Yii Framework v1.1.10 绫诲弬鑰

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 CActiveRelation 浠h〃姝ゆ爲鑺傜偣鐨勫叧绯汇 CStatElement

鍏叡鏂规硶

闅愯棌缁ф壙鏂规硶

鏂规硶鎻忚堪瀹氫箟鍦
__construct() 鏋勯犲嚱鏁般 CStatElement
query() 鎵цSTAT鏌ヨ銆 CStatElement

灞炴ц缁

relation 灞炴
public CActiveRelation $relation;

浠h〃姝ゆ爲鑺傜偣鐨勫叧绯汇

鏂规硶璇︾粏

__construct() 鏂规硶
public void __construct(CActiveFinder $finder, CStatRelation $relation, CJoinElement $parent)
$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鏌ヨ銆

Copyright © 2008-2011 by Yii Software LLC
All Rights Reserved.