Skip to content

Instantly share code, notes, and snippets.

@eminetto
Last active October 12, 2015 10:18
Show Gist options
  • Save eminetto/4012076 to your computer and use it in GitHub Desktop.
Save eminetto/4012076 to your computer and use it in GitHub Desktop.
'service_manager' => array(
'factories' => array(
'Session' => function($sm) {
return new Zend\Session\Container('ZF2napratica');
},
'Admin\Service\Auth' => function($sm) {
$dbAdapter = $sm->get('DbAdapter');
return new Admin\Service\Auth($dbAdapter);
},
'Cache' => function($sm) {
$config = include __DIR__ . '/../../../config/application.config.php';
$cache = \Zend\Cache\StorageFactory::factory(
array(
'adapter' => $config['cache']['adapter'],
'plugins' => array(
'exception_handler' => array('throw_exceptions' => false),
'Serializer'
),
)
);
return $cache;
}
)
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment