Posted by & filed under Zend Framework 2.

In order to use our module in an application we must first tell the ServiceManager about our module. Since the ServiceManager already knows our module exists (ZFTool took care of that in the config/application.config.php file) we can turn our attention to telling it about our controller and where it will find the view templates for the controller’s actions. Leaning on the original tutorial I start off my modules just like them.

<?php return [ 
    'controllers' => [
        'invokables' => [
            'Album\Controller\Album' => 'Album\Controller\AlbumController',
    'view_manager' => [
        'template_path_stack' => [
            'album' => __DIR__ . '/../view',

What do you really think?