<?php
/**
* @see https://github.com/laminas/laminas-code for the canonical source repository
* @copyright https://github.com/laminas/laminas-code/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-code/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Code\Annotation;
use ArrayObject;
use function get_class;
class AnnotationCollection extends ArrayObject
{
/**
* Checks if the collection has annotations for a class
*
* @param string $class
* @return bool
*/
public function hasAnnotation($class)
{
foreach ($this as $annotation) {
if (get_class($annotation) == $class) {
return true;
}
}
return false;
}
}
-
root authoreda0a3ef35