PHP Class Webmozart\Expression\Constraint\In

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: extends Webmozart\Expression\Logic\Literal
Datei anzeigen Open project: webmozart/expression Class Usage Examples

Public Methods

Method Description
__construct ( array $acceptedValues, boolean $strict = true ) Creates the expression.
equivalentTo ( Webmozart\Expression\Expression $other )
evaluate ( $value )
getAcceptedValues ( ) : array Returns the accepted values.
isStrict ( ) : boolean Returns whether the value is compared strictly.
toString ( )

Method Details

__construct() public method

Creates the expression.
public __construct ( array $acceptedValues, boolean $strict = true )
$acceptedValues array The accepted values.
$strict boolean Whether to do strict comparison.

equivalentTo() public method

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

evaluate() public method

public evaluate ( $value )

getAcceptedValues() public method

Returns the accepted values.
public getAcceptedValues ( ) : array
return array The accepted values.

isStrict() public method

Returns whether the value is compared strictly.
public isStrict ( ) : boolean
return boolean Returns `true` if using strict comparison (`===`) and `false` if using weak comparison (`==`).

toString() public method

public toString ( )