PHP Class Nelmio\Alice\ParameterBag

Inheritance: implements IteratorAggregate, implements Countable
Show file Open project: nelmio/alice Class Usage Examples

Public Methods

Method Description
__construct ( array $parameters = [] )
count ( )
get ( string $key ) : mixed
getIterator ( )
has ( string $key ) : boolean
toArray ( ) : array
with ( Parameter $parameter ) : self Returns a new instance which will include the passed parameter. If a parameter with that key already exist, it WILL NOT be overridden.
without ( string $key ) : self

Method Details

__construct() public method

public __construct ( array $parameters = [] )
$parameters array Keys/values pair of parameters

count() public method

public count ( )

get() public method

public get ( string $key ) : mixed
$key string
return mixed

getIterator() public method

public getIterator ( )

has() public method

public has ( string $key ) : boolean
$key string
return boolean

toArray() public method

public toArray ( ) : array
return array

with() public method

Returns a new instance which will include the passed parameter. If a parameter with that key already exist, it WILL NOT be overridden.
public with ( Parameter $parameter ) : self
$parameter Parameter
return self

without() public method

public without ( string $key ) : self
$key string
return self