Zephir\Documentation\Docblock::addAnnotation PHP Метод

addAnnotation() публичный Метод

public addAnnotation ( Zephir\Documentation\Annotation $annotation )
$annotation Zephir\Documentation\Annotation
    public function addAnnotation(Annotation $annotation)
    {
        $this->annotations[] = $annotation;
    }

Usage Example

Пример #1
0
 /**
  * check if there is a currently parsed annotation, registers it, and stops the current annotation parsing
  */
 private function __tryRegisterAnnotation()
 {
     if (($this->annotationNameOpen || $this->annotationOpen) && strlen($this->currentAnnotationStr) > 0) {
         $annotation = $this->__createAnnotation($this->currentAnnotationStr, $this->currentAnnotationContentStr);
         $this->docblockObj->addAnnotation($annotation);
     }
     $this->annotationNameOpen = false;
     $this->annotationOpen = false;
 }