/** * Toggle requesting gzip encoded responses * * @param boolean $enabled Whether or not to enable gzipped responses * @return void */ public static function setGzipEnabled($enabled = false) { if ($enabled && !function_exists('gzinflate')) { throw new App\InvalidArgumentException('You cannot enable gzipped responses if the zlib module ' . 'is not enabled in your PHP installation.'); } self::$_gzipEnabled = $enabled; }