$objDi->set('router', function() use ($arrConfig){
$_objRouter = new \Phalcon\Mvc\Router(false);
$_objRouter->add("/:controller/:action.html", array('controller' => 1, 'action' => 2))->setName('test');
$_objRouter->notFound(array('controller' => 'error', 'action' => 'notfound'));
return $_objRouter;
}, true);
I define an route with name "test" :
$_objRouter->add("/:controller/:action.html", array('controller' => 1, 'action' => 2))->setName('test');
used for example xxx.com/index/index.html
but i use the \Phalcon\Url::get method with "test" route in IndexController::indexAction, the result is not right.
$_strLinker = $this->url->get(array('for' => 'test', 'controller' => 'item', 'action' => 'view'));
die($_strLinker);
The result is not "/item/view.html", but is "/item/view.ht".
how to do?