Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Neofox opened this issue Oct 11, 2017 · 0 comments
Open

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

Neofox opened this issue Oct 11, 2017 · 0 comments
Assignees

Comments

@Neofox
Copy link
Member

Neofox commented Oct 11, 2017

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants