symfony API

sfResponse Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.4 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

Inheritence

sfWebResponse  <  sfResponse

Method Summary

  • string getContent()
    Gets the current response content
  • array getOptions()
    Returns the options.
  • bool initialize($dispatcher, $options)
    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()
    Class constructor.

Method Details

  • (string) getContent ()

    Gets the current response content

    returns Content

  • (array) getOptions ()

    Returns the options.

    returns The options.

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

    $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 ()

    Sends the content.

  • sendContent ()

    Outputs the response content

  • (array) serialize ()

    Serializes the current instance.

    returns Objects instance

  • setContent ($content)

    Sets the response content

  • setEventDispatcher ($dispatcher)

    $dispatcher An sfEventDispatcher instance

    Sets the event dispatcher.

  • unserialize ($serialized)

    $serialized A serialized sfResponse instance

    Unserializes a sfResponse instance.


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

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

    $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 ()

    Class constructor.