Ejemplo n.º 1
0
 /**
  * @param array $matches
  *
  * @return string
  */
 private function rewriteInternalUriCallback(array $matches)
 {
     if ($this->internalUriValidationRule->isValid($matches[7]) === true) {
         $resourceParts = explode('/', $matches[7]);
         $path = $this->getResourcePath($resourceParts);
         if ($this->controllerActionExists->controllerActionExists($path) === true) {
             return '<a' . $matches[1] . 'href="' . $this->router->route($matches[7]) . '"';
         }
     }
     return $matches[0];
 }
Ejemplo n.º 2
0
 /**
  * Returns, whether the given module controller action exists
  *
  * @param string $path
  *
  * @return boolean
  */
 public function controllerActionExists($path)
 {
     return $this->controllerActionExists->controllerActionExists($path);
 }