Get settings file. File should be a PHP file returning an array of key / value pairs. Key is the variable to be set in the class to the value provided.
Abstract
| Methods |
public __call(string $name, array $args) : ?string
|
| public __construct(string $serverName = '') |
| public __get(string $field) : ?mixed Allows for $object->field syntax Unset fields will return null |
| public __set(string $field, ?mixed $value) : void Allows for $object->field = $x syntax |
| public addFields(array $fields) : static Add fields
|
| public empty() : bool |
public getFields() : array
|
| public getLoadedFileName() : string |
| public optional(string $key) : ?mixed |
| public save() : bool |
| public setFields(array $fields) : static Set the fields
|
| Properties |
| private string $fileName = 'NOT FOUND' |
| private string $serverName |
private array $settings = []
|
| Methods |
| private getFileName(string $fileName) : string |
| private load() : void Load settings file from config directory in project root. The following is the file search order:
|
private loadFile(string $configName) : array
|