Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Allow to match route name? #53

Closed
bakura10 opened this issue Jan 23, 2015 · 1 comment
Closed

Allow to match route name? #53

bakura10 opened this issue Jan 23, 2015 · 1 comment

Comments

@bakura10
Copy link

Hi,

In my refactor of ZfrRest, I stumbled into an interesting case, and I'd like to know if Dash supports that. Basically, I want to be able to set a template based on a route name. For instance, if there is a "users" route that has a child route called "user", it will be possible to decide to render a template for "users/user".

However, for correctly resolving the file path and find the proper file name, I need to have the default controller (because it contains the namespace that is needed to resolve the file). What I'd like to do is being able to do that:

$params = $router->getRouteForPath('users/user');

Or something similar, and it would return all the info from config for a given path (its defaults values, constraints)...

Is this possible @DASPRiD ?

@DASPRiD
Copy link
Owner

DASPRiD commented Jan 26, 2015

I think your best bet for that would actually reading the config array. The config stuff itself is pretty much lost during the factory process.

@DASPRiD DASPRiD closed this as completed Oct 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants