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>"); }
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); } } }
/** * @return Controller */ public static function topController(Controller $aController) { if (!($aParent = $aController->parent())) { return $aController; } else { return self::topController($aParent); } }