Moodle  2.2.1
http://www.collinsharper.com
Zend_Http_Response_Stream Class Reference
Inheritance diagram for Zend_Http_Response_Stream:
Collaboration diagram for Zend_Http_Response_Stream:

Public Member Functions

 getStream ()
 setStream ($stream)
 getCleanup ()
 setCleanup ($cleanup=true)
 getStreamName ()
 setStreamName ($stream_name)
 __construct ($code, $headers, $body=null, $version= '1.1', $message=null)
 getBody ()
 getRawBody ()
 __destruct ()

Static Public Member Functions

static fromStream ($response_str, $stream)

Protected Member Functions

 readStream ()

Protected Attributes

 $stream
 $stream_name
 $_cleanup

Detailed Description

Definition at line 34 of file Stream.php.


Constructor & Destructor Documentation

__construct ( code,
headers,
body = null,
version = '1.1',
message = null 
)

HTTP response constructor

In most cases, you would use Zend_Http_Response::fromString to parse an HTTP response string and create a new Zend_Http_Response object.

NOTE: The constructor no longer accepts nulls or empty values for the code and headers and will throw an exception if the passed values do not form a valid HTTP responses.

If no message is passed, the message will be guessed according to the response code.

Parameters:
int$codeResponse code (200, 404, ...)
array$headersHeaders array
string$bodyResponse body
string$versionHTTP version
string$messageResponse code as text
Exceptions:
Zend_Http_Exception

Reimplemented from Zend_Http_Response.

Definition at line 139 of file Stream.php.

Here is the call graph for this function:

Definition at line 224 of file Stream.php.


Member Function Documentation

static fromStream ( response_str,
stream 
) [static]

Create a new Zend_Http_Response_Stream object from a string

Parameters:
string$response_str
resource$stream
Returns:
Zend_Http_Response_Stream

Definition at line 156 of file Stream.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getBody ( )

Get the response body as string

This method returns the body of the HTTP response (the content), as it should be in it's readable version - that is, after decoding it (if it was decoded), deflating it (if it was gzip compressed), etc.

If you want to get the raw body (as transfered on wire) use $this->getRawBody() instead.

Returns:
string

Reimplemented from Zend_Http_Response.

Definition at line 178 of file Stream.php.

Here is the call graph for this function:

Get the cleanup trigger

Returns:
boolean

Definition at line 86 of file Stream.php.

Get the raw response body (as transfered "on wire") as string

If the body is encoded (with Transfer-Encoding, not content-encoding - IE "chunked" body), gzip compressed, etc. it will not be decoded.

Returns:
string

Reimplemented from Zend_Http_Response.

Definition at line 194 of file Stream.php.

Here is the call graph for this function:

getStream ( )

Get the response as stream

Returns:
resourse

Definition at line 64 of file Stream.php.

Get file name associated with the stream

Returns:
string

Definition at line 104 of file Stream.php.

readStream ( ) [protected]

Read stream content and return it as string

Function reads the remainder of the body from the stream and closes the stream.

Returns:
string

Definition at line 209 of file Stream.php.

Here is the caller graph for this function:

setCleanup ( cleanup = true)

Set the cleanup trigger

Parameters:
$cleanupSet cleanup trigger

Definition at line 95 of file Stream.php.

setStream ( stream)

Set the response stream

Parameters:
resourse$stream
Returns:
Zend_Http_Response_Stream

Definition at line 75 of file Stream.php.

Here is the caller graph for this function:

setStreamName ( stream_name)

Set file name associated with the stream

Parameters:
string$stream_nameName to set
Returns:
Zend_Http_Response_Stream

Definition at line 114 of file Stream.php.


Field Documentation

$_cleanup [protected]

Definition at line 57 of file Stream.php.

$stream [protected]

Definition at line 41 of file Stream.php.

$stream_name [protected]

Definition at line 50 of file Stream.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations