php - Zf2 Fatal error: Class 'BookList\Controller\BookController' not found -


i'me developing app in zf2. when define routes in module.config.php , access them in 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 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 bookcontroller namespaced booklist\src\booklist\controller

this should be:

'controllers' => array(     'invokables' => array(         'booklist\controller\book' => 'booklist\controller\bookcontroller' // <- change key , value     ) ), '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\controller\book', // <- change                     'action' => 'index'                 )             )         )     ) ), 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -