Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 32 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
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) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg |
19 | * (under the project TAO & TAO2); |
20 | * 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung |
21 | * (under the project TAO-TRANSFER); |
22 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
23 | * (under the project TAO-SUSTAIN & TAO-DEV); |
24 | * 2013- (update and modification) Open Assessment Technologies SA; |
25 | */ |
26 | |
27 | // phpcs:disable PSR1.Files.SideEffects |
28 | |
29 | use oat\tao\model\mvc\DotEnvReader; |
30 | |
31 | $root = realpath(__DIR__ . '/../../') . DIRECTORY_SEPARATOR; |
32 | define('TAO_INSTALL_PATH', $root); |
33 | |
34 | // only script that may use the quick TZ fix |
35 | if (function_exists("date_default_timezone_set")) { |
36 | date_default_timezone_set('UTC'); |
37 | } |
38 | |
39 | require_once($root . 'vendor/autoload.php'); |
40 | |
41 | new DotEnvReader(); |
42 | |
43 | if (tao_install_utils_System::isTAOInstalled()) { |
44 | require_once($root . 'config/generis.conf.php'); |
45 | } |
46 | |
47 | // Logger service initialization. |
48 | $loggerService = new \oat\oatbox\log\LoggerService(); |
49 | $loggerService->addLogger( |
50 | \oat\oatbox\log\VerboseLoggerFactory::getInstance( |
51 | empty($argv) |
52 | ? ['-nc', '-vv'] // For no color visualization but showing the notices. |
53 | : $argv |
54 | ) |
55 | ); |
56 | |
57 | $loggerService->addLogger( |
58 | new \oat\oatbox\log\logger\TaoLog([ |
59 | 'appenders' => [ |
60 | [ |
61 | 'class' => 'SingleFileAppender', |
62 | 'threshold' => common_Logger::TRACE_LEVEL, |
63 | 'file' => TAO_INSTALL_PATH . 'tao/install/log/install.log' |
64 | ] |
65 | ] |
66 | ]) |
67 | ); |
68 | |
69 | // Initializing the dependency container. |
70 | $container = new \Pimple\Container( |
71 | [ |
72 | \oat\oatbox\log\LoggerService::SERVICE_ID => $loggerService, |
73 | ] |
74 | ); |