Creates route to elFinder client
@return array
493601
protected function createRoute()
    {
        $route = (array)$this->clientRoute;
        $route['id'] = $this->options['id'];
        if (!empty($this->filter)) {
            $route['filter'] = $this->filter;
        }
        if ($this->multiple) {
            $route['multiple'] = 1;
        }
        return $route;
    }
862021
protected function getRouteDefinitions()
    {
        $provider = 'Adamgoose\AnnotationsServiceProvider';

        return '<?php '.PHP_EOL.PHP_EOL.Scanner::create(
          $this->laravel->getProvider($provider)->routeScans()
        )->getRouteDefinitions().PHP_EOL;
    }
595362
public function get(): array
    {
        list ($generatorClass, $dispatcherClass) = $this->getGeneratorAndDispatcherClasses();

        $routesData = $this
            ->createRouter($generatorClass, $dispatcherClass)
            ->getCachedRoutes($this->addRoutes($this->createGroup()));

        $globalConfigurators = iterator_to_array($this->getGlobalContainerConfigurators(), false);
        $globalMiddleware    = iterator_to_array($this->getGlobalMiddleWareHandlers(), false);

        return [
            static::KEY_ROUTER_PARAMS                  => [
                static::KEY_ROUTER_PARAMS__GENERATOR  => $generatorClass,
                static::KEY_ROUTER_PARAMS__DISPATCHER => $dispatcherClass,
            ],
            static::KEY_ROUTES_DATA                    => $routesData,
            static::KEY_GLOBAL_CONTAINER_CONFIGURATORS => $globalConfigurators,
            static::KEY_GLOBAL_MIDDLEWARE              => $globalMiddleware,
        ];
    }
226270
public static function getRoutes()
    {
        $routes  = new \FreeFW\Router\RouteCollection();
        $paths   = [];
        $paths[] = __DIR__ . '/../resource/routes/restful/v1/routes.php';
        foreach ($paths as $idx => $onePath) {
            $apiRoutes = @include($onePath);
            if (is_array($apiRoutes)) {
                foreach ($apiRoutes as $idx => $apiRoute) {
                    $myRoute = new \FreeFW\Router\Route();
                    $myRoute
                        ->setMethod($apiRoute['method'])
                        ->setUrl($apiRoute['url'])
                        ->setController($apiRoute['controller'])
                        ->setFunction($apiRoute['function'])
                        ->setSecured($apiRoute['secured'])
                    ;
                    $routes->addRoute($myRoute);
                }
            }
        }
        return $routes;
    }
145947
public function routes()
    {
        if (empty($this->routes))
        {
            $this->routes = $this->configureSlice()->asArray();
        }

        return $this->routes;
    }
592661
public function getallRouting():array
    {
        $routings = array();
        $appc = $this->getMaster("Apps");
        $apps = $appc->getAllApps();

        $routingArray = array();
        $pattern = '/\s*/m';
        $replace = '';

        foreach ($apps as $one) {
            $routers = scandir(FEnv::get("framework.root") . "apps/" . $one->name . "/Routing");
            foreach ($routers as $file) {
                $scope = null;
                if ($file == "." || $file == ".." || false === strpos($file, ".merc")) {
                    continue;
                }
                if (($router = fopen((FEnv::get("framework.apps")) .
                    $one->name . "/Routing/" . $file, "r"))) {
                    $rtarray = array("activity" => "", "path" => "", "name" => "");
                    $start = 0;
                    $end = 0;
                    $croute = 0;
                    while ($listen = fgets($router, 1024)) {
                        $listen = preg_replace($pattern, $replace, $listen);

                        if ($listen === "") {
                            continue;
                        }
                        if ($listen === "route:" && $start == 0 && $end === 0) {
                            $start = 1;
                            continue;
                        } elseif ($listen === "endroute" && $start === 1 & $end === 0) {
                            $end = 1;
                            array_push($routingArray, $rtarray);
                        } elseif (($this->strlikeInArray($listen, array("activity", "path", "name")) !== false) ||
                            ($this->strlikeInArray($listen, array("activity", "path",
                                    "name", "visibility")) !== false)) {
                            $listen = explode(':', $listen);
                            $rtarray[$listen[0]] = $listen[1];
                        }

                        if ($start === 1 && $end === 1) {
                            $rtarray = array("method" => "", "path" => "", "name" => "", "visibility" => "private");
                            $start = $end = 0;
                            $croute++;
                        }
                    }
                    $newfilename = str_replace(".merc", "", $file);
                    $view = $this->generateRoute(
                        'iumio_manager_routing_manager_get_one',
                        array("filename" => $newfilename, "appname" => $one->name)
                    );
                    $remove = $this->generateRoute(
                        'iumio_manager_routing_manager_remove_one',
                        array("filename" => $newfilename, "appname" => $one->name)
                    );
                    array_push($routings, array("name" => $file, "count_route" => $croute, "app" => $one->name,
                        'view' => $view, 'remove' => $remove));
                }
            }
        }

        return ($routings);
    }
358343
protected function addRoutes()
    {
        // Define a "not found" route
        $this->router->add('/', [$this, 'unknownEndpoint']);

        // Only add these routes if we're using authorization
        if ($this->configuration->getUseAuthorization()) {
            // Token route for requesting tokens
            $this->router->add('/token', [$this, 'token']);

            if ($this->configuration->getAuthorizationMode() >= 2) {
                // Token route for authorizing a client
                $this->router->add('/authorize', [$this, 'authorize']);
            }
        }

        return $this;
    }
1120263
public function getUrlRule()
    {
        $request = $this->getRequestRoute();
        
        return [
            'module' => $this->module->id,
            'route' => $this->module->id . '/' . $request['route'],
            'params' => $request['originalArgs'],
        ];
    }
801339
public function getCreateRoute()
    {
        if (null === $this->createRoute) {
            $route = rtrim($this->getBaseRoute(), '/') . '/' . $this->getCreateSuffix();
            $this->setCreateRoute($route);
        }

        return $this->createRoute;
    }
490472
public function getAllRoutes()
    {
        $routes = Route::getRoutes();
        $results = [];

        if ($routes != null) {
            foreach ($routes as $route) {
                $route = array(
                    'method' => $route->getMethods(),
                    'uri'    => $route->getPath()
                );
                $results[] = (object)$route;
            }
        }

        return response()->json(arrayView('phpsoft.users::route/browse', [
            'routes' => $results,
        ]), 200);
    }
340662
protected function createClient()
	{
		$resource = Route::input( 'resource' );
		$related = Route::input( 'related', Input::get( 'related' ) );

		$aimeos = app( 'aimeos' )->get();
		$tmplPaths = $aimeos->getCustomPaths( 'client/jsonapi/templates' );

		$context = app( 'aimeos.context' )->get();
		$langid = $context->getLocale()->getLanguageId();

		$context->setView( app( 'aimeos.view' )->create( $context, $tmplPaths, $langid ) );

		return \Aimeos\Client\JsonApi::create( $context, $resource . '/' . $related );
	}
764851
public function getRouteDefinitionsDetail()
    {
        $paths = array();
        foreach ($this->getEndpointsInClasses($this->getReader()) as $endpoint) {
            /* @var \Collective\Annotations\Routing\Annotations\MethodEndpoint $endpoint */
            foreach ($endpoint->toRouteDefinitionDetail() as $path) {
                $paths[] = $path;
            }
        }

        return $paths;
    }
630807
protected function getRoutes()
    {
        $routes = [];
        foreach ($this->routes as $collection) {
            foreach ($collection->getRoutes() as $route) {
                $uses = array_key_exists('uses', $route->getAction())
                    ? $route->getAction()['uses']
                    : $route->getActionName();

                $routes[] = $this->filterRoute([
                    'host' => $route->domain(),
                    'method' => implode('|', $route->methods()),
                    'uri' => $route->uri(),
                    'name' => $route->getName(),
                    'action' => $uses,
                    'middleware' => $route->getMiddleware() ? implode(", ", $route->getMiddleware()) : "No",
                    'protected' => $route->isProtected() ? 'Yes' : 'No',
                    'versions' => implode(', ', $route->versions()),
                    'scopes' => implode(', ', $route->scopes()),
                    'rate' => $this->routeRateLimit($route),
                ]);
            }
        }

        if ($sort = $this->option('sort')) {
            $routes = Arr::sort($routes, function ($value) use ($sort) {
                return $value[$sort];
            });
        }
        if ($this->option('short')) {
            $this->headers = ['Method', 'URI', 'Name', 'Version(s)'];
            $routes = array_map(function ($item) {
                return array_only($item, ['method', 'uri', 'name', 'versions']);
            }, $routes);
        }
        return array_filter(array_unique($routes, SORT_REGULAR));
    }
1368599
public function configure()
    {
        $configurator = $this->configurator;
        if (!($configurator instanceof ElFinderConfigurationProviderInterface)) {
            throw new \Exception('Configurator class must implement ElFinderConfigurationProviderInterface');
        }
        $parameters = $configurator->getConfiguration($this->instance);

        return $parameters;
    }
569092
public function getList()
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        $mode = $this->params('mode', false);
        $type = $this->params('type', false);
        $endpoint = $this->params('endpoint', false);
        $annee = $this->params('annee', 0);
        $processHandler = $this->getProcessStateHandler();
        $executions = $processHandler->getProcessExecutions($mode, $type, $endpoint, $annee);
        if ($executions instanceof \Doctrine\ORM\PersistentCollection)
            $executions = $executions->toArray();
        usort($executions, function (Execution $a, Execution $b)
        {
            return intval($a->getId()) < intval($b->getId());
        });
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $processJson = $serializer->serialize($executions, 'json');
        $response->setContent($processJson);
        return $response;
    }
1193727
public function buildRoutes(EntityReflectionInterface $entity)
    {
        $collection = $this->entityActionCollectionBuilder->build($entity);

        $routes = [];

        /** @var EntityActionInterface $action */
        foreach ($collection as $action) {
            $pattern = '/'.$entity->getSlug().'/'.$action->getSlug();
            $defaults = [
                '_controller'   => $this->queryController,
                'orchestra_type' => $this::ROUTE_TYPE,
                'entity_method' => $action->getMethod(),
                'method_slug'   => $action->getSlug(),
                'entity_slug'   => $entity->getSlug()
            ];
            $requirements = [
                '_method'       => $this->methodRequirement
            ];

            if (true === $action->isCommand()) {
                $defaults['_controller'] = $this->commandController;

                // We add a "command"
                $defaults['command_class'] = $action->getCommandClass();

                $requirements['_method'] = 'GET|POST';
            }

            if (true === $action->emitEvent()) {
                $defaults['_controller'] = $this->eventController;
            }

            $route = new Route($pattern, $defaults, $requirements);
            $routeName = $action->getRouteName();

            $routes[$routeName] = $route;
        }

        return $routes;
    }
697235
public function getRoutes()
    {
        $manager = RBACHelper::getAuthManager();
        $routes = $this->getAppRoutes();
        $exists = [];
        foreach (array_keys($manager->getPermissions()) as $name) {
            if ($name[0] !== '/') {
                continue;
            }
            $exists[] = $name;
            unset($routes[$name]);
        }
        return [
            'avaliable' => array_keys($routes),
            'assigned' => $exists
        ];
    }