You are here

function ServiceFactory::proxyFinder in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 src/DIC/ServiceFactory.php \Drupal\xautoload\DIC\ServiceFactory::proxyFinder()

Proxy class finder.

Parameters

ServiceContainer $services:

Return value

ClassFinderInterface Proxy object wrapping the class finder. This is used to delay namespace registration until the first time the finder is actually used. (which might never happen thanks to the APC cache)

File

lib/DIC/ServiceFactory.php, line 84

Class

ServiceFactory

Namespace

Drupal\xautoload\DIC

Code

function proxyFinder($services) {

  // The class finder is cheap to create, so it can use an identity proxy.
  return new ProxyClassFinder($services->finder, $services->extensionRegistrationService);
}