-
(sfContext) createInstance ($configuration, $name, $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
-
| $name |
The name of the object to retrieve |
Gets an object from the current context.
returns The 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.
-
(sfActionStack) getActionStack ()
Browse code
Retrieve the ActionStack.
returns the sfActionStack instance
-
(sfConfigCache) getConfigCache ()
Browse code
Returns the configuration cache.
returns A sfConfigCache instance
-
(sfApplicationConfiguration) getConfiguration ()
Browse code
Returns the configuration instance.
returns The current application configuration instance
-
(sfController) getController ()
Browse code
Retrieve the controller.
returns The current sfController implementation instance.
-
(mixed) getDatabaseConnection ($name)
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.
-
(sfEventDispatcher) getEventDispatcher ()
Browse code
Retrieves the current event dispatcher.
returns An sfEventDispatcher instance
-
Retrieve the i18n instance
returns The current sfI18N implementation instance.
-
(sfContext) getInstance ($name, $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.
-
(sfLogger) getLogger ()
Browse code
Retrieve the logger.
returns The current sfLogger implementation instance.
-
(sfMailer) getMailer ()
Browse code
Retrieves the mailer.
returns The current sfMailer 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.
-
(sfRequest) getRequest ()
Browse code
Retrieve the request.
returns The current sfRequest implementation instance.
-
(sfResponse) getResponse ()
Browse code
Retrieve the response.
returns The current sfResponse implementation instance.
-
(sfRouting) getRouting ()
Browse code
Retrieve the routing instance.
returns The current sfRouting implementation instance.
-
(sfStorage) getStorage ()
Browse code
Retrieve the storage.
returns The current sfStorage implementation instance.
-
Retrieve the user.
returns The current sfUser implementation instance.
-
(sfViewCacheManager) 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)
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.
-
(Boolean) offsetExists ($name)
Browse code
| $name |
The name of the context object |
Returns true if the context object exists (implements the ArrayAccess interface).
returns true if the context object exists, false otherwise
-
(mixed) offsetGet ($name)
Browse code
| $name |
The offset of the value to get |
Returns the context object associated with the name (implements the ArrayAccess interface).
returns The context object if exists, null otherwise
-
offsetSet ($offset, $value)
Browse code
| $offset |
The parameter name |
| $value |
The parameter value |
Sets the context object associated with the offset (implements the ArrayAccess interface).
-
| $offset |
The parameter name |
Unsets the context object associated with the offset (implements the ArrayAccess interface).
-
| $name |
The name of the object to store |
| $object |
The object to store |
Puts an object in the current context.
-
setMailerConfiguration ()
Browse code
-
(void) setResponse ($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
-
(mixed) __call ($method, $arguments)
Browse code
| $method |
The method name |
| $arguments |
The method arguments |
Calls methods defined via sfEventDispatcher.
If a method cannot be found via sfEventDispatcher, the method name will
be parsed to magically handle getMyFactory() and setMyFactory() methods.
returns The returned value of the called method
throws sfException if call fails