sathyashrayan

Test\ModuleOne\config\module.config.php

Jul 18th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. //Test\ModuleOne\config\module.config.php
  2.  
  3. <?php
  4. namespace Test\ModuleOne;
  5.  
  6. use Zend\Router\Http\Literal;
  7. use Zend\Router\Http\Segment;
  8. use Zend\ServiceManager\Factory\InvokableFactory;
  9.  
  10. return [
  11.        
  12.         'controllers' => [
  13.                 'factories' => [
  14.                         Controller\IndexController::class => InvokableFactory::class,
  15.                 ],
  16.         ],
  17.        
  18.         'router' =>[
  19.                 'routes'=>[
  20.                         'one'=>[
  21.                         'type'    => Segment::class,
  22.                         'options' =>[
  23.                         'route' => '/one[/:action[/:id]]',
  24.                             'constraints' =>[
  25.                                 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
  26.                                 'id'     => '[0-9]+',
  27.                                         ],
  28.                                                 'defaults'=>[
  29.                                                 'controller' => Controller\IndexController::class,
  30.                                                 'action'     => 'index',
  31.                                         ]
  32.                                         ]
  33.                         ]
  34.                            
  35.                 ],
  36.                    
  37.         ],
  38.        
  39. ];
Add Comment
Please, Sign In to add comment