Guest User

Untitled

a guest
Feb 14th, 2020
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  
  4. namespace App\Classes;
  5.  
  6.  
  7. class FileSize
  8. {
  9. private $bytes;
  10.  
  11. public function __construct($bytes)
  12. {
  13. $this->bytes = $bytes;
  14. }
  15.  
  16. public function getKiloBytes()
  17. {
  18. return $this->bytes / 1024;
  19. }
  20.  
  21. public function getMegabytes()
  22. {
  23. return $this->getKiloBytes() / 1024;
  24. }
  25. }
RAW Paste Data