상속: extends Silex\Application
예제 #1
0
/**
 * Create application
 *
 * @return Application
 */
function create_application()
{
    $app = new Application(__DIR__ . '/../../', false, array('config.cache_dir' => __DIR__ . '/../../app/cache/config'));
    $app->register(new PlacephantServiceProvider());
    $app->register(new HttpCacheServiceProvider());
    $app->boot();
    return $app['http_cache'];
}
예제 #2
0
 public function __construct($rootDir, $env, $debug = false)
 {
     parent::__construct($rootDir, $debug, ['env' => $env]);
     $this->init($env, $debug);
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function __construct($rootDir, $debug = false, array $parameters = [])
 {
     $parameters += ['config.cache_dir' => $rootDir . '/app/cache/config'];
     parent::__construct($rootDir, $debug, $parameters);
     $this->initialize();
 }
예제 #4
0
 public function __construct($rootDir, $debug = true, array $parameters = array())
 {
     $parameters += array('config.cache_dir' => $rootDir . '/app/cache/config');
     parent::__construct($rootDir, $debug, $parameters);
 }