src/base/Config.php
public function addModule($module)
    {
        if (!($module instanceof ModuleInterface)) {
            $module = new Module($module);
        }

        return ($this->modules[$module->getName()] = $module);
    }
public function addModule($module)
    {
        if (!($module instanceof ModuleInterface)) {
            $module = new Module($module);
        }

        return ($this->modules[$module->getName()] = $module);
    }
public function addModule ( $ module ) { if ( ! ( $ module instanceof ModuleInterface ) ) { $ module = new Module ( $ module ) ; } return ( $ this -> modules [ $ module -> getName ( ) ] = $ module ) ; }
Adds new module into configuration

If passed a string a new module will be created if it does not exist yet

@param ModuleInterface|string $module an instance of module to be added or name of a module to be created and added

@return ModuleInterface
Adds new module into configuration