PHP Class mpyw\Co\Internal\CoOption

Inheritance: implements ArrayAccess
Mostra file Open project: mpyw/co Class Usage Examples

Public Methods

Method Description
__construct ( array $options = [] ) Constructor.
getDefault ( ) : array Get default options.
offsetExists ( mixed $offset ) : boolean Implemention of ArrayAccess.
offsetGet ( mixed $offset ) : mixed Implemention of ArrayAccess.
offsetSet ( mixed $offset, mixed $value ) Implemention of ArrayAccess.
offsetUnset ( mixed $offset ) Implemention of ArrayAccess.
reconfigure ( array $options ) : CoOption Reconfigure to get new instance.
setDefault ( array $options ) Set default options.

Private Methods

Method Description
validateBool ( string $key, mixed $value ) : boolean Validate bool value.
validateNaturalFloat ( string $key, mixed $value ) : float Validate natural float value.
validateNaturalInt ( string $key, mixed $value ) : integer Validate natural int value.
validateOptions ( array $options ) : array Validate options.

Method Details

__construct() public method

Constructor.
public __construct ( array $options = [] )
$options array

getDefault() public static method

Get default options.
public static getDefault ( ) : array
return array $options

offsetExists() public method

Implemention of ArrayAccess.
public offsetExists ( mixed $offset ) : boolean
$offset mixed
return boolean

offsetGet() public method

Implemention of ArrayAccess.
public offsetGet ( mixed $offset ) : mixed
$offset mixed
return mixed

offsetSet() public method

Implemention of ArrayAccess.
public offsetSet ( mixed $offset, mixed $value )
$offset mixed
$value mixed

offsetUnset() public method

Implemention of ArrayAccess.
public offsetUnset ( mixed $offset )
$offset mixed

reconfigure() public method

Reconfigure to get new instance.
public reconfigure ( array $options ) : CoOption
$options array
return CoOption

setDefault() public static method

Set default options.
public static setDefault ( array $options )
$options array