psr12 fixes for new PHP_CodeSniffer (#4795)
[openemr.git] / interface / modules / zend_modules / module / PrescriptionTemplates / Module.php
blobb40e7d333107192a589bd3a1bd4c733962837ff5
1 <?php
3 /**
4 * Copyright (C) 2018 Amiel Elboim <amielel@matrix.co.il>
6 * LICENSE: This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @package OpenEMR
18 * @author Amiel Elboim <amielel@matrix.co.il>
19 * @link http://www.open-emr.org
22 namespace PrescriptionTemplates;
24 use Laminas\ModuleManager\ModuleManager;
26 /**
27 * The default module configurator
29 * @author suleymanmelikoglu
31 class Module
33 /**
34 * the implementation of the autoloader provider,
35 * returns an array for the AutoloaderFactory
37 public function getAutoloaderConfig()
39 return array(
40 'Laminas\Loader\ClassMapAutoloader' => array(
41 __DIR__ . '/autoload_classmap.php',
43 'Laminas\Loader\StandardAutoloader' => array(
44 'namespaces' => array(
45 __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
52 public function getConfig()
54 return include __DIR__ . '/config/module.config.php';
57 /**
58 * load global variables foe every controllers
59 * @param ModuleManager $manager
61 public function init(ModuleManager $manager)
63 $events = $manager->getEventManager();
64 $sharedEvents = $events->getSharedManager();
66 $sharedEvents->attach(__NAMESPACE__, 'dispatch', function ($e) {
67 $controller = $e->getTarget();
68 //$controller->layout()->setVariable('status', null);
69 $controller->layout('PrescriptionTemplate/layout/layout');
70 }, 100);