[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/zendframework/zend-code/src/Annotation/ -> AnnotationCollection.php (source)

   1  <?php
   2  /**
   3   * Zend Framework (http://framework.zend.com/)
   4   *
   5   * @link      http://github.com/zendframework/zf2 for the canonical source repository
   6   * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
   7   * @license   http://framework.zend.com/license/new-bsd New BSD License
   8   */
   9  
  10  namespace Zend\Code\Annotation;
  11  
  12  use ArrayObject;
  13  
  14  use function get_class;
  15  
  16  class AnnotationCollection extends ArrayObject
  17  {
  18      /**
  19       * Checks if the collection has annotations for a class
  20       *
  21       * @param  string $class
  22       * @return bool
  23       */
  24      public function hasAnnotation($class)
  25      {
  26          foreach ($this as $annotation) {
  27              if (get_class($annotation) == $class) {
  28                  return true;
  29              }
  30          }
  31  
  32          return false;
  33      }
  34  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1