Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // see lines 8/9 & 14/15
- return array(
- 'di' => array(
- 'instance' => array(
- 'Bom\Controller\BomController' => array(
- 'parameters' => array(
- 'bomTable' => 'Bom\Model\DbTable\BomTable', // TODO: **** Move data table gateway
- //'bomTable' => 'Bom\Model\BomTable',
- 'contactTable' => 'Company\Model\ContactTable',
- 'companyTable' => 'Company\Model\CompanyTable',
- ),
- ),
- 'Bom\Model\DbTable\BomTable' => array( // TODO: **** Move data table gateway
- //'Bom\Model\BomTable' => array(
- 'parameters' => array(
- 'adapter' => 'Zend\Db\Adapter\Adapter',
- )
- ),
- 'Zend\View\Resolver\TemplatePathStack' => array(
- 'parameters' => array(
- 'paths' => array(
- 'Bom' => __DIR__ . '/../view',
- ),
- ),
- ),
- 'Zend\Db\Adapter\Adapter' => array(
- 'parameters'=>array(
- 'driver' => array(
- 'driver' => 'Pdo',
- 'dsn' => 'mysql:dbname=db;hostname=localhost',
- 'username' => 'uid',
- 'password' => 'pass',
- 'driver_options' => array(
- PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''),
- ),
- )
- ),
- //ROUTES
- 'Zend\Mvc\Router\RouteStack'=>array( 'parameters'=>array(
- 'routes' => array(
- // route to company controller
- 'bom' => array( // this key-name for the array is totally arbitrary
- 'type' => 'Segment',
- 'options' => array(
- 'route' => '/bom[/:action]',
- 'constraints' => array(
- 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
- ),
- 'defaults' => array(
- 'controller' => 'Bom\Controller\BomController',
- 'action' => 'index',
- ),
- ),
- ),
- ),
- )), // END ROUTES
- ),
- ),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement