Class

Dat0r\Runtime\Validator\Rule\Type\BooleanRule

class BooleanRule extends Rule

Methods

__construct($name, array $options = array())

from Rule
boolean apply(mixed $value)

from Rule
string getName()

from Rule
getOptions()

from Rule
mixed getOption(string $name, mixed $default = null)

from Rule
boolean hasOption($name)

from Rule
IncidentMap getIncidents()

from Rule
mixed getSanitizedValue()

from Rule

Details

in Rule at line 21
public __construct($name, array $options = array())

Parameters

$name
array $options

in Rule at line 27
public boolean apply(mixed $value)

Parameters

mixed $value

Return Value

boolean

in Rule at line 42
public string getName()

Return Value

string

in Rule at line 47
public getOptions()

in Rule at line 52
public mixed getOption(string $name, mixed $default = null)

Parameters

string $name
mixed $default

Return Value

mixed The option's value if the option is set, $default otherwise.

in Rule at line 61
public boolean hasOption($name)

Parameters

$name

Return Value

boolean

in Rule at line 66
public IncidentMap getIncidents()

Return Value

IncidentMap

in Rule at line 71
public mixed getSanitizedValue()

Return Value

mixed