1 | <?php |
||
7 | class ParameterArrayConstructor |
||
8 | { |
||
9 | public function __construct($params) |
||
20 | |||
21 | /** |
||
22 | * Require that a specific parameter key exists (and optionally has a |
||
23 | * particular class as one of its parents) |
||
24 | * |
||
25 | * @param mixed[string] $params |
||
1 ignored issue
–
show
|
|||
26 | * @param string $key |
||
27 | * @param string|false $class (Optional, defaults to `FALSE`) name of class |
||
28 | * to require as a parent |
||
29 | * @return void |
||
30 | * @throws Exception If the required parameter is not set (or does not |
||
31 | * have the correct parent class, if `$class` is specified) |
||
32 | */ |
||
33 | protected static function requireParameter($params, $key, $class = false) |
||
48 | |||
49 | /** |
||
50 | * Set a parameter to a default value if it is not set |
||
51 | * |
||
52 | * @param mixed[string] $params |
||
1 ignored issue
–
show
|
|||
53 | * @param string $key |
||
54 | * @param mixed $value |
||
55 | * @param string|false $class |
||
56 | * @return void |
||
57 | */ |
||
58 | protected static function defaultParameter(&$params, $key, $value, $class = false) |
||
66 | |||
67 | /** |
||
68 | * Force a boolean result from a particular parameter key |
||
69 | * |
||
70 | * @param mixed[string] $params |
||
1 ignored issue
–
show
|
|||
71 | * @param string $key [description] |
||
72 | * @return boolean `TRUE` iff `$params[$key]` exists and has a true value |
||
73 | * (`1`, `'yes'`, `'true'`, `true`, etc.), `FALSE` |
||
74 | * otherwise. |
||
75 | */ |
||
76 | protected static function forceBooleanParameter($params, $key) |
||
80 | |||
81 | protected static function consumeParameters($params, $consumedParams) |
||
85 | |||
86 | public function __call($method, $arguments) |
||
105 | } |
||
106 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.