CStatElement

优质
小牛编辑
124浏览
2023-12-01
所有包 | 属性 | 方法
system.db.ar
继承class CStatElement
版本$Id: CActiveFinder.php 3562 2012-02-13 01:27:06Z qiang.xue $
源码framework/db/ar/CActiveFinder.php
CStatElement代表CActiveFinder的 STAT 连接元素。

公共属性

隐藏继承属性

属性类型描述定义在
relationCActiveRelation代表此树节点的关系。CStatElement

公共方法

隐藏继承方法

方法描述定义在
__construct()构造函数。CStatElement
query()执行STAT查询。CStatElement

属性详细

relation 属性 public CActiveRelation $relation;

代表此树节点的关系。

方法详细

__construct() 方法
public void __construct(CActiveFinder $finder, CStatRelation $relation, CJoinElement $parent)
$finderCActiveFinder查询器。
$relationCStatRelationSTAT 关系
$parentCJoinElement连接元素拥有这个 STAT 元素
源码: framework/db/ar/CActiveFinder.php#1387 (显示) publicfunction__construct($finder,$relation,$parent)
{
$this->_finder=$finder;
$this->_parent=$parent;
$this->relation=$relation;
$parent->stats[]=$this;
}

构造函数。

query() 方法
public void query()
源码: framework/db/ar/CActiveFinder.php#1398 (显示) publicfunctionquery()
{
if(preg_match('/^s*(.*?)((.*))s*$/',$this->relation->foreignKey,$matches))
$this->queryManyMany($matches[1],$matches[2]);
else
$this->queryOneMany();
}

执行STAT查询。