예제 #1
0
파일: bootstrap.php 프로젝트: k42b3/psx-ws
function getContainer()
{
    static $container;
    if ($container === null) {
        $container = new PSX\Dependency\DefaultContainer();
        $container->setParameter('config.file', array('psx_url' => 'http://127.0.0.1/projects/psx/public', 'psx_dispatch' => 'index.php/', 'psx_timezone' => 'UTC', 'psx_debug' => true, 'psx_path_cache' => sys_get_temp_dir(), 'psx_path_library' => __DIR__ . '/../src'));
    }
    return $container;
}
예제 #2
0
파일: container.php 프로젝트: seytar/psx
<?php

/*
This file returns the global DI container for the application. The DI container
must be compatible with the symfony DI container interface. If you want load an 
different configuration depending on the environment you can change the 
"config.file" parameter.
*/
$container = new \PSX\Dependency\DefaultContainer();
$container->setParameter('config.file', __DIR__ . '/configuration.php');
return $container;