public function setUseGzip($value)
    {
        if ($value && !extension_loaded('zlib')) {
            throw new \RuntimeException('Zlib extension must be enabled to gzip the sitemap.');
        }
        if ($this->writerBackend !== null && $value != $this->useGzip) {
            throw new \RuntimeException('Cannot change the gzip value once items have been added to the sitemap.');
        }
        $this->useGzip = $value;
    }
public function setUseGzip($value)
    {
        if ($value && !extension_loaded('zlib')) {
            throw new \RuntimeException('Zlib extension must be enabled to gzip the sitemap.');
        }
        if ($this->writerBackend !== null && $value != $this->useGzip) {
            throw new \RuntimeException('Cannot change the gzip value once items have been added to the sitemap.');
        }
        $this->useGzip = $value;
    }
public function setUseGzip ( $ value ) { if ( $ value && ! extension_loaded ( 'zlib' ) ) { throw new \ RuntimeException ( 'Zlib extension must be enabled to gzip the sitemap.' ) ; } if ( $ this -> writerBackend !== null && $ value != $ this -> useGzip ) { throw new \ RuntimeException ( 'Cannot change the gzip value once items have been added to the sitemap.' ) ; } $ this -> useGzip = $ value ; }
Sets whether the resulting files will be gzipped or not.
@param bool $value
@throws \RuntimeException when trying to enable gzip while zlib is not available or when trying to change
setting when some items are already written
Sets whether the resulting files will be gzipped or not .