PHP Interface Webmozart\Expression\Expression

Since: 1.0
Author: Bernhard Schussek ([email protected])
Show file Open project: webmozart/expression Interface Usage Examples

Public Methods

Method Description
equivalentTo ( Webmozart\Expression\Expression $other ) : boolean Returns whether this expression is logically equivalent to another expression.
evaluate ( mixed $value ) : boolean Evaluates the expression with the given value.
toString ( ) : string Returns a string representation of the expression.

Method Details

equivalentTo() public method

Returns whether this expression is logically equivalent to another expression.
public equivalentTo ( Webmozart\Expression\Expression $other ) : boolean
$other Webmozart\Expression\Expression Some expression.
return boolean Returns `true` if the expressions are logically equivalent and `false` otherwise.

evaluate() public method

Evaluates the expression with the given value.
public evaluate ( mixed $value ) : boolean
$value mixed A value.
return boolean Returns `true` if the value satisfies the expression and `false` otherwise.

toString() public method

Returns a string representation of the expression.
public toString ( ) : string
return string The expression as string.