sfController directs application flow.
Method Summary
-
__construct($context)
Class constructor.
-
mixed
__call($method, $arguments)
Calls methods defined via sfEventDispatcher.
-
bool
componentExists($moduleName, $componentName)
Indicates whether or not a module has a specific component.
-
getAction($moduleName, $actionName, $actionname)
Retrieves an sfAction 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.
-
getComponent($moduleName, $componentName)
Retrieves a sfComponent implementation instance.
-
initialize((sfContext) $context)
Initializes this controller.
-
getActionStack()
Retrieves the action stack.
-
getView($moduleName, $actionName, $viewName)
Retrieves a sfView implementation instance.
-
boolean
controllerExists($moduleName, $controllerName, $extension, $throwExceptions)
Looks for a controller and optionally throw exceptions if existence is
required (i.e.
-
bool
inCLI()
Indicates whether or not we were called using the CLI version of PHP.
-
forward($moduleName, $actionName)
Forwards the request to another action.
-
bool
actionExists($moduleName, $actionName)
Indicates whether or not a module has a specific action.
-
setRenderMode($mode)
Sets the presentation rendering mode.
-
string
sendEmail($module, $action)
[DEPRECATED] Sends and email.
-
object A
getController($moduleName, $controllerName, $extension)
Retrieves a controller implementation instance.
Method Details
-
__construct ($context)
Class constructor.
-
(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
-
(bool) componentExists ($moduleName, $componentName)
| $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
-
getAction ($moduleName, $actionName, $actionname)
| $moduleName |
A module name |
| $actionname |
An action name |
Retrieves an sfAction implementation instance.
returns An sfAction implementation instance, if the action exists, otherwise null
-
(string) getPresentationFor ($module, $action, $viewName = null)
| $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 ()
Retrieves the presentation rendering mode.
returns One of the following:
sfView::RENDER_CLIENT
sfView::RENDER_VAR
-
getComponent ($moduleName, $componentName)
| $moduleName |
A module name |
| $componentName |
A component name |
Retrieves a sfComponent implementation instance.
returns A sfComponent implementation instance, if the component exists, otherwise null
-
initialize ((sfContext) $context)
| $context |
A sfContext implementation instance |
Initializes this controller.
-
getActionStack ()
Retrieves the action stack.
returns An sfActionStack instance, if the action stack is enabled, otherwise null
-
getView ($moduleName, $actionName, $viewName)
| $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
-
(boolean) controllerExists ($moduleName, $controllerName, $extension, $throwExceptions)
| $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
-
(bool) inCLI ()
Indicates whether or not we were called using the CLI version of PHP.
returns true, if using cli, otherwise false.
-
forward ($moduleName, $actionName)
| $moduleName |
A module name |
| $actionName |
An action name |
Forwards the request to another action.
throws sfConfigurationException If an invalid configuration setting has been found
-
(bool) actionExists ($moduleName, $actionName)
| $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
-
setRenderMode ($mode)
Sets the presentation rendering mode.
throws sfRenderException If an invalid render mode has been set
-
(string) sendEmail ($module, $action)
| $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
-
(object A) getController ($moduleName, $controllerName, $extension)
| $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
|