Your IP : 127.0.0.1


Current Path : /home/dev2.destoffenstraat.com/vendor/laminas/laminas-code/src/Annotation/
Upload File :
Current File : /home/dev2.destoffenstraat.com/vendor/laminas/laminas-code/src/Annotation/AnnotationCollection.php

<?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;
    }
}