| 1 | <?php |
||
| 15 | trait Configurable |
||
| 16 | { |
||
| 17 | /* ----------------------------------------------------------------- |
||
| 18 | | Properties |
||
| 19 | | ----------------------------------------------------------------- |
||
| 20 | */ |
||
| 21 | |||
| 22 | /** @var array */ |
||
| 23 | protected $configs = []; |
||
| 24 | |||
| 25 | /* ----------------------------------------------------------------- |
||
| 26 | | Getters & Setters |
||
| 27 | | ----------------------------------------------------------------- |
||
| 28 | */ |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Set the configs. |
||
| 32 | * |
||
| 33 | * @param array $configs |
||
| 34 | * |
||
| 35 | * @return $this |
||
| 36 | */ |
||
| 37 | 798 | protected function setConfigs(array $configs) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $name |
||
| 46 | * @param mixed|null $default |
||
| 47 | * |
||
| 48 | * @return mixed |
||
| 49 | */ |
||
| 50 | 768 | public function getConfig($name, $default = null) |
|
| 54 | } |
||
| 55 |