public function get($key, $defaultValue = null) { if (isset(BlockController::$sets[$this->identifier][$key])) { return BlockController::$sets[$this->identifier][$key]; } return parent::get($key, $defaultValue); }
public function get($key) { if (isset(BlockController::$sets[$this->identifier][$key])) { return BlockController::$sets[$this->identifier][$key]; } return parent::get($key); }
/** * 获取并分析$_GET数组某参数值 */ public function get($string) { return Controller::get($string); }
/** * 返回$this->page=$page. * * @param integer $page * @return $this */ public function page($page = null) { //当参数为空时.自动获取GET['page'] if (is_null($page)) { $page = (int) Controller::get('page'); $page = !$page ? 1 : $page; } if (!$page) { return false; } $this->page = $page; return $this; }
/** * Call a controller * <strong>This will require the CONTROLLERWork component</strong> * @param string $controller_n The name of the class * @param string $method The name of the method to call * @param string $uri_r The current URI OR the parameter which should be passed to the function * @param boolean $param TRUE will let $uri_r act as parameter * @return [type] */ protected function controller($controller_n, $method, $uri_r, $param = false) { $controller['name'] = __NAMESPACE__ . '\\' . $controller_n; if (class_exists($controller['name'])) { $controller['object'] = Controller::get($controller['name']); if ($controller['object']->rest) { $method = strtolower(static::$rest) . '_' . $method; } if (method_exists($controller['object'], $method)) { if ($param) { $controller['object']->{$method}($uri_r); } else { $controller['object']->{$method}(self::getParameter($uri_r)); } static::$served = true; } } }