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

webmasterlv opened this Issue Mar 17, 2018 · 1 comment


None yet
2 participants

webmasterlv commented Mar 17, 2018

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 sergeyklay referenced this issue Mar 24, 2018


Added Phalcon\Mvc\Router::attach #13330

3 of 3 tasks complete

This comment has been minimized.


sergeyklay commented Mar 24, 2018

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

@sergeyklay sergeyklay closed this Mar 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment