| 1 | <?php |
||
| 7 | class Node implements NodeInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string[] |
||
| 11 | */ |
||
| 12 | private $path; |
||
| 13 | /** |
||
| 14 | * @var mixed |
||
| 15 | */ |
||
| 16 | private $value; |
||
| 17 | /** |
||
| 18 | * @var bool |
||
| 19 | */ |
||
| 20 | private $readable; |
||
| 21 | /** |
||
| 22 | * @var bool |
||
| 23 | */ |
||
| 24 | private $writable; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string[] $path |
||
| 28 | * @param mixed $value |
||
| 29 | * @param bool $readable |
||
| 30 | * @param bool $writable |
||
| 31 | * |
||
| 32 | * @SuppressWarnings(PHPMD.BooleanArgumentFlag) |
||
| 33 | */ |
||
| 34 | 30 | public function __construct( |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @return string[] |
||
| 48 | */ |
||
| 49 | 13 | public function getPath() |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @inheritDoc |
||
| 56 | */ |
||
| 57 | 1 | public function getKey() |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @return mixed |
||
| 64 | */ |
||
| 65 | 30 | public function &getValue() |
|
| 69 | |||
| 70 | /** |
||
| 71 | * @return bool |
||
| 72 | */ |
||
| 73 | 23 | public function isReadable() |
|
| 77 | |||
| 78 | /** |
||
| 79 | * @return bool |
||
| 80 | */ |
||
| 81 | 23 | public function isWritable() |
|
| 85 | |||
| 86 | /** |
||
| 87 | * @param NodeInterface $node |
||
| 88 | * @param string[] $path |
||
| 89 | * @return Node |
||
| 90 | */ |
||
| 91 | 13 | public static function withPath(NodeInterface $node, array $path) |
|
| 100 | } |
||
| 101 |