| 1 | <?php | ||
| 13 | abstract class AbstractSection | ||
| 14 | { | ||
| 15 | |||
| 16 | /** | ||
| 17 | * @var Parameter[] | ||
| 18 | */ | ||
| 19 | protected $parameters = []; | ||
| 20 | |||
| 21 | |||
| 22 | /** | ||
| 23 | * @return string the type of section | ||
| 24 | */ | ||
| 25 | abstract public function getType(); | ||
| 26 | |||
| 27 | |||
| 28 | /** | ||
| 29 | * @param Parameter $parameter | ||
| 30 | * | ||
| 31 | * @return $this | ||
| 32 | */ | ||
| 33 | public function addParameter(Parameter $parameter) | ||
| 39 | |||
| 40 | |||
| 41 | /** | ||
| 42 | * @param string $name | ||
| 43 | * | ||
| 44 | * @return bool whether the specified parameter exists | ||
| 45 | */ | ||
| 46 | public function hasParameter($name) | ||
| 50 | |||
| 51 | |||
| 52 | /** | ||
| 53 | * @param string $name | ||
| 54 | * | ||
| 55 | * @return Parameter|null the parameter matching the specified name, or null if not found | ||
| 56 | */ | ||
| 57 | public function getParameterByName($name) | ||
| 67 | |||
| 68 | |||
| 69 | /** | ||
| 70 | * @return Parameter[] | ||
| 71 | */ | ||
| 72 | public function getParameters() | ||
| 76 | |||
| 77 | |||
| 78 | /** | ||
| 79 | * @param string $name | ||
| 80 | * | ||
| 81 | * @return Parameter[] all parameters matching the specified nameF | ||
| 82 | */ | ||
| 83 | public function getParametersByName($name) | ||
| 95 | |||
| 96 | } | ||
| 97 |