Install/Loader.php
public function addInstaller(InstallerInterface $installer)
    {
        $installerClass = get_class($installer);

        if (!isset($this->installers[$installerClass])) {
            if ($installer instanceof OrderedInstallerInterface && $installer instanceof DependentInstallerInterface) {
                throw new \InvalidArgumentException(sprintf('Class "%s" can\'t implement "%s" and "%s" at the same time.',
                    $installerClass,
                    'OrderedInstallerInterface',
                    'DependentInstallerInterface'));
            } elseif ($installer instanceof OrderedInstallerInterface) {
                $this->orderInstallersByNumber = true;
            } elseif ($installer instanceof DependentInstallerInterface) {
                $this->orderInstallersByDependencies = true;
                foreach ($installer->getDependencies() as $class) {
                    $this->addInstaller(new $class);
                }
            }

            $this->installers[$installerClass] = $installer;
        }
    }
public function addInstaller(InstallerInterface $installer)
    {
        $installerClass = get_class($installer);

        if (!isset($this->installers[$installerClass])) {
            if ($installer instanceof OrderedInstallerInterface && $installer instanceof DependentInstallerInterface) {
                throw new \InvalidArgumentException(sprintf('Class "%s" can\'t implement "%s" and "%s" at the same time.',
                    $installerClass,
                    'OrderedInstallerInterface',
                    'DependentInstallerInterface'));
            } elseif ($installer instanceof OrderedInstallerInterface) {
                $this->orderInstallersByNumber = true;
            } elseif ($installer instanceof DependentInstallerInterface) {
                $this->orderInstallersByDependencies = true;
                foreach ($installer->getDependencies() as $class) {
                    $this->addInstaller(new $class);
                }
            }

            $this->installers[$installerClass] = $installer;
        }
    }
public function addInstaller ( InstallerInterface $ installer ) { $ installerClass = get_class ( $ installer ) ; if ( ! isset ( $ this -> installers [ $ installerClass ] ) ) { if ( $ installer instanceof OrderedInstallerInterface && $ installer instanceof DependentInstallerInterface ) { throw new \ InvalidArgumentException ( sprintf ( 'Class "%s" can\'t implement "%s" and "%s" at the same time.' , $ installerClass , 'OrderedInstallerInterface' , 'DependentInstallerInterface' ) ) ; } elseif ( $ installer instanceof OrderedInstallerInterface ) { $ this -> orderInstallersByNumber = true ; } elseif ( $ installer instanceof DependentInstallerInterface ) { $ this -> orderInstallersByDependencies = true ; foreach ( $ installer -> getDependencies ( ) as $ class ) { $ this -> addInstaller ( new $ class ) ; } } $ this -> installers [ $ installerClass ] = $ installer ; } }
Adds the installer object instance to the loader.

@param InstallerInterface $installer
Adds the installer object instance to the loader .