Project

General

Profile

1
<?php
2
/**
3
* @package   yoo_bento
4
* @author    YOOtheme http://www.yootheme.com
5
* @copyright Copyright (C) YOOtheme GmbH
6
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
7
*/
8

    
9
use Warp\Warp;
10
use Warp\Autoload\ClassLoader;
11
use Warp\Config\Repository;
12

    
13
global $warp;
14

    
15
if (!$warp) {
16

    
17
    require_once(__DIR__.'/warp/src/Warp/Autoload/ClassLoader.php');
18

    
19
    // set loader
20
    $loader = new ClassLoader;
21
    $loader->add('Warp', __DIR__.'/warp/src');
22
    $loader->add('Warp\Joomla', __DIR__.'/warp/systems/joomla/src');
23
    $loader->register();
24

    
25
    // set config
26
    $config = new Repository;
27
    $config->load(__DIR__.'/warp/config.php');
28
    $config->load(__DIR__.'/warp/systems/joomla/config.php');
29
    $config->load(__DIR__.'/config.php');
30

    
31
    // set warp
32
    $warp = new Warp(compact('loader', 'config'));
33
    $warp['system']->init();
34
}
35

    
36
return $warp;
(19-19/19)