Beispiel #1
0
 /**
  *
  * @param string $cache
  * @throws InvalidArgumentException
  */
 public function destroyCache($cache = '')
 {
     if (!is_string($cache)) {
         throw new InvalidArgumentException(I18n::text("Argument 'cache' is invalid."));
     }
     $fileHandler = new FileHandler();
     if (!file_exists($cache)) {
         return;
     }
     if (is_dir($cache)) {
         return $fileHandler->removeDirectory($cache, true);
     }
     return $fileHandler->removeFile($cache);
 }