lbacik/object-collection

Object collection based on SPL ArrayObject class

v0.1 2022-09-28 16:45 UTC

This package is not auto-updated.

Last update: 2024-11-22 01:21:19 UTC


README

Install with composer:

composer require lbacik/object-collection

Example

Declaration

use App\MyObject;
use Sushi\ObjectCollection

class MyObjectCollection extends ObjectCollection
{
    static string $type = MyObject::class;
}

Usage

$myCollection = new MyObjectCollection([
    new MyObject('foo'),
    new MyObject('bar'),
]);