Repository navigation
Internals Model Interfaces IRelationBelongs
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/model/interfaces/IRelationBelongs.php · Snapshot 8411f4287706.
Models add hydration, persistence, relations, casts and attribute controls to DatabaseManager. Collections hydrate already fetched rows and provide iteration/counting.
use model\Model;interface IRelationBelongsNo own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.
| Method | Signature |
|---|---|
| belongsTo | public function belongsTo(): array |
public function belongsTo(): array;Return an array with parameters:
[ "column" => "example", "model" => namespace/Model, "inConstructor" => true ]
Where column represents a foreign key in your table.
inConstructor optional tells model to pass id from column directly into constructor.
@return array
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
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