/** * action的构造函数 * * @access public * @param Controller $controller 控制器 * @param String $id Action ID */ public function __construct($controller, $id) { $this->controller = $controller; if (isset($controller->layout)) { $controller->setLayout($controller->layout); } $this->setData($controller->datas); $this->id = $id; }
public function setLayout($layout) { if (defined('CMS_BACKEND')) { parent::setLayout($layout); } else { $this->frontend_layout = $layout; } }