Пример #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();
 }
Пример #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();
 }
Пример #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();
 }
Пример #5
0
 public function __construct(array $config)
 {
     $this->config = $config;
     parent::__construct();
 }
Пример #6
0
 public function __construct(AbstractModule $module, $scheme)
 {
     parent::__construct($module);
     $this->scheme = $scheme;
 }