1. Go to this page and download the library: Download zeptech/annotations library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zeptech / annotations example snippets
use \zpt\anno\Annotations;
$classReflector = new ReflectionClass('MyClass');
$classAnnotations = new Annotations($classReflector);
$methodAnnotations = array();
foreach ($classReflector->getMethods() as $methodReflector) {
$methodAnnotations[$methodReflector->getName()] = new Annotations($methodReflector);
}
use \zpt\anno\AnnotationFactory;
$factory = new AnnotationFactory;
$annos = $factory->get('stdclass');
/**
* @Characteristic
*/
class MyClass {
}
$annotations = new Annotations(new ReflectionClass('MyClass'));
$annotations['Characteristic'] === true;