PHP Class Scalr\System\Config\Extension

This class helps to define default values of the config parameters.
Since: 11.06.2013
Author: Vitaliy Demidov ([email protected])
Inheritance: implements IteratorAggregat\IteratorAggregate
Show file Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$paths array Array of defined parameter bags

Public Methods

Method Description
__invoke ( $parameter )
defined ( string $name ) : boolean Checks whether scalar node is defined
getIterator ( )
getParameter ( string $name ) : object Gets parameter with dot notation key
load ( ) : Extension Loads config defaults
node ( string $name, mixed $defaultValue = null ) : Extension Appends new scalar or scalarArray node to Extension
setParameter ( string $name, object $value ) Sets parameter with specified name
sub ( string $name, boolean $required = true ) : Extension Defines subset

Method Details

__invoke() public method

public __invoke ( $parameter )

defined() public method

Checks whether scalar node is defined
public defined ( string $name ) : boolean
$name string Dot notation key
return boolean Returns true if config node is defined

getIterator() public method

See also: IteratorAggregate::getIterator()
public getIterator ( )

getParameter() public method

Gets parameter with dot notation key
public getParameter ( string $name ) : object
$name string Dot notaion key
return object

load() public method

It's supposed to load all external Extension from here.
public load ( ) : Extension
return Extension

node() public method

Appends new scalar or scalarArray node to Extension
public node ( string $name, mixed $defaultValue = null ) : Extension
$name string Dot notaion name.
$defaultValue mixed optional Default value for the parameter.
return Extension

setParameter() public method

Sets parameter with specified name
public setParameter ( string $name, object $value )
$name string
$value object

sub() public method

Defines subset
public sub ( string $name, boolean $required = true ) : Extension
$name string Parameter bag name
$required boolean optional Whether this bag is required.
return Extension

Property Details

$paths public property

Array of defined parameter bags
public array $paths
return array