|
17 | 17 | use Doctrine\Common\Util\ClassUtils; |
18 | 18 | use PHPCR\InvalidItemStateException; |
19 | 19 | use Symfony\Cmf\Component\RoutingAuto\Model\AutoRouteInterface; |
20 | | -use Symfony\Cmf\Component\RoutingAuto\UrlContext; |
| 20 | +use Symfony\Cmf\Component\RoutingAuto\UriContext; |
21 | 21 | use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute; |
22 | 22 | use Symfony\Cmf\Component\RoutingAuto\AdapterInterface; |
23 | 23 | use Symfony\Cmf\Bundle\RoutingAutoBundle\Model\AutoRedirectRoute; |
@@ -79,9 +79,9 @@ public function translateObject($contentDocument, $locale) |
79 | 79 | /** |
80 | 80 | * {@inheritDoc} |
81 | 81 | */ |
82 | | - public function generateAutoRouteTag(UrlContext $urlContext) |
| 82 | + public function generateAutoRouteTag(UriContext $uriContext) |
83 | 83 | { |
84 | | - return $urlContext->getLocale() ? : self::TAG_NO_MULTILANG; |
| 84 | + return $uriContext->getLocale() ? : self::TAG_NO_MULTILANG; |
85 | 85 | } |
86 | 86 |
|
87 | 87 | /** |
@@ -114,11 +114,11 @@ public function removeAutoRoute(AutoRouteInterface $autoRoute) |
114 | 114 | /** |
115 | 115 | * {@inheritDoc} |
116 | 116 | */ |
117 | | - public function createAutoRoute($url, $contentDocument, $autoRouteTag) |
| 117 | + public function createAutoRoute($uri, $contentDocument, $autoRouteTag) |
118 | 118 | { |
119 | 119 | $path = $this->baseRoutePath; |
120 | 120 | $parentDocument = $this->dm->find(null, $path); |
121 | | - $segments = preg_split('#/#', $url, null, PREG_SPLIT_NO_EMPTY); |
| 121 | + $segments = preg_split('#/#', $uri, null, PREG_SPLIT_NO_EMPTY); |
122 | 122 | $headName = array_pop($segments); |
123 | 123 | foreach ($segments as $segment) { |
124 | 124 | $path .= '/' . $segment; |
@@ -183,15 +183,15 @@ public function getReferringAutoRoutes($contentDocument) |
183 | 183 | /** |
184 | 184 | * {@inheritDoc} |
185 | 185 | */ |
186 | | - public function findRouteForUrl($url) |
| 186 | + public function findRouteForUri($uri) |
187 | 187 | { |
188 | | - $path = $this->getPathFromUrl($url); |
| 188 | + $path = $this->getPathFromUri($uri); |
189 | 189 |
|
190 | 190 | return $this->dm->find(null, $path); |
191 | 191 | } |
192 | 192 |
|
193 | | - private function getPathFromUrl($url) |
| 193 | + private function getPathFromUri($uri) |
194 | 194 | { |
195 | | - return $this->baseRoutePath . $url; |
| 195 | + return $this->baseRoutePath . $uri; |
196 | 196 | } |
197 | 197 | } |
0 commit comments