Example #1
0
 private function printDebugModelStruct(Controller $aController, $sModelName)
 {
     $this->device()->write("<div style='padding-top:10px'><h4>[模型:{$sModelName}]</h4>");
     if ($aModel = $aController->modelByName($sModelName)) {
         $this->device()->write("<pre>");
         $aModel->printStruct($this->device());
         $this->device()->write("</pre>");
     } else {
         $this->device()->write("模型名称{$sModelName}无效");
     }
     $this->device()->write("</div>");
 }
Example #2
0
 public function __get($sName)
 {
     // 找到 frameview
     if ($this->arrFrameViews and isset($this->arrFrameViews[$sName])) {
         return $this->arrFrameViews[$sName];
     } else {
         if ($this->arrFrameViews and strlen($sName) > 4 and substr($sName, 0, 4) == 'view' and isset($this->arrFrameViews[$sViewName = substr($sName, 4)])) {
             return $this->arrFrameViews[$sViewName];
         } else {
             return parent::__get($sName);
         }
     }
 }
Example #3
0
 /**
  * @return Controller
  */
 public static function topController(Controller $aController)
 {
     if (!($aParent = $aController->parent())) {
         return $aController;
     } else {
         return self::topController($aParent);
     }
 }