/**
  * @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);
 }
 /**
  *
  */
 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();
 }
Exemple #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");
 }
Exemple #4
0
 public function __construct()
 {
     parent::__construct();
     $this->addServiceProvider(new ServiceProvider());
 }