public function ExtensionDiscovery::__construct

public ExtensionDiscovery::__construct($root, $use_file_cache = TRUE, $profile_directories = NULL, $site_path = NULL)

Constructs a new ExtensionDiscovery object.

Parameters

string $root: The app root.

bool $use_file_cache: Whether file cache should be used.

string[] $profile_directories: The available profile directories

string $site_path: The path to the site.

File

core/lib/Drupal/Core/Extension/ExtensionDiscovery.php, line 113

Class

ExtensionDiscovery
Discovers available extensions in the filesystem.

Namespace

Drupal\Core\Extension

Code

public function __construct($root, $use_file_cache = TRUE, $profile_directories = NULL, $site_path = NULL) {
  $this->root = $root;
  $this->fileCache = $use_file_cache ? FileCacheFactory::get('extension_discovery') : NULL;
  $this->profileDirectories = $profile_directories;
  $this->sitePath = $site_path;
}

© 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!Core!Extension!ExtensionDiscovery.php/function/ExtensionDiscovery::__construct/8.1.x