-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Phalcon\Mvc\Micro\Collection::map returns NULL instead of Phalcon\Mvc\Router\RouteInterface #1037
Comments
I would say this is a bug in the documentation — I don't see how Phalcon\Mvc\Micro\Collection can return Phalcon\Mvc\Router\RouteInterface; it can return Phalcon\Mvc\Micro\CollectionInterface @phalcon what do you think? https://github.com/phalcon/cphalcon/blob/master/ext/mvc/micro/collection.c#L85 |
The map method should return Phalcon\Mvc\Router\RouteInterface so it can be chained using via(...); $upload->map('/', 'execUpload')->via(['POST','OPTIONS','HEAD']); It should mimic Phalcon\Mvc\Micro::map method that can be called like this //Matches if the HTTP method is GET or POST
$app->map('/repos/store/refs',"action_product")->via(array('GET', 'POST')); |
Micro collections now return Phalcon\Mvc\Micro\CollectionInterface |
A collection does not create a route, so it can't return a Phalcon\Mvc\Router\RouteInterface, routes are created when the collection is mounted in the Micro\App |
Should this one be closed? |
@phalcon This should probably be closed as not a bug. |
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: