You are here

function ServiceFactory::phaseControl in X Autoload 7.5

Parameters

ServiceContainer $services:

Return value

DrupalPhaseControl

File

src/DIC/ServiceFactory.php, line 143

Class

ServiceFactory

Namespace

Drupal\xautoload\DIC

Code

function phaseControl($services) {
  $observers = array(
    $services->extensionNamespaces,
    new HookXautoload($services->system),
    new LibrariesOnInit($services->system),
  );
  if ($services->system
    ->variableGet(XAUTOLOAD_VARNAME_REPLACE_CORE, FALSE)) {
    $observers[] = new DrupalCoreRegistryRegistrator();
  }
  return new DrupalPhaseControl($services->system, $observers);
}