PHP Class Bluz\Validator\Rule\In

Inheritance: extends AbstractRule
Show file Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$haystack haystack for search, can be array or string
$identical strong comparison

Public Methods

Method Description
__construct ( string | array $haystack, boolean $identical = false ) Setup validation rule
getTemplate ( ) : string Get error template
validate ( string $input ) : boolean Check input data

Method Details

__construct() public method

Setup validation rule
public __construct ( string | array $haystack, boolean $identical = false )
$haystack string | array
$identical boolean

getTemplate() public method

Get error template
public getTemplate ( ) : string
return string

validate() public method

Check input data
public validate ( string $input ) : boolean
$input string
return boolean

Property Details

$haystack protected property

haystack for search, can be array or string
protected $haystack

$identical protected property

strong comparison
protected $identical