protected function createServicesFromArray(
        array $services,
        string $path
    ) : void {
        if (!isset($services["services"])) {
            throw new Exception("The configuration array is missing the key 'services' in file '$path'.");
        }

        foreach ($services["services"] as $name => $service) {
            try {
                $this->createService($name, $service);
            } catch (Exception $e) {
                throw new Exception($e->getMessage() . " In configuration file '$path'.");
            }
        }
    }
protected function createServicesFromArray(
        array $services,
        string $path
    ) : void {
        if (!isset($services["services"])) {
            throw new Exception("The configuration array is missing the key 'services' in file '$path'.");
        }

        foreach ($services["services"] as $name => $service) {
            try {
                $this->createService($name, $service);
            } catch (Exception $e) {
                throw new Exception($e->getMessage() . " In configuration file '$path'.");
            }
        }
    }
protected function createServicesFromArray ( array $ services , string $ path ) : void { if ( ! isset ( $ services [ "services" ] ) ) { throw new Exception ( "The configuration array is missing the key 'services' in file '$path'." ) ; } foreach ( $ services [ "services" ] as $ name => $ service ) { try { $ this -> createService ( $ name , $ service ) ; } catch ( Exception $ e ) { throw new Exception ( $ e -> getMessage ( ) . " In configuration file '$path'." ) ; } } }
Create services from an array containing a list of services.

@param array  $service details to use when creating the service.

@throws Exception when configuration is corrupt.

@return void
Create services from an array containing a list of services .