src/Modules/ModuleManager.php
public function initialize(array $modules = null)
    {
        if ($this->initialized) return $this;

        if (is_array($modules)) {
            $this->moduleClasses = $modules;
        } else {
            $this->loadConfiguredModuleClasses();
        }

        $this->populateModuleCollection()
             ->sortModules()
             ->populateAssociatedClassIndex();

        $this->initialized = true;

        return $this;
    }
public function initialize(array $modules = null)
    {
        if ($this->initialized) return $this;

        if (is_array($modules)) {
            $this->moduleClasses = $modules;
        } else {
            $this->loadConfiguredModuleClasses();
        }

        $this->populateModuleCollection()
             ->sortModules()
             ->populateAssociatedClassIndex();

        $this->initialized = true;

        return $this;
    }
public function initialize ( array $ modules = null ) { if ( $ this -> initialized ) return $ this ; if ( is_array ( $ modules ) ) { $ this -> moduleClasses = $ modules ; } else { $ this -> loadConfiguredModuleClasses ( ) ; } $ this -> populateModuleCollection ( ) -> sortModules ( ) -> populateAssociatedClassIndex ( ) ; $ this -> initialized = true ; return $ this ; }
Starts initialization, collection and registration of modules.
This prepares the manager for further requests.

@param string[]|null $modules     optional override of config: list of module FQN's
@return $this
Starts initialization collection and registration of modules . This prepares the manager for further requests .