services[$name][$path][$metadata['protocol']] = $metadata; } else { $this->services[$name][$path]['default'] = $metadata; } } /** * Deregister a service from the manager. */ public function deregister(string $name, ?string $path = null): void { if ($path) { unset($this->services[$name][$path]); } else { unset($this->services[$name]); } } /** * List all services. */ public function all(): array { return $this->services; } }