system system.base system.caching system.caching.dependencies system.collections system.console system.db system.db.ar system.db.schema system.db.schema.cubrid system.db.schema.mssql system.db.schema.mysql system.db.schema.oci system.db.schema.pgsql system.db.schema.sqlite system.gii system.i18n system.i18n.gettext system.logging system.test system.utils system.validators system.web system.web.actions system.web.auth system.web.filters system.web.form system.web.helpers system.web.renderers system.web.services system.web.widgets system.web.widgets.captcha system.web.widgets.pagers zii.behaviors zii.widgets zii.widgets.grid zii.widgets.jui

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() 方法
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
源码: 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.