public function addDelegator(string $name, $factory)
    {
        if (isset($this->services[$name]) && ! $this->allowOverride) {
            throw ContainerModificationsNotAllowedException::fromExistingService($name);
        }
        $factory = is_array($factory) ? $factory : [ $factory];
        if (isset($this->delegators[$name])) {
            $this->delegators[$name] = $factory + $this->delegators[$name];
        } else {
            $this->delegators[$name] = $factory;
        }
    }