Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
namespace Lesson1;
class Module
{
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
public function getConfig()
{
return array(
'controllers' => array(
'invokables' => array(
'Lesson1\Controller\Employees' => 'Lesson1\Controller\EmployeesController'
)
),
'view_manager' => array(
'template_path_stack' => array(
__DIR__ . '/../view',
),
),
'router' => array(
'routes' => array(
'lesson1' => array(
'type' => 'Literal',
'options' => array(
'route' => '/lesson1',
'defaults' => array(
'__NAMESPACE__' => 'Lesson1\Controller',
'controller' => 'EmployeesController',
'action' => 'list',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/:controller[/:action]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'__NAMESPACE__' => 'Lesson1\Controller',
),
),
),
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment