PHP Class Webmozart\Expression\Selector\Key

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

Public Methods

Method Description
__construct ( string | integer $key, Webmozart\Expression\Expression $expr ) Creates the expression.
equivalentTo ( Webmozart\Expression\Expression $other )
evaluate ( $value )
getKey ( ) : string | integer Returns the array key.
toString ( )

Method Details

__construct() public method

Creates the expression.
public __construct ( string | integer $key, Webmozart\Expression\Expression $expr )
$key string | integer The array key.
$expr Webmozart\Expression\Expression The expression to evaluate for the key.

equivalentTo() public method

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

evaluate() public method

public evaluate ( $value )

getKey() public method

Returns the array key.
public getKey ( ) : string | integer
return string | integer The array key.

toString() public method

public toString ( )