sathyashrayan

earth module.config.php

Mar 8th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.02 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-2015 Zend Technologies USA Inc. (http://www.zend.com)
  7.  * @license   http://framework.zend.com/license/new-bsd New BSD License
  8.  */
  9. // /module/hello/Earth/config/module.config.php
  10. namespace hello\Earth;
  11.  
  12. return array(
  13.     'router' => array(
  14.         'routes' => array(
  15.             'home' => array(
  16.                 'type' => 'Zend\Mvc\Router\Http\Literal',
  17.                 'options' => array(
  18.                     'route'    => '/',
  19.                     'defaults' => array(
  20.                         'controller' => 'hello\Earth\Controller\Index',
  21.                         'action'     => 'index',
  22.                     ),
  23.                 ),
  24.             ),
  25.             // The following is a route to simplify getting started creating
  26.             // new controllers and actions without needing to create a new
  27.             // module. Simply drop new controllers in, and you can access them
  28.             // using the path /application/:controller/:action
  29.             'earth' => array(
  30.                 'type'    => 'Literal',
  31.                 'options' => array(
  32.                     'route'    => '/earth',
  33.                     'defaults' => array(
  34.                         '__NAMESPACE__' => 'hello\Earth\Controller',
  35.                         'controller'    => 'Index',
  36.                         'action'        => 'index',
  37.                     ),
  38.                 ),
  39.                 'may_terminate' => true,
  40.                 'child_routes' => array(
  41.                     'default' => array(
  42.                         'type'    => 'Segment',
  43.                         'options' => array(
  44.                             'route'    => '/[:controller[/:action]]',
  45.                             'constraints' => array(
  46.                                 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
  47.                                 'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
  48.                             ),
  49.                             'defaults' => array(
  50.                             ),
  51.                         ),
  52.                     ),
  53.                 ),
  54.             ),
  55.         ),
  56.     ),
  57.     'service_manager' => array(
  58.         'abstract_factories' => array(
  59.             'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
  60.             'Zend\Log\LoggerAbstractServiceFactory',
  61.         ),
  62.         'factories' => array(
  63.             'translator' => 'Zend\Mvc\Service\TranslatorServiceFactory',
  64.         ),
  65.     ),
  66.     'translator' => array(
  67.         'locale' => 'en_US',
  68.         'translation_file_patterns' => array(
  69.             array(
  70.                 'type'     => 'gettext',
  71.                 'base_dir' => __DIR__ . '/../language',
  72.                 'pattern'  => '%s.mo',
  73.             ),
  74.         ),
  75.     ),
  76.     'controllers' => array(
  77.         'invokables' => array(
  78.            'hello\Earth\Controller\Index' => Controller\IndexController::class
  79.          
  80.         ),
  81.     ),
  82.     'view_manager' => array(
  83.         'display_not_found_reason' => true,
  84.         'display_exceptions'       => true,
  85.         'doctype'                  => 'HTML5',
  86.         'not_found_template'       => 'error/404',
  87.         'exception_template'       => 'error/index',
  88.         'template_map' => array(
  89.             'earth/layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
  90.             'hello/Earth/index/index' => __DIR__ . '/../view/application/index/index.phtml',
  91.             'earth/error/404'               => __DIR__ . '/../view/error/404.phtml',
  92.             'earth/error/index'             => __DIR__ . '/../view/error/index.phtml',
  93.         ),
  94.    
  95.     'controller_map' => array(        
  96.         'hello\Earth' => true,
  97.     ),
  98.  
  99.         'template_path_stack' => array(
  100.             __DIR__ . '/../view',
  101.         ),
  102.     ),
  103.     // Placeholder for console routes
  104.     'console' => array(
  105.         'router' => array(
  106.             'routes' => array(
  107.             ),
  108.         ),
  109.     ),
  110. );
Add Comment
Please, Sign In to add comment