Skip to content

Internals Model Interfaces IRelationHasMany

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

model\interfaces\IRelationHasMany

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/model/interfaces/IRelationHasMany.php · Snapshot 8411f4287706.

Models add hydration, persistence, relations, casts and attribute controls to DatabaseManager. Collections hydrate already fetched rows and provide iteration/counting.

IRelationHasMany

Declaration and architectural role

interface IRelationHasMany

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

Method Signature
hasMany public function hasMany(): array

hasMany

Source line 18

public function hasMany(): array;

Return an array with parameters: [ "column" => "example", "model" => [namespace\Model, namespace\Model2], ]

Where column represents a key in your table.

@return array

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Clone this wiki locally