/** * Register extension. * * @param Application $app Application * @access public * @return void */ public function register(Application $app) { if (isset($app['zend.class_path'])) { $app['autoloader']->registerPrefix('Zend_', $app['zend.class_path']); } $app['zend.db'] = $app->protect(function () use($app) { $db = \Zend_Db::Factory($app['zend.db.adapter'], $app['zend.db.options']); \Zend_Db_Table_Abstract::setDefaultAdapter($db); return $db; }); }