public function set(string $serviceName, $object) {
        if(isset($this->serviceData[$serviceName]) || in_array($serviceName, $this->getSelfReferenceNames())) {
            if($this->replaceExistingServices()) {
                trigger_error("Service $serviceName is already registered", E_USER_NOTICE);
            } else {
                $e = new ServiceException("Service $serviceName is already registered");
                $e->setServiceName($serviceName);
                throw $e;
            }
        }


        if(is_callable($object)) {
            $object = new CallbackContainer($object);
        } elseif (is_array($object)) {
            $object = new ConfiguredServiceContainer($serviceName, $object, $this);
        } elseif(!is_object($object)) {
            throw new ServiceException("Service Manager only allows objects to be service instances!");
        } elseif(!($object instanceof ContainerInterface)) {
            $object = new StaticContainer($object);
        }

        $this->serviceData[$serviceName] = $object;
    }