Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DrupalFinder.php

function DrupalFinder::__construct

Initialize finder.

Optionally pass the starting path.

@todo Make $start_path mandatory in v2.

Parameters

string|null $start_path: The path to begin the search from.

Throws

\Exception

File

vendor/webflo/drupal-finder/src/DrupalFinder.php, line 65

Class

DrupalFinder

Namespace

DrupalFinder

Code

public function __construct($start_path = null) {
    // Initialize path variables to false, indicating their locations are
    // not yet known.
    $this->drupalRoot = false;
    $this->composerRoot = false;
    $this->vendorDir = false;
    // If a starting path was provided, attempt to locate and set path
    // variables.
    if (!empty($start_path)) {
        $this->discoverRoots($start_path);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal