1 | <?php |
||
9 | class Path extends AbstractModel implements Arrayable { |
||
10 | |||
11 | use ExtensionPart; |
||
12 | |||
13 | private $operations; |
||
14 | |||
15 | /** @var string */ |
||
16 | private $path; |
||
17 | |||
18 | 8 | public function __construct($path, $contents = []) { |
|
23 | |||
24 | 8 | private function parse($contents) { |
|
36 | |||
37 | 6 | public function toArray() { |
|
40 | |||
41 | /** |
||
42 | * Returns this path |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | 1 | public function getPath() { |
|
49 | |||
50 | /** |
||
51 | * Gets the operation for the given method, creates one if none exists |
||
52 | * |
||
53 | * @param string $method |
||
54 | * @return Operation |
||
55 | */ |
||
56 | 2 | public function getOperation($method) { |
|
63 | |||
64 | /** |
||
65 | * |
||
66 | * @param string $method |
||
67 | * @return boolean |
||
68 | */ |
||
69 | public function hasOperation($method) { |
||
72 | |||
73 | /** |
||
74 | * Removes an operation for the given method |
||
75 | * |
||
76 | * @param string $method |
||
77 | */ |
||
78 | public function removeOperation($method) { |
||
81 | |||
82 | } |