PHP Class Jyxo\Input\Validator\Regex

Author: Jan Pěček
Inheritance: extends AbstractValidator
Show file Open project: jyxo/php

Protected Properties

Property Type Description
$pattern string Regular expression.

Public Methods

Method Description
__construct ( string $pattern ) Constructor.
getPattern ( ) : string Returns the validation regular expression.
isValid ( mixed $value ) : boolean Validates a value.
setPattern ( string $pattern ) : self Sets the validation regular expression.

Method Details

__construct() public method

Constructor.
public __construct ( string $pattern )
$pattern string Regular expression

getPattern() public method

Returns the validation regular expression.
public getPattern ( ) : string
return string

isValid() public method

Validates a value.
public isValid ( mixed $value ) : boolean
$value mixed Input value
return boolean

setPattern() public method

Sets the validation regular expression.
public setPattern ( string $pattern ) : self
$pattern string Regular expression
return self

Property Details

$pattern protected property

Regular expression.
protected string $pattern
return string