+ {
+ $translator = $e->getApplication()->getServiceManager()->get('translator');
+ \Zend\Validator\AbstractValidator::setDefaultTranslator($translator, 'val');
+ }
+
+ public function getServiceConfig()
+ {
+ $config = $this->getConfig();
+ return array(
+ 'factories' => array(
+ 'Galerie\Model\GalerieTable' => function($sm) {
+ return new GalerieTable(
+ $sm->get('Zend\Db\Adapter\Adapter')
+ );
+ },
+ 'Galerie\Model\GalerieInfoTable' => function($sm) {
+ return new GalerieInfoTable(
+ $sm->get('Zend\Db\Adapter\Adapter')
+ );
+ },
+ 'Galerie\Form\GalerieForm' => function($sm) {
+ $result = new GalerieForm;
+ $result->setTranslator($sm->get('translator'), 'galerie');
+ $result->initialize();
+ return $result;
+ },
+ 'Galerie\Export\GalerieWorkbook' => function ($sm) {
+ return new GalerieWorkbook;
+ },
+ 'Galerie\Mail\MailSender' => function($sm) use ($config) {
+ $result = new MailSender;
+ $result::initialize($config['mail']);
+ return $result;
+ },
+ ),
+ );
+ }
+
+ public function getViewHelperConfig()