You are here

function xautoload_ServiceFactory::loaderManager in X Autoload 7.3

Loader manager

Parameters

xautoload_Container_LazyServices $services:

Return value

xautoload_LoaderManager Object that can

  • create class loaders with different cache mechanics,
  • register the one for the currently configured cache method, and also
  • switch between cache methods.

File

lib/ServiceFactory.php, line 61

Class

xautoload_ServiceFactory

Code

function loaderManager($services) {

  // Build the loader manager.
  $proxyFinder = $services->proxyFinder;
  $loaderFactory = new xautoload_LoaderFactory($proxyFinder);
  $services->apcKeyManager
    ->observeApcPrefix($loaderFactory);
  $loaderManager = new xautoload_LoaderManager($loaderFactory);
  $services->apcKeyManager
    ->observeApcPrefix($loaderManager);
  return $loaderManager;
}