当前位置: 首页>>代码示例>>PHP>>正文


PHP RootURLController::is_at_root方法代码示例

本文整理汇总了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;
 }
开发者ID:ramziammar,项目名称:websites,代码行数:10,代码来源:RootURLController.php

示例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;
	}
开发者ID:neopba,项目名称:silverstripe-book,代码行数:16,代码来源:RootURLController.php

示例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;
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:21,代码来源:RootURLController.php

示例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;
 }
开发者ID:racontemoi,项目名称:shibuichi,代码行数:18,代码来源:RootURLController.php


注:本文中的RootURLController::is_at_root方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。