function drush_drupal_load_autoloader

8.0.x drush_drupal_load_autoloader($drupal_root)
7.x drush_drupal_load_autoloader($drupal_root)
master drush_drupal_load_autoloader($drupal_root)

Loads the Drupal autoloader and returns the instance.

4 calls to drush_drupal_load_autoloader()
DrupalBoot8::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot8.php
Initialize and load the Drupal configuration files.
drush_cache_rebuild in commands/core/
Rebuild a Drupal 8 site.
drush_core_site_install_version in commands/core/drupal/
Install Drupal 8+
drush_drupal_version in includes/
Detects the version number of the current Drupal installation, if any. Returns FALSE if there is no current Drupal installation, or it is somehow broken.


includes/, line 13
Utility functions related to Drupal.


function drush_drupal_load_autoloader($drupal_root) {
  static $autoloader = FALSE;

  if (!$autoloader) {
    $autoloader = require $drupal_root . '/autoload.php';
    if ($autoloader === TRUE) {
      // The autoloader was already require(). Assume that Drush and Drupal share an autoloader per
      // "Point autoload.php to the proper vendor directory" -
      $autoloader = drush_get_context('DRUSH_CLASSLOADER');
  return $autoloader;