You are here

protected function xautoload_LoaderManager::detectLoaderMode in X Autoload 7.3

Detect the loader mode.

Return value

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

1 call to xautoload_LoaderManager::detectLoaderMode()
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 90

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 detectLoaderMode() {
  if (function_exists('variable_get')) {
    $mode = variable_get('xautoload_cache_mode', 'default');
    return $mode;
  }
  return 'default';
}