function GenerateAutoloadReferenceFile::autoLoadContents
Builds the contents of the autoload file.
Parameters
string $relative_autoload_path: The relative path to the autoloader in vendor.
Return value
string Return the contents for the autoload.php.
1 call to GenerateAutoloadReferenceFile::autoLoadContents()
- GenerateAutoloadReferenceFile::generateAutoload in composer/
Plugin/ Scaffold/ GenerateAutoloadReferenceFile.php  - Generates the autoload file at the specified location.
 
File
- 
              composer/
Plugin/ Scaffold/ GenerateAutoloadReferenceFile.php, line 101  
Class
- GenerateAutoloadReferenceFile
 - Generates an 'autoload.php' that includes the autoloader created by Composer.
 
Namespace
Drupal\Composer\Plugin\ScaffoldCode
protected static function autoLoadContents($relative_autoload_path) {
  $relative_autoload_path = preg_replace('#^\\./#', '', $relative_autoload_path);
  return <<<EOF
  <?php
  
  /**
   * @file
   * Includes the autoloader created by Composer.
   *
   * This file was generated by drupal-scaffold.
   *
   * @see composer.json
   * @see index.php
   * @see core/install.php
   * @see core/rebuild.php
   */
  
  return require __DIR__ . '/{<span class="php-variable">$relative_autoload_path</span>}';
  
  EOF;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.