コード例 #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;