Update plugin interfaces and instantiate container

This commit is contained in:
johannes.pichler
2020-06-05 07:48:51 +02:00
parent b20f208b55
commit 337e751200
6 changed files with 31 additions and 17 deletions

View File

@ -13,11 +13,28 @@ use ReflectionParameter;
*/
final class Container
{
/**
* @var self
*/
private static $instance;
/**
* @var array<string, mixed>
*/
private $instances = [];
/**
* Gets a new or already existing container.
*/
public static function getInstance(): self
{
if (static::$instance === null) {
static::$instance = new static();
}
return static::$instance;
}
/**
* Gets a dependency from the container.
*