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

Public Member Functions

 __construct (Handler $handler)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 load (string $resourceName, bool $prependResourceName=false)
 
 addResDir (string $dir)
 

Public Attributes

const PHP_CONFIG_HANDLER = "php"
 
const XML_CONFIG_HANDLER = "xml"
 
const YAML_CONFIG_HANDLER = "yaml"
 

Protected Attributes

 $_handler = null
 

Constructor & Destructor Documentation

SlaxWeb\Config\Container::__construct ( Handler  $handler)

Class constructor

Set the injected config handler to the internal protected property.

Parameters
\SlaxWeb\Config\Handler$handlerConfiguration handler

Member Function Documentation

SlaxWeb\Config\Container::addResDir ( string  $dir)

Add Resource Location

Add an additional configuration resource location.

Parameters
string$dirAdditional resource location
Returns
void
SlaxWeb\Config\Container::load ( string  $resourceName,
bool  $prependResourceName = false 
)

Load config resource

Combine the received configuration resource name with the '_configLocation' protected property, and pass it to the config handler.

Parameters
string$resourceNameName of the configuration resource
bool$prependResourceNameIf the resource name should be prepended to each config key
Returns
void
SlaxWeb\Config\Container::offsetExists (   $offset)

Check offset exists

Check in the handler that the offset exists, and return true if it does, false otherwise.

Parameters
string$offsetConfiguration key name
Returns
bool
SlaxWeb\Config\Container::offsetGet (   $offset)

Get offset value

Get the value from the handler for the passed in offset. Return the value provided by the handler.

Parameters
string$offsetConfiguration key name
Returns
mixed
SlaxWeb\Config\Container::offsetSet (   $offset,
  $value 
)

Set offset value

Set the value to the handler for the passed in offset and value.

Parameters
string$offsetConfiguration key name
mixed$valueConfiguration value
Returns
void
SlaxWeb\Config\Container::offsetUnset (   $offset)

Unset offset

Unset the configuration item with the offset key.

Parameters
string$offsetConfiguration key name
Returns
void

Member Data Documentation

const SlaxWeb\Config\Container::PHP_CONFIG_HANDLER = "php"

Config handler constants


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