Return route array.

@return array
328655
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'method' => $this->method,
            'url' => $this->url,
            'model' => $this->model,
            'view' => $this->view,
            'controller' => $this->controller,
            'action' => $this->action,
            'default' => $this->default,
            'param' => $this->param,
            'callback' => $this->callback
        ];
    }
611096
public function getAllRoutes(): array
  {
    foreach ($this->routesGet as $rout)
    {
      $this->routesAll[] = $rout;
    }

    foreach ($this->routesPost as $rout)
    {
      $this->routesAll[] = $rout;
    }

    return $this->routesAll;
  }
835911
public function getRoute()
    {
        foreach ($this->routes as $route) {

            // Is the route array valid
            if (false == ($cleansed = $this->isValidRoute($route))) {
                continue;
            }

            $route = $cleansed;

            // Does request method match
            if (!$this->methodMatches($route)) {
                continue;
            }

            if (false === $this->isAllowedByIp($route)) {
                continue;
            }

            if (false === $this->isAllowedByRole($route)) {
                // @codeCoverageIgnoreStart
                continue;
                // @codeCoverageIgnoreEnd
            }

            if (false != ($match = $this->isDirectMatch($route))) {
                return $match;
            }

            if (false != ($match = $this->isParameterisedMatch($route))) {
                return $match;
            }
        }

        $e = new RouteNotFoundException('Route for path not found.');
        $e->setAdditionalData('Path: ', $this->path);
        throw $e;
    }
714940
protected function getRoute()
    {
        $route = $this->path['route'];
        if (is_array($route)) {
            return route($route[0], array_slice($route, 1));
        }

        return route($route);
    }
77135
private function fetchRoutingTable()
    {
        $this->routes = $this->loadRoutingTable();

        if (!empty($this->routes)) {
            $this->traverseRouteListAndBuildMap();
        }

        return $this->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;
  }
1049065
public function getRoutes() : array {
        $request = get_request();
        $requestMethod = $request->method();
        $requestPathParts = $request->pathParts();
        $routesIndex = $this->routesIndex;
        $routes = [];
        $this->getRoutesFromIndex($routes,$routesIndex, $requestMethod, $requestPathParts);
        return $routes;
    }
997226
protected function getRoutes(): array
    {
        uasort($this->routes, function (RouteInterface $left, RouteInterface $right) {
            if ($left instanceof GroupRoute || $right instanceof GroupRoute) {
                return 1;
            }

            return 0;
        });

        return $this->routes;
    }
507127
public static function getRouteInfo()
    {
        $action 				= \Route::current()->getActionName();
        list($class, $method) 	= explode('@', $action);
        return ['controller_name' => ltrim($class, '\\'), 'method_name' => $method];
    }
179837
public function getAvailableAndAssignedRoutes(): array
    {
        $routes = $this->getAppRoutes();
        $exists = [];

        foreach (array_keys($this->manager->getPermissions()) as $name) {
            if ($name[0] !== '/') {
                continue;
            }
            $exists[] = $name;
            unset($routes[$name]);
        }

        return [
            'available' => array_keys($routes),
            'assigned' => $exists,
        ];
    }
434464
protected function getRoutes()
    {
        $options = $this->getOptions();
        return isset($options[self::KEY_ROUTES]) ? $options[self::KEY_ROUTES] : array();
    }
53976
public function toArray(): array
    {
        return [
            'name'      => $this->name,
            'path'      => $this->path,
            'method'    => $this->method,
            'handler'   => $this->handler,
            'binds'     => $this->bindVars,
            'params'    => $this->params,
            'options'   => $this->options,
            //
            'pathVars'  => $this->pathVars,
            'pathStart' => $this->pathStart,
            'pathRegex' => $this->pathRegex,
            //
            'chains'    => $this->chains,
        ];
    }
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;
    }
1037406
public function route()
    {
        $batch = array();
                
        foreach ($this->request->getCalls() as $call) {
            $batch[] = $this->dispatch($call);
        }

        return $this->response->encode($batch);
    }
822303
public function gatherMiddlewareStack(): array
    {
        $middlewares = $this->getMiddlewareStack();
        // If there is a parent group, we merge both middleware stacks (Route + RouteGroup).
        if ($group = $this->getParentGroup()) {
            $middlewares = array_merge($middlewares, $group->getMiddlewareStack());
        }

        return $middlewares;
    }
915402
public function getAllRoutes()
    {
        $routes = [];
        foreach ($this->getRoutes() as $path => $route) {
            if (array_key_exists('slug', $route)) {
                $routes[$route['slug']] = $path;
            }
        }
        return $routes;
    }
170897
public function toArray()
    {
        return [
            'key'      => $this->key(),
            'name'     => $this->name(),
            'script'   => $this->script(),
            'dir'      => $this->direction(),
            'native'   => $this->native(),
            'regional' => $this->regional(),
        ];
    }