public function replace()
    {
        if (! $this->started()) {
            throw new LogicException('You need to start a section before to end it.');
        }
        $this->started = false;
        if (empty($this->mode)) {
            $this->mode = self::MODE_REPLACE;
        }
        $buffer = ob_get_clean();
        $this->content = ($this->mode & self::MODE_APPEND) ? $buffer.$this->content : $buffer;
        if ($this->mode & self::MODE_OUTPUT) {
            echo $this->content();
        }
    }
public function replace()
    {
        if (! $this->started()) {
            throw new LogicException('You need to start a section before to end it.');
        }
        $this->started = false;
        if (empty($this->mode)) {
            $this->mode = self::MODE_REPLACE;
        }
        $buffer = ob_get_clean();
        $this->content = ($this->mode & self::MODE_APPEND) ? $buffer.$this->content : $buffer;
        if ($this->mode & self::MODE_OUTPUT) {
            echo $this->content();
        }
    }
public function replace ( ) { if ( ! $ this -> started ( ) ) { throw new LogicException ( 'You need to start a section before to end it.' ) ; } $ this -> started = false ; if ( empty ( $ this -> mode ) ) { $ this -> mode = self :: MODE_REPLACE ; } $ buffer = ob_get_clean ( ) ; $ this -> content = ( $ this -> mode & self :: MODE_APPEND ) ? $ buffer . $ this -> content : $ buffer ; if ( $ this -> mode & self :: MODE_OUTPUT ) { echo $ this -> content ( ) ; } }
Close a section collecting buffer content.
If mode is not set, set to replace. If mode is output echo buffer.
Close a section collecting buffer content . If mode is not set set to replace . If mode is output echo buffer .