| 1 |
|
<?php |
| 2 |
|
/** |
| 3 |
|
* Xyster Framework |
| 4 |
|
* |
| 5 |
|
* This source file is subject to the new BSD license that is bundled |
| 6 |
|
* with this package in the file LICENSE.txt. |
| 7 |
|
* It is also available through the world-wide-web at this URL: |
| 8 |
|
* http://www.opensource.org/licenses/bsd-license.php |
| 9 |
|
* |
| 10 |
|
* @category Xyster |
| 11 |
|
* @package Xyster_Data |
| 12 |
|
* @copyright Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net) |
| 13 |
|
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License |
| 14 |
|
*/ |
| 15 |
|
/** |
| 16 |
|
* @see Xyster_Enum |
| 17 |
|
*/ |
| 18 |
1 |
require_once 'Xyster/Enum.php'; |
| 19 |
|
/** |
| 20 |
|
* Aggregate function enumerated type |
| 21 |
|
* |
| 22 |
|
* @category Xyster |
| 23 |
|
* @package Xyster_Data |
| 24 |
|
* @copyright Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net) |
| 25 |
|
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License |
| 26 |
|
*/ |
| 27 |
|
class Xyster_Data_Aggregate extends Xyster_Enum |
| 28 |
|
{ |
| 29 |
|
const Average = "AVG"; |
| 30 |
|
const Count = "COUNT"; |
| 31 |
|
const Maximum = "MAX"; |
| 32 |
|
const Minimum = "MIN"; |
| 33 |
|
const Sum = "SUM"; |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* Uses the Average function |
| 37 |
|
* |
| 38 |
|
* @return Xyster_Data_Aggregate |
| 39 |
|
*/ |
| 40 |
|
static public function Average() |
| 41 |
|
{ |
| 42 |
4 |
return Xyster_Enum::_factory(); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
/** |
| 46 |
|
* Uses the Count function |
| 47 |
|
* |
| 48 |
|
* @return Xyster_Data_Aggregate |
| 49 |
|
*/ |
| 50 |
|
static public function Count() |
| 51 |
|
{ |
| 52 |
11 |
return Xyster_Enum::_factory(); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* Uses the Maximum function |
| 57 |
|
* |
| 58 |
|
* @return Xyster_Data_Aggregate |
| 59 |
|
*/ |
| 60 |
|
static public function Maximum() |
| 61 |
|
{ |
| 62 |
8 |
return Xyster_Enum::_factory(); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
/** |
| 66 |
|
* Uses the Minimum function |
| 67 |
|
* |
| 68 |
|
* @return Xyster_Data_Aggregate |
| 69 |
|
*/ |
| 70 |
|
static public function Minimum() |
| 71 |
|
{ |
| 72 |
4 |
return Xyster_Enum::_factory(); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
/** |
| 76 |
|
* Uses the Sum function |
| 77 |
|
* |
| 78 |
|
* @return Xyster_Data_Aggregate |
| 79 |
|
*/ |
| 80 |
|
static public function Sum() |
| 81 |
|
{ |
| 82 |
4 |
return Xyster_Enum::_factory(); |
| 83 |
|
} |
| 84 |
|
} |