コード例 #1
0
ファイル: DataSrc.php プロジェクト: JeCat/framework
 public function has($sName)
 {
     // disable data
     if ($this->arrDisables and array_key_exists($sName, $this->arrDisables)) {
         return false;
     }
     if (parent::has($sName)) {
         return true;
     }
     // 在 exclude中的数据,不向 childs中寻找
     if (in_array($sName, $this->arrExclude)) {
         return false;
     }
     // 从 Childs 中找数据
     foreach ($this->arrChildren as $aChild) {
         if ($aChild->has($sName)) {
             return true;
         }
     }
     return false;
 }
コード例 #2
0
ファイル: Attributes.php プロジェクト: JeCat/framework
 public function object($sName)
 {
     return parent::get($sName);
 }
コード例 #3
0
ファイル: ResultSet.php プロジェクト: JeCat/framework
 public function add(Result $aResult)
 {
     parent::add($aResult);
 }
コード例 #4
0
ファイル: Widget.php プロジェクト: JeCat/framework
 public function display(UI $aUI, IHashTable $aVariables = null, IOutputStream $aDevice = null)
 {
     $sTemplateName = $this->templateName();
     $sSubTemplateName = $this->subTemplateName();
     if (!$sTemplateName and !$sSubTemplateName) {
         throw new Exception("显示UI控件时遇到错误,UI控件尚未设置模板文件", $this->id());
     }
     if (!$aVariables) {
         $aVariables = new HashTable();
     }
     $oldWidget = $aVariables->get('theWidget');
     $aVariables->set('theWidget', $this);
     $aVariables->set('theUI', $aUI);
     if ($sTemplateName) {
         $aUI->display($sTemplateName, $aVariables, $aDevice);
     } else {
         if (!function_exists($sSubTemplateName)) {
             throw new Exception("正在调用无效的子模板:%s %s", array($sSubTemplateName, $this->id()));
         }
         call_user_func_array($sSubTemplateName, array($aVariables, $aDevice));
     }
     $aVariables->set('theWidget', $oldWidget);
 }