for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace mxdiModule\Annotation;
use mxdiModule\Exception\CannotGetValue;
use Zend\ServiceManager\ServiceLocatorInterface;
/**
* @Annotation
* @Target("METHOD")
*/
final class InjectParams implements \IteratorAggregate, \Countable, AnnotationInterface
{
/** @var array */
public $value = [];
* @return array|\Traversable
* @internal
public function getIterator()
return new \ArrayIterator($this->value);
}
* Get the value.
*
* @param ServiceLocatorInterface $sm
* @return mixed
* @throws CannotGetValue
public function getValue(ServiceLocatorInterface $sm)
$value = [];
/** @var Inject $injection */
foreach ($this as $injection) {
$value[] = $injection->getValue($sm);
return $value;
public function count()
return count($this->value);