/
warp.php
36 lines (28 loc) · 866 Bytes
/
warp.php
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
/**
* @package Master
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
use Warp\Warp;
use Warp\Autoload\ClassLoader;
use Warp\Config\Repository;
global $warp;
if (!$warp) {
require_once(__DIR__.'/warp/src/Warp/Autoload/ClassLoader.php');
// set loader
$loader = new ClassLoader;
$loader->add('Warp', __DIR__.'/warp/src');
$loader->add('Warp\Wordpress', __DIR__.'/warp/systems/wordpress/src');
$loader->register();
// set config
$config = new Repository;
$config->load(__DIR__.'/warp/config.php');
$config->load(__DIR__.'/warp/systems/wordpress/config.php');
$config->load(__DIR__.'/config.php');
// set warp
$warp = new Warp(compact('loader', 'config'));
$warp['system']->init();
}
return $warp;