response/AgaviResponse.class.php

Show: inherited
Table of Contents

\AgaviResponse

Package: agavi\response

AgaviResponse handles the output and other stuff sent back to the client.

Parent(s)
\AgaviParameterHolder
Children
\AgaviSoapResponse
\AgaviWebResponse
\AgaviConsoleResponse
\AgaviXmlrpcepiphpResponse
Author
David Zülke  
Copyright
Authors  
Copyright
The Agavi Project  
Since
0.11.0  
Version
$Id: AgaviResponse.class.php 4667 2011-05-20 12:34:58Z david $  

Properties

Propertyprotectedmixed  $content= 'null'

The content to send back to the client.
Default valuenullDetails
Type
mixed
Propertyprotected\AgaviContext  $context= 'null'

An AgaviContext instance.
Default valuenullDetails
Type
\AgaviContext
Propertyprotected\AgaviOutputType  $outputType= 'null'

The output type of this response.
Default valuenullDetails
Type
\AgaviOutputType

Methods

methodpublic__sleep( ) : void

Pre-serialization callback.

Will set the name of the context and exclude the instance from serializing.

Details
Author
David Zülke  
Since
0.11.0  
methodpublic__wakeup( ) : void

Post-unserialization callback.

Will restore the context based on the names set by __sleep.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicappendContent( mixed $content ) : void

Append content to the existing content for this Response.

Parameters
Name Type Description
$content mixed

The content to be appended to this Response.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicclear( ) : void
abstract

Clear all data for this Response.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicclearContent( ) : void

Clear the content for this Response

Details
Author
David Zülke  
Since
0.11.0  
methodpublicclearOutputType( ) : void

Clear the Output Type to use with this response.

Details
Author
David Zülke  
Since
0.11.1  
methodpublicclearRedirect( ) : void
abstract

Clear any set redirect information.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicgetContent( ) : mixed

Retrieve the content set for this Response.

Returns
Type Description
mixed The content set in this Response.
Details
Author
David Zülke  
Since
0.11.0  
methodpublicgetContentSize( ) : int

Retrieve the size (in bytes) of the content set for this Response.

Returns
Type Description
int The content size in bytes.
Details
Author
David Zülke  
Since
0.11.0  
methodpublicgetContext( ) : \AgaviContext
final

Retrieve the AgaviContext instance this Response object belongs to.

Returns
Type Description
\AgaviContext An AgaviContext instance.
Details
Author
David Zülke  
Since
0.11.0  
methodpublicgetOutputType( ) : \AgaviOutputType

Get the Output Type to use with this response.

Returns
Type Description
\AgaviOutputType The Output Type instance associated with.
Details
Author
David Zülke  
Since
0.11.1  
methodpublicgetRedirect( ) : array
abstract

Get info about the set redirect.

Returns
Type Description
array An assoc array of redirect info, or null if none set.
Details
Author
David Zülke  
Since
0.11.0  
methodpublichasContent( ) : bool

Check whether or not some content is set.

Returns
Type Description
bool If any content is set, false otherwise.
Details
Author
David Zülke  
Since
0.11.6  
methodpublichasRedirect( ) : bool
abstract

Check if a redirect is set.

Returns
Type Description
bool true, if a redirect is set, otherwise false
Details
Author
David Zülke  
Since
0.11.0  
methodpublicinitialize( \AgaviContext $context, array $parameters = array() ) : void

Initialize this Response.

Parameters
Name Type Description
$context \AgaviContext

An AgaviContext instance.

$parameters array

An array of initialization parameters.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicisContentMutable( ) : bool

Determine whether the content in the response may be modified by appending or prepending data using string operations. Typically false for streams, and for responses like XMLRPC where the content is an array.

Returns
Type Description
bool If the content can be treated as / changed like a string.
Details
Author
David Zülke  
Since
0.11.0  
methodpublicmerge( \AgaviResponse $otherResponse ) : void
abstract

Import response metadata from another response.

Parameters
Name Type Description
$otherResponse \AgaviResponse

The other response to import information from.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicprependContent( mixed $content ) : void

Prepend content to the existing content for this Response.

Parameters
Name Type Description
$content mixed

The content to be prepended to this Response.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicsend( \AgaviOutputType $outputType = null ) : void
abstract

Send all response data to the client.

Parameters
Name Type Description
$outputType \AgaviOutputType

An optional Output Type object with information the response can use to send additional data.

Details
Author
David Zülke  
Since
0.11.0  
methodprotectedsendContent( ) : void

Send the content for this response

Details
Author
David Zülke  
Since
0.11.0  
methodpublicsetContent( mixed $content ) : void

Set the content for this Response.

Parameters
Name Type Description
$content mixed

The content to be sent in this Response.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicsetOutputType( \AgaviOutputType $outputType ) : void

Set the Output Type to use with this response.

Parameters
Name Type Description
$outputType \AgaviOutputType

The Output Type instance to associate with.

Details
Author
David Zülke  
Since
0.11.1  
methodpublicsetRedirect( mixed $to ) : void
abstract

Redirect externally.

Parameters
Name Type Description
$to mixed

Where to redirect.

Details
Author
David Zülke  
Since
0.11.0  
Documentation was generated by DocBlox 0.17.2.