hotfix: Added aliases, implemented new runners

This commit is contained in:
2016-12-11 22:36:27 +01:00
parent 8e8cb05674
commit 302e5a50ce
23 changed files with 597 additions and 225 deletions

View File

@ -0,0 +1,25 @@
<?php
namespace NoccyLabs\Hotfix\Service;
class ServiceManager
{
private static $services = [];
public static function registerService(ServiceInterface $service)
{
self::$services[$service->getId()] = $service;
}
public static function getRegisteredServices()
{
return self::$services;
}
public static function getService($id)
{
if (!array_key_exists($id,self::$services)) return null;
return self::$services[$id];
}
}