Add container access

This commit is contained in:
eater 2018-01-27 18:44:28 +01:00
parent 986be392f3
commit 6a18422b09
Signed by: eater
GPG key ID: AD2560A0F84F0759

View file

@ -224,4 +224,16 @@ class Instance
$this->container = $builder->build();
}
public function has(string $key): bool {
return $this->container->has($key);
}
public function get(string $key, $default = null) {
if (!$this->container->has($key)) {
return $default;
}
return $this->container->get($key);
}
}