@@ 247-255 (lines=9) @@ | ||
244 | * @param RoutingRoute $route |
|
245 | * @param \ReflectionClass $class |
|
246 | */ |
|
247 | protected function setCustomSecurity(RoutingRoute $route, \ReflectionClass $class) |
|
248 | { |
|
249 | if ($this->hasCustom()) { |
|
250 | if (strpos($this->getCustom(), '::') === false && $class->hasMethod($this->getCustom())) { |
|
251 | $this->setCustom(sprintf('%s::%s', $class->getName(), $this->getCustom())); |
|
252 | } |
|
253 | $route->setRequirement('_custom_access', $this->getCustom()); |
|
254 | } |
|
255 | } |
|
256 | } |
|
257 |
@@ 195-203 (lines=9) @@ | ||
192 | * @param RoutingRoute $route |
|
193 | * @param \ReflectionClass $class |
|
194 | */ |
|
195 | protected function registerCallback(RoutingRoute $route, \ReflectionClass $class) |
|
196 | { |
|
197 | if ($this->hasCallback()) { |
|
198 | if (strpos($this->getCallback(), '::') === false && $class->hasMethod($this->getCallback())) { |
|
199 | $this->setCallback(sprintf('%s::%s', $class->getName(), $this->getCallback())); |
|
200 | } |
|
201 | $route->setDefault('_title_callback', $this->getCallback()); |
|
202 | } |
|
203 | } |
|
204 | } |
|
205 |