/** * Will be called from the Vinelab\Cdn\EmptyCommand class on Fire(). */ public function emptyBucket() { // return the configurations from the config file $configurations = $this->helper->getConfigurations(); // return an instance of the corresponding Provider concrete according to the configuration $provider = $this->provider_factory->create($configurations); return $provider->emptyBucket(); }
/** * Read the configuration file and pass it to the provider factory * to return an object of the default provider specified in the * config file. */ private function init() { // return the configurations from the config file $this->configurations = $this->helper->getConfigurations(); // return an instance of the corresponding Provider concrete according to the configuration $this->provider = $this->provider_factory->create($this->configurations); }