Mbh/Collection/Traits/Sequenceable/Arrayed/Iterator.php
<?php namespace Mbh\Collection\Traits\Sequenceable\Arrayed;
/**
* MBHFramework
*
* @link https://github.com/MBHFramework/mbh-framework
* @copyright Copyright (c) 2017 Ulises Jeremias Cornejo Fandos
* @license https://github.com/MBHFramework/mbh-framework/blob/master/LICENSE (MIT License)
*/
use Traversable;
trait Iterator
{
protected $sfa = null;
/**
* Iterator
*/
public function current()
{
return $this->sfa->current();
}
public function key(): int
{
return $this->sfa->key();
}
public function next()
{
return $this->sfa->next();
}
public function rewind()
{
return $this->sfa->rewind();
}
public function valid()
{
return $this->sfa->valid();
}
abstract protected function checkCapacity();
}