@param $path

@return FastRouteWrapper
351504
protected function loadFastRouteRoutes($path)
    {
        $routeParser = new \FastRoute\RouteParser\Std();
        $dataGenerator = new \FastRoute\DataGenerator\GroupCountBased();
        $routeCollector = new \FastRoute\RouteCollector($routeParser, $dataGenerator);

        if (!is_readable($path)) {
            throw new \InvalidArgumentException('Invalid fast route routes path found: ' . $path);
        }

        // The included file must return the laravel router
        $getRouteCollector = function () use ($routeCollector, $path) {
            $r = $routeCollector;
            include $path;

            return $r;
        };

        $routeCollector = $getRouteCollector();
        if (!($routeCollector instanceof \FastRoute\RouteCollector)) {
            throw new \Exception('Invalid return value from '
                . pathinfo($path, PATHINFO_FILENAME)
                . ' expected instance of RouteCollector'
            );
        }

        $dispatcher = new \FastRoute\Dispatcher\GroupCountBased($routeCollector->getData());
        $router = new \PPI\FastRoute\Wrapper\FastRouteWrapper(
            $dispatcher
        );
        $router->setModuleName($this->getName());

        return $router;
    }
1151034
public function apiIndexOnGet(string $path): ConfigurableRoute
    {
        return $this->onGet($path, new Index($this->routes, $this->mimeTypes));
    }
931459
public function withPath(string $path): UriInterface
    {
        $instance = clone $this;
        $instance->path = $this->marshalPath($path);

        return $instance;
    }
1015075
public function any($path, $abstract) {
        return $this->createRoute([
            HttpRequestMethod::GET,
            HttpRequestMethod::POST,
            HttpRequestMethod::PUT,
            HttpRequestMethod::PATCH,
            HttpRequestMethod::UPDATE,
            HttpRequestMethod::DELETE,
        ], $path, $abstract);
    }
297996
public function beforeUnbind($path)
    {
        // FIXME: We shouldn't trigger this functionality when we're issuing a
        // MOVE. This is a hack.
        if ('MOVE' === $this->server->httpRequest->getMethod()) {
            return;
        }

        $node = $this->server->tree->getNodeForPath($path);

        if (!$node instanceof ICalendarObject || $node instanceof ISchedulingObject) {
            return;
        }

        if (!$this->scheduleReply($this->server->httpRequest)) {
            return;
        }

        $addresses = $this->getAddressesForPrincipal(
            $node->getOwner()
        );

        $broker = new ITip\Broker();
        $messages = $broker->parseEvent(null, $addresses, $node->get());

        foreach ($messages as $message) {
            $this->deliver($message);
        }
    }
938561
public function getHandler( $path )
    {
        foreach ( $this->pathHandlers as $supportedPath => $handler )
        {
            if ( strstr( $path, $supportedPath ) !== false )
            {
                return $handler;
            }
        }

        return $this->defaultHandler;
    }
227271
protected function relativeTargetPath($path)
    {
        if (strpos($path, JPATH_ROOT) === 0) {
            $path = self::$resourceLocator->rewrite(
                $this->relativeJoomlaTargetPath($path),
                true
            );
        }

        return $path;
    }
1041632
public function get($path)
    {
        if (isset($this->allRoutes[$path])) {
            return $this->allRoutes[$path];
        }

        throw new RoutingException("Route [{$path}] does not exist.");
    }
718182
protected function getApiUrl($path) {
		// remove extra / at the beginning
		$path = ltrim($path, '/');

		// prepend protocol if not passed
		$protocol = '';
		if(strpos($this->domain, 'http://') !== 0 && strpos($this->domain, 'https://') !== 0) {
			$protocol = 'https://';
		}

		// assemble final url
		return $protocol . $this->domain . '/api/' . self::API_VERSION . '/' . $path;
	}
1099546
public function dispatch($path) {

            $found  = false;
            $params = [];

            if (isset($this->routes[$path])) {

                $found = $this->render_route($path, $params);

            } else {

                foreach ($this->routes as $route => $callback) {

                    $params = [];

                    /* e.g. #\.html$#  */
                    if (substr($route,0,1)=='#' && substr($route,-1)=='#'){

                        if (preg_match($route, $path, $matches)){
                            $params[':captures'] = array_slice($matches, 1);
                            $found = $this->render_route($route, $params);
                            break;
                        }
                    }

                    /* e.g. /admin/*  */
                    if (strpos($route, '*') !== false){

                        $pattern = '#^'.str_replace('\*', '(.*)', preg_quote($route, '#')).'#';

                        if (preg_match($pattern, $path, $matches)){

                            $params[':splat'] = array_slice($matches, 1);
                            $found = $this->render_route($route, $params);
                            break;
                        }
                    }

                    /* e.g. /admin/:id  */
                    if (strpos($route, ':') !== false){

                        $parts_p = explode('/', $path);
                        $parts_r = explode('/', $route);

                        if (count($parts_p) == count($parts_r)){

                            $matched = true;

                            foreach($parts_r as $index => $part){
                                if (':' === substr($part,0,1)) {
                                    $params[substr($part,1)] = $parts_p[$index];
                                    continue;
                                }

                                if ($parts_p[$index] != $parts_r[$index]) {
                                    $matched = false;
                                    break;
                                }
                            }

                            if ($matched){
                                $found = $this->render_route($route, $params);
                                break;
                            }
                        }
                    }
                }
            }

            return $found;
    }
1200414
public function ignorePath($path)
    {
        if (is_array($path)) {
            foreach ($path as $pathToIgnore) {
                $this->ignorePath($pathToIgnore);
            }

            return $this;
        }

        $this->ignoredPaths[] = $path;
        return $this;
    }
283646
public function setPath($path)
    {
        $this->path = '';
        $this->realPath = $path;

        if(!empty($path)) {
            $this->path .= $this->str($path)->trim()->trimLeft('/')->trimRight('/')->val();
        }

        return $this;
    }
794358
public static function makeGoodPathServer($path)
    {

        $path = (string)$path;
        $path = str_replace(['\\', '/',], DIRECTORY_SEPARATOR, $path);

        return $path;
    }
62244
protected function setRequestPath($path) {
        // Resolve the path with the base_uri set in the client
        $uri = Psr7\Uri::resolve($this->client->getConfig('base_uri'), Psr7\uri_for($path));
        $this->request = $this->request->withUri($uri);

        return $this;
    }
746319
public function withPath(Path $path): self
    {
        $url = Structure::fromString((string) $this)
            ->withPath(
                new UrlPath((string) $path)
            )
            ->withQuery(new NullQuery)
            ->withFragment(new NullFragment);

        return new self(
            (string) $url
        );
    }
127276
public static function getHandlerByPath($path)
    {
        $result = null;
        $path   = self::prepareRoute('/'.trim($path, " /"));

        foreach (static::$routes as $key => $handler) {
            $matches = [];
            if (preg_match('#'.$key.'$#i', $path, $matches)) {
                foreach ($matches as $key => $val) {
                    if (!is_numeric($key)) {
                        $_GET[$key] = $val;
                    }
                }
                $result = $handler[1];
                break;
            }
        }
        return $result;
    }
963019
public function cover(string $path): DriverInterface
    {
        return new Adapters\Cover(
            $this,
            $this->imagePath($path)
        );
    }