How can I generate URLs in Phalcon CLI?
I have a multimodule application with standard router (
Phalcon\Mvc\Router) and CLI worker that sends e-mails.
I want the URLs generated in CLI to be based on the routes from MVC app.
I have a
Phalcon\Mvc\View in CLI that works as stand-alone component. It generates the body of e-mail messages. The URLs are generated this way:
$url = $this->url->get([ 'for' => 'panel', //route name 'controller' => 'verification', 'action' => 'email', 'params' => $parameters->getParam('key'), ]);
I have declared the MVC router in CLI app and I get this error:
Unexpected value type: expected object of type Phalcon\CLI\Router, object of type Phalcon\Mvc\Router given.
So, how I can generate URLs in CLI app, URLs that are already defined in MVC router?