setRequest() public method

public setRequest ( SimplifiedRequest $request )
$request eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest
示例#1
0
 /**
  * Injects the request object to match against.
  *
  * @param \eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest $request
  */
 public function setRequest(SimplifiedRequest $request)
 {
     if (!$this->key) {
         $this->setMapKey($request->host);
     }
     parent::setRequest($request);
 }
示例#2
0
 /**
  * Injects the request object to match against.
  *
  * @param \eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest $request
  */
 public function setRequest(SimplifiedRequest $request)
 {
     if (!$this->key) {
         sscanf($request->pathinfo, '/%[^/]', $key);
         $this->setMapKey($key);
     }
     parent::setRequest($request);
 }
示例#3
0
 /**
  * Injects the request object to match against.
  *
  * @param \eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest $request
  */
 public function setRequest(SimplifiedRequest $request)
 {
     if (!$this->key) {
         if (!empty($request->port)) {
             $key = $request->port;
         } else {
             switch ($request->scheme) {
                 case 'https':
                     $key = 443;
                     break;
                 case 'http':
                 default:
                     $key = 80;
             }
         }
         $this->setMapKey($key);
     }
     parent::setRequest($request);
 }