| 1 | <?php |
||
| 7 | trait GetOptionTrait |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | protected $options = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Get an option value |
||
| 16 | * |
||
| 17 | * @param string $name |
||
| 18 | * @param mixed $default |
||
| 19 | * |
||
| 20 | * @return mixed |
||
| 21 | */ |
||
| 22 | 65 | protected function getOption($name, $default) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $name |
||
| 29 | * |
||
| 30 | * @return mixed |
||
| 31 | * @throws InvalidArgumentException |
||
| 32 | */ |
||
| 33 | 15 | protected function requireOption($name) |
|
| 40 | } |
||
| 41 |