symfony API

sfRequest 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.0 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.

sfRequest provides methods for manipulating client request information such

Inheritence

sfConsoleRequest, sfWebRequest  <  sfRequest

Method Summary

  • string &()
    Removes an error.
  • mixed getAttribute(, , )
    Retrieves an attribute from the current request.
  • sfParameterHolder getAttributeHolder()
    Retrieves the attributes holder.
  • sfContext getContext()
    Retrieves the current application context.
  • string getError()
    Retrieves an error message.
  • array getErrorNames()
    Retrieves an array of error names.
  • array getErrors()
    Retrieves an array of errors.
  • int getMethod()
    Retrieves this request's method.
  • getParameter(, , )
    Retrieves a paramater for the current request.
  • sfParameterHolder getParameterHolder()
    Retrieves the parameters for the current request.
  • boolean hasAttribute(, )
    Indicates whether or not an attribute exist for the current request.
  • boolean hasError()
    Indicates whether or not an error exists.
  • boolean hasErrors()
    Indicates whether or not any errors exist.
  • boolean hasParameter(, )
    Indicates whether or not a parameter exist for the current request.
  • boolean initialize(, , )
    Initializes this sfRequest.
  • sfRequest newInstance()
    Retrieves a new sfRequest implementation instance.
  • setAttribute(, , )
    Sets an attribute for the request.
  • setError(, )
    Sets an error.
  • setErrors()
    Sets an array of errors
  • void setMethod()
    Sets the request method.
  • setParameter(, , )
    Sets a parameter for the current request.
  • shutdown()
    Executes the shutdown procedure.
  • mixed __call(, )
    Overloads a given method.

Method Details

  • (string) & ()

    Removes an error.

    returns An error message, if the error was removed, otherwise null

  • (mixed) getAttribute (, , )

    Retrieves an attribute from the current request.

    returns An attribute value

  • (sfParameterHolder) getAttributeHolder ()

    Retrieves the attributes holder.

    returns The attribute holder

  • (sfContext) getContext ()

    Retrieves the current application context.

    returns Current application context

  • (string) getError ()

    Retrieves an error message.

    returns An error message, if the error exists, otherwise null

  • (array) getErrorNames ()

    Retrieves an array of error names.

    returns An indexed array of error names

  • (array) getErrors ()

    Retrieves an array of errors.

    returns An associative array of errors

  • (int) getMethod ()

    Retrieves this request's method.

    returns One of the following constants: - sfRequest::GET - sfRequest::POST

  • getParameter (, , )

    Retrieves a paramater for the current request.

  • (sfParameterHolder) getParameterHolder ()

    Retrieves the parameters for the current request.

    returns The parameter holder

  • (boolean) hasAttribute (, )

    Indicates whether or not an attribute exist for the current request.

    returns true, if the attribute exists otherwise false

  • (boolean) hasError ()

    Indicates whether or not an error exists.

    returns true, if the error exists, otherwise false

  • (boolean) hasErrors ()

    Indicates whether or not any errors exist.

    returns true, if any error exist, otherwise false

  • (boolean) hasParameter (, )

    Indicates whether or not a parameter exist for the current request.

    returns true, if the paramater exists otherwise false

  • (boolean) initialize (, , )

    Initializes this sfRequest.

    returns true, if initialization completes successfully, otherwise false

    throws sfInitializationException If an error occurs while initializing this Request

  • (sfRequest) newInstance ()

    Retrieves a new sfRequest implementation instance.

    returns A sfRequest implementation instance

    throws sfFactoryException If a request implementation instance cannot be created

  • setAttribute (, , )

    Sets an attribute for the request.

  • setError (, )

    Sets an error.

  • setErrors ()

    Sets an array of errors


    If an existing error name matches any of the keys in the supplied
    array, the associated message will be overridden.

  • (void) setMethod ()

    Sets the request method.

    throws sfException - If the specified request method is invalid

  • setParameter (, , )

    Sets a parameter for the current request.

  • shutdown ()

    Executes the shutdown procedure.

  • (mixed) __call (, )

    Overloads a given method.

    returns User function callback

    throws sfException if call fails