Skip to content

Instantly share code, notes, and snippets.

@weierophinney
Created December 8, 2011 16:33
Show Gist options
  • Save weierophinney/1447522 to your computer and use it in GitHub Desktop.
Save weierophinney/1447522 to your computer and use it in GitHub Desktop.
<?php
function($e) use ($validator) {
$manager = $e->getTarget();
foreach ($manager->getLoadedModules() as $module) {
if (!$module instanceof ServiceConsumer) {
continue;
}
$validator->merge($module->getServiceValidatorMap());
}
};
function ($e) use ($locator) {
$manager = $e->getTarget();
foreach ($manager->getLoadedModules() as $module) {
if (!$module instanceof ServiceProvider) {
continue;
}
$locator->addMany($module->getServices());
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment