SlaxWeb Framework
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
SlaxWeb\Config\PhpHandler Class Reference
Inheritance diagram for SlaxWeb\Config\PhpHandler:
Inheritance graph
[legend]
Collaboration diagram for SlaxWeb\Config\PhpHandler:
Collaboration graph
[legend]

Public Member Functions

 load (string $config, bool $prependResourceName=false)
 
- Public Member Functions inherited from SlaxWeb\Config\Handler
 __construct (array $resDir)
 
 load (string $config, bool $prependResourceName=false)
 
 set (string $key, $value)
 
 get (string $key)
 
 remove (string $key)
 
 exists (string $key)
 
 prependResourceName (array $loadedConfig, string $resName)
 
 addResDir (string $dir)
 
 addResDirs (array $dirs)
 

Additional Inherited Members

- Public Attributes inherited from SlaxWeb\Config\Handler
const CONFIG_LOADED = 100
 
const CONFIG_RESOURCE_NOT_FOUND = 101
 
const CONFIG_PARSE_ERROR = 102
 
- Protected Member Functions inherited from SlaxWeb\Config\Handler
 _getAbsPath (string $resName)
 
- Protected Attributes inherited from SlaxWeb\Config\Handler
 $_configValues = []
 
 $_resDir = []
 

Member Function Documentation

SlaxWeb\Config\PhpHandler::load ( string  $config,
bool  $prependResourceName = false 
)

Load the Config File

Check if the file exists, load it, and parse the containing array into the the internal container array. Return 'CONFIG_LOADED' constant on success. If the file is not found, return 'CONFIG_RESOURCE_NOT_FOUND' constant, and 'CONFIG_PARSE_ERROR' if the contants could not have been parsed.

Parameters
string$configPath to the config resource
bool$prependResourceNameIf the resource name should be prepended to each config key
Returns
int

The documentation for this class was generated from the following file: