1 | <?php |
||
14 | trait ParametersTrait |
||
15 | { |
||
16 | /** |
||
17 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
18 | */ |
||
19 | protected $parameters = []; |
||
20 | |||
21 | /** |
||
22 | * Initialize options collection. |
||
23 | */ |
||
24 | protected function initializeParameters() |
||
30 | |||
31 | /** |
||
32 | * Has parameter. |
||
33 | * |
||
34 | * @param string $parameter |
||
35 | * |
||
36 | * @return bool |
||
37 | */ |
||
38 | public function hasParameter($parameter) |
||
44 | |||
45 | /** |
||
46 | * Get parameter. |
||
47 | * |
||
48 | * @param string $parameter |
||
49 | * @param mixed $default |
||
50 | * |
||
51 | * @return mixed |
||
52 | */ |
||
53 | public function getParameter($parameter, $default = null) |
||
59 | |||
60 | /** |
||
61 | * Get parameters. |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | public function getParameters() |
||
71 | |||
72 | /** |
||
73 | * Set parameters. |
||
74 | * |
||
75 | * @param array $parameters |
||
76 | * |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function setParameters($parameters) |
||
93 | |||
94 | /** |
||
95 | * Set parameter. |
||
96 | * |
||
97 | * @param string $parameter |
||
98 | * @param mixed $value |
||
99 | * |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setParameter($parameter, $value) |
||
110 | } |
||
111 |