function GenerateAutoloadReferenceFile::autoloadPath
Same name in other branches
- 9 composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php \Drupal\Composer\Plugin\Scaffold\GenerateAutoloadReferenceFile::autoloadPath()
- 8.9.x composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php \Drupal\Composer\Plugin\Scaffold\GenerateAutoloadReferenceFile::autoloadPath()
- 10 composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php \Drupal\Composer\Plugin\Scaffold\GenerateAutoloadReferenceFile::autoloadPath()
Generates a scaffold file path object for the autoload file.
Parameters
string $package_name: The name of the package defining the autoload file (the root package).
string $web_root: The path to the web root.
Return value
\Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath Object wrapping the relative and absolute path to the destination file.
2 calls to GenerateAutoloadReferenceFile::autoloadPath()
- GenerateAutoloadReferenceFile::autoloadFileCommitted in composer/
Plugin/ Scaffold/ GenerateAutoloadReferenceFile.php - Determines whether or not the autoload file has been committed.
- GenerateAutoloadReferenceFile::generateAutoload in composer/
Plugin/ Scaffold/ GenerateAutoloadReferenceFile.php - Generates the autoload file at the specified location.
File
-
composer/
Plugin/ Scaffold/ GenerateAutoloadReferenceFile.php, line 85
Class
- GenerateAutoloadReferenceFile
- Generates an 'autoload.php' that includes the autoloader created by Composer.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
protected static function autoloadPath($package_name, $web_root) {
$rel_path = 'autoload.php';
$dest_rel_path = '[web-root]/' . $rel_path;
$dest_full_path = $web_root . '/' . $rel_path;
return new ScaffoldFilePath('autoload', $package_name, $dest_rel_path, $dest_full_path);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.