/** * クライアントの準備 * @return void */ protected function boot() { $this->container->set('config', $this->config); $this->container->set('api', $this->container->get(QiitaAPIInterface::class)); Model::setFactory($this->container); Model::setApi($this->container->get('api')); }
public function __construct($name = null, array $data = [], $dataName = '') { parent::__construct($name, $data, $dataName); $this->container = createContainer(); $this->container->set('config', $this->createConfig()); Model::setFactory($this->container); }