public function end($data = null)
    {
        if ($this->complete) {
            return $this;
        }

        if ($data) {
            $this->write($data);
        }

        $new = clone $this;
        $new->complete = true;
        return $new;
    }
public function end($data = null)
    {
        if ($this->complete) {
            return $this;
        }

        if ($data) {
            $this->write($data);
        }

        $new = clone $this;
        $new->complete = true;
        return $new;
    }
public function end ( $ data = null ) { if ( $ this -> complete ) { return $ this ; } if ( $ data ) { $ this -> write ( $ data ) ; } $ new = clone $ this ; $ new -> complete = true ; return $ new ; }
Mark the response as complete

A completed response should no longer allow manipulation of either
headers or the content body.

If $data is passed, that data should be written to the response body
prior to marking the response as complete.

@param string $data
Mark the response as complete