load_phalcon.php 503 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
<?php
/**
 * User: ad
 * Date: 08-12-14
 * Time: 20:23
 */
use Phalcon\DI\FactoryDefault;
use Phalcon\Loader;

$di = new FactoryDefault();
11
$phalcon_config = include_once(__DIR__."/../app/config/config.php");
12 13 14 15

$loader = new Loader();
$loader->registerDirs(
    array(
16
        $phalcon_config->application->controllersDir,
17 18
        $phalcon_config->application->modelsDir,
        $phalcon_config->application->libraryDir
19 20 21
    )
)->register();

22
$di->set('config', $phalcon_config);
23

24
unset($phalcon_config);