Beispiel #1
0
 private function findTargetClassCandidates($annotationName, $targetPackageNames)
 {
     $targets = Customweb_Annotation_Cache_Reader::getTargetsByAnnotationName($annotationName);
     if (is_array($targetPackageNames) && count($targetPackageNames) > 0) {
         $candidates = array();
         foreach ($targets as $target) {
             foreach ($targetPackageNames as $packageName) {
                 if ($this->isMatching($target, $packageName)) {
                     $candidates[] = $target;
                 }
             }
         }
         return $candidates;
     } else {
         return $targets;
     }
 }
 /**
  * 
  * @param Reflector $reflection
  * @return Customweb_Annotation_Cache_Annotation[]
  */
 private function parse(Reflector $reflection)
 {
     $key = Customweb_Annotation_Util::createName($reflection);
     if (!isset(self::$cache[$key])) {
         $data = Customweb_Annotation_Cache_Reader::getAnnotationsByTarget($reflection);
         self::$cache[$key] = $data;
     }
     return self::$cache[$key];
 }
Beispiel #3
0
 public static function skipAnnotationCache($bool = true)
 {
     self::$skipCache = $bool;
     self::$data = null;
 }