Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 587 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 587 Bytes

Abstract Collection

Installation

Require package

composer require gusarov112/abstract-collection

Usage

This is just recommendation how to use and how to implement.

/**
 * @method Bar[] getIterator()
 */
class BarCollection extends \Gusarov112\AbstractCollection\AbstractCollection
{
    public function __construct(Bar ...$items)
    {
        $this->items = $items;
    }

    public function addItem(Bar $item)
    {
        $this->items[] = $item;
    }
}

@TODO

  1. Write tests
  2. Make SplFixedArray benchmark again and post results in readme