src/Container.php
public function set(string $serviceName, $serviceValue) 
    {
        if ($serviceName === 'container')
        {
            throw new ContainerException('Cannot overwrite self container reference!');
        }

        $this->resolvedSharedServices[$serviceName] = $serviceValue;
        $this->setServiceResolverType($serviceName, static::RESOLVE_SETTER);
    }
public function set(string $serviceName, $serviceValue) 
    {
        if ($serviceName === 'container')
        {
            throw new ContainerException('Cannot overwrite self container reference!');
        }

        $this->resolvedSharedServices[$serviceName] = $serviceValue;
        $this->setServiceResolverType($serviceName, static::RESOLVE_SETTER);
    }
Sets a value on the container instance.
This will overwrite any service stored / shared under the same name.

@param string            $serviceName The name / Identifier of the service to look for.
@param mixed             $serviceValue
@return void