CStatElement
鍖 | system.db.ar |
---|---|
缁ф壙 | class CStatElement |
鐗堟湰 | $Id: CActiveFinder.php 3562 2012-02-13 01:27:06Z qiang.xue $ |
婧愮爜 | framework/db/ar/CActiveFinder.php |
CStatElement浠h〃CActiveFinder鐨 STAT 杩炴帴鍏冪礌銆
灞炴ц缁
relation
灞炴
public CActiveRelation $relation;
浠h〃姝ゆ爲鑺傜偣鐨勫叧绯汇
鏂规硶璇︾粏
__construct()
鏂规硶
$finder | CActiveFinder | 鏌ヨ鍣ㄣ |
$relation | CStatRelation | STAT 鍏崇郴 |
$parent | CJoinElement | 杩炴帴鍏冪礌鎷ユ湁杩欎釜 STAT 鍏冪礌 |
婧愮爜锛 framework/db/ar/CActiveFinder.php#1387 (鏄剧ず)
public function __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 (鏄剧ず)
public function query()
{
if(preg_match('/^\s*(.*?)\((.*)\)\s*$/',$this->relation->foreignKey,$matches))
$this->queryManyMany($matches[1],$matches[2]);
else
$this->queryOneMany();
}
鎵цSTAT鏌ヨ銆