Example #1
0
 /**
  * @param bool $restriction
  *
  * @return array
  */
 public function getAllAnnotations($restriction = false)
 {
     $restriction = RokCommon_Annotation_Addendum::resolveClassName($restriction);
     $result = array();
     foreach ($this->annotations as $class => $instances) {
         if (!$restriction || $restriction == $class) {
             $result = array_merge($result, $instances);
         }
     }
     return $result;
 }
Example #2
0
 /**
  * @static
  * @return bool
  */
 private static function getDeclaredAnnotations()
 {
     if (!self::$annotations) {
         self::$annotations = array();
         foreach (get_declared_classes() as $class) {
             if (is_subclass_of($class, 'RokCommon_Annotation') || $class == 'RokCommon_Annotation') {
                 self::$annotations[] = $class;
             }
         }
     }
     return self::$annotations;
 }
Example #3
0
 /**
  * @param $reflection
  *
  * @return bool
  */
 protected function getDocComment($reflection)
 {
     return RokCommon_Annotation_Addendum::getDocComment($reflection);
 }