Repository navigation
Internals Events and Context
Framework Internals · Developer guide
EventDispatcher stores listener arrays by event-name string. addListener appends, dispatch obtains IEvent::getName() and calls each listener's handle() in registration order, returning an array of result arrays. There is no priority, queued execution, listener discovery, cancellation or exception isolation. removeListeners deletes the entire name entry.
Context contains package path/name/string ID. GetContextEvent bundles the event object itself so RespondContextEvent can set its Context. Runtime activation replaces context.get listeners with a responder for the package; route execution adds the controller's responder. A freshly created GetContextEvent has no initialized context unless set/responded to, while ExceptionBase seeds a System fallback first.
VFS uses a separate ContextRequestEvent whose context field is set by ContextSwitchEvent. The executor replaces vfs.context.request listeners when main starts. These reserved names and mutable request-event patterns are implementation plumbing, not general package lifecycle notifications.
Built-in event names are package.installed, package.updated, route.dynamic.add, router.enter, renderer.ready, context.get and vfs.context.request. Exact payload definitions live in the event type references. Package events are sent after hooks; routing/rendering events bracket controller action/output processing.
-
Context-Context —
awt_src/classes/context/Context.php -
Context-Events-GetContextEvent —
awt_src/classes/context/events/GetContextEvent.php -
Context-Events-RespondContextEvent —
awt_src/classes/context/events/RespondContextEvent.php -
Event-EventDispatcher —
awt_src/classes/event/EventDispatcher.php -
Event-Interfaces-IEvent —
awt_src/classes/event/interfaces/IEvent.php -
Event-Interfaces-IEventListener —
awt_src/classes/event/interfaces/IEventListener.php
AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes