CStatElement
| Package | system.db.ar |
|---|---|
| Inheritance | class CStatElement |
| 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
public void __construct(CActiveFinder $finder, CStatRelation $relation, CJoinElement $parent) | ||
| $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#1401 (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#1412 (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.
© 2008–2017 by Yii Software LLC
Licensed under the three clause BSD license.
http://www.yiiframework.com/doc/api/1.1/CStatElement