for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Saxulum\AnnotationManager\Helper;
abstract class AbstractInfo
{
/**
* @var string
*/
protected $name;
* @var array
protected $annotations;
* @param string $name
* @param array $annotations
public function __construct($name, array $annotations = array())
$this->name = $name;
$this->annotations = $annotations;
}
* @return string
public function getName()
return $this->name;
* @return array
public function getAnnotations()
return $this->annotations;
* @param string $className
public function getAnnotationsInstanceof($className)
$annotationsInstanceOf = array();
foreach ($this->getAnnotations() as $annotation) {
if ($annotation instanceof $className) {
$annotationsInstanceOf[] = $annotation;
return $annotationsInstanceOf;
* @return null|object
public function getFirstAnnotationInstanceof($className)
return $annotation;
return null;