Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

uppm/phpdocannotations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP-Doc-Annotations parser

Example

<?php
use modules\phpdocannotations\Annotation;
use modules\phpdocannotations\AnnotationParser;

/**
 * @Annotation()
 */
final class TestAnnotation {
    public $key;
}

/**
 * @TestAnnotation(key = "Hello world")
 */
class Test {
}

$testClassAnnotations = new AnnotationParser(Test::class);

$testAnnotation = $testClassAnnotations->getAnnotation(TestAnnotation::class);

echo $testAnnotation->key;