You are here

protected function xautoload_LoaderManager::initLoaderMode in X Autoload 7.3

Create the loader for a given mode, if it does not exist yet.

Parameters

string $mode: Loader mode, e.g. 'apc' or 'default'.

Return value

boolean TRUE, if the loader for the mode does now exist.

1 call to xautoload_LoaderManager::initLoaderMode()
xautoload_LoaderManager::register in lib/LoaderManager.php
Register the loader for the given mode, and unregister other loaders. This can be used both for initial registration, and later on to change the cache mode.

File

lib/LoaderManager.php, line 129

Class

xautoload_LoaderManager
This thing has an overview of available class loaders with different cache mechanics. It can detect the currently applicable cache method, and it can switch between cache methods.

Code

protected function initLoaderMode($mode) {
  if (!isset($this->loaders[$mode])) {
    $this->loaders[$mode] = $this->loaderFactory
      ->buildLoader($mode);
  }
  return !empty($this->loaders[$mode]);
}