SHARE
TWEET

Untitled

a guest Feb 14th, 2020 69 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top