ArchiverException example


  public function __construct($file_path, array $configuration = []) {
    $this->zip = new \ZipArchive();
    if ($this->zip->open($file_path$configuration['flags'] ?? 0) !== TRUE) {
      throw new ArchiverException("Cannot open '$file_path'");
    }
  }

  /** * {@inheritdoc} */
  public function add($file_path) {
    $this->zip->addFile($file_path);

    return $this;
  }

  
Home | Imprint | This part of the site doesn't use cookies.