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

Breadcrumb

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

function ClassLoader::set

Same name in this branch
  1. 11.1.x vendor/composer/composer/src/Composer/Autoload/ClassLoader.php \Composer\Autoload\ClassLoader::set()

Registers a set of PSR-0 directories for a given prefix, replacing any others previously set for this prefix.

Parameters

string $prefix The prefix:

list<string>|string $paths The PSR-0 base directories:

Return value

void

File

vendor/composer/ClassLoader.php, line 278

Class

ClassLoader
ClassLoader implements a PSR-0, PSR-4 and classmap class loader.

Namespace

Composer\Autoload

Code

public function set($prefix, $paths) {
    if (!$prefix) {
        $this->fallbackDirsPsr0 = (array) $paths;
    }
    else {
        $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
    }
}
RSS feed
Powered by Drupal