watson.framework.applications¶
- class watson.framework.applications.Base(config=None)[source]¶
The core application structure for a Watson application.
It makes heavy use of the IocContainer and EventDispatcher classes to handle the wiring and executing of methods. The default configuration for Watson applications can be seen at watson.framework.config.
- _config dict¶
The configuration for the application.
- global_app Base¶
A reference to the currently running application.
- __init__(config=None)[source]¶
Initializes the application.
Registers any events that are within the application configuration.
Example:
app = Base()
- Events:
- Dispatches the INIT.
Parameters: config (mixed) – See the Base.config properties.
- container[source]¶
Returns the applications IocContainer.
If no container has been created, a new container will be created based on the dependencies within the application configuration.