2 /* +-----------------------------------------------------------------------------+
3 * OpenEMR - Open Source Electronic Medical Record
4 * Copyright (C) 2013 Z&H Consultancy Services Private Limited <sam@zhservices.com>
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 * @author Remesh Babu S <remesh@zhservices.com>
19 * +------------------------------------------------------------------------------+
22 namespace Application
;
24 use Application\Model\ApplicationTable
;
25 use Zend\Mvc\ModuleRouteListener
;
26 use Zend\Mvc\MvcEvent
;
30 public function onBootstrap(MvcEvent
$e)
32 $e->getApplication()->getServiceManager()->get('translator');
33 $eventManager = $e->getApplication()->getEventManager();
34 $moduleRouteListener = new ModuleRouteListener();
35 $moduleRouteListener->attach($eventManager);
38 public function getControllerPluginConfig()
42 'CommonPlugin' => function($sm) {
43 $sm = $sm->getServiceLocator();
44 return new Plugin\
CommonPlugin($sm);
50 public function getServiceConfig()
54 'Application\Model\ApplicationTable' => function($sm) {
55 $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
56 $table = new ApplicationTable($dbAdapter);
63 public function getConfig()
65 return include __DIR__
. '/config/module.config.php';
68 public function getAutoloaderConfig()
71 'Zend\Loader\StandardAutoloader' => array(
72 'namespaces' => array(
73 __NAMESPACE__
=> __DIR__
. '/src/' . __NAMESPACE__
,