protected function compileMinify($value)
    {
        if ($this->shouldMinify($value)) {
            $replace = array(
                '/<!--[^\[](.*?)[^\]]-->/s' => '',
                "/<\?php/"                  => '<?php ',
                "/\n([\S])/"                => ' $1',
                "/\r/"                      => '',
                "/\n/"                      => '',
                "/\t/"                      => ' ',
                "/ +/"                      => ' ',
            );

            return preg_replace(
                array_keys($replace), array_values($replace), $value
            );
        } else {
            return $value;
        }

    }
protected function compileMinify($value)
    {
        if ($this->shouldMinify($value)) {
            $replace = array(
                '/<!--[^\[](.*?)[^\]]-->/s' => '',
                "/<\?php/"                  => '<?php ',
                "/\n([\S])/"                => ' $1',
                "/\r/"                      => '',
                "/\n/"                      => '',
                "/\t/"                      => ' ',
                "/ +/"                      => ' ',
            );

            return preg_replace(
                array_keys($replace), array_values($replace), $value
            );
        } else {
            return $value;
        }

    }
protected function compileMinify ( $ value ) { if ( $ this -> shouldMinify ( $ value ) ) { $ replace = array ( '/<!--[^\[](.*?)[^\]]-->/s' => '' , "/<\?php/" => '<?php ' , "/\n([\S])/" => ' $1' , "/\r/" => '' , "/\n/" => '' , "/\t/" => ' ' , "/ +/" => ' ' , ) ; return preg_replace ( array_keys ( $ replace ) , array_values ( $ replace ) , $ value ) ; } else { return $ value ; } }
Compress the HTML output before saving it

@param string $value the contents of the view file

@return string
Compress the HTML output before saving it