public function end($name, $append = true)
    {
        $content = trim(ob_get_contents());
        ob_end_clean();

        $hash = md5($content);

        if (isset($this->hashCache[$hash])) {
            return;
        }

        $this->hashCache[$hash] = true;

        if (isset($this->blocks[$name]) && $append) {
            $this->blocks[$name] .= $content;
        } else {
            $this->blocks[$name] = $content;
        }
    }
public function end($name, $append = true)
    {
        $content = trim(ob_get_contents());
        ob_end_clean();

        $hash = md5($content);

        if (isset($this->hashCache[$hash])) {
            return;
        }

        $this->hashCache[$hash] = true;

        if (isset($this->blocks[$name]) && $append) {
            $this->blocks[$name] .= $content;
        } else {
            $this->blocks[$name] = $content;
        }
    }
public function end ( $ name , $ append = true ) { $ content = trim ( ob_get_contents ( ) ) ; ob_end_clean ( ) ; $ hash = md5 ( $ content ) ; if ( isset ( $ this -> hashCache [ $ hash ] ) ) { return ; } $ this -> hashCache [ $ hash ] = true ; if ( isset ( $ this -> blocks [ $ name ] ) && $ append ) { $ this -> blocks [ $ name ] .= $ content ; } else { $ this -> blocks [ $ name ] = $ content ; } }
End to catch block and save it.

@param  string $name
@param  bool   $append Append content to previous block. Otherwise, reset content.
@return void
End to catch block and save it .