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

Proposal: ability to add Route object directly into Router #13326

Closed
webmasterlv opened this issue Mar 17, 2018 · 1 comment
Closed

Proposal: ability to add Route object directly into Router #13326

webmasterlv opened this issue Mar 17, 2018 · 1 comment
Assignees
Milestone

Comments

@webmasterlv
Copy link

First of all, thank you for work you've done, this is outstanding framework.
While developing my application routing structure, one particular feature would be useful - if i could pass Route object directly into Router instance. This way by extending Route object it is would be possible to attach some additional data to object and use it somewhere else in application.
As i understand, this shouldn't break BC, because internally Router stores them as Route objects already.
This could be like:

class CustomRoute extends Phalcon\Mvc\Router\Route {

}

$route = new CustomRoute();

$router = new Phalcon\Mvc\Router();
$router -> add($route);
@sergeyklay sergeyklay added this to the 3.4.x milestone Mar 24, 2018
@sergeyklay sergeyklay self-assigned this Mar 24, 2018
@sergeyklay
Copy link
Contributor

Implemented in the 3.4.x branch. Thank you for contributing.

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