CStatElement
| 包 | system.db.ar |
|---|---|
| 继承 | class CStatElement |
| 源码 | framework/db/ar/CActiveFinder.php |
CStatElement represents STAT join element for CActiveFinder.
公共属性
| 属性 | 类型 | 描述 | 被定义在 |
|---|---|---|---|
| relation | CActiveRelation | the relation represented by this tree node | CStatElement |
公共方法
| 方法 | 描述 | 被定义在 |
|---|---|---|
| __construct() | Constructor. | CStatElement |
| query() | Performs the STAT query. | CStatElement |
属性详情
relation
属性
public CActiveRelation $relation;
the relation represented by this tree node
方法详情
__construct()
方法
| $finder | CActiveFinder | the finder |
| $relation | CStatRelation | the STAT relation |
| $parent | CJoinElement | the join element owning this STAT element |
源码: framework/db/ar/CActiveFinder.php#1403 (显示)
public function __construct($finder,$relation,$parent)
{
$this->_finder=$finder;
$this->_parent=$parent;
$this->relation=$relation;
$parent->stats[]=$this;
}
Constructor.
query()
方法
|
public void query()
|
源码: framework/db/ar/CActiveFinder.php#1414 (显示)
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.