function GenerateAutoloadRuntimeReferenceFile::autoloadRuntimePath

Same name and namespace in other branches
  1. main composer/Plugin/Scaffold/GenerateAutoloadRuntimeReferenceFile.php \Drupal\Composer\Plugin\Scaffold\GenerateAutoloadRuntimeReferenceFile::autoloadRuntimePath()

Generates a scaffold file path object for the autoload_runtime file.

Parameters

string $package_name: The name of the package defining the autoload_runtime 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 GenerateAutoloadRuntimeReferenceFile::autoloadRuntimePath()
GenerateAutoloadRuntimeReferenceFile::autoloadRuntimeFileCommitted in composer/Plugin/Scaffold/GenerateAutoloadRuntimeReferenceFile.php
Determines whether or not the autoload_runtime file has been committed.
GenerateAutoloadRuntimeReferenceFile::generateAutoloadRuntime in composer/Plugin/Scaffold/GenerateAutoloadRuntimeReferenceFile.php
Generates the autoload_runtime file at the specified location.

File

composer/Plugin/Scaffold/GenerateAutoloadRuntimeReferenceFile.php, line 89

Class

GenerateAutoloadRuntimeReferenceFile
Generates an 'autoload_runtime.php' that includes the Symfony_runtime loader.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

protected static function autoloadRuntimePath(string $package_name, string $web_root) : ScaffoldFilePath {
  $rel_path = 'autoload_runtime.php';
  $dest_rel_path = '[web-root]/' . $rel_path;
  $dest_full_path = $web_root . '/' . $rel_path;
  return new ScaffoldFilePath('autoload_runtime', $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.