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