/** * 运行应用 * @access private */ private static function start() { //控制器实例 $controller = controller(CONTROLLER); //控制器不存在 if (!$controller) { //模块检测 if (!is_dir(MODULE_PATH)) { _404('模块' . MODULE . '不存在'); } //空控制器 $controller = Controller("Empty"); if (!$controller) { _404('控制器' . CONTROLLER . C("CONTROLLER_FIX") . '不存在'); } } //执行动作 try { $action = new ReflectionMethod($controller, ACTION); if ($action->isPublic()) { $action->invoke($controller); } else { throw new ReflectionException(); } } catch (ReflectionException $e) { $action = new ReflectionMethod($controller, '__call'); $action->invokeArgs($controller, array(ACTION, '')); } }
/** * 初始化Member 获取正确配置并获取到模板信息 */ public function Initialize() { Controller('Index'); $this->data = $this->load->template()->var; $database = array('cache' => 0); Config::set($database, 'database'); if ($this->data['user'] == false) { header('Location:' . Router::$router->url('Member/login')); } }
function __construct() { parent: Controller(); $this->load->helper(array('form', 'url')); $this->load->library('session'); $this->output->set_header('Content-Type: text/html; charset=UTF8'); $this->load->library('varlidataion'); $this->validation->set_error_delimeters('<div class="error">', '</div>'); $fields['name'] = '名前'; $fields['email'] = 'メールアドレス'; $fields['comment'] = 'コメント'; $this->validation->set_fields($fields); $rules['name'] = "trim|required|max_length(20)"; $rulds['email'] = "trim|required|valid_email"; $rules['comment'] = "required|max_length(200)"; //$this->output->enable_profiler(true); }
<?php require_once getRootPath() . "/cms/modules/controller.php"; $params = array(); $params["PAGE"] = $PAGE; Controller("contact-form", "form", "", $params);
<?php include "application.php"; ?> <?php include "includes/header.php"; ?> <?php Controller("node-create", "form"); ?> <?php include "includes/footer.php";
<?php $blnAuthenticate = false; include "application.php"; ?> <?php include "includes/header.php"; ?> <?php Controller("login", "form"); ?> <?php include "includes/footer.php";
<?php include "application.php"; ?> <?php include "includes/header.php"; ?> <?php Controller("node-delete", "form"); ?> <?php include "includes/footer.php";
public function initialize() { Controller('Index'); }
<?php global $wpdb, $wp; define('WP_USE_THEMES', false); require getRootPath() . "/" . $PAGE->getField("Path")->getValue() . "/wp-blog-header.php"; die("wordpress integrated"); require_once getRootPath() . "/cms/modules/controller.php"; $params = array(); $params["PAGE"] = $PAGE; Controller("wordpress", "list", "", $params);
<?php include "application.php"; ?> <?php include "includes/header.php"; ?> <?php Controller("node-edit", "form"); ?> <?php include "includes/footer.php";
<?php include "application.php"; ?> <?php include "includes/header.php"; ?> <?php Controller("node-layout", "form"); ?> <?php include "includes/footer.php";
<?php require_once getRootPath() . "/cms/modules/controller.php"; $params = array(); $params["PAGE"] = $PAGE; Controller("search", "form", "", $params);