Exemple #1
0
 /**
  * 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();
 }
Exemple #2
0
 /**
  * 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);
 }