| 1 | <?php |
||
| 8 | class DiskSpaceHealthIndicatorProperties |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * One MB in bytes. |
||
| 12 | */ |
||
| 13 | const MEGABYTES = 1048576; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Default threshold - 10MB. |
||
| 17 | */ |
||
| 18 | const DEFAULT_THRESHOLD = 10485760; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Path used to compute the available disk space. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $directory = '.'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Minimum disk space that should be available, in bytes. |
||
| 29 | * |
||
| 30 | * @var int |
||
| 31 | */ |
||
| 32 | private $threshold = self::DEFAULT_THRESHOLD; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public function getDirectory() |
||
| 41 | 9 | ||
| 42 | /** |
||
| 43 | * @param string $directory |
||
| 44 | */ |
||
| 45 | public function setDirectory($directory) |
||
| 51 | 9 | ||
| 52 | 9 | /** |
|
| 53 | * @return int |
||
| 54 | */ |
||
| 55 | public function getThreshold() |
||
| 59 | 9 | ||
| 60 | /** |
||
| 61 | * @param int $threshold |
||
| 62 | */ |
||
| 63 | public function setThreshold($threshold) |
||
| 68 | } |
||
| 69 |