1 | <?php |
||
32 | trait FilesystemAwareTrait |
||
33 | { |
||
34 | /** |
||
35 | * @var FilesystemInterface |
||
36 | * @access protected |
||
37 | */ |
||
38 | protected $filesystem; |
||
39 | |||
40 | /** |
||
41 | * {@inheritDoc} |
||
42 | */ |
||
43 | public function setFilesystem(FilesystemInterface $filesystem) |
||
48 | |||
49 | /** |
||
50 | * {@inheritDoc} |
||
51 | */ |
||
52 | public function getFilesystem()/*# : FilesystemInterface */ |
||
56 | |||
57 | /** |
||
58 | * Check filesystem readable or not |
||
59 | * |
||
60 | * @return bool |
||
61 | * @access protected |
||
62 | */ |
||
63 | protected function isFilesystemReadable()/*# : bool */ |
||
74 | |||
75 | /** |
||
76 | * Check filesystem writable or not |
||
77 | * |
||
78 | * @return bool |
||
79 | * @access protected |
||
80 | */ |
||
81 | protected function isFilesystemWritable()/*# : bool */ |
||
92 | |||
93 | /** |
||
94 | * Check filesystem file deletable or not |
||
95 | * |
||
96 | * @return bool |
||
97 | * @access protected |
||
98 | */ |
||
99 | protected function isFilesystemDeletable()/*# : bool */ |
||
110 | |||
111 | abstract public function setError( |
||
115 | } |
||
116 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: