Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Map/Host.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map;
8
9 use eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map;
10 use eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest;
11
12 class Host extends Map
13 {
14 public function getName()
15 {
16 return 'host:map';
17 }
18
24 public function setRequest(SimplifiedRequest $request)
25 {
26 if (!$this->key) {
27 $this->setMapKey($request->host);
28 }
29
30 parent::setRequest($request);
31 }
32
33 public function reverseMatch($siteAccessName)
34 {
35 $matcher = parent::reverseMatch($siteAccessName);
36 if ($matcher instanceof self) {
37 $matcher->getRequest()->setHost($matcher->getMapKey());
38 }
39
40 return $matcher;
41 }
42 }
eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest
Definition: SimplifiedRequest.php:21
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host
Definition: Map/Host.php:13
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host\setRequest
setRequest(SimplifiedRequest $request)
Injects the request object to match against.
Definition: Map/Host.php:24
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host\reverseMatch
reverseMatch($siteAccessName)
Definition: Map/Host.php:33
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host\getName
getName()
Returns the matcher's name.
Definition: Map/Host.php:14
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map
Definition: Map.php:13
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\setMapKey
setMapKey($key)
Injects the key that will be used for matching against the map configuration.
Definition: Map.php:78
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\$request
$request
Definition: Map.php:36
eZ\Publish\Core\MVC\Symfony\SiteAccess\$matcher
$matcher
Definition: SiteAccess.php:37
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map
Definition: Map/Host.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.