I'me developing an app in zf2. when I define routes in module.config.php
and access them in my browser, php throws error :
Fatal error: Class 'BookList\src\BookList\Controller\BookController' not found in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\projects\autoclick\skeleton-application\vendor\zendframework\zendframework\library\Zend\ServiceManager\AbstractPluginManager.php on line 170
here is my module.config.php :
return array(
'controllers' => array(
'invokables' => array(
'BookList\src\BookList\Controller\Book' => 'BookList\src\BookList\Controller\BookController'
)
),
'router' => array(
'routes' => array(
'book' => array(
'type' => 'segment',
'options' => array(
'route' => '/book[/][:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+'
),
'defaults' => array(
'controller' => 'BookList\src\BookList\Controller\Book',
'action' => 'index'
)
)
)
)
),
'view_manager' => array(
'template_path_stack' => array(
'book' => __DIR__ . '/../view'
)
)
I have my BookController
namespaced BookList\src\BookList\Controller