function xautoload_ServiceFactory::proxyFinder in X Autoload 7.3
Proxy class finder.
Parameters
xautoload_Container_LazyServices $services:
Return value
xautoload_ClassFinder_Interface 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/
ServiceFactory.php, line 107
Class
Code
function proxyFinder($services) {
// The class finder is cheap to create,
// so it can use an identity proxy.
$proxy = new xautoload_ClassFinder_Proxy($services->finder);
$proxy
->proxyObserveInstantiation(array(
$services->schedule,
'setFinder',
));
return $proxy;
}