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();
        }
    }