AnnotatedClassDiscovery
class AnnotatedClassDiscovery implements DiscoveryInterface (View source)
Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces.
Traits
Properties
| protected string[] | $pluginNamespaces | The namespaces within which to find plugin classes. |
|
| protected string | $pluginDefinitionAnnotationName | The name of the annotation that contains the plugin definition. |
|
| protected Reader | $annotationReader | The doctrine annotation reader. |
|
| protected string[] | $annotationNamespaces | Additional namespaces to be scanned for annotation classes. |
|
| protected FileCacheInterface | $fileCache | The file cache object. |
Methods
Gets the definition of all plugins for this type.
Gets a specific plugin definition.
Constructs a new instance.
Gets the used doctrine annotation reader.
Prepares the annotation definition.
Gets an array of PSR-4 namespaces to search for plugin classes.
Details
array
getDefinitions()
Gets the definition of all plugins for this type.
getDefinition($plugin_id, $exception_on_invalid = TRUE)
{@inheritdoc}
protected array|null
doGetDefinition(array $definitions, string $plugin_id, bool $exception_on_invalid)
Gets a specific plugin definition.
hasDefinition($plugin_id)
{@inheritdoc}
__construct(string[] $plugin_namespaces = [], string $plugin_definition_annotation_name = 'Drupal\\Component\\Annotation\\Plugin', array $annotation_namespaces = [])
Constructs a new instance.
protected Reader
getAnnotationReader()
Gets the used doctrine annotation reader.
protected
prepareAnnotationDefinition(AnnotationInterface $annotation, string $class)
Prepares the annotation definition.
protected string[]
getPluginNamespaces()
Gets an array of PSR-4 namespaces to search for plugin classes.