CStatElement
Package | system.db.ar |
---|---|
Inheritance | class CStatElement |
Version | $Id: CActiveFinder.php 3562 2012-02-13 01:27:06Z qiang.xue $ |
Source Code | framework/db/ar/CActiveFinder.php |
CStatElement represents STAT join element for CActiveFinder.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
relation | CActiveRelation | the relation represented by this tree node | CStatElement |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Constructor. | CStatElement |
query() | Performs the STAT query. | CStatElement |
Property Details
relation
property
public CActiveRelation $relation;
the relation represented by this tree node
Method Details
__construct()
method
$finder | CActiveFinder | the finder |
$relation | CStatRelation | the STAT relation |
$parent | CJoinElement | the join element owning this STAT element |
Source Code: framework/db/ar/CActiveFinder.php#1387 (show)
public function __construct($finder,$relation,$parent)
{
$this->_finder=$finder;
$this->_parent=$parent;
$this->relation=$relation;
$parent->stats[]=$this;
}
Constructor.
query()
method
public void query()
|
Source Code: framework/db/ar/CActiveFinder.php#1398 (show)
public function query()
{
if(preg_match('/^\s*(.*?)\((.*)\)\s*$/',$this->relation->foreignKey,$matches))
$this->queryManyMany($matches[1],$matches[2]);
else
$this->queryOneMany();
}
Performs the STAT query.