6. Context

On top of the low level Dependency Injection Container and the EventDispatcher, the framework gives you a more powerful components, the Context, that summarize the 2 components and adds other features as caching. The basic syntax of Context XML is:

<?xml version="1.0" encoding="UTF-8"?>
<context namespace="...">
	<objects>
		<object id="..." class="...">....</object>
		<object id="..." class="...">....</object>
	</objects>
	<events>
		<event name="...">
			<listeners>
				<listener>...</listener>
			</listeners>
		</event>
		<event name="...">
			<listeners>
				<listener>...</listener>
			</listeners>
		</event>
	</events>
</context>

As you see, every context “lives” in a specific namespace, and can defines objects and events.