src/ContainerBuilder.php
public function addArray(array $servicesArray) 
    {
        foreach($servicesArray as $serviceName => $serviceConfiguration)
        {
            $this->addService($serviceName, ServiceDefinition::fromArray($serviceConfiguration), $serviceConfiguration['shared'] ?? true);
        }
    }
public function addArray(array $servicesArray) 
    {
        foreach($servicesArray as $serviceName => $serviceConfiguration)
        {
            $this->addService($serviceName, ServiceDefinition::fromArray($serviceConfiguration), $serviceConfiguration['shared'] ?? true);
        }
    }
Add services by an array

@param array             $serviceArray
@return void