Class Xyster_Data_Field_Aggregate

Description

A field or column that has some aggregate function applied to it

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

Located in /Data/Field/Aggregate.php (line 27)

Xyster_Data_Field
   |
   --Xyster_Data_Field_Aggregate
Class Constant Summary
 AGGREGATE_REGEX = '/^(?P<function>AVG|MAX|MIN|COUNT|SUM)\((?P<field>[\w\W]*)\)$/i'
Variable Summary
Method Summary
static array match (string $haystack)
Xyster_Data_Field_Aggregate __construct (Xyster_Data_Aggregate $function, string $name, [string $alias = null])
mixed evaluate (mixed $object)
string __toString ()
Variables
Xyster_Data_Aggregate $_function (line 38)
  • access: protected

Inherited Variables

Inherited from Xyster_Data_Field

Xyster_Data_Field::$_alias
Xyster_Data_Field::$_name
Methods
static method match (line 92)

Matches for aggregate functions

  • access: public
static array match (string $haystack)
  • string $haystack
Constructor __construct (line 47)

Creates a new Aggregate Field

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

Redefinition of:
Xyster_Data_Field::__construct()
Creates a new Field
evaluate (line 59)

Evaluates the reference for the given object

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

Redefinition of:
Xyster_Data_Field::evaluate()
Evaluates the reference for the given object
getFunction (line 70)

Gets the aggregate function associated with this field

  • return: The assigned aggregate function
  • access: public
Xyster_Data_Aggregate getFunction ()
__toString (line 81)

String representation of this object

  • magic:
  • access: public
string __toString ()

Redefinition of:
Xyster_Data_Field::__toString()
String representation of this object

Inherited Methods

Inherited From Xyster_Data_Field

Xyster_Data_Field::__construct()
Xyster_Data_Field::aggregate()
Xyster_Data_Field::asc()
Xyster_Data_Field::avg()
Xyster_Data_Field::between()
Xyster_Data_Field::count()
Xyster_Data_Field::desc()
Xyster_Data_Field::eq()
Xyster_Data_Field::evaluate()
Xyster_Data_Field::getAlias()
Xyster_Data_Field::getName()
Xyster_Data_Field::group()
Xyster_Data_Field::gt()
Xyster_Data_Field::gte()
Xyster_Data_Field::in()
Xyster_Data_Field::like()
Xyster_Data_Field::lt()
Xyster_Data_Field::lte()
Xyster_Data_Field::max()
Xyster_Data_Field::min()
Xyster_Data_Field::named()
Xyster_Data_Field::neq()
Xyster_Data_Field::notBetween()
Xyster_Data_Field::notIn()
Xyster_Data_Field::notLike()
Xyster_Data_Field::setAlias()
Xyster_Data_Field::sum()
Xyster_Data_Field::_expression()
Xyster_Data_Field::__toString()
Class Constants
AGGREGATE_REGEX = '/^(?P<function>AVG|MAX|MIN|COUNT|SUM)\((?P<field>[\w\W]*)\)$/i' (line 33)

The pattern to match aggregate function fields

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