This facilitates the installation process of a new Cabin, Gadget, or Motif.
Inheritance: use trait SupplierBolt, use trait LogBolt
Ejemplo n.º 1
0
 /**
  * Clear the cache files related to Cabins.
  *
  * @return bool
  */
 public function clearCache() : bool
 {
     $name = $this->makeNamespace($this->supplier->getName(), $this->package);
     $toDelete = [\implode(DIRECTORY_SEPARATOR, [ROOT, 'tmp', 'cache', 'cargo-' . $name . '.cache.json']), \implode(DIRECTORY_SEPARATOR, [ROOT, 'tmp', 'cache', 'csp.' . $name . '.json']), \implode(DIRECTORY_SEPARATOR, [ROOT, 'tmp', 'cache', $name . '.motifs.json'])];
     foreach ($toDelete as $file) {
         if (\file_exists($file)) {
             \unlink($file);
         }
     }
     return parent::clearCache();
 }