-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathshared.php
More file actions
36 lines (32 loc) · 1.01 KB
/
Copy pathshared.php
File metadata and controls
36 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
// @codeCoverageIgnoreStart
/**
* General bootstrap operations for the framework.
*
* @author paolo.fagni<at>gmail.com
*/
\pff\Core\ServiceContainer::initPimple();
\pff\Core\ServiceContainer::set()['config'] = function ($c) {
return new \pff\Config();
};
\pff\Core\ServiceContainer::set()['hookmanager'] = function ($c) {
return new \pff\Core\HookManager();
};
\pff\Core\ServiceContainer::set()['modulemanager'] = function ($c) {
return new \pff\Core\ModuleManager();
};
\pff\Core\ServiceContainer::set()['helpermanager'] = function ($c) {
return new \pff\Core\HelperManager();
};
\pff\Core\ServiceContainer::set()['app'] = function ($c) {
return new \pff\App();
};
\pff\Core\ServiceContainer::set()['yamlparser'] = function ($c) {
return new \Symfony\Component\Yaml\Parser();
};
$app = \pff\Core\ServiceContainer::get('app');
$app->setUrl($url);
$app->setErrorReporting();
$app->unregisterGlobals();
\pff\Core\ServiceContainer::get('modulemanager')->initModules();
// @codeCoverageIgnoreStop