ufk

module in zf2

ufk
Jul 30th, 2012
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.56 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Zend Framework (http://framework.zend.com/)
  4.  *
  5.  * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
  6.  * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  7.  * @license   http://framework.zend.com/license/new-bsd New BSD License
  8.  */
  9.  
  10. return array(
  11.     'router' => array(
  12.         'routes' => array(
  13.             'home' => array(
  14.                 'type' => 'Zend\Mvc\Router\Http\Literal',
  15.                 'options' => array(
  16.                     'route'    => '/',
  17.                     'defaults' => array(
  18.                         'controller' => 'DrinkManagement\Controller\Drink',
  19.                         'action'     => 'index',
  20.                     ),
  21.                 ),
  22.             ),
  23.             // The following is a route to simplify getting started creating
  24.             // new controllers and actions without needing to create a new
  25.             // module. Simply drop new controllers in, and you can access them
  26.             // using the path /application/:controller/:action
  27.             'drink-management' => array(
  28.                 'type'    => 'Literal',
  29.                 'options' => array(
  30.                     'route'    => '/drink-management',
  31.                     'defaults' => array(
  32.                         '__NAMESPACE__' => 'DrinkManagement\Controller',
  33.                         'controller'    => 'Drink',
  34.                         'action'        => 'index',
  35.                     ),
  36.                 ),
  37.                 'may_terminate' => true,
  38.                 'child_routes' => array(
  39.                     'default' => array(
  40.                         'type'    => 'Segment',
  41.                         'options' => array(
  42.                             'route'    => '/[:controller[/:action]]',
  43.                             'constraints' => array(
  44.                                 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
  45.                                 'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
  46.                             ),
  47.                             'defaults' => array(
  48.                             ),
  49.                         ),
  50.                     ),
  51.                 ),
  52.             ),
  53.         ),
  54.     ),
  55.     'service_manager' => array(
  56.         'factories' => array(
  57.             'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory',
  58.         ),
  59.     ),
  60.     'translator' => array(
  61.         'locale' => 'en_US',
  62.         'translation_patterns' => array(
  63.             array(
  64.                 'type'     => 'gettext',
  65.                 'base_dir' => __DIR__ . '/../language',
  66.                 'pattern'  => '%s.mo',
  67.             ),
  68.         ),
  69.     ),
  70.     'controllers' => array(
  71.         'invokables' => array(
  72.             'DrinkManagement\Controller\Drink' => 'DrinkManagement\Controller\DrinkController'
  73.         ),
  74.     ),
  75.     'view_manager' => array(
  76.         'display_not_found_reason' => true,
  77.         'display_exceptions'       => true,
  78.         'doctype'                  => 'HTML5',
  79.         'not_found_template'       => 'error/404',
  80.         'exception_template'       => 'error/index',
  81.         'template_map' => array(
  82.             'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
  83.             'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',
  84.             'error/404'               => __DIR__ . '/../view/error/404.phtml',
  85.             'error/index'             => __DIR__ . '/../view/error/index.phtml',
  86.         ),
  87.         'template_path_stack' => array(
  88.             __DIR__ . '/../view',
  89.         ),
  90.     ),
  91. );
Advertisement
Add Comment
Please, Sign In to add comment