---
title: "Route"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:typo3-request-attribute-route@11.5"
source: "ApiOverview/RequestLifeCycle/RequestAttributes/Route.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v11 has reached end-of-life as of October 31th 2024 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Route {#typo3-request-attribute-route}

The `route` backend request attribute provides routing information in
the object `\TYPO3\CMS\Backend\Routing\Route`.

Example:

```php
$route = $request->getAttribute('route');
$moduleConfiguration = $route->getOption('moduleConfiguration');
```

## API {#api}

-   **class Route**

    -   *Fully qualified name:* `\TYPO3\CMS\Backend\Routing\Route`

    This is a single entity for a Route.

    The architecture is highly inspired by the Symfony Routing Component.

    -   **getPath()**

        Returns the path

    -   **setPath(string $pattern)**

        Sets the pattern for the path
        A pattern must start with a slash and must not have multiple slashes at the beginning because the
        generated path for this route would be confused with a network path, e.g. '//domain.com/path'.

        This method implements a fluent interface.

        -   *param string $pattern:* The path pattern

    -   **getMethods()**

        Returns the uppercased HTTP methods this route is restricted to.

        An empty array means that any method is allowed.

        -   *returntype:* array

        *Returns:* The methods

    -   **setMethods(array $methods)**

        Sets the HTTP methods (e.g. \['POST'\]) this route is restricted to.

        An empty array means that any method is allowed.

        This method implements a fluent interface.

        -   *param array $methods:* The array of allowed methods
        -   *returntype:* self

    -   **getOptions()**

        Returns the options set

    -   **setOptions(array $options)**

        Sets the options

        This method implements a fluent interface.

        -   *param array $options:* The options

    -   **setOption(string $name, mixed $value)**

        Sets an option value

        This method implements a fluent interface.

        -   *param string $name:* An option name
        -   *param mixed $value:* The option value

    -   **getOption(string $name)**

        Get an option value

        -   *param string $name:* An option name

    -   **hasOption(string $name)**

        Checks if an option has been set

        -   *param string $name:* An option name
