How can I use the url ()
controller in the console?
I have to generate some URL through the action of the console, but if I do $ this-> Controller- & gt; Url () - & gt; Route from (...);
, I can only ask for the routes defined in the console
router.
In other words, I need the ability to call all the routes of the application's main router.
Thanks
I'm not sure this is a good decision, but you Manually convert router:
// router / router HTTP $ this-> GetEvent () - & gt; SetRouter ($-- getServiceLocator () -> Get ('HttpRouter')); // Get the route ('your_http_route') from any HTTP path var_dump ($ this-> url () - & gt; // Change it back, if you want $ this-> GetEvent () - & gt; SetRouter ($-> getServiceLocator () - & gt; Receive ('router'));
No comments:
Post a Comment