public function YamlDirectoryDiscovery::__construct

public YamlDirectoryDiscovery::__construct(array $directories, $file_cache_key_suffix, $key = 'id')

Constructs a YamlDirectoryDiscovery object.

Parameters

array $directories: An array of directories to scan, keyed by the provider. The value can either be a string or an array of strings. The string values should be the path of a directory to scan.

string $file_cache_key_suffix: The file cache key suffix. This should be unique for each type of discovery.

string $key: (optional) The key contained in the discovered data that identifies it. Defaults to 'id'.

File

core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php, line 58

Class

YamlDirectoryDiscovery
Discovers multiple YAML files in a set of directories.

Namespace

Drupal\Component\Discovery

Code

public function __construct(array $directories, $file_cache_key_suffix, $key = 'id') {
  $this->directories = $directories;
  $this->fileCacheKeySuffix = $file_cache_key_suffix;
  $this->idKey = $key;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Discovery!YamlDirectoryDiscovery.php/function/YamlDirectoryDiscovery::__construct/8.1.x