1 | <?php |
||
5 | class Path implements PathInterface |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | protected $path; |
||
11 | |||
12 | /** |
||
13 | * @param null|string $path |
||
14 | */ |
||
15 | public function __construct($path = null) |
||
21 | |||
22 | /** |
||
23 | * @param string $path |
||
24 | * @return $this |
||
25 | * @throws PathNotFoundException |
||
26 | */ |
||
27 | public function setPath($path) |
||
36 | |||
37 | /** |
||
38 | * @return string |
||
39 | */ |
||
40 | public function getPath() |
||
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | public function __toString() |
||
52 | } |
||
53 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: