PHP Class ScriptFUSION\Porter\Options\EncapsulatedOptions

Show file Open project: ScriptFUSION/Porter Class Usage Examples

Public Methods

Method Description
copy ( ) : array Creates a copy of the encapsulated options.

Protected Methods

Method Description
get ( string $option ) : mixed Gets the value for the specified option name. Returns the specified default value if option name is not set.
getReference ( string $option ) : mixed Gets a pointer to the specified option name.
set ( string $option, mixed $value ) Sets the specified option name to the specified value.
setDefaults ( array $defaults ) Sets the default values for the specified map of keys and values.

Method Details

copy() final public method

Creates a copy of the encapsulated options.
final public copy ( ) : array
return array Options.

get() final protected method

Gets the value for the specified option name. Returns the specified default value if option name is not set.
final protected get ( string $option ) : mixed
$option string Option name.
return mixed Option value or default value.

getReference() final protected method

Gets a pointer to the specified option name.
final protected getReference ( string $option ) : mixed
$option string Option name.
return mixed

set() final protected method

Sets the specified option name to the specified value.
final protected set ( string $option, mixed $value )
$option string Option name.
$value mixed Value.

setDefaults() final protected method

Sets the default values for the specified map of keys and values.
final protected setDefaults ( array $defaults )
$defaults array Map of keys and default values.