Repository navigation
Internals Objects
Framework Internals · Developer guide
ObjectHandler includes a real file once, examines declared classes through ReflectionClass, and selects a nonabstract class whose declaring filename is the included file. It returns null when none is found; createObjectFromFile instantiates without arguments. Dependencies included by the file do not become the selected runtime accidentally.
ObjectFactory chooses an explicit class name or infers it from classPath. It reflects the class, rejects abstract classes, constructs with configured arguments, verifies optional type, assigns configured properties and invokes ordered method calls. DEBUG controls several exception-versus-null/skip decisions; constructors, inaccessible members and method failures still follow normal PHP behavior. setClassPath requires an existing path; className includes namespace when relevant.
Factories are configuration recipes rather than singleton guarantees. RouteExecutor caches its created controller by replacing that route's factory, while ordinary create() calls create fresh objects. Runtime passables and shared objects retain references through the executor registries for the request.
ObjectCollection stores an array of objects, optional strict type, key/order/multiple sort keys and custom priority maps. sortByKey uses array_multisort; sortByValue uses a comparator with null/numeric/string/custom-map ordering. find is direct index lookup when not value-sorted, otherwise binary search using the selected property. Callers must align search with ordering. The callable accessor API has a ?string backing property, so non-string callables are currently unsafe.
-
Object-ObjectCollection —
awt_src/classes/object/ObjectCollection.php -
Object-ObjectFactory —
awt_src/classes/object/ObjectFactory.php -
Object-ObjectHandler —
awt_src/classes/object/ObjectHandler.php -
Object-Exceptions-ObjectHandlerException —
awt_src/classes/object/exceptions/ObjectHandlerException.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