Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Classes;
- class FileSize
- {
- private $bytes;
- public function __construct($bytes)
- {
- $this->bytes = $bytes;
- }
- public function getKiloBytes()
- {
- return $this->bytes / 1024;
- }
- public function getMegabytes()
- {
- return $this->getKiloBytes() / 1024;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement