| 1 | <?php |
||
| 10 | abstract class AbstractCollection implements \IteratorAggregate, \Countable, CollectionInterface |
||
| 11 | { |
||
| 12 | protected $entities = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param array $entities |
||
| 16 | */ |
||
| 17 | public function __construct(array $entities = []) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * {@inheritdoc} |
||
| 24 | */ |
||
| 25 | public function add(EntityInterface $entity) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | public function get($idx) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return \ArrayIterator |
||
| 46 | */ |
||
| 47 | public function getIterator() |
||
| 53 | |||
| 54 | public function count() |
||
| 58 | } |
||
| 59 |