You are here

function LocalDirectoryAdapter::add in X Autoload 7.5

Same name and namespace in other branches
  1. 7.4 lib/Adapter/LocalDirectoryAdapter.php \Drupal\xautoload\Adapter\LocalDirectoryAdapter::add()

Adds a PSR-0 style prefix. Alias for ->addPsr0().

Parameters

string $prefix:

string|\string[] $paths:

bool $relative: If TRUE, the paths will be relative to $this->localDirectory.

Overrides CommonRegistrationInterface::add

File

src/Adapter/LocalDirectoryAdapter.php, line 156

Class

LocalDirectoryAdapter
An instance of this class is passed around to implementations of hook_xautoload(). It acts as a wrapper around the ClassFinder, to register stuff.

Namespace

Drupal\xautoload\Adapter

Code

function add($prefix, $paths, $relative = TRUE) {
  $relative && $this
    ->prependToPaths($paths);
  $this->master
    ->add($prefix, $paths);
}