sfController directs application flow.
Method Summary
-
bool
actionExists($moduleName, $actionName)
Indicates whether or not a module has a specific action.
-
bool
componentExists($moduleName, $componentName)
Indicates whether or not a module has a specific component.
-
boolean
controllerExists($moduleName, $controllerName, $extension, $throwExceptions)
Looks for a controller and optionally throw exceptions if existence is
required (i.e.
-
forward($moduleName, $actionName)
Forwards the request to another action.
-
getAction($moduleName, $actionName)
Retrieves an sfAction implementation instance.
-
getActionStack()
Retrieves the action stack.
-
getComponent($moduleName, $componentName)
Retrieves a sfComponent implementation instance.
-
object A
getController($moduleName, $controllerName, $extension)
Retrieves a controller implementation instance.
-
string
getPresentationFor($module, $action, $viewName = null)
Returns the rendered view presentation of a given module/action.
-
int
getRenderMode()
Retrieves the presentation rendering mode.
-
getView($moduleName, $actionName, $viewName)
Retrieves a sfView implementation instance.
-
bool
inCLI()
Indicates whether or not we were called using the CLI version of PHP.
-
initialize((sfContext) $context)
Initializes this controller.
-
string
sendEmail($module, $action)
[DEPRECATED] Sends and email.
-
setRenderMode($mode)
Sets the presentation rendering mode.
-
mixed
__call($method, $arguments)
Calls methods defined via sfEventDispatcher.
-
__construct($context)
Class constructor.
Method Details
-
(bool) actionExists ($moduleName, $actionName)
Browse code
| $moduleName |
A module name
|
| $actionName |
An action name
|
Indicates whether or not a module has a specific action.
returns true, if the action exists, otherwise false
-
(bool) componentExists ($moduleName, $componentName)
Browse code
| $moduleName |
A module name
|
| $componentName |
An component name
|
Indicates whether or not a module has a specific component.
returns true, if the component exists, otherwise false
-
(boolean) controllerExists ($moduleName, $controllerName, $extension, $throwExceptions)
Browse code
| $moduleName |
The name of the module
|
| $controllerName |
The name of the controller within the module
|
| $extension |
Either 'action' or 'component' depending on the type of
controller to look for
|
| $throwExceptions |
Whether to throw exceptions if the controller doesn't exist
|
Looks for a controller and optionally throw exceptions if existence is
required (i.e.
in the case of getController).
returns true if the controller exists, false otherwise
throws sfControllerException thrown if the controller doesn't exist and the $throwExceptions parameter is set to true
-
forward ($moduleName, $actionName)
Browse code
| $moduleName |
A module name
|
| $actionName |
An action name
|
Forwards the request to another action.
throws sfConfigurationException If an invalid configuration setting has been found
-
getAction ($moduleName, $actionName)
Browse code
| $moduleName |
A module name
|
| $actionName |
An action name
|
Retrieves an sfAction implementation instance.
returns An sfAction implementation instance, if the action exists, otherwise null
-
Retrieves the action stack.
returns An sfActionStack instance, if the action stack is enabled, otherwise null
-
getComponent ($moduleName, $componentName)
Browse code
| $moduleName |
A module name
|
| $componentName |
A component name
|
Retrieves a sfComponent implementation instance.
returns A sfComponent implementation instance, if the component exists, otherwise null
-
(object A) getController ($moduleName, $controllerName, $extension)
Browse code
| $moduleName |
A module name
|
| $controllerName |
A component name
|
| $extension |
Either 'action' or 'component' depending on the type of
controller to look for
|
Retrieves a controller implementation instance.
returns controller implementation instance, if the controller exists, otherwise null
-
(string) getPresentationFor ($module, $action, $viewName = null)
Browse code
| $module |
A module name
|
| $action |
An action name
|
| $viewName |
A View class name
|
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
-
getView ($moduleName, $actionName, $viewName)
Browse code
| $moduleName |
A module name
|
| $actionName |
An action name
|
| $viewName |
A view name
|
Retrieves a sfView implementation instance.
returns A sfView implementation instance, if the view exists, otherwise null
-
Indicates whether or not we were called using the CLI version of PHP.
returns true, if using cli, otherwise false.
-
initialize ((sfContext) $context)
Browse code
| $context |
A sfContext implementation instance
|
Initializes this controller.
-
(string) sendEmail ($module, $action)
Browse code
| $module |
A module name
|
| $action |
An action name
|
[DEPRECATED] Sends and email.
This methods calls a module/action with the sfMailView class.
returns The generated mail content
-
Sets the presentation rendering mode.
throws sfRenderException If an invalid render mode has been set
-
(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
-
__construct ($context)
Browse code
Class constructor.
|