Skip to content

Instantly share code, notes, and snippets.

@EvanDotPro
Created August 12, 2012 08:31
Show Gist options
  • Save EvanDotPro/3330676 to your computer and use it in GitHub Desktop.
Save EvanDotPro/3330676 to your computer and use it in GitHub Desktop.
<?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