Yii Framework v1.1.10 绫诲弬鑰

CEvent

system.base
缁ф壙 class CEvent » CComponent
瀛愮被 CErrorEvent, CExceptionEvent, CMissingTranslationEvent, CModelEvent, COutputEvent
婧愯嚜 1.0
鐗堟湰 $Id: CComponent.php 3521 2011-12-29 22:10:57Z mdomba $
婧愮爜 framework/base/CComponent.php
CEvent鏄墍鏈変簨浠剁被鐨勫熀绫汇

瀹冨皝瑁呬簡涓庝簨浠剁浉鍏崇殑鍙傛暟銆 sender灞炴ф寚鐨勬槸璋佸彂璧锋潵鐨勪簨浠躲 handled灞炴ф寚鐨勬槸浜嬩欢鐨勫鐞嗘柟寮. 濡傛灉涓涓簨浠跺鐞嗙▼搴忚缃簡handled涓簍rue锛 鍏跺畠鏈鐞嗙殑浜嬩欢澶勭悊绋嬪簭灏嗕笉浼氳璋冪敤銆

鍏叡灞炴

闅愯棌缁ф壙灞炴

灞炴绫诲瀷鎻忚堪瀹氫箟鍦
handled boolean 鏄惁澶勭悊浜嬩欢銆傞粯璁や负false銆 褰撹繖涓艰缃负true锛屽叾瀹冩湭澶勭悊鐨勪簨浠跺鐞嗙▼搴忋 CEvent
params mixed 闄勫姞鐨勪簨浠跺弬鏁. CEvent
sender object 浜嬩欢鐨勫彂璧疯 CEvent

鍏叡鏂规硶

闅愯棌缁ф壙鏂规硶

鏂规硶鎻忚堪瀹氫箟鍦
__call() 濡傛灉绫讳腑娌℃湁璋冪殑鏂规硶鍚嶏紝鍒欒皟鐢ㄨ繖涓柟娉曘 CComponent
__construct() 鏋勯犲櫒. CEvent
__get() 杩斿洖涓涓睘鎬у笺佷竴涓簨浠跺鐞嗙▼搴忓垪琛ㄦ垨涓涓涓哄悕绉般 CComponent
__isset() 妫鏌ヤ竴涓睘鎬ф槸鍚︿负null銆 CComponent
__set() 璁剧疆涓涓粍浠剁殑灞炴у笺 CComponent
__unset() 璁剧疆涓涓粍浠剁殑灞炴т负null銆 CComponent
asa() 杩斿洖杩欎釜鍚嶅瓧鐨勮涓哄璞° CComponent
attachBehavior() 闄勫姞涓涓涓哄埌缁勪欢銆 CComponent
attachBehaviors() 闄勫姞涓涓涓哄垪琛ㄥ埌缁勪欢銆 CComponent
attachEventHandler() 涓轰簨浠堕檮鍔犱竴涓簨浠跺鐞嗙▼搴忋 CComponent
canGetProperty() 纭畾灞炴ф槸鍚﹀彲璇汇 CComponent
canSetProperty() 纭畾灞炴ф槸鍚﹀彲鍐欍 CComponent
detachBehavior() 浠庣粍浠朵腑鍒嗙涓涓涓恒 CComponent
detachBehaviors() 浠庣粍浠朵腑鍒嗙鎵鏈夎涓恒 CComponent
detachEventHandler() 鍒嗙涓涓瓨鍦ㄧ殑浜嬩欢澶勭悊绋嬪簭銆 CComponent
disableBehavior() 绂佺敤涓涓檮鍔犺涓恒 CComponent
disableBehaviors() 绂佺敤缁勪欢闄勫姞鐨勬墍鏈夎涓恒 CComponent
enableBehavior() 鍚敤涓涓檮鍔犺涓恒 CComponent
enableBehaviors() 鍚敤缁勪欢闄勫姞鐨勬墍鏈夎涓恒 CComponent
evaluateExpression() 璁$畻涓涓狿HP琛ㄨ揪寮忥紝鎴栨牴鎹粍浠朵笂涓嬫枃鎵ц鍥炶皟銆 CComponent
getEventHandlers() 杩斿洖涓涓簨浠剁殑闄勫姞澶勭悊绋嬪簭鍒楄〃銆 CComponent
hasEvent() 纭畾涓涓簨浠舵槸鍚﹀畾涔夈 CComponent
hasEventHandler() 妫鏌ヤ簨浠舵槸鍚︽湁闄勫姞鐨勫鐞嗙▼搴忋 CComponent
hasProperty() 纭畾灞炴ф槸鍚﹁瀹氫箟銆 CComponent
raiseEvent() 鍙戣捣涓涓簨浠躲 CComponent

灞炴ц缁

handled 灞炴
public boolean $handled;

鏄惁澶勭悊浜嬩欢銆傞粯璁や负false銆 褰撹繖涓艰缃负true锛屽叾瀹冩湭澶勭悊鐨勪簨浠跺鐞嗙▼搴忋

params 灞炴 锛堝彲鐢ㄨ嚜 v1.1.7锛
public mixed $params;

闄勫姞鐨勪簨浠跺弬鏁.

sender 灞炴
public object $sender;

浜嬩欢鐨勫彂璧疯

鏂规硶璇︾粏

__construct() 鏂规硶
public void __construct(mixed $sender=NULL, mixed $params=NULL)
$sender mixed 浜嬩欢鍙戣捣鑰
$params mixed 闄勫姞鐨勪簨浠跺弬鏁
婧愮爜锛 framework/base/CComponent.php#654 (鏄剧ず)
public function __construct($sender=null,$params=null)
{
    
$this->sender=$sender;
    
$this->params=$params;
}

鏋勯犲櫒.

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