| 
| 
  | $_configValues = [] | 
|   | 
| 
  | $_resDir = [] | 
|   | 
      
        
          | SlaxWeb\Config\Handler::__construct  | 
          ( | 
          array  | 
          $resDir | ) | 
           | 
        
      
 
Handler constructor
Stores the resource location to the local protected property for later use.
- Parameters
 - 
  
    | array | $resDir | Configuration resource locations  | 
  
   
 
 
  
  
      
        
          | SlaxWeb\Config\Handler::_getAbsPath  | 
          ( | 
          string  | 
          $resName | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Get resource absolute path
Iterate the Resource Location array and return the absolute path of the resource. Return empty string if resource does not exist in any of the directories.
- Parameters
 - 
  
    | string | $resName | Name of the resource  | 
  
   
- Returns
 - string 
 
 
 
      
        
          | SlaxWeb\Config\Handler::addResDir  | 
          ( | 
          string  | 
          $dir | ) | 
           | 
        
      
 
Add Resource Location
Add an additional configuration resource location.
- Parameters
 - 
  
    | string | $dir | Additional resource location  | 
  
   
- Returns
 - void 
 
 
 
      
        
          | SlaxWeb\Config\Handler::addResDirs  | 
          ( | 
          array  | 
          $dirs | ) | 
           | 
        
      
 
Add Resource Locations
Add additional configuration resource locations.
- Parameters
 - 
  
    | array | $dirs | Additional resource locations  | 
  
   
- Returns
 - void 
 
 
 
      
        
          | SlaxWeb\Config\Handler::exists  | 
          ( | 
          string  | 
          $key | ) | 
           | 
        
      
 
Check config item exists
If the config item does not exist, returns false, true otherwise.
- Parameters
 - 
  
    | string | $key | Config item key  | 
  
   
- Returns
 - bool 
 
 
 
      
        
          | SlaxWeb\Config\Handler::get  | 
          ( | 
          string  | 
          $key | ) | 
           | 
        
      
 
Get config item
Get a config item from the internal config container. On a missing key, return null.
- Parameters
 - 
  
    | string | $key | Config item key  | 
  
   
- Returns
 - mixed 
 
 
 
  
  
      
        
          | SlaxWeb\Config\Handler::load  | 
          ( | 
          string  | 
          $config,  | 
         
        
           | 
           | 
          bool  | 
          $prependResourceName = false  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
abstract   | 
  
 
Load the config
Require the config resource, or load its contents, depending on type of handler that extends this abstract class.
- Parameters
 - 
  
    | string | $config | Name of the config resource  | 
    | bool | $prependResourceName | If the resource name should be prepended to each config key  | 
  
   
- Returns
 - int 
 
 
 
      
        
          | SlaxWeb\Config\Handler::prependResourceName  | 
          ( | 
          array  | 
          $loadedConfig,  | 
        
        
           | 
           | 
          string  | 
          $resName  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Prepend resource name to keys
Prepends the resource name to the keys defined in loaded configuration array.
- Parameters
 - 
  
    | array | $loadedConfig | The loaded config  | 
    | string | $resName | Resource name, that is prepended to the keys  | 
  
   
- Returns
 - array Loaded config with keys prepended by resource name 
 
 
 
      
        
          | SlaxWeb\Config\Handler::remove  | 
          ( | 
          string  | 
          $key | ) | 
           | 
        
      
 
Remove config item
Check if an item with provided key exists, and remove it.
- Parameters
 - 
  
    | string | $key | Config item key  | 
  
   
- Returns
 - bool 
 
 
 
      
        
          | SlaxWeb\Config\Handler::set  | 
          ( | 
          string  | 
          $key,  | 
        
        
           | 
           | 
            | 
          $value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set config item
Set a new config item, ro overwrite an existing item.
- Parameters
 - 
  
    | string | $key | Config item key  | 
    | mixed | $value | Config item value  | 
  
   
- Returns
 - bool 
 
 
 
      
        
          | const SlaxWeb\Config\Handler::CONFIG_LOADED = 100 | 
        
      
 
Config was loaded and parsed successfuly 
 
 
      
        
          | const SlaxWeb\Config\Handler::CONFIG_PARSE_ERROR = 102 | 
        
      
 
Config resource was found, but an error occured while parsing 
 
 
      
        
          | const SlaxWeb\Config\Handler::CONFIG_RESOURCE_NOT_FOUND = 101 | 
        
      
 
Config resource could not be found 
 
 
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/config/src/Handler.php