1 | <?php |
||
12 | class Paths extends AbstractModel implements Arrayable, \Iterator { |
||
13 | |||
14 | use ExtensionPart; |
||
15 | |||
16 | /** @var Map */ |
||
17 | private $paths; |
||
18 | |||
19 | 11 | public function __construct($contents = []) { |
|
22 | |||
23 | 11 | private function parse($contents) { |
|
37 | |||
38 | 9 | public function toArray() { |
|
41 | |||
42 | 9 | public function size() { |
|
45 | 1 | ||
46 | 1 | /** |
|
47 | * Returns whether a path with the given name exists |
||
48 | * |
||
49 | * @param string $path |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function has($path) { |
||
55 | 1 | ||
56 | 1 | /** |
|
57 | * Returns whether the given path exists |
||
58 | * |
||
59 | * @param Path $path |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function contains(Path $path) { |
||
65 | 1 | ||
66 | 1 | /** |
|
67 | * Returns the path info for the given path |
||
68 | * |
||
69 | * @param string $path |
||
70 | * @return Path |
||
71 | */ |
||
72 | public function get($path) { |
||
78 | |||
79 | 2 | /** |
|
80 | * Sets the path |
||
81 | * |
||
82 | * @param Path $path |
||
83 | * @return $this |
||
84 | */ |
||
85 | public function add(Path $path) { |
||
89 | 1 | ||
90 | 1 | /** |
|
91 | * Adds all operations from another paths collection. Will overwrite existing operations. |
||
92 | * |
||
93 | * @param Paths $paths |
||
94 | */ |
||
95 | public function addAll(Paths $paths) { |
||
103 | |||
104 | /** |
||
105 | * Removes the given path |
||
106 | * |
||
107 | * @param string $path |
||
108 | */ |
||
109 | public function remove($path) { |
||
113 | 1 | ||
114 | 1 | public function current() { |
|
117 | |||
118 | public function key() { |
||
121 | |||
122 | public function next() { |
||
125 | |||
126 | public function rewind() { |
||
129 | |||
130 | public function valid() { |
||
133 | } |
||
134 |