Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/ModelCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
*/
class ModelCollection implements Iterator, Countable, ArrayAccess
{
/**
* @var TModel[]
*/
protected array $models;
protected int $iterator = 0;

Expand Down Expand Up @@ -142,4 +145,13 @@ public function offsetUnset(mixed $offset): void
unset($this->models[$offset]);
}

/**
* Get the models in this collection as an array
*
* @return TModel[]
*/
public function getModels(): array
{
return $this->models;
}
}
Loading