3 namespace Drupal\Console\Annotations;
5 use Doctrine\Common\Annotations\AnnotationReader;
8 * Class DrupalCommandReader
10 * @package Drupal\Console\Annotations
12 class DrupalCommandAnnotationReader
18 public function readAnnotation($class)
21 $reader = new AnnotationReader();
22 $drupalCommandAnnotation = $reader->getClassAnnotation(
23 new \ReflectionClass($class),
24 'Drupal\\Console\\Annotations\\DrupalCommand'
26 if ($drupalCommandAnnotation) {
27 $annotation['extension'] = $drupalCommandAnnotation->extension?:'';
28 $annotation['extensionType'] = $drupalCommandAnnotation->extensionType?:'';
29 $annotation['dependencies'] = $drupalCommandAnnotation->dependencies?:[];