| 1 | <?php |
||
| 13 | class Config { |
||
| 14 | /** |
||
| 15 | * Configuration type. |
||
| 16 | * |
||
| 17 | * @var ConfigType |
||
| 18 | */ |
||
| 19 | public $type; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * App entry file. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | public $file; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * App url. |
||
| 30 | * |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | public $url; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * App path. |
||
| 37 | * |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | public $path; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * App slug. |
||
| 44 | * |
||
| 45 | * @var string |
||
| 46 | */ |
||
| 47 | public $slug; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * App basename. |
||
| 51 | * |
||
| 52 | * @var string |
||
| 53 | */ |
||
| 54 | public $basename; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Loaded configuration files. |
||
| 58 | * |
||
| 59 | * @var array |
||
| 60 | */ |
||
| 61 | private $loaded = array(); |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Config constructor. |
||
| 65 | * |
||
| 66 | * @param string $type |
||
| 67 | * @param string $file |
||
| 68 | */ |
||
| 69 | 27 | public function __construct( $type, $file ) { |
|
| 87 | |||
| 88 | /** |
||
| 89 | * Load a configuration JSON file from the config folder. |
||
| 90 | * |
||
| 91 | * @param string $filename |
||
| 92 | * |
||
| 93 | * @return array|null |
||
| 94 | */ |
||
| 95 | public function get_config_json( $filename ) { |
||
| 108 | } |
||
| 109 |