Skip to content

gusarov112/abstract-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages