Skip to content

Instantly share code, notes, and snippets.

@shiroyuki
Created January 17, 2012 18:09
Show Gist options
  • Save shiroyuki/1627894 to your computer and use it in GitHub Desktop.
Save shiroyuki/1627894 to your computer and use it in GitHub Desktop.
module.config.php for ICX/ZF2/Blog
<?php
return array(
'routes' => array(
'blog-category' => array(
'type' => `Zend\Mvc\Router\Http\Literal`,
'options' => array(
'route' => '/category/index',
'defaults' => array(
'controller' => 'blog-category',
'action' => 'index',
),
),
),
),
'di' => array(
'instance' => array(
'alias' => array(
'blog-category' => 'Blog\Controller\CategoryController',
),
'Blog\Controller\CategoryController' => array(
'parameters' => array(
'categoryTable' => 'Blog\Model\CategoryTable',
),
),
'Blog\ModelCategoryTable' => array(
'parameters' => array(
'config' => 'Zend\Db\Adapter\Mysqli',
),
),
'Zend\Db\Adapter\Mysqli' => array(
'parameters' => array(
'config' => array(
'host' => 'localhost',
'username' => 'root',
'password' => '',
'dbname' => 'z2',
),
),
),
'Zend\View\PhpRenderer' => array(
'parameters' => array(
'options' => array(
'script_paths' => array(
'blog' => __DIR__ . '/../views',
),
),
),
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment