| 1 | <?php |
||
| 4 | class Config { |
||
| 5 | /** |
||
| 6 | * Configuration type. |
||
| 7 | * |
||
| 8 | * @var ConfigType |
||
| 9 | */ |
||
| 10 | public $type; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * App entry file. |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | public $file; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * App url. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | public $url; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * App path. |
||
| 28 | * |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | public $path; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * App slug. |
||
| 35 | * |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | public $slug; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * App basename. |
||
| 42 | * |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | public $basename; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Loaded configuration files. |
||
| 49 | * |
||
| 50 | * @var array |
||
| 51 | */ |
||
| 52 | private $loaded = array(); |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Config constructor. |
||
| 56 | * |
||
| 57 | * @param string $type |
||
| 58 | * @param string $file |
||
| 59 | */ |
||
| 60 | public function __construct( $type, $file ) { |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Load a configuration JSON file from the config folder. |
||
| 81 | * |
||
| 82 | * @param string $filename |
||
| 83 | * |
||
| 84 | * @return array|null |
||
| 85 | */ |
||
| 86 | public function get_config_json( $filename ) { |
||
| 99 | } |
||
| 100 |