Files
wiosna-dev_common-library/src/Traits/Collection/IteratorAggregateTrait.php
2019-05-10 22:17:40 +02:00

29 lines
598 B
PHP

<?php
/**
* (c) Meritoo.pl, http://www.meritoo.pl
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Meritoo\Common\Traits\Collection;
use ArrayIterator;
/**
* Trait for the Collection required by IteratorAggregate interface
*
* @author Meritoo <github@meritoo.pl>
* @copyright Meritoo <http://www.meritoo.pl>
*/
trait IteratorAggregateTrait
{
/**
* {@inheritdoc}
*/
public function getIterator(): ArrayIterator
{
return new ArrayIterator($this->elements);
}
}