@param string $name
@param string $path
@param array $routeData

@return array
171100
protected function buildSwaggerPathData(
        string $name,
        string $path,
        array $routeData
    ): array {
        $swaggerPathData = [];

        $swaggerConfig = Options::getArray(
            $routeData,
            ConfigKey::SWAGGER,
            []
        );

        $allowedMethods = Options::getArray(
            $routeData,
            'allowed_methods',
            []
        );

        if (is_string($allowedMethods)) {
            $allowedMethods = [$allowedMethods];
        }

        foreach ($allowedMethods as $allowedMethod) {
            $allowedMethod = strtolower($allowedMethod);

            $data = Options::getArray(
                $swaggerConfig,
                $allowedMethod,
                []
            );

            $data['description'] = Options::getString(
                $data,
                'description',
                'Name: ' . $name
            );

            $data['operationId'] = Options::getString(
                $swaggerPathData,
                'operationId',
                '[' . $allowedMethod . ']' . $name
            );

            $data['produces'] = Options::getArray(
                $data,
                'produces',
                ['application/json']
            );

            $parameters = Options::getArray(
                $data,
                'parameters',
                []
            );

            $data['parameters'] = $this->buildPathParameters->__invoke(
                $parameters,
                $path
            );

            $data['responses'] = Options::getArray(
                $data,
                'responses',
                [
                    "default" => [
                        'description' => "undefined"
                    ]
                ]
            );

            $swaggerPathData[$allowedMethod] = $data;
        }

        return $swaggerPathData;
    }
237781
private function getSubPathsByNames(string $path, array $names): array
    {
        $subPaths = [];
        foreach ($names as $name) {
            $subPaths[] = $this->getSubPathByName($path, $name);
        }

        return $subPaths;
    }
792425
protected function makeFromPath($name, $path)
    {
        if (!$this->get($name)) {

            $params = [
                'name' => $name,
                'path' => rtrim($path, '/') . '/' . $name
            ];

            $module = IOC::resolve('Module', $params);
            $this->add($module->getName(), $module->create());

            return $module;
        }

        return null;
    }
1285872
public function load($name)
  {
    $path = $this->_getPath($name);
    
    $data = null;
    if (file_exists($path)) {
      $serialized = file_get_contents($path);
      $data = @unserialize($serialized);
    }
    if (!is_array($data)) {
      $data = array();
    }
    
    return $data;
  }
295036
public static function register($name, $path, $controller, $parameters, $options=array()) {
		static::$routes[$name] = new static($name, $path, $controller, $parameters, $options);
	}
374061
public function getRouteByPath($path, RequestContext $context, array &$routeAttributes = [])
    {
        $path = $this->normalizePath($path);
        $potentialRoutes = $this->filterRouteCollectionForPath($this->getRoutes(), $path);
        $matcher = new UrlMatcher($potentialRoutes, $context);
        $routeAttributes = $matcher->match($path);

        return $potentialRoutes->get($routeAttributes['_route']);
    }
469113
public function read($name, $path = null) {
        // in cache?
        if(isset($this->cache[$name]))
            return !is_null($path) && isset($this->cache[$name][$path]) ? $this->cache[$name][$path] : $this->cache[$name];

        // no cookie?
        if(!$this->check($name))
            return null;

        return $this->cookies->get($name)->read($path);
    }
338907
public function post($name, $path, $controller = null)
    {
        $this->add('POST', $name, $path, $controller);
        return $this;
    }
1318730
protected function handle(string $path, callable $action, $method, string $name = null): HttpRoute
    {
        if (!is_array($method)) {
            $method = [$method];
        }
        /** @var HttpRoute $route */
        $route = $this->data->createRoute($this->prefix . $path, $action, $name);
        $route->method(...$method);
        return $route;
    }
226693
public static function getRouteByName($name, $parameters = [], $absolute = true) {
		foreach ( self::$routes as $routePath => $routeDetails ) {
			if (self::checkRouteName ( $routeDetails, $name )) {
				if (\sizeof ( $parameters ) > 0)
					$routePath = self::_getURL ( $routePath, $parameters );
				if (! $absolute)
					return \ltrim ( $routePath, '/' );
				else
					return $routePath;
			}
		}
		return false;
	}
94471
protected function _addRoute($routeType, $routeData)
    {
        switch ($routeType) {
            case RouteTypes::TYPE_DEFAULT_ROUTE:
                $route = $this->_addDefaultRoute($routeData);
                break;
            case RouteTypes::TYPE_REDIRECT_ROUTE:
                $route = $this->_addRedirectRoute($routeData);
                break;
            default:
                throw new BadRequestException();
        }
        return $route;
    }
680012
public function getUri(string $name, array $data = [], $warnData = true) : Uri
    {
        if (!isset($this->routes[$name])) {
            throw new \InvalidArgumentException(sprintf("Invalid route name '%s'", $name));
        }

        $route = $this->routes[$name];

        $uri = self::request()->getUri();
        $uri->removeAllQueries()
            ->setFragment(null)
            ->setPath($this->routeRegexp($route, $data))
        ;

        // $cloneData = $data;

        // append querystring
        if ($route->getUserInputs()) {
            $queryToAdd = [];
            foreach ($route->getUserInputs() as $querystring) {
                if (!isset($data[$querystring->getName()]) &&
                    $querystring->isMandatory() &&
                    $warnData &&
                    $route->getHttpMethod() != 'POST' &&
                    $route->getHttpMethod() != 'PUT' &&
                    $route->getHttpMethod() != 'DELETE'
                ) {
                    throw new \InvalidArgumentException(sprintf(
                        "Missing querystring '%s' to generate route '%s'",
                        $querystring->getName(),
                        $route->getName()
                    ));
                }

                if (isset($data[$querystring->getName()])) {
                    // unset($cloneData[$querystring->getName()]);
                    $queryToAdd[$querystring->getName()] = $data[$querystring->getName()];
                }
            }

            $uri->addQueries($queryToAdd);
        }

        /*
        // Args can be consumed by routeRegexp and not remove from cloneData
        if (sizeof($cloneData)) {
            throw new \InvalidArgumentException(sprintf(
                "Too many data to generate route '%s' with keys %s",
                $route->getName(),
                "'" . implode("', '", array_keys($cloneData)) . "'"
            ));
        }
        */

        return $uri;
    }
1355041
protected function _mkdir($path, $name) {
		$path = $path.'/'.$name;
		if (ftp_mkdir($this->connect, $path) === false) {
			return false;
		} 
		
		$this->options['dirMode'] && @ftp_chmod($this->connect, $this->options['dirMode'], $path);
		return $path;
	}
385892
public function bindRouteCollection($name = "")
    {
        $routeCollection = new RouteCollection($this->paths['app'].'/routes.yml', $this->paths, $name, $this->parser);

        return $routeCollection;
    }
786394
public function parse($name, $data, Map $map)
    {
        if (is_array($data)) {
            return $this->complexRoute($name, $data, $map);
        }
        return $map->get($name, $data);
    }
1048201
private function createDirectory($path = '', $name = '')
    {
        $directory = new ArrayObject();
        $directory['name'] = $name;
        $directory['real_path'] = $path;
        $directory['directories'] = [];
        $directory['files'] = [];

        return $directory;
    }
522226
protected function fromPath($name)
    {
        $modules = [];

        $base = $this->getBase();
        $path = $this->getDir();

        if ($this->endsWith($name, '*')) {

            $dirs = $this->getDirs($base . $path, $name);

            foreach ($dirs as $name => $dir) {
                $modules[] = $this->makeFromPath($name, $path);
            }

        } else {
            $modules[] = $this->makeFromPath($name, $name);
        }

        return $modules;
    }