You are here

function AnnotatedClassDiscovery::__construct in Service Container 7

Same name in this branch
  1. 7 lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery::__construct()
  2. 7 modules/providers/service_container_annotation_discovery/src/Plugin/Discovery/AnnotatedClassDiscovery.php \Drupal\service_container_annotation_discovery\Plugin\Discovery\AnnotatedClassDiscovery::__construct()
Same name and namespace in other branches
  1. 7.2 lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery::__construct()

Constructs a new instance.

Parameters

string[] $plugin_namespaces: (optional) An array of namespace that may contain plugin implementations. Defaults to an empty array.

string $plugin_definition_annotation_name: (optional) The name of the annotation that contains the plugin definition. Defaults to 'Drupal\Component\Annotation\Plugin'.

File

lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php, line 59
Contains \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery.

Class

AnnotatedClassDiscovery
Defines a discovery mechanism to find annotated plugins in PSR-0 namespaces.

Namespace

Drupal\Component\Annotation\Plugin\Discovery

Code

function __construct($plugin_namespaces = array(), $plugin_definition_annotation_name = 'Drupal\\Component\\Annotation\\Plugin') {
  $this->pluginNamespaces = $plugin_namespaces;
  $this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
}