Class Xyster_Data_Junction

Description

Implements interfaces:

A Junction is an infix expression of Xyster_Data_Criterion objects

A typical example of a junction is a SQL where clause:

  1. <var>expression</varAND <var>expression</var)

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

Located in /Data/Junction.php (line 35)

Xyster_Data_Criterion
   |
   --Xyster_Data_Junction
Variable Summary
array $_criteria
string $_operator
Method Summary
Xyster_Data_Junction __construct (Xyster_Data_Criterion $lc, Xyster_Data_Criterion $rc, string $operator)
int count ()
boolean evaluate (mixed $value)
Iterator getIterator ()
string getOperator ()
array toArray ()
string __toString ()
Variables
array $_criteria = array() (line 42)

The criteria in the junction (an array of Xyster_Data_Criterion)

  • access: protected
string $_operator (line 49)

The operator ('AND' or 'OR')

  • access: protected
Methods
static method all (line 211)

Create a new 'AND' junction, i.e. ( x AND y )

  • access: public
static method any (line 199)

Create a new 'OR' junction, i.e. ( x OR y )

  • access: public
Constructor __construct (line 58)

Creates a new junction

  • access: protected
Xyster_Data_Junction __construct (Xyster_Data_Criterion $lc, Xyster_Data_Criterion $rc, string $operator)
add (line 85)

Adds a Criterion to this Junction

  • access: public
count (line 102)

Gets the number of entries in the clause

  • access: public
int count ()
evaluate (line 113)

Evaluates the Junction for a given object

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

Redefinition of:
Xyster_Data_Criterion::evaluate()
Evaluates the Criterion for a given object
getCriteria (line 140)

Gets the Criteria in this Junction

  • access: public
Xyster_Collection getCriteria ()
getIterator (line 151)

Gets the iterator for this clause

  • access: public
Iterator getIterator ()
getOperator (line 163)

Gets the Junction operator

  • access: public
string getOperator ()
toArray (line 173)

Converts the clause into an array of its symbols

  • access: public
array toArray ()

Implementation of:
Xyster_Data_Clause_Interface::toArray()
Converts the clause into an array of its symbols
__toString (line 183)

Returns the string syntax for this Junction

  • access: public
string __toString ()

Implementation of:
Xyster_Data_Symbol::__toString()
Gets the string representation of this object

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:25 -0400 by phpDocumentor 1.4.2