PHP Class Webmozart\Expression\Constraint\Matches

The comparison is done using PHP's preg_match() function.
Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: extends Webmozart\Expression\Logic\Literal
Mostrar archivo Open project: webmozart/expression Class Usage Examples

Public Methods

Method Description
__construct ( string $regExp ) Creates the expression.
equivalentTo ( Webmozart\Expression\Expression $other )
evaluate ( $value )
getRegularExpression ( ) : mixed Returns the regular expression.
toString ( )

Method Details

__construct() public method

Creates the expression.
public __construct ( string $regExp )
$regExp string The regular expression.

equivalentTo() public method

public equivalentTo ( Webmozart\Expression\Expression $other )
$other Webmozart\Expression\Expression

evaluate() public method

public evaluate ( $value )

getRegularExpression() public method

Returns the regular expression.
public getRegularExpression ( ) : mixed
return mixed The regular expression.

toString() public method

public toString ( )