PHP Class Locker\Repository\Statement\Options

Show file Open project: learninglocker/learninglocker Class Usage Examples

Public Properties

Property Type Description
$options

Protected Properties

Property Type Description
$defaults
$types

Public Methods

Method Description
__construct ( array $opts )
getOpt ( String $opt ) : Mixed Gets an options.

Protected Methods

Method Description
convertToBoolean ( mixed $value ) : boolean | mixed Converts the given value to a Boolean if it can be.
convertToInt ( mixed $value ) : integer | mixed Converts the given value to a Integer if it can be.
mergeDefaults ( array $opts ) : [String Returns all of the index options set to their default or given value (using the given options).
validate ( $opts ) : [String Validates the given options as index options.

Method Details

__construct() public method

public __construct ( array $opts )
$opts array

convertToBoolean() protected method

Converts the given value to a Boolean if it can be.
protected convertToBoolean ( mixed $value ) : boolean | mixed
$value mixed
return boolean | mixed Returns the value unchanged if it can't be converted.

convertToInt() protected method

Converts the given value to a Integer if it can be.
protected convertToInt ( mixed $value ) : integer | mixed
$value mixed
return integer | mixed Returns the value unchanged if it can't be converted.

getOpt() public method

Gets an options.
public getOpt ( String $opt ) : Mixed
$opt String Option name.
return Mixed

mergeDefaults() protected method

Returns all of the index options set to their default or given value (using the given options).
protected mergeDefaults ( array $opts ) : [String
$opts array
return [String

validate() protected method

Validates the given options as index options.
protected validate ( $opts ) : [String
return [String

Property Details

$defaults protected property

protected $defaults

$options public property

public $options

$types protected property

protected $types