Closed
Description
Example
$eventsManager->attach(
"dispatch:beforeDispatch",
function(\Phalcon\Events\Event $event, \Phalcon\Mvc\Dispatcher $dispatcher) {
log($dispatcher->getControllerName());
}
);
$router->add('hoge/huga', ['controller' => 'HogeHoge', 'action' => 'huga'];
// controller_name: HogeHoge
$router->add('hoge/huga', ['controller' => 'hoge-hoge', 'action' => 'huga'];
// controller_name: hoge-hoge
$router->add('hoge/huga', 'HogeHoge::huga'];
// controller_name: hoge_hoge
The operation is different when passing in an array and passing in a string.
Because it is uncamelize by the following process.
cphalcon/phalcon/Mvc/Router/Route.zep
Line 451 in 634e723
Although it is a syntax sugar, the processing is different...
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Released