1 | <?php |
||
10 | class Parameters implements Arrayable { |
||
11 | |||
12 | use RefPart; |
||
13 | |||
14 | /** @var ArrayList */ |
||
15 | private $parameters; |
||
16 | |||
17 | 11 | public function __construct($contents = null) { |
|
20 | |||
21 | 11 | private function parse($contents) { |
|
33 | |||
34 | 7 | public function toArray() { |
|
41 | |||
42 | 1 | public function size() { |
|
45 | |||
46 | /** |
||
47 | * Searches whether a parameter with the given name exists |
||
48 | * |
||
49 | * @param string $name |
||
50 | * @return boolean |
||
51 | */ |
||
52 | public function searchByName($name) { |
||
57 | |||
58 | /** |
||
59 | * Returns parameter with the given name if it exists |
||
60 | * |
||
61 | * @param string $name |
||
62 | * @return Parameter|void |
||
63 | */ |
||
64 | 11 | public function findByName($name) { |
|
71 | |||
72 | /** |
||
73 | * Searches for the parameter with the given name. Creates a parameter with the given name |
||
74 | * if none exists |
||
75 | * |
||
76 | * @param string $name |
||
77 | * @return Parameter |
||
78 | */ |
||
79 | public function getByName($name) { |
||
89 | |||
90 | /** |
||
91 | * Adds a parameter |
||
92 | * |
||
93 | * @param Parameter $param |
||
94 | */ |
||
95 | 1 | public function add(Parameter $param) { |
|
98 | |||
99 | /** |
||
100 | * Removes a parameter |
||
101 | * |
||
102 | * @param Parameter $param |
||
103 | */ |
||
104 | 1 | public function remove(Parameter $param) { |
|
107 | |||
108 | /** |
||
109 | * Returns whether a given parameter exists |
||
110 | * |
||
111 | * @param Parameter $param |
||
112 | * @return boolean |
||
113 | */ |
||
114 | 1 | public function contains(Parameter $param) { |
|
117 | } |
||
118 |