Vendor/langcode-conv/zendframework/zend-filter/src/Compress/Tar.php
public function setMode($mode)
    {
        $mode = strtolower($mode);
        if (($mode != 'bz2') && ($mode != 'gz')) {
            throw new Exception\InvalidArgumentException("The mode '$mode' is unknown");
        }

        if (($mode == 'bz2') && (!extension_loaded('bz2'))) {
            throw new Exception\ExtensionNotLoadedException('This mode needs the bz2 extension');
        }

        if (($mode == 'gz') && (!extension_loaded('zlib'))) {
            throw new Exception\ExtensionNotLoadedException('This mode needs the zlib extension');
        }

        $this->options['mode'] = $mode;
        return $this;
    }
public function setMode($mode)
    {
        $mode = strtolower($mode);
        if (($mode != 'bz2') && ($mode != 'gz')) {
            throw new Exception\InvalidArgumentException("The mode '$mode' is unknown");
        }

        if (($mode == 'bz2') && (!extension_loaded('bz2'))) {
            throw new Exception\ExtensionNotLoadedException('This mode needs the bz2 extension');
        }

        if (($mode == 'gz') && (!extension_loaded('zlib'))) {
            throw new Exception\ExtensionNotLoadedException('This mode needs the zlib extension');
        }

        $this->options['mode'] = $mode;
        return $this;
    }
public function setMode ( $ mode ) { $ mode = strtolower ( $ mode ) ; if ( ( $ mode != 'bz2' ) && ( $ mode != 'gz' ) ) { throw new Exception \ InvalidArgumentException ( "The mode '$mode' is unknown" ) ; } if ( ( $ mode == 'bz2' ) && ( ! extension_loaded ( 'bz2' ) ) ) { throw new Exception \ ExtensionNotLoadedException ( 'This mode needs the bz2 extension' ) ; } if ( ( $ mode == 'gz' ) && ( ! extension_loaded ( 'zlib' ) ) ) { throw new Exception \ ExtensionNotLoadedException ( 'This mode needs the zlib extension' ) ; } $ this -> options [ 'mode' ] = $ mode ; return $ this ; }
Compression mode to use

Either Gz or Bz2.

@param string $mode
@return self
@throws Exception\InvalidArgumentException for invalid $mode values
@throws Exception\ExtensionNotLoadedException if bz2 mode selected but extension not loaded
@throws Exception\ExtensionNotLoadedException if gz mode selected but extension not loaded
Compression mode to use