protected function initializeModule($path, $activateDependencies = false)
    {
        $moduleNamespace = $this->getNamespaceFromModuleJson($path);
        $module = $this->getModule($moduleNamespace);
        
        // If the module is already initialized, return it
        if ($module instanceof ModuleAbstract) {
            return $module;
        }
        
        // Try to find and load the module
        if (!file_exists($path . '/Module.php')) {
            throw new Exception('The module "' . $path . '" is not valid!');
        }

        // Look for dependencies and warn the user or activate the dependencies
        $this->handleModuleDependencies($moduleNamespace, $path, $activateDependencies);
        
        // Load the module
        require_once($path . '/Module.php');
        $moduleClassName = Framework::prepareClassName($moduleNamespace . 'Module');
        
        // Initialize the module
        $module = new $moduleClassName($this->framework, $moduleNamespace, $path);
        $this->modules[$moduleNamespace] = $module;
        
        $module->initialize();
        
        return $module;
    }
protected function initializeModule($path, $activateDependencies = false)
    {
        $moduleNamespace = $this->getNamespaceFromModuleJson($path);
        $module = $this->getModule($moduleNamespace);
        
        // If the module is already initialized, return it
        if ($module instanceof ModuleAbstract) {
            return $module;
        }
        
        // Try to find and load the module
        if (!file_exists($path . '/Module.php')) {
            throw new Exception('The module "' . $path . '" is not valid!');
        }

        // Look for dependencies and warn the user or activate the dependencies
        $this->handleModuleDependencies($moduleNamespace, $path, $activateDependencies);
        
        // Load the module
        require_once($path . '/Module.php');
        $moduleClassName = Framework::prepareClassName($moduleNamespace . 'Module');
        
        // Initialize the module
        $module = new $moduleClassName($this->framework, $moduleNamespace, $path);
        $this->modules[$moduleNamespace] = $module;
        
        $module->initialize();
        
        return $module;
    }
protected function initializeModule ( $ path , $ activateDependencies = false ) { $ moduleNamespace = $ this -> getNamespaceFromModuleJson ( $ path ) ; $ module = $ this -> getModule ( $ moduleNamespace ) ; // If the module is already initialized, return it if ( $ module instanceof ModuleAbstract ) { return $ module ; } // Try to find and load the module if ( ! file_exists ( $ path . '/Module.php' ) ) { throw new Exception ( 'The module "' . $ path . '" is not valid!' ) ; } // Look for dependencies and warn the user or activate the dependencies $ this -> handleModuleDependencies ( $ moduleNamespace , $ path , $ activateDependencies ) ; // Load the module require_once ( $ path . '/Module.php' ) ; $ moduleClassName = Framework :: prepareClassName ( $ moduleNamespace . 'Module' ) ; // Initialize the module $ module = new $ moduleClassName ( $ this -> framework , $ moduleNamespace , $ path ) ; $ this -> modules [ $ moduleNamespace ] = $ module ; $ module -> initialize ( ) ; return $ module ; }
Initializes the module. This creates an new Module object if the
given module path is valid. The function returns the initialized
module or false, if the module can't be initialized.

@access protected
@param string $path
@param boolean $activateDependencies
@return ModuleAbstract

@throws Zepi\Turbo\Exception The module "$path" is not valid
Initializes the module . This creates an new Module object if the given module path is valid . The function returns the initialized module or false if the module can t be initialized .