Class Xyster_Data_Field

Description

Implements interfaces:

A simple concept for data fields and columns

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

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


	
			
Direct descendents
Class Description
Xyster_Data_Field_Group A simple concept for data fields and columns
Xyster_Data_Field_Aggregate A field or column that has some aggregate function applied to it
Variable Summary
string $_alias
string $_name
Method Summary
static Xyster_Data_Field_Aggregate aggregate (Xyster_Data_Aggregate $function, string $name, [string $alias = null])
static Xyster_Data_Field_Aggregate avg (string $name, [string $alias = null])
static Xyster_Data_Field_Aggregate count (string $name, [string $alias = null])
static Xyster_Data_Field_Group group (string $name, [string $alias = null])
static Xyster_Data_Field_Aggregate max (string $name, [string $alias = null])
static Xyster_Data_Field_Aggregate min (string $name, [string $alias = null])
static Xyster_Data_Field named (string $name, [string $alias = null])
static Xyster_Data_Field_Aggregate sum (string $name, [string $alias = null])
Xyster_Data_Field __construct (string $name, [string $alias = null])
Xyster_Data_Expression between (mixed $start, mixed $end)
Xyster_Data_Expression eq (mixed $value)
mixed evaluate (mixed $object)
string getAlias ()
string getName ()
Xyster_Data_Expression gt (mixed $value)
Xyster_Data_Expression gte (mixed $value)
Xyster_Data_Expression in ( $choices)
Xyster_Data_Expression like (mixed $value)
Xyster_Data_Expression lt (mixed $value)
Xyster_Data_Expression lte (mixed $value)
Xyster_Data_Expression neq (mixed $value)
Xyster_Data_Expression notBetween (mixed $start, mixed $end)
void setAlias (string $alias)
Xyster_Data_Expression _expression (string $function, [ $params = array()])
string __toString ()
Variables
string $_alias (line 46)

An alias for the field, equal to the field name by default

  • access: protected
string $_name (line 39)

The name of the field

  • access: protected
Methods
static method aggregate (line 351)

Creates an Xyster_Data_Aggregate field

  • access: public
static Xyster_Data_Field_Aggregate aggregate (Xyster_Data_Aggregate $function, string $name, [string $alias = null])
  • Xyster_Data_Aggregate $function: The aggregate used
  • string $name: The name of the field to aggregate
  • string $alias: Optional; the alias of the aggregate field
static method avg (line 388)

Creates an Xyster_Data_Aggregate field to average the values in a field

  • access: public
static Xyster_Data_Field_Aggregate avg (string $name, [string $alias = null])
  • string $name: The name of the field
  • string $alias: The alias to assign
static method count (line 364)

Creates an Xyster_Data_Aggregate field to count items in a tuple

  • access: public
static Xyster_Data_Field_Aggregate count (string $name, [string $alias = null])
  • string $name: The name of the field
  • string $alias: The alias to assign
static method group (line 337)

Creates a Xyster_Data_Field that defines a group in a result

  • access: public
static Xyster_Data_Field_Group group (string $name, [string $alias = null])
  • string $name
  • string $alias
static method max (line 400)

Creates an Xyster_Data_Aggregate field to find the maximum value in a field

  • access: public
static Xyster_Data_Field_Aggregate max (string $name, [string $alias = null])
  • string $name: The name of the field
  • string $alias: The alias to assign
static method min (line 412)

Creates an Xyster_Data_Aggregate field to find the minimum value in a field

  • access: public
static Xyster_Data_Field_Aggregate min (string $name, [string $alias = null])
  • string $name: The name of the field
  • string $alias: The alias to assign
static method named (line 318)

Creates a Xyster_Data_Field by name with an alias

  • access: public
static Xyster_Data_Field named (string $name, [string $alias = null])
  • string $name: The name of the field
  • string $alias: The alias to assign
static method sum (line 376)

Creates an Xyster_Data_Aggregate field to sum the values in a field

  • access: public
static Xyster_Data_Field_Aggregate sum (string $name, [string $alias = null])
  • string $name: The name of the field
  • string $alias: The alias to assign
Constructor __construct (line 54)

Creates a new Field

  • access: protected
Xyster_Data_Field __construct (string $name, [string $alias = null])
  • string $name: The field name (be it a property, column, whatever)
  • string $alias: The alias for this field

Redefined in descendants as:
asc (line 144)

Factories an ascending Xyster_Data_Sort for this field name

  • access: public
between (line 256)

Factories a BETWEEN Xyster_Data_Expression ( column BETWEEN 'value' AND 'value' )

  • access: public
Xyster_Data_Expression between (mixed $start, mixed $end)
  • mixed $start
  • mixed $end
desc (line 155)

Factories a descending Xyster_Data_Sort for this field name

  • access: public
eq (line 167)

Factories an Equal To Xyster_Data_Expression ( column = 'value' )

  • access: public
Xyster_Data_Expression eq (mixed $value)
  • mixed $value
evaluate (line 105)

Evaluates the reference for the given object

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

Redefined in descendants as:
getAlias (line 79)

Gets the alias assigned to this field

  • return: The field alias
  • access: public
string getAlias ()
getName (line 69)

Gets the name of this field

  • return: The field name
  • access: public
string getName ()
gt (line 211)

Factories a Greater Than Xyster_Data_Expression ( column > 2 )

  • access: public
Xyster_Data_Expression gt (mixed $value)
  • mixed $value
gte (line 222)

Factories a Greater Than or Equal To Xyster_Data_Expression ( column >= 2 )

  • access: public
Xyster_Data_Expression gte (mixed $value)
  • mixed $value
in (line 279)

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

  • access: public
Xyster_Data_Expression in ( $choices)
  • array $choices
like (line 233)

Factories a LIKE Xyster_Data_Expression ( column LIKE '%value' )

  • access: public
Xyster_Data_Expression like (mixed $value)
  • mixed $value
lt (line 189)

Factories a Less Than Xyster_Data_Expression ( column < 3 )

  • access: public
Xyster_Data_Expression lt (mixed $value)
  • mixed $value
lte (line 200)

Factories a Less Than or Equal To Xyster_Data_Expression ( column <= 3 )

  • access: public
Xyster_Data_Expression lte (mixed $value)
  • mixed $value
neq (line 178)

Factories a Not Equal To Xyster_Data_Expression ( column <> 'value' )

  • access: public
Xyster_Data_Expression neq (mixed $value)
  • mixed $value
notBetween (line 268)

Factories a NOT BETWEEN Xyster_Data_Expression ( column NOT BETWEEN 'value' AND 'value' )

  • access: public
Xyster_Data_Expression notBetween (mixed $start, mixed $end)
  • mixed $start
  • mixed $end
notIn (line 290)

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

  • access: public
Xyster_Data_Expression notIn ( $choices)
  • array $choices
notLike (line 244)

Factories a NOT LIKE Xyster_Data_Expression ( column NOT LIKE '%value' )

  • access: public
Xyster_Data_Expression notLike (mixed $value)
  • mixed $value
setAlias (line 90)

Sets the alias assigned to this column

  • throws: Xyster_Data_Field_Exception if the alias is invalid
  • access: public
void setAlias (string $alias)
  • string $alias: The alias to assign
_expression (line 302)

Factories an expression

  • access: protected
Xyster_Data_Expression _expression (string $function, [ $params = array()])
  • string $function
  • array $params
__toString (line 134)

String representation of this object

  • magic:
  • access: public
string __toString ()

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

Redefined in descendants as:

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