AnnotatedClassDiscoveryAutomatedProviders
class AnnotatedClassDiscoveryAutomatedProviders extends AnnotatedClassDiscovery (View source)
| internal | This is a temporary solution to the fact that migration source plugins have more than one provider. This functionality will be moved to core in https://www.drupal.org/node/2786355. |
Determines providers based on a class's and its parent's 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. |
from AnnotatedClassDiscovery |
| protected string | $namespaceSuffix | A suffix to append to each base namespace, to obtain the namespaces where plugins are found. |
from AnnotatedClassDiscovery |
| protected Traversable | $rootNamespacesIterator | A list of base namespaces with their PSR-4 directories. |
from AnnotatedClassDiscovery |
| protected ClassFinderInterface | $finder | A utility object that can use active autoloaders to find files for classes. |
Methods
{@inheritdoc}
Gets a specific plugin definition.
Constructs an AnnotatedClassDiscoveryAutomatedProviders object.
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
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 AnnotatedClassDiscoveryAutomatedProviders object.
protected Reader
getAnnotationReader()
Gets the used doctrine annotation reader.
protected
prepareAnnotationDefinition(AnnotationInterface $annotation, string $class, StaticReflectionParser $parser = NULL)
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.