18 lines
349 B
PHP
18 lines
349 B
PHP
![]() |
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace Loom\Utility\Collection;
|
||
|
|
||
|
class Collection extends AbstractCollection implements \IteratorAggregate, \Countable
|
||
|
{
|
||
|
public function getIterator(): \Traversable
|
||
|
{
|
||
|
return new \ArrayIterator($this->items);
|
||
|
}
|
||
|
|
||
|
public function count(): int
|
||
|
{
|
||
|
return count($this->items);
|
||
|
}
|
||
|
}
|