public function setMode($mode)
    {
        $mode = ucfirst(strtolower($mode));
        if (($mode != 'Bz2') && ($mode != 'Gz')) {

            throw new Zend_Filter_Exception("The mode '$mode' is unknown");
        }

        if (($mode == 'Bz2') && (!extension_loaded('bz2'))) {

            throw new Zend_Filter_Exception('This mode needs the bz2 extension');
        }

        if (($mode == 'Gz') && (!extension_loaded('zlib'))) {

            throw new Zend_Filter_Exception('This mode needs the zlib extension');
        }
    }
public function setMode($mode)
    {
        $mode = ucfirst(strtolower($mode));
        if (($mode != 'Bz2') && ($mode != 'Gz')) {

            throw new Zend_Filter_Exception("The mode '$mode' is unknown");
        }

        if (($mode == 'Bz2') && (!extension_loaded('bz2'))) {

            throw new Zend_Filter_Exception('This mode needs the bz2 extension');
        }

        if (($mode == 'Gz') && (!extension_loaded('zlib'))) {

            throw new Zend_Filter_Exception('This mode needs the zlib extension');
        }
    }
public function setMode ( $ mode ) { $ mode = ucfirst ( strtolower ( $ mode ) ) ; if ( ( $ mode != 'Bz2' ) && ( $ mode != 'Gz' ) ) { throw new Zend_Filter_Exception ( "The mode '$mode' is unknown" ) ; } if ( ( $ mode == 'Bz2' ) && ( ! extension_loaded ( 'bz2' ) ) ) { throw new Zend_Filter_Exception ( 'This mode needs the bz2 extension' ) ; } if ( ( $ mode == 'Gz' ) && ( ! extension_loaded ( 'zlib' ) ) ) { throw new Zend_Filter_Exception ( 'This mode needs the zlib extension' ) ; } }
Compression mode to use
Eighter Gz or Bz2

@param string $mode
Compression mode to use Eighter Gz or Bz2