0 follower

CStatElement

Package system.db.ar
Inheritance class CStatElement
Source Code framework/db/ar/CActiveFinder.php
CStatElement represents STAT join element for CActiveFinder.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
relation CActiveRelation the relation represented by this tree node CStatElement

Public Methods

Hide inherited methods

MethodDescriptionDefined 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#1403 (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#1414 (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.