PHP Class Jyxo\Input\Validator\Regex

Author: Jan Pěček
Inheritance: extends AbstractValidator
Afficher le fichier Open project: jyxo/php

Protected Properties

Свойство Type Description
$pattern string Regular expression.

Méthodes publiques

Méthode 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 méthode

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

getPattern() public méthode

Returns the validation regular expression.
public getPattern ( ) : string
Résultat string

isValid() public méthode

Validates a value.
public isValid ( mixed $value ) : boolean
$value mixed Input value
Résultat boolean

setPattern() public méthode

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

Property Details

$pattern protected_oe property

Regular expression.
protected string $pattern
Résultat string