Skip to content

$application->getRequest()->getRoute() not working #2

@Neofox

Description

@Neofox

Hello,

In an API based application I would like to get the route called.
My API uses the FastRouteRouter.

In my VersionedApiAction::init() method I just did a

var_dump($this->getApplication()->getRequest()->getRoute())

And I get /srv/app/src/Api/TestEndpoint.php:21:null

Expected result: the route which was used to display the view
/srv/app/src/Api/TestEndpoint.php:21:string '/api/v1/test/23' (length=15)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions