for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
/*
* This file is part of the FiveLab Resource package
*
* (c) FiveLab
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace FiveLab\Component\Resource\Resource\Action;
/**
* The collection for store resource actions.
* @author Vitaliy Zhuk <[email protected]>
class ActionCollection implements \IteratorAggregate, \Countable
{
* @var array
private $actions;
* Constructor.
* @param ActionInterface ...$actions
public function __construct(ActionInterface ...$actions)
$this->actions = $actions;
}
* {@inheritdoc}
* @return \ArrayIterator|ActionInterface[]
public function getIterator(): \ArrayIterator
return new \ArrayIterator($this->actions);
public function count(): int
return \count($this->actions);