AnnotatedClassDiscovery
class AnnotatedClassDiscovery extends AnnotatedClassDiscovery (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. |
from AnnotatedClassDiscovery |
| protected string | $pluginDefinitionAnnotationName | The name of the annotation that contains the plugin definition. |
from AnnotatedClassDiscovery |
| protected Reader | $annotationReader | The doctrine annotation reader. |
from AnnotatedClassDiscovery |
| protected string[] | $annotationNamespaces | Additional namespaces to be scanned for annotation classes. |
from AnnotatedClassDiscovery |
| protected FileCacheInterface | $fileCache | The file cache object. |
from AnnotatedClassDiscovery |
| protected string | $directorySuffix | A suffix to append to each PSR-4 directory associated with a base namespace, to form the directories where plugins are found. |
|
| protected string | $namespaceSuffix | A suffix to append to each base namespace, to obtain the namespaces where plugins are found. |
|
| protected Traversable | $rootNamespacesIterator | A list of base namespaces with their PSR-4 directories. |
Methods
Gets a specific plugin definition.
Constructs an AnnotatedClassDiscovery object.
Gets the used doctrine annotation reader.
Prepares the annotation definition.
Gets an array of PSR-4 namespaces to search for plugin classes.
Extracts the provider name from a Drupal namespace.
Details
abstract
getDefinitions()
{@inheritdoc}
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 $subdir, Traversable $root_namespaces, string $plugin_definition_annotation_name = 'Drupal\\Component\\Annotation\\Plugin', array $annotation_namespaces = [])
Constructs an AnnotatedClassDiscovery object.
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.
protected string|null
getProviderFromNamespace(string $namespace)
Extracts the provider name from a Drupal namespace.