symfony API

sfResponse Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.2 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 as headers, cookies and content.

Inheritence

sfWebResponse  <  sfResponse

Method Summary

  • string getContent()
    Gets the current response content
  • getOptions()
  • bool initialize($dispatcher, $options = array())
    Initializes this sfResponse.
  • send()
    Sends the content.
  • sendContent()
    Outputs the response content
  • array serialize()
    Serializes the current instance.
  • setContent($content)
    Sets the response content
  • setEventDispatcher($dispatcher)
    Sets the event dispatcher.
  • unserialize($serialized)
    Unserializes a sfResponse instance.
  • mixed __call($method, $arguments)
    Calls methods defined via sfEventDispatcher.
  • __construct($dispatcher, $options = array())
    Class constructor.

Method Details

  • (string) getContent () Browse code

    Gets the current response content

    returns Content

  • getOptions () Browse code

  • (bool) initialize ($dispatcher, $options = array()) 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

    $content

    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 ($dispatcher, $options = array()) Browse code

    $dispatcher
    $options

    Class constructor.