public function load(ConfigurationInterface $configuration)
    {

        // initialize the default loader and load the DI configuration for the this library
        $defaultLoader = new XmlFileLoader($this->getContainer(), new FileLocator($this->getVendorDir()));

        // load the DI configuration for all the extension libraries
        foreach ($configuration->getExtensionLibraries() as $library) {
            if (file_exists($diConfiguration = sprintf('%s/%s/symfony/Resources/config/services.xml', $this->getVendorDir(), $library))) {
                $defaultLoader->load($diConfiguration);
            } else {
                throw new \Exception(
                    sprintf(
                        'Can\'t load DI configuration for library "%s"',
                        $diConfiguration
                    )
                );
            }
        }

        // register autoloaders for additional vendor directories
        $customLoader = new XmlFileLoader($this->getContainer(), new FileLocator());
        foreach ($configuration->getAdditionalVendorDirs() as $additionalVendorDir) {
            // load the vendor directory's auto loader
            if (file_exists($autoLoader = $additionalVendorDir->getVendorDir() . '/autoload.php')) {
                require $autoLoader;
            } else {
                throw new \Exception(
                    sprintf(
                        'Can\'t find autoloader in configured additional vendor directory "%s"',
                        $additionalVendorDir->getVendorDir()
                    )
                );
            }

            // try to load the DI configuration for the configured extension libraries
            foreach ($additionalVendorDir->getLibraries() as $library) {
                // prepare the DI configuration filename
                $diConfiguration = realpath(sprintf('%s/%s/symfony/Resources/config/services.xml', $additionalVendorDir->getVendorDir(), $library));
                // try to load the filename
                if (file_exists($diConfiguration)) {
                    $customLoader->load($diConfiguration);
                } else {
                    throw new \Exception(
                        sprintf(
                            'Can\'t load DI configuration for library "%s"',
                            $diConfiguration
                        )
                    );
                }
            }
        }
    }
public function load(ConfigurationInterface $configuration)
    {

        // initialize the default loader and load the DI configuration for the this library
        $defaultLoader = new XmlFileLoader($this->getContainer(), new FileLocator($this->getVendorDir()));

        // load the DI configuration for all the extension libraries
        foreach ($configuration->getExtensionLibraries() as $library) {
            if (file_exists($diConfiguration = sprintf('%s/%s/symfony/Resources/config/services.xml', $this->getVendorDir(), $library))) {
                $defaultLoader->load($diConfiguration);
            } else {
                throw new \Exception(
                    sprintf(
                        'Can\'t load DI configuration for library "%s"',
                        $diConfiguration
                    )
                );
            }
        }

        // register autoloaders for additional vendor directories
        $customLoader = new XmlFileLoader($this->getContainer(), new FileLocator());
        foreach ($configuration->getAdditionalVendorDirs() as $additionalVendorDir) {
            // load the vendor directory's auto loader
            if (file_exists($autoLoader = $additionalVendorDir->getVendorDir() . '/autoload.php')) {
                require $autoLoader;
            } else {
                throw new \Exception(
                    sprintf(
                        'Can\'t find autoloader in configured additional vendor directory "%s"',
                        $additionalVendorDir->getVendorDir()
                    )
                );
            }

            // try to load the DI configuration for the configured extension libraries
            foreach ($additionalVendorDir->getLibraries() as $library) {
                // prepare the DI configuration filename
                $diConfiguration = realpath(sprintf('%s/%s/symfony/Resources/config/services.xml', $additionalVendorDir->getVendorDir(), $library));
                // try to load the filename
                if (file_exists($diConfiguration)) {
                    $customLoader->load($diConfiguration);
                } else {
                    throw new \Exception(
                        sprintf(
                            'Can\'t load DI configuration for library "%s"',
                            $diConfiguration
                        )
                    );
                }
            }
        }
    }
public function load ( ConfigurationInterface $ configuration ) { // initialize the default loader and load the DI configuration for the this library $ defaultLoader = new XmlFileLoader ( $ this -> getContainer ( ) , new FileLocator ( $ this -> getVendorDir ( ) ) ) ; // load the DI configuration for all the extension libraries foreach ( $ configuration -> getExtensionLibraries ( ) as $ library ) { if ( file_exists ( $ diConfiguration = sprintf ( '%s/%s/symfony/Resources/config/services.xml' , $ this -> getVendorDir ( ) , $ library ) ) ) { $ defaultLoader -> load ( $ diConfiguration ) ; } else { throw new \ Exception ( sprintf ( 'Can\'t load DI configuration for library "%s"' , $ diConfiguration ) ) ; } } // register autoloaders for additional vendor directories $ customLoader = new XmlFileLoader ( $ this -> getContainer ( ) , new FileLocator ( ) ) ; foreach ( $ configuration -> getAdditionalVendorDirs ( ) as $ additionalVendorDir ) { // load the vendor directory's auto loader if ( file_exists ( $ autoLoader = $ additionalVendorDir -> getVendorDir ( ) . '/autoload.php' ) ) { require $ autoLoader ; } else { throw new \ Exception ( sprintf ( 'Can\'t find autoloader in configured additional vendor directory "%s"' , $ additionalVendorDir -> getVendorDir ( ) ) ) ; } // try to load the DI configuration for the configured extension libraries foreach ( $ additionalVendorDir -> getLibraries ( ) as $ library ) { // prepare the DI configuration filename $ diConfiguration = realpath ( sprintf ( '%s/%s/symfony/Resources/config/services.xml' , $ additionalVendorDir -> getVendorDir ( ) , $ library ) ) ; // try to load the filename if ( file_exists ( $ diConfiguration ) ) { $ customLoader -> load ( $ diConfiguration ) ; } else { throw new \ Exception ( sprintf ( 'Can\'t load DI configuration for library "%s"' , $ diConfiguration ) ) ; } } } }
Load's the external libraries registered in the passed configuration.

@param \TechDivision\Import\ConfigurationInterface $configuration The configuration instance

@return void
Load s the external libraries registered in the passed configuration .