public function BootstrapManager::bootstrapObjectForRoot

master BootstrapManager.php public BootstrapManager::bootstrapObjectForRoot($path)

Look up the best bootstrap class for the given location from the set of available candidates.

Return value

\Drush\Boot\Boot

1 call to BootstrapManager::bootstrapObjectForRoot()
BootstrapManager::selectBootstrapClass in lib/Drush/Boot/BootstrapManager.php
Select the bootstrap class to use. If this is called multiple times, the bootstrap class returned might change on subsequent calls, if the root directory changes. Once the bootstrap object starts changing the state of the system, however, it will be…

File

lib/Drush/Boot/BootstrapManager.php, line 105

Namespace

Drush\Boot

Class

BootstrapManager

Code

public function bootstrapObjectForRoot($path) {
  foreach ($this->bootstrapCandidates as $candidate) {
    if ($candidate->valid_root($path)) {
      return $candidate;
    }
  }
  return NULL;
}