You are here

public function YamlDiscovery::__construct in Plug 7

Same name in this branch
  1. 7 lib/Drupal/Component/Discovery/YamlDiscovery.php \Drupal\Component\Discovery\YamlDiscovery::__construct()
  2. 7 lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDiscovery::__construct()

Constructs a YamlDiscovery object.

Parameters

string $name: The base filename to look for in each directory. The format will be $provider.$name.yml.

array $directories: An array of directories to scan, keyed by the provider.

File

lib/Drupal/Component/Discovery/YamlDiscovery.php, line 41
Contains \Drupal\Component\Discovery\YamlDiscovery.

Class

YamlDiscovery
Provides discovery for YAML files within a given set of directories.

Namespace

Drupal\Component\Discovery

Code

public function __construct($name, array $directories) {
  $this->name = $name;
  $this->directories = $directories;
}