1 | <?php namespace BestServedCold\PhalueObjects; |
||
3 | class File extends ValueObject |
||
4 | { |
||
5 | protected $checkExists = true; |
||
6 | protected $timeout; |
||
7 | protected $mustExist; |
||
8 | |||
9 | 1 | public function __construct($value, $mustExist = true, $timeout = 10) |
|
15 | |||
16 | /** |
||
17 | * @return bool |
||
18 | */ |
||
19 | public function exists() |
||
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | public function getContents() |
||
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getExtension() |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getDirectoryName() |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getFileName() |
||
57 | |||
58 | /** |
||
59 | * @param string $string |
||
60 | * @return static |
||
61 | */ |
||
62 | public static function fromString($string) |
||
66 | } |
||
67 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.