Sunday, 8 September 2013

Register annotation router

Register annotation router

I want to use the annotation router in phaclon and I follow the example
from the documentation
http://docs.phalconphp.com/en/latest/reference/routing.html#annotations-router.
I have a multi module application and keep getting 'ReflectionException'
with message 'Class IndexController does not exist'.
Have anyone experienced the same problem? How did you solve it?
router
$router = new Phalcon\Mvc\Router\Annotations();
$router->addModuleResource('frontend', 'Index');
$di->set('router', $router);
frontend/controllers/IndexController.php
/**
* @Get("/:action")
*/
public function indexAction()
{
}

No comments:

Post a Comment