-
createInstance ($configuration, $name = null, $class = __CLASS__)
Browse code
| $configuration |
An sfApplicationConfiguration instance
|
| $name |
A name for this context (application name by default)
|
| $class |
The context class to use (sfContext by default)
|
Creates a new context instance.
returns An sfContext instance
-
Dispatches the current request.
-
(array) filterTemplateParameters ($event, $parameters)
Browse code
| $event |
An sfEvent instance
|
| $parameters |
An array of template parameters to filter
|
Listens to the template.filter_parameters event.
returns The filtered parameters array
-
(object The) get ($name)
Browse code
| $name |
The name of the object to retrieve
|
Gets an object from the current context.
returns object associated with the given name
-
(string) getActionName ()
Browse code
Retrieve the action name for this context.
returns The currently executing action name, if one is set, otherwise null.
-
Retrieve the ActionStack.
returns the sfActionStack instance
-
Returns the configuration cache.
returns A sfConfigCache instance
-
Returns the configuration instance.
returns The current application configuration instance
-
Retrieve the controller.
returns The current sfController implementation instance.
-
(mixed) getDatabaseConnection ((name) $name = 'default')
Browse code
Retrieve a database connection from the database manager.
This is a shortcut to manually getting a connection from an existing database implementation instance.
If the [sf_use_database] setting is off, this will return null.
returns A database instance.
throws sfDatabaseException if the requested database name does not exist.
-
(sfDatabaseManager) getDatabaseManager ()
Browse code
Retrieve the database manager.
returns The current sfDatabaseManager instance.
-
Retrieves the current event dispatcher.
returns An sfEventDispatcher instance
-
Retrieve the i18n instance
returns The current sfI18N implementation instance.
-
getInstance ($name = null, $class = __CLASS__)
Browse code
| $name |
The name of the sfContext to retrieve.
|
| $class |
The context class to use (sfContext by default)
|
Retrieves the singleton instance of this class.
returns An sfContext implementation instance.
-
Retrieve the logger.
returns The current sfLogger implementation instance.
-
(string) getModuleDirectory ()
Browse code
Retrieve the module directory for this context.
returns An absolute filesystem path to the directory of the currently executing module, if one is set, otherwise null.
-
(string) getModuleName ()
Browse code
Retrieve the module name for this context.
returns The currently executing module name, if one is set, otherwise null.
-
Retrieve the request.
returns The current sfRequest implementation instance.
-
Retrieve the response.
returns The current sfResponse implementation instance.
-
Retrieve the routing instance.
returns The current sfRouting implementation instance.
-
Retrieve the storage.
returns The current sfStorage implementation instance.
-
Retrieve the user.
returns The current sfUser implementation instance.
-
getViewCacheManager ()
Browse code
Retrieve the view cache manager
returns The current sfViewCacheManager implementation instance.
-
Returns true if an object is currently stored in the current context with
the given name, false otherwise.
returns true if the object is not null, false otherwise
-
(bool) hasInstance ($name = null)
Browse code
| $name |
The name of the sfContext to check for
|
Checks to see if there has been a context created
returns true is instanced, otherwise false
-
initialize ($configuration)
Browse code
| $configuration |
An sfApplicationConfiguration instance
|
Initializes the current sfContext instance.
-
Loads the symfony factories.
-
retrieveObjects ($class, $peerMethod)
Browse code
-
| $name |
The name of the object to store
|
| $object |
The object to store
|
Puts an object in the current context.
-
setResponse ((sfResponse) $response)
Browse code
| $response |
An sfResponse instance.
|
Set the response object.
-
Execute the shutdown procedure.
-
| $name |
The name of the context to switch to
|
Sets the current context to something else