public function uri(string $target, $parameters = []): UriInterface
    {
        if (strpos($target, ':') !== false) {
            list($controller, $action) = explode(':', $target);
        } else {
            $controller = $target;
            $action = $parameters['action'] ?? null;
        }

        if (!$this->config->hasController($controller)) {
            throw new VaultException("Unable to generate uri, undefined controller '{$controller}'");
        }

        return $this->route->withDefaults(compact('controller', 'action'))->uri($parameters);
    }
public function uri(string $target, $parameters = []): UriInterface
    {
        if (strpos($target, ':') !== false) {
            list($controller, $action) = explode(':', $target);
        } else {
            $controller = $target;
            $action = $parameters['action'] ?? null;
        }

        if (!$this->config->hasController($controller)) {
            throw new VaultException("Unable to generate uri, undefined controller '{$controller}'");
        }

        return $this->route->withDefaults(compact('controller', 'action'))->uri($parameters);
    }
public function uri ( string $ target , $ parameters = [ ] ) : UriInterface { if ( strpos ( $ target , ':' ) !== false ) { list ( $ controller , $ action ) = explode ( ':' , $ target ) ; } else { $ controller = $ target ; $ action = $ parameters [ 'action' ] ?? null ; } if ( ! $ this -> config -> hasController ( $ controller ) ) { throw new VaultException ( "Unable to generate uri, undefined controller '{$controller}'" ) ; } return $ this -> route -> withDefaults ( compact ( 'controller' , 'action' ) ) -> uri ( $ parameters ) ; }
Get vault specific uri.

@param string      $target Target controller and action in a form of "controller::action" or
"controller:action" or "controller".
@param array|mixed $parameters

@return UriInterface

@throws VaultException
Get vault specific uri .