本文整理汇总了PHP中RootURLController::is_at_root方法的典型用法代码示例。如果您正苦于以下问题:PHP RootURLController::is_at_root方法的具体用法?PHP RootURLController::is_at_root怎么用?PHP RootURLController::is_at_root使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RootURLController
的用法示例。
在下文中一共展示了RootURLController::is_at_root方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run($requestParams)
{
self::$is_at_root = true;
$this->pushCurrent();
$controller = new ModelAsController();
$controller->setUrlParams(array('URLSegment' => self::get_homepage_urlsegment(), 'Action' => ''));
$result = $controller->run($requestParams);
$this->popCurrent();
return $result;
}
示例2: handleRequest
public function handleRequest($request) {
self::$is_at_root = true;
$this->pushCurrent();
$this->init();
$controller = new ModelAsController();
$request = new HTTPRequest("GET", self::get_homepage_urlsegment().'/', $request->getVars(), $request->postVars());
$request->match('$URLSegment//$Action', true);
$result = $controller->handleRequest($request);
$this->popCurrent();
return $result;
}
示例3: handleRequest
/**
* @param SS_HTTPRequest $request
* @return SS_HTTPResponse
*/
public function handleRequest(SS_HTTPRequest $request)
{
self::$is_at_root = true;
$this->pushCurrent();
$this->init();
if (!DB::isActive() || !ClassInfo::hasTable('SiteTree')) {
$this->response = new SS_HTTPResponse();
$this->response->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
return $this->response;
}
$request = new SS_HTTPRequest($request->httpMethod(), self::get_homepage_link() . '/', $request->getVars(), $request->postVars());
$request->match('$URLSegment//$Action', true);
$controller = new ModelAsController();
$result = $controller->handleRequest($request);
$this->popCurrent();
return $result;
}
示例4: handleRequest
public function handleRequest($request)
{
self::$is_at_root = true;
$this->pushCurrent();
$this->init();
// If the basic database hasn't been created, then build it.
if (!DB::isActive() || !ClassInfo::hasTable('SiteTree')) {
$this->response = new HTTPResponse();
$this->redirect("dev/build?returnURL=");
return $this->response;
}
$controller = new ModelAsController();
$request = new HTTPRequest("GET", self::get_homepage_urlsegment() . '/', $request->getVars(), $request->postVars());
$request->match('$URLSegment//$Action', true);
$result = $controller->handleRequest($request);
$this->popCurrent();
return $result;
}