Return options by route
@param  string $path Route name
@return array        Options
344381
public function getRouteOptions($path)
    {
        $routeName = ltrim($path, '/');
        if (!isset($this->routeOptions[$routeName])) {
            return [];
        }
        return $this->routeOptions[$routeName];
    }
1204376
private function getFilterParams($path)
    {
        if (!$path) {
            $path = "";
        }

        $parts = explode("/", $path);
        if ($path == "") {

        } elseif (count($parts) == 1) {
            $this->filterParameters['id'] = $parts[0];
        } else {
            foreach ($parts as $key => $part) {
                if (($key % 2) == 1) {
                    $this->filterParameters[$parts[$key - 1]] = urldecode($part);
                } else {
                    $this->filterParameters[$part] = "";
                }
            }
        }

        $this->filterParameters = array_merge($_GET, $this->filterParameters);
    }
206615
public static function get($path)
    {
        $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
        if (!isset(self::$fileTypes[$ext])) {
            return false;
        }
        return self::$fileTypes[$ext];
    }
1353932
public function getUrl($path)
    {
        if ($this->config['cdn']) {
            return $this->applyPathPrefix($path);
        }

        $options = [
            'Scheme' => isset($this->config['scheme']) ? $this->config['scheme'] : 'http',
        ];

        $objectUrl = $this->client->getObjectUrl(
            $this->getBucket(), $path, null, $options
        );

        return $objectUrl;
    }
366541
public function getPathParts($path)
    {
        $path = preg_replace('/\[/', '->[', $path);
        if (preg_match('/^->/', $path)) {
            $path = substr($path, 2);
        }

        return explode('->', $path);
    }
1061021
public function urlFor($path)
    {
        $root = $this->options['api_root'][$this->options['mode']];
        return rtrim($root, '/') . '/' . ltrim($path, '/');
    }
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;
    }
1196625
public function getLocatorPath($path)
	{
		if (!isset($this->locator->$path))
		{
			return false;
		}

		return $this->locator->$path;
	}
879734
public function findByPath(string $path)
    {
        return $this->first(function(ExtensionContract $extension) use($path) {
                    return $extension->getPath() === $path;
                });
    }
368694
private function withPath($path)
    {
        $params = $this->getOptions(true);

        return $this->getBucketKey($path) + $params;
    }
1169992
public function getArgs($path)
    {
        if (!$this->isParsed()) $this->parse();
        
        $data = [];
        $args = [];
        preg_match('#'.$this->parsedRoute.'$#', $path, $data);


        foreach ($data as $name => $value) {
            if (is_int($name)) continue;
            $args[$name] = $value;
        }

        return $args;
    }
1304951
private function pathinfo(string $path): array
    {
        $pathinfo = pathinfo($path) + compact('path');
        $pathinfo['dirname'] = array_key_exists('dirname', $pathinfo) ?
                            $this->normalizeDirname($pathinfo['dirname']) :
                            '';

        return $pathinfo;
    }
490892
private function _list(string $path): array {
        $result = [];
        $scan = glob($path . '/*');
        foreach ($scan as $item) {
            if (is_dir($item)) {
                $result[basename($item)] = $this->_list($item);
            } else {
                $result[] = basename($item);
            }
        }
        return $result;
    }
378908
protected static function getFilesFromPath($path)
    {
        $files = [];
        $path = rtrim($path, '/') . DIRECTORY_SEPARATOR;

        if (false !== $items = scandir($path)) {
            foreach ($items as $item) {
                $file = $path . $item;
                if (is_file($file)) {
                    $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
                    if (in_array($extension, [Packager::FILE_EXTENSION, Package::FILE_EXTENSION])) {
                        $files[] = $file;
                    }
                }
            }
        }

        return $files;
    }
740244
private function getFiles($path)
    {
        if (is_file($path)) {
            return [new SplFileInfo($path, '', '')];
        }

        return $this->finder->name('*.php')->in(realpath($path));
    }
748956
public function lsDirs(string $path = '') : array
    {
        return array_filter(
            $this->ls($path),
            function(File $file) {
                return $file->isDir();
            }
        );
    }
937109
public function getClassesByPath($path)
    {
        $allClasses = [];
        foreach ($this->findAllClasses([$this->rootPath."/$path"], 'php') as $class){
            $allClasses[] = trim($class,"0\\");
        }

        return $allClasses;
    }