Exemple #1
0
 /**
  * @param string $appClass
  * @param string $context
  * @param array  $config
  */
 public function __construct($appClass, $context, array $config)
 {
     $this->appClass = $appClass;
     $this->context = $context;
     $this->config = $config;
     parent::__construct();
 }
Exemple #2
0
 /**
  * @param array $contexts
  */
 public function __construct($contexts, $apps)
 {
     $this->context = $contexts;
     $this->appDir = dirname(dirname(dirname(dirname(dirname(dirname(__DIR__))))));
     if (isset($apps['apps'][$apps['default']]['app_dir'])) {
         $this->appDir = $apps['apps'][$apps['default']]['app_dir'];
     }
     $this->constants += (require "{$this->appDir}/conf/defaults.php");
     $params = (require "{$this->appDir}/conf/params.php");
     foreach ($this->context as $context) {
         $this->constants = array_replace_recursive($this->constants, require "{$this->appDir}/conf/contexts/{$context}.php");
         $this->params += $params[$context];
     }
     $this->params += $params['prod'];
     $this->constants['site_name'] = $apps['site'];
     $this->constants['default_site'] = $apps['default'];
     $this->constants['apps']['spout']['path'] = dirname(__DIR__);
     $this->constants['apps'] = array_replace_recursive($this->constants['apps'], $apps['apps']);
     $this->constants['app_name'] = $this->constants['apps'][$apps['default']]['namespace'];
     parent::__construct();
 }
Exemple #3
0
 public function __construct(array $configuration)
 {
     $this->configuration = $configuration;
     parent::__construct();
 }
 /**
  * @param string $context
  *
  * @Inject
  * @Named("app_context")
  */
 public function __construct($context = 'prod')
 {
     $this->context = $context;
     parent::__construct();
 }
Exemple #5
0
 public function __construct(array $config)
 {
     $this->config = $config;
     parent::__construct();
 }
Exemple #6
0
 public function __construct(AbstractModule $module, $scheme)
 {
     parent::__construct($module);
     $this->scheme = $scheme;
 }
 /**
  * {@inheritdoc}
  */
 public function enableBindCache()
 {
     AbstractModule::enableInvokeCache();
     return $this;
 }
 /**
  * Install module
  *
  * @param AbstractModule $module
  *
  * @return void
  */
 public function install(AbstractModule $module)
 {
     $module->activate($this->dependencyInjector);
     $this->pointcuts = new ArrayObject(array_merge((array) $module->pointcuts, (array) $this->pointcuts));
     $this->bindings = $this->mergeBindings($module);
     if ($module->modules) {
         $this->modules = array_merge($this->modules, $module->modules);
     }
 }