/**
* @return Container
*/
private static function getIoc()
{
$diConfig = (include 'di.php');
$container = new Container();
$container->setSingleton('workerMapper', $diConfig['workerMapper']);
$container->setSingleton('entityfx\\utils\\workers\\contracts\\repositories\\WorkerRepositoryInterface', function ($container, $params, $config) use($diConfig) {
return $container->get($diConfig['workerRepository'], [$container->get('workerMapper')]);
});
$container->set('entityfx\\utils\\workers\\contracts\\WorkerInterceptorInterface', function ($container, $params, $config) use($diConfig) {
return $container->get($diConfig['workerInterceptor'], [$params['worker'], $container->get('entityfx\\utils\\workers\\contracts\\repositories\\WorkerRepositoryInterface')]);
});
return $container;
}