You are here

function GenericPrefixMap::prependDeepPath in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 src/ClassFinder/GenericPrefixMap.php \Drupal\xautoload\ClassFinder\GenericPrefixMap::prependDeepPath()

Parameters

string $logical_base_path: The would-be namespace path relative to PSR-0 root. That is, the namespace with '\\' replaced by '/'.

string $deep_path: The filesystem location of the (PSR-0) subfolder for the given namespace.

DirectoryBehaviorInterface $behavior: Behavior in this directory.

File

lib/ClassFinder/GenericPrefixMap.php, line 86

Class

GenericPrefixMap
Helper class for the class finder. This is not part of ClassFinder, because we want to use the same logic for namespaces (PSR-0) and prefixes (PEAR).

Namespace

Drupal\xautoload\ClassFinder

Code

function prependDeepPath($logical_base_path, $deep_path, $behavior) {
  $this->paths[$logical_base_path] = isset($this->paths[$logical_base_path]) ? array(
    $deep_path => $behavior,
  ) + $this->paths[$logical_base_path] : array(
    $deep_path => $behavior,
  );
}