Returns an array of CLI routes
@return array
199011
public function getList()
    {
        $routes = &gplcart_static('cli.route.list');

        if (isset($routes)) {
            return $routes;
        }

        $routes = (array) gplcart_config_get(GC_FILE_CONFIG_ROUTE_CLI);

        $this->hook->attach('cli.route.list', $routes, $this);
        $this->setAliases($routes);
        return $routes;
    }
1205601
public function routes() {
    $routes = [];

    // Only add the routes if we're using ecomm sessions, otherwise drupal user
    // accounts will be created for everyone and the core user login/logout
    // functionality can be used.
    if (!$this->config->get('use_ecomm_sessions')) {
      return $routes;
    }

    $external_registration_path = $this->config->get('external_registration_path') ?: '/register';
    $external_login_path = $this->config->get('external_login_path') ?: '/login';
    $external_logout_path = $this->config->get('external_logout_path') ?: '/logout';

    if ($this->config->get('use_ecomm_pass_reset')) {
      $ecomm_forgot_password_path = $this->config->get('ecomm_forgot_password_path') ?: '/forgottenpassword';
      $routes['acm.ecomm_password_reset'] = new Route(
        $ecomm_forgot_password_path,
        [
          '_form' => 'Drupal\acm\Form\CommerceUserPasswordTokenResetForm',
          '_title' => 'Reset Password',
        ],
        [
          // Authentication status will be checked within the form.
          '_access' => 'TRUE',
        ],
        [
          'no_cache' => 'TRUE',
        ]
      );
    }

    $routes['acm.external_user_registration'] = new Route(
      $external_registration_path,
      [
        '_form' => 'Drupal\acm\Form\CommerceUserRegistrationForm',
        '_title' => 'Create Account',
      ],
      [
        '_commerce_user_is_logged_in' => 'FALSE',
      ],
      [
        'no_cache' => 'TRUE',
      ]
    );

    $routes['acm.external_user_login'] = new Route(
      $external_login_path,
      [
        '_form' => 'Drupal\acm\Form\CommerceUserLoginForm',
        '_title' => 'Log In',
      ],
      [
        '_commerce_user_is_logged_in' => 'FALSE',
      ],
      [
        'no_cache' => 'TRUE',
      ]
    );

    $routes['acm.external_user_logout'] = new Route(
      $external_logout_path,
      [
        '_controller' => 'Drupal\acm\Controller\CommerceUserController::logout',
      ],
      [
        '_commerce_user_is_logged_in' => 'TRUE',
      ],
      [
        'no_cache' => 'TRUE',
      ]
    );

    $routes['acm.external_user_password'] = new Route(
      '/commerce-user/password',
      [
        '_form' => 'Drupal\acm\Form\CommerceUserPasswordForm',
        '_title' => 'Reset your password',
      ],
      [
        '_commerce_user_is_logged_in' => 'FALSE',
      ],
      [
        'no_cache' => 'TRUE',
      ]
    );

    $routes['acm.external_user_password_reset'] = new Route(
      '/commerce-user/reset/{email}/{timestamp}/{hash}',
      [
        '_controller' => 'Drupal\acm\Controller\CommerceUserController::resetPass',
        '_title' => 'Reset password',
      ],
      [
        '_commerce_user_is_logged_in' => 'FALSE',
      ],
      [
        'no_cache' => 'TRUE',
      ]
    );

    $routes['acm.external_user_password_reset_form'] = new Route(
      '/commerce-user/reset/{email}',
      [
        '_controller' => 'Drupal\acm\Controller\CommerceUserController::getResetPassForm',
        '_title' => 'Reset password',
      ],
      [
        '_commerce_user_is_logged_in' => 'FALSE',
      ],
      [
        'no_cache' => 'TRUE',
      ]
    );

    $routes['acm.external_user_password_reset_login'] = new Route(
      '/commerce-user/reset/{email}/{timestamp}/{hash}/login',
      [
        '_controller' => 'Drupal\acm\Controller\CommerceUserController::resetPassLogin',
        '_title' => 'Reset password',
      ],
      [
        '_commerce_user_is_logged_in' => 'FALSE',
      ],
      [
        'no_cache' => 'TRUE',
      ]
    );

    return $routes;
  }
522505
protected function getPaths(): array
    {
        $paths = [
            base_path('app'),
            base_path('modules'),
            base_path('resources'),
            base_path('routes'),
        ];

        foreach ($paths as $i => $path) {
            if (!File::isDirectory($path)) {
                unset($paths[$i]);
            }
        }

        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));
    }
153000
protected function getRoutesFromPresenters()
    {
        // Assume no routes
        $routes = [];

        $directoryIterator = new RecursiveDirectoryIterator(DOOZR_APP_ROOT.'App/Presenter');
        $iteratorIterator  = new RecursiveIteratorIterator($directoryIterator);
        $regexIterator     = new RegexIterator($iteratorIterator, '/.*\.php/i', RecursiveRegexIterator::GET_MATCH);

        // Iterate over result
        foreach ($regexIterator as $file) {
            // Found a ".php" file in presenter folder ... try to extract routes
            $routesByMethod = self::parseRoutesFromFile($file[0]);

            foreach ($routesByMethod as $method => $routesForMethod) {
                if (isset($routes[$method]) === false) {
                    $routes[$method] = [];
                }

                foreach ($routesForMethod as $route => $object) {
                    $routesForMethod[$route] = $this->objectToObject($object);
                }

                $routes[$method] = array_merge($routes[$method], $routesForMethod);
            }
        }

        // Return routes found ...
        return $routes;
    }
145947
public function routes()
    {
        if (empty($this->routes))
        {
            $this->routes = $this->configureSlice()->asArray();
        }

        return $this->routes;
    }
1242197
public static function getRoutes()
    {
        if (empty(self::$routes)) {
            // If no routes have been set, try the standard file.
            if (is_readable(self::ROUTES_FILE_LOCATION)) {
                // Decode the JSON routes file into an array.
                self::$routes = json_decode(
                    file_get_contents(self::ROUTES_FILE_LOCATION),
                    true
                );
            }
            // No valid routes have been found.
            if (empty(self::$routes)) {
                throw new Exception('No routes could be obtained. Please check the route configuration file.');
            }
        }

        return self::$routes;
    }
535731
public function getRoutesPatterns()
	{
		$patterns = [];
		$rows = $this->getRoutes();
		if ($rows) foreach ($rows as $route) {
		    $patterns[] = $route->getPattern();
		}
		return $patterns;
	}
1022447
public function getAllPaths()
    {
        $paths = [];

        foreach ($this as $endpoint) {
            foreach ($endpoint->getPaths() as $path) {
                $paths[] = $path;
            }
        }

        return $paths;
    }
1079104
protected function getRoutes()
    {
        $c = self::ROUTE_PATTERN_CONTROLLER;
        $a = self::ROUTE_PATTERN_ACTION;
        $p = self::ROUTE_PATTERN_PARAMS;
        return array(
            "/" => self::MATCHES_NOTHING,
            "/$c" => self::MATCHES_CONTROLLER,
            "/$c/" => self::MATCHES_CONTROLLER,
            "/$c/$a" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/$p" => self::MATCHES_CONTROLLER_ACTION_AND_PARAMS
        );
    }
765043
private function generateDeclaredRoutes()
    {
        $routes = "[\n";
        foreach ($this->getRoutes()->all() as $name => $route) {
            $compiledRoute = $route->compile();

            $properties = [];
            $properties[] = $compiledRoute->getVariables();
            $properties[] = $route->getDefaults();
            $properties[] = $route->getRequirements();
            $properties[] = $compiledRoute->getTokens();
            $properties[] = $compiledRoute->getHostTokens();
            $properties[] = $route->getSchemes();

            $routes .= sprintf("        '%s' => %s,\n", $name, CompiledUrlMatcherDumper::export($properties));
        }
        $routes .= '    ]';

        return $routes;
    }
386962
public function getRoutes()
    {
        $manager = Yii::$app->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
        ];
    }
767017
public function loadRoutes()
    {
        $routesJsonFile = $this->configDir . '/routes.json';
        $routesPhpFile = $this->configDir . '/routes.php';
        
        if (file_exists($this->resourcesDir) && file_exists($this->configDir)) {
            if (file_exists($routesJsonFile))
                return json_decode(file_get_contents($routesJsonFile), true);
            elseif (file_exists($routesPhpFile))
                return require_once $routesPhpFile;
        } else {
            return array();
        }
    }
1121056
public static function routes()
  {
    Route::group(['namespace' => 'Auth'], function () {

      Route::group(['middleware' => ['guest']], function () {

        Route::get('login', 'LoginController@showLoginPage')->name('showLogin');
        Route::post('login', 'LoginController@login')->name('login');

        Route::get('login/email', 'LoginController@showMagicLinkPage')->name('showMagicLink');
        Route::post('login/email', 'LoginController@loginWithEmail')->name('loginWithEmail');
        Route::get('login/callback/email/', 'LoginController@loginEmailCallback')->name('loginCallback');

        Route::get('register', 'RegisterController@showRegistrationPage')->name('showRegistration');
        Route::post('register', 'RegisterController@register')->name('register');

        Route::get('password/forgot', 'ForgotPasswordController@showForgotPasswordPage')->name('showForgotPassword');
        Route::post('password/forgot', 'ForgotPasswordController@forgot')->name('forgot');

        Route::get('password/reset', 'ForgotPasswordController@showResetPasswordPage')->name('showResetPassword');
        Route::post('password/reset', 'ForgotPasswordController@resetPassword')->name('resetPassword');

      });

      Route::get('logout', 'LoginController@logout')->name('logout')->middleware('private', 'auth');
      Route::get('account/verify', 'RegisterController@verifyEmail')->name('verify');

    });
  }
899257
protected function getCallPaths(): array
    {
        $paths = [];
        $backTrace = \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        foreach ($backTrace as $value) {
            if (isset($value['file'])) {
                $paths[] = $value['file'];
            }
        }

        return $paths;
    }
1319119
public function getList()
    {
        $routes = &gplcart_static('route.list');

        if (isset($routes)) {
            return $routes;
        }

        $routes = (array) gplcart_config_get(GC_FILE_CONFIG_ROUTE);
        $this->hook->attach('route.list', $routes, $this);
        return $routes;
    }
742358
public function getAuthRoutes()
    {
        $menu = $this->getMenu();
         
        if (!$menu) {
            return $this->extendPermissionRoutes();
        }
        
        return ArrayHelper::merge($this->extendPermissionRoutes(), $menu->getPermissionRoutes());
    }