Class Xyster_Data_Expression

Description

An expression is a boolean evaluation comparing a column against a value

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Data/Expression.php (line 32)

Xyster_Data_Criterion
   |
   --Xyster_Data_Expression
Variable Summary
Method Summary
static Xyster_Data_Expression between (string $field, string $start, string $end)
static Xyster_Data_Expression eq (string $field, string $value)
static string getMethodName (string $operator)
static Xyster_Data_Expression gt (string $field, string $value)
static Xyster_Data_Expression gte (string $field, string $value)
static Xyster_Data_Expression in (string $field,  $choices)
static Xyster_Data_Expression like (string $field, string $value)
static Xyster_Data_Expression lt (string $field, string $value)
static Xyster_Data_Expression lte (string $field, string $value)
static Xyster_Data_Expression neq (string $field, string $value)
static Xyster_Data_Expression notBetween (string $field, string $start, string $end)
static Xyster_Data_Expression notIn (string $field,  $choices)
static Xyster_Data_Expression notLike (string $field, string $value)
Xyster_Data_Expression __construct (Xyster_Data_Field|string $field, string $operator, mixed $value)
boolean evaluate (mixed $object)
mixed getRight ()
string __toString ()
Variables
Xyster_Data_Field $_left (line 59)

The left value, always a field

  • access: protected
Xyster_Data_Operator_Expression $_operator (line 66)

The operator

  • access: protected
mixed $_right (line 73)

The right value, could be a scalar or a Xyster_Data_Field

  • access: protected
Methods
static method between (line 304)

BETWEEN Xyster_Data_Expression ( field BETWEEN 'value' AND 'value' )

  • access: public
static Xyster_Data_Expression between (string $field, string $start, string $end)
  • string $field
  • string $start
  • string $end
static method eq (line 199)

Equal To Xyster_Data_Expression ( field = 'value' )

For $value to reference another field, pass a Xyster_Data_Field object

  • access: public
static Xyster_Data_Expression eq (string $field, string $value)
  • string $field
  • string $value
static method getMethodName (line 184)

Returns the name of the static method to call for the operator passed

  • access: public
static string getMethodName (string $operator)
  • string $operator
static method gt (line 253)

Greater Than Xyster_Data_Expression ( field > 2 )

For $value to reference another field, pass a Xyster_Data_Field object

  • access: public
static Xyster_Data_Expression gt (string $field, string $value)
  • string $field
  • string $value
static method gte (line 267)

Greater Than or Equal To Xyster_Data_Expression ( field >= 2 )

For $value to reference another field, pass a Xyster_Data_Field object

  • access: public
static Xyster_Data_Expression gte (string $field, string $value)
  • string $field
  • string $value
static method in (line 329)

In expression ( field IN ( 1,1,2,3,5,8,13,21,'fibonacci','sequence' ) )

  • access: public
static Xyster_Data_Expression in (string $field,  $choices)
  • string $field
  • array $choices
static method like (line 279)

LIKE Xyster_Data_Expression ( field LIKE '%value' )

  • access: public
static Xyster_Data_Expression like (string $field, string $value)
  • string $field
  • string $value
static method lt (line 227)

Less Than Xyster_Data_Expression ( field < 3 )

For $value to reference another field, pass a Xyster_Data_Field object

  • access: public
static Xyster_Data_Expression lt (string $field, string $value)
  • string $field
  • string $value
static method lte (line 239)

Less Than or Equal To Xyster_Data_Expression ( field <= 3 )

  • access: public
static Xyster_Data_Expression lte (string $field, string $value)
  • string $field
  • string $value
static method neq (line 213)

Not Equal To Xyster_Data_Expression ( field <> 'value' )

For $value to reference another field, pass a Xyster_Data_Field object

  • access: public
static Xyster_Data_Expression neq (string $field, string $value)
  • string $field
  • string $value
static method notBetween (line 317)

Equal To Xyster_Data_Expression ( field NOT BETWEEN 'value' AND 'value' )

  • access: public
static Xyster_Data_Expression notBetween (string $field, string $start, string $end)
  • string $field
  • string $start
  • string $end
static method notIn (line 341)

Not in expression ( field NOT IN ( 1,1,2,3,5,8,13,21,'fibonacci','sequence' ) )

  • access: public
static Xyster_Data_Expression notIn (string $field,  $choices)
  • string $field
  • array $choices
static method notLike (line 291)

NOT LIKE Xyster_Data_Expression ( field NOT LIKE '%value' )

  • access: public
static Xyster_Data_Expression notLike (string $field, string $value)
  • string $field
  • string $value
Constructor __construct (line 82)

Creates a new expression

  • access: protected
Xyster_Data_Expression __construct (Xyster_Data_Field|string $field, string $operator, mixed $value)
evaluate (line 170)

Evaluates the Expression for a given array or object

  • access: public
boolean evaluate (mixed $object)
  • mixed $object

Redefinition of:
Xyster_Data_Criterion::evaluate()
Evaluates the Criterion for a given object
getLeft (line 101)

Gets the field

  • access: public
Xyster_Data_Field getLeft ()
getOperator (line 111)

Gets the operator

  • access: public
getRight (line 121)

Gets the value

  • access: public
mixed getRight ()
__toString (line 132)

Returns the syntax for this Expression

  • magic:
  • access: public
string __toString ()

Inherited Methods

Inherited From Xyster_Data_Criterion

Xyster_Data_Criterion::evaluate()
Xyster_Data_Criterion::fromArray()
Xyster_Data_Criterion::getFields()
Xyster_Data_Criterion::_getFields()

Documentation generated on Mon, 19 May 2008 17:07:16 -0400 by phpDocumentor 1.4.2