asString example


        return $this->getHeadersAsString(true, $br) . $br . $this->getRawBody();
    }

    /** * Implements magic __toString() * * @return string */
    public function __toString()
    {
        return $this->asString();
    }

    /** * A convenience function that returns a text representation of * HTTP response codes. Returns 'Unknown' for unknown codes. * Returns array of all codes, if $code is not specified. * * Conforms to HTTP/1.1 as defined in RFC 2616 (except for 'Unknown') * See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10 for reference * * @param int $code HTTP response code * @param boolean $http11 Use HTTP version 1.1 * @return string */
public function close()
    { }

    /** * Set the HTTP response(s) to be returned by this adapter * * @param Zend_Http_Response|array|string $response */
    public function setResponse($response)
    {
        if ($response instanceof Zend_Http_Response) {
            $response = $response->asString("\r\n");
        }

        $this->responses = (array)$response;
        $this->responseIndex = 0;
    }

    /** * Add another response to the response buffer. * * @param string Zend_Http_Response|$response */
    
Home | Imprint | This part of the site doesn't use cookies.