Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| common_ext_ExtensionLoader | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
30 | |
0.00% |
0 / 1 |
| load | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
30 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2008-2010 (original work) Deutsche Institut für Internationale Pädagogische Forschung |
| 19 | * (under the project TAO-TRANSFER); |
| 20 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
| 21 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 22 | * |
| 23 | */ |
| 24 | |
| 25 | /** |
| 26 | * Short description of class common_ext_ExtensionLoader |
| 27 | * |
| 28 | * @access public |
| 29 | * @author lionel.lecaque@tudor.lu |
| 30 | * @package generis |
| 31 | * @see @license GNU General Public (GPL) Version 2 http://www.opensource.org/licenses/gpl-2.0.php |
| 32 | |
| 33 | */ |
| 34 | class common_ext_ExtensionLoader extends common_ext_ExtensionHandler |
| 35 | { |
| 36 | /** |
| 37 | * Load the extension. |
| 38 | * |
| 39 | * @access public |
| 40 | * @author Jerome Bogaerts, <jerome@taotesting.com> |
| 41 | * @return mixed |
| 42 | */ |
| 43 | public function load() |
| 44 | { |
| 45 | // load the constants from the manifest |
| 46 | if ($this->extension->getId() != "generis") { |
| 47 | foreach ($this->extension->getConstants() as $key => $value) { |
| 48 | if (!defined($key) && !is_array($value)) { |
| 49 | define($key, $value); |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | } |