| 1 | <?php |
||
| 16 | abstract class ConfigAbstract |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | public $settings; |
||
| 22 | |||
| 23 | public $allowable; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * |
||
| 27 | * |
||
| 28 | * ConfigAbstract constructor. |
||
| 29 | * @param array $settings |
||
| 30 | */ |
||
| 31 | public function __construct($settings = []) |
||
| 35 | |||
| 36 | public function implementAllowable() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * All classes need to setup some kind of configuration data. |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | abstract public function setup(); |
||
| 48 | |||
| 49 | |||
| 50 | /** |
||
| 51 | * First we set the value stored in the database. If there is no value, we go to what is in the config/env files. |
||
| 52 | * |
||
| 53 | * @param string $location |
||
| 54 | * @param mixed $default |
||
| 55 | */ |
||
| 56 | public function setConfigValues(string $location, $default = null) |
||
| 61 | } |