Exemplo n.º 1
0
Arquivo: Cdn.php Projeto: codenut/cdn
 /**
  * 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();
 }
Exemplo n.º 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);
 }