symfony API

sfController Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.0 API OpenSearch

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.

sfController directs application flow.

Inheritence

sfWebController, sfConsoleController  <  sfController

Method Summary

  • bool actionExists(, )
    Indicates whether or not a module has a specific action.
  • bool componentExists(, )
    Indicates whether or not a module has a specific component.
  • boolean controllerExists(, , , )
    Looks for a controller and optionally throw exceptions if existence is required (i.e.
  • forward(, )
    Forwards the request to another action.
  • sfAction getAction(, )
    Retrieves an sfAction implementation instance.
  • sfActionStack getActionStack()
    Retrieves the action stack.
  • sfComponent getComponent(, )
    Retrieves a sfComponent implementation instance.
  • sfContext getContext()
    Retrieves the current application context.
  • object getController(, , )
    Retrieves a controller implementation instance.
  • string getPresentationFor(, , )
    Returns the rendered view presentation of a given module/action.
  • int getRenderMode()
    Retrieves the presentation rendering mode.
  • sfView getView(, , )
    Retrieves a sfView implementation instance.
  • bool inCLI()
    Indicates whether or not we were called using the CLI version of PHP.
  • initialize()
    Initializes this controller.
  • loadFilters(, )
    Loads application nad module filters.
  • sfController newInstance()
    Retrieves a new sfController implementation instance.
  • string sendEmail(, )
    Sends and email from the current action.
  • setRenderMode()
    Sets the presentation rendering mode.
  • mixed __call(, )
    Calls methods defined via the sfMixer class.

Method Details

  • (bool) actionExists (, ) Browse code

    Indicates whether or not a module has a specific action.

    returns true, if the action exists, otherwise false

  • (bool) componentExists (, ) Browse code

    Indicates whether or not a module has a specific component.

    returns true, if the component exists, otherwise false

  • (boolean) controllerExists (, , , ) Browse code

    Looks for a controller and optionally throw exceptions if existence is required (i.e.

    in the case of {@link getController()}).

    returns true if the controller exists, false otherwise

    throws sfConfigurationException thrown if the module is not enabled

  • forward (, ) Browse code

    Forwards the request to another action.

    throws sfConfigurationException If an invalid configuration setting has been found

  • (sfAction) getAction (, ) Browse code

    Retrieves an sfAction implementation instance.

    returns An sfAction implementation instance, if the action exists, otherwise null

  • (sfActionStack) getActionStack () Browse code

    Retrieves the action stack.

    returns An sfActionStack instance, if the action stack is enabled, otherwise null

  • (sfComponent) getComponent (, ) Browse code

    Retrieves a sfComponent implementation instance.

    returns A sfComponent implementation instance, if the component exists, otherwise null

  • (sfContext) getContext () Browse code

    Retrieves the current application context.

    returns A sfContext instance

  • (object) getController (, , ) Browse code

    Retrieves a controller implementation instance.

    returns A controller implementation instance, if the controller exists, otherwise null

  • (string) getPresentationFor (, , ) Browse code

    Returns the rendered view presentation of a given module/action.

    returns The generated content

  • (int) getRenderMode () Browse code

    Retrieves the presentation rendering mode.

    returns One of the following: - sfView::RENDER_CLIENT - sfView::RENDER_VAR

  • (sfView) getView (, , ) Browse code

    Retrieves a sfView implementation instance.

    returns A sfView implementation instance, if the view exists, otherwise null

  • (bool) inCLI () Browse code

    Indicates whether or not we were called using the CLI version of PHP.

    returns true, if using cli, otherwise false.

  • initialize () Browse code

    Initializes this controller.

  • loadFilters (, ) Browse code

    Loads application nad module filters.

  • (sfController) newInstance () Browse code

    Retrieves a new sfController implementation instance.

    returns A sfController implementation instance

    throws sfFactoryException If a new controller implementation instance cannot be created

  • (string) sendEmail (, ) Browse code

    Sends and email from the current action.


    This methods calls a module/action with the sfMailView class.

    returns The generated mail content

  • setRenderMode () Browse code

    Sets the presentation rendering mode.

    throws sfRenderException If an invalid render mode has been set

  • (mixed) __call (, ) Browse code

    Calls methods defined via the sfMixer class.

    returns The returned value of the called method