symfony API

sfResponse Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu

1.1 API OpenSearch


You are currently browsing the symfony API for the 1.1 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfResponse provides methods for manipulating client response information such


sfWebResponse, sfConsoleResponse  <  sfResponse

Method Summary

Method Details

  • (string) getContent () Browse code

    Gets the current response content

    returns Content

  • getOptions () Browse code

  • (bool) initialize ($dispatcher, $options) Browse code

    $dispatcher An sfEventDispatcher instance
    $options An array of options

    Initializes this sfResponse.

    Available options:

    * logging: Whether to enable logging or not (false by default)

    returns true, if initialization completes successfully, otherwise false

    throws sfInitializationException If an error occurs while initializing this sfResponse

  • send () Browse code

    Sends the content.

  • sendContent () Browse code

    Outputs the response content

  • (array) serialize () Browse code

    Serializes the current instance.

    returns Objects instance

  • setContent ($content) Browse code

    Sets the response content

  • setEventDispatcher ($dispatcher) Browse code

    $dispatcher An sfEventDispatcher instance

    Sets the event dispatcher.

  • unserialize ($serialized) Browse code

    $serialized A serialized sfResponse instance

    Unserializes a sfResponse instance.

    You need to inject a dispatcher after unserializing a sfResponse instance.

  • (mixed) __call ($method, $arguments) Browse code

    $method The method name
    $arguments The method arguments

    Calls methods defined via sfEventDispatcher.

    returns The returned value of the called method

    throws sfException If the calls fails

  • __construct () Browse code

    Class constructor.