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