You are here

protected function LocalDirectoryAdapter::prependToPaths in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 src/Adapter/LocalDirectoryAdapter.php \Drupal\xautoload\Adapter\LocalDirectoryAdapter::prependToPaths()

Parameters

string|string[] &$paths:

7 calls to LocalDirectoryAdapter::prependToPaths()
LocalDirectoryAdapter::add in lib/Adapter/LocalDirectoryAdapter.php
LocalDirectoryAdapter::addClassMap in lib/Adapter/LocalDirectoryAdapter.php
LocalDirectoryAdapter::addClassmapSources in lib/Adapter/LocalDirectoryAdapter.php
LocalDirectoryAdapter::addNamespacePsr0 in lib/Adapter/LocalDirectoryAdapter.php
LocalDirectoryAdapter::addPear in lib/Adapter/LocalDirectoryAdapter.php

... See full list

File

lib/Adapter/LocalDirectoryAdapter.php, line 193

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

protected function prependToPaths(&$paths) {
  if (!is_array($paths)) {
    $paths = $this->localDirectory . $paths;
  }
  else {
    foreach ($paths as &$path) {
      $path = $this->localDirectory . $path;
    }
  }
}