1 | <?php |
||
10 | class Path extends AbstractModel implements Arrayable |
||
11 | { |
||
12 | use ExtensionPart; |
||
13 | |||
14 | private $operations; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $path; |
||
18 | |||
19 | 8 | public function __construct($path, $contents = []) |
|
25 | |||
26 | 8 | private function parse($contents) |
|
39 | |||
40 | 6 | public function toArray() |
|
44 | |||
45 | /** |
||
46 | * Returns this path. |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 1 | public function getPath() |
|
54 | |||
55 | /** |
||
56 | * Gets the operation for the given method, creates one if none exists. |
||
57 | * |
||
58 | * @param string $method |
||
59 | * |
||
60 | * @return Operation |
||
61 | */ |
||
62 | 6 | public function getOperation($method) |
|
70 | |||
71 | /** |
||
72 | * @param string $method |
||
73 | * |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function hasOperation($method) |
||
80 | |||
81 | /** |
||
82 | * Removes an operation for the given method. |
||
83 | * |
||
84 | * @param string $method |
||
85 | */ |
||
86 | public function removeOperation($method) |
||
90 | } |
||
91 |