示例#1
1
 protected function doParsing($string)
 {
     $stream = new StringStream($string);
     $annotations = array();
     while ($char = $stream->getFirstCharacter()) {
         if ($char == '@') {
             $parser = new AnnotationParser();
             $annotation = $parser->parseStream($stream);
             $annotations[get_class($annotation)] = $annotation;
         } else {
             $stream->forward();
         }
     }
     return $annotations;
 }