setRequest() public méthode

public setRequest ( SimplifiedRequest $request )
$request eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }