1 | <?php |
||
13 | abstract class AbstractSection |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var Parameter[] |
||
18 | */ |
||
19 | protected $parameters = []; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $magicComments = []; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * @return string the type of section |
||
29 | */ |
||
30 | abstract public function getType(); |
||
31 | |||
32 | |||
33 | /** |
||
34 | * @param Parameter $parameter |
||
35 | * |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function addParameter(Parameter $parameter) |
||
44 | |||
45 | |||
46 | /** |
||
47 | * @param string $name |
||
48 | * |
||
49 | * @return bool whether the specified parameter exists |
||
50 | */ |
||
51 | public function hasParameter($name) |
||
55 | |||
56 | |||
57 | /** |
||
58 | * @param string $name |
||
59 | * |
||
60 | * @return Parameter|null the parameter matching the specified name, or null if not found |
||
61 | */ |
||
62 | public function getParameterByName($name) |
||
72 | |||
73 | |||
74 | /** |
||
75 | * @return Parameter[] |
||
76 | */ |
||
77 | public function getParameters() |
||
81 | |||
82 | |||
83 | /** |
||
84 | * @param string $name |
||
85 | * |
||
86 | * @return Parameter[] all parameters matching the specified nameF |
||
87 | */ |
||
88 | public function getParametersByName($name) |
||
100 | |||
101 | |||
102 | /** |
||
103 | * @return array |
||
104 | */ |
||
105 | public function getMagicComments() |
||
109 | |||
110 | |||
111 | /** |
||
112 | * @param string $comment |
||
113 | */ |
||
114 | public function addMagicComment($comment) |
||
118 | |||
119 | } |
||
120 |