protected function maybeCompressHtmlCode($html)
    {
        if (($benchmark = !empty($this->options['benchmark']) && $this->options['benchmark'] === 'details')) {
            $time = microtime(true);
        }
        $html = (string) $html; // Force string value.

        if (isset($this->options['compress_html_code'])) {
            if (!$this->options['compress_html_code']) {
                $disabled = true; // Disabled flag.
            }
        }
        if (!$html || !empty($disabled)) {
            goto finale; // Nothing to do.
        }
        if (($compressed_html = $this->compressHtml($html))) {
            $html = $compressed_html; // Use it :-)
        }
        finale: // Target point; finale/return value.

        if ($html) {
            $html = trim($html);
        } // Trim it up now!

        if ($benchmark && !empty($time) && $html && empty($disabled)) {
            $this->benchmark->addTime(
                __FUNCTION__,
                $time, // Caller, start time, task performed.
                sprintf('compressing HTML w/ checksum: `%1$s`', md5($html))
            );
        }
        return $html; // With possible compression having been applied here.
    }
protected function maybeCompressHtmlCode($html)
    {
        if (($benchmark = !empty($this->options['benchmark']) && $this->options['benchmark'] === 'details')) {
            $time = microtime(true);
        }
        $html = (string) $html; // Force string value.

        if (isset($this->options['compress_html_code'])) {
            if (!$this->options['compress_html_code']) {
                $disabled = true; // Disabled flag.
            }
        }
        if (!$html || !empty($disabled)) {
            goto finale; // Nothing to do.
        }
        if (($compressed_html = $this->compressHtml($html))) {
            $html = $compressed_html; // Use it :-)
        }
        finale: // Target point; finale/return value.

        if ($html) {
            $html = trim($html);
        } // Trim it up now!

        if ($benchmark && !empty($time) && $html && empty($disabled)) {
            $this->benchmark->addTime(
                __FUNCTION__,
                $time, // Caller, start time, task performed.
                sprintf('compressing HTML w/ checksum: `%1$s`', md5($html))
            );
        }
        return $html; // With possible compression having been applied here.
    }
protected function maybeCompressHtmlCode ( $ html ) { if ( ( $ benchmark = ! empty ( $ this -> options [ 'benchmark' ] ) && $ this -> options [ 'benchmark' ] === 'details' ) ) { $ time = microtime ( true ) ; } $ html = ( string ) $ html ; // Force string value. if ( isset ( $ this -> options [ 'compress_html_code' ] ) ) { if ( ! $ this -> options [ 'compress_html_code' ] ) { $ disabled = true ; // Disabled flag. } } if ( ! $ html || ! empty ( $ disabled ) ) { goto finale ; // Nothing to do. } if ( ( $ compressed_html = $ this -> compressHtml ( $ html ) ) ) { $ html = $ compressed_html ; // Use it :-) } finale : // Target point; finale/return value. if ( $ html ) { $ html = trim ( $ html ) ; } // Trim it up now! if ( $ benchmark && ! empty ( $ time ) && $ html && empty ( $ disabled ) ) { $ this -> benchmark -> addTime ( __FUNCTION__ , $ time , // Caller, start time, task performed. sprintf ( 'compressing HTML w/ checksum: `%1$s`' , md5 ( $ html ) ) ) ; } return $ html ; // With possible compression having been applied here. }
Maybe compress HTML code.

@since 140417 Initial release.

@param string $html Raw HTML code.

@return string Possibly compressed HTML code.
Maybe compress HTML code .