definitions = $definitions; } public function get(string $id) { $value = $this->definitions[$id] ?? null; if ($value instanceof \Closure) { return $value($this); } return $value; } public function has(string $id): bool { return array_key_exists($id, $this->definitions); } }