gamee/php-collections

package of usefull collections for php

v1.5.0 2019-08-12 11:53 UTC

README

Latest Stable Version License Total Downloads Build Status

php-collections

Useful PHP utilities (Collections, Iterators, etc)

ObjectIterator usage


use Gamee\Collections\Iterator\ObjectIterator;

class UserCredentialsDataIterator extends ObjectIterator
{

	public function current(): UserCredentialsData
	{
		return parent::current();
	}
}

ImmutableObjectCollection

use Gamee\Collections\Collection\ImmutableObjectCollection;

final class UserDataCollection extends ImmutableObjectCollection
{

	protected function getItemType(): string
	{
		return UserData::class;
	}


	public function current(): UserData
	{
		return parent::current();
	}
}