1 | <?php |
||
21 | trait Properties |
||
22 | { |
||
23 | /** |
||
24 | * @param mixed $name |
||
25 | * @return mixed |
||
26 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
27 | * @throws \Railt\Io\Exception\ExternalFileException |
||
28 | * @throws \Railt\Io\Exception\NotReadableException |
||
29 | */ |
||
30 | public function __get($name) |
||
43 | |||
44 | /** |
||
45 | * @param mixed $name |
||
46 | * @param mixed $value |
||
47 | * @return mixed |
||
48 | * @throws AccessDeniedException |
||
49 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
50 | * @throws \Railt\Io\Exception\NotReadableException |
||
51 | */ |
||
52 | public function __set($name, $value) |
||
71 | |||
72 | /** |
||
73 | * @param string|ExternalFileException $exception |
||
74 | * @param string $message |
||
75 | * @return AccessDeniedException |
||
76 | * @throws \Railt\Io\Exception\NotReadableException |
||
77 | */ |
||
78 | private function propertyAccessException(string $exception, string $message): AccessDeniedException |
||
84 | |||
85 | /** |
||
86 | * @param mixed $name |
||
87 | * @return bool |
||
88 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
89 | */ |
||
90 | public function __isset($name) |
||
96 | |||
97 | /** |
||
98 | * @param mixed $name |
||
99 | * @return bool |
||
100 | * @throws AccessDeniedException |
||
101 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
102 | * @throws \Railt\Io\Exception\NotReadableException |
||
103 | */ |
||
104 | public function __unset($name) |
||
119 | } |
||
120 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.