Repository navigation
Internals Context Events GetContextEvent
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/context/events/GetContextEvent.php · Snapshot 8411f4287706.
Context carries the current package root, name and ID. Context events let consumers request or replace that information through the dispatcher.
use context\Context;
use event\interfaces\IEvent;final class GetContextEvent implements IEventDeclarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.
| Member | Declaration | Purpose or source contract |
|---|---|---|
| $context | private Context $context; |
Used by getContext(), setContext(). |
| Method | Signature |
|---|---|
| getContext | public function getContext(): Context |
| setContext | public function setContext(Context $context): void |
| getName | public function getName(): string |
| bundle | public function bundle(): array |
public function getContext(): ContextReturn expressions (including local callbacks): $this->context.
Implementation, validation guards and interaction order
public function getContext(): Context
{
return $this->context;
}public function setContext(Context $context): void| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$context |
Context $context |
Package context object or package name according to the declared type. |
State writes: $this->context.
Implementation, validation guards and interaction order
public function setContext(Context $context): void
{
$this->context = $context;
}public function getName(): stringReturn expressions (including local callbacks): 'context.get'.
Implementation, validation guards and interaction order
public function getName(): string
{
return 'context.get';
}public function bundle(): arrayReturn expressions (including local callbacks): ["context" => $this].
Implementation, validation guards and interaction order
public function bundle(): array
{
return ["context" => $this];
}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