/**
  * @param array $options
  */
 public function __construct(array $options = [])
 {
     parent::__construct(['di' => $this->buildDi((array) array_pull($options, 'di'))]);
     $this->registerInstance($this);
     $this->validate($options);
     $this->registerConfig($options);
 }
예제 #2
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     // wire autodelegates
     $this->delegate(new ReflectionContainer());
     // share the "Plugin" class as the container class
     $this->share(Container::class, $this);
     // bind providers
     $this->registerProviders();
 }
예제 #3
0
 /**
  * @param array $config
  * @param FactoryInterface $factory
  */
 public function __construct($config = [], FactoryInterface $factory = null)
 {
     parent::__construct($config, $factory);
     //
     $settings = get_option($this->optionKey, ["api_key" => "asdfjkl;", "some" => "settings"]);
     $this->add("settings", $settings);
     /**
      *
      */
     do_action("wp-json.construct");
 }
예제 #4
0
파일: Container.php 프로젝트: ezimuel/tonis
 public function __construct()
 {
     parent::__construct();
     $this->addServiceProvider(new ServiceProvider());
 }