public function setDestinationDir($destination_dir)
    {
        if (is_string($destination_dir)) {
            $destination_dir = realpath($destination_dir);
            if (@file_exists($destination_dir) && @is_dir($destination_dir)) {
                $this->destination_dir = rtrim($destination_dir, '/').'/';
            } elseif (false===$this->silent) {
                throw new \InvalidArgumentException(
                    sprintf('[Compressor] Destination directory "%s" must exist!', $destination_dir)
                );
            }
        } else {
            if (false===$this->silent) {
                throw new \InvalidArgumentException(
                    sprintf('[Compressor] Destination directory must be a string (got "%s")!', gettype($destination_dir))
                );
            }
        }
        return $this;
    }
public function setDestinationDir($destination_dir)
    {
        if (is_string($destination_dir)) {
            $destination_dir = realpath($destination_dir);
            if (@file_exists($destination_dir) && @is_dir($destination_dir)) {
                $this->destination_dir = rtrim($destination_dir, '/').'/';
            } elseif (false===$this->silent) {
                throw new \InvalidArgumentException(
                    sprintf('[Compressor] Destination directory "%s" must exist!', $destination_dir)
                );
            }
        } else {
            if (false===$this->silent) {
                throw new \InvalidArgumentException(
                    sprintf('[Compressor] Destination directory must be a string (got "%s")!', gettype($destination_dir))
                );
            }
        }
        return $this;
    }
public function setDestinationDir ( $ destination_dir ) { if ( is_string ( $ destination_dir ) ) { $ destination_dir = realpath ( $ destination_dir ) ; if ( @ file_exists ( $ destination_dir ) && @ is_dir ( $ destination_dir ) ) { $ this -> destination_dir = rtrim ( $ destination_dir , '/' ) . '/' ; } elseif ( false === $ this -> silent ) { throw new \ InvalidArgumentException ( sprintf ( '[Compressor] Destination directory "%s" must exist!' , $ destination_dir ) ) ; } } else { if ( false === $ this -> silent ) { throw new \ InvalidArgumentException ( sprintf ( '[Compressor] Destination directory must be a string (got "%s")!' , gettype ( $ destination_dir ) ) ) ; } } return $ this ; }
Set the destination directory to write the destination file in

@param string $destination_dir The directory path to create the file in
@return self
@throws \InvalidArgumentException if the directory name is not a string (and if $silent==false)
Set the destination directory to write the destination file in