public function activateModule($namespace, $activateDependencies = false)
    {
        $namespace = Framework::prepareNamespace($namespace);

        // If the module already is activated we won't activate it again
        if (isset($this->activatedModules[$namespace])) {
            return true;
        }
        
        // Search the path for the module and initialize it
        $path = $this->searchModulePath($namespace);
        if ($path === false) {
            throw new Exception('Can not find the module "' . $namespace . '".');
        }
        
        // Get the version
        $moduleProperties = $this->parseModuleJson($path);
        $version = $moduleProperties->module->version;
        
        $module = $this->initializeModule($path, $activateDependencies);
        $module->activate($version, 0);
        
        // Save the path in the activated modules array
        $this->activatedModules[$namespace] = array('version' => $version, 'path' => $path);
        $this->saveActivatedModules();
        
        return true;
    }
public function activateModule($namespace, $activateDependencies = false)
    {
        $namespace = Framework::prepareNamespace($namespace);

        // If the module already is activated we won't activate it again
        if (isset($this->activatedModules[$namespace])) {
            return true;
        }
        
        // Search the path for the module and initialize it
        $path = $this->searchModulePath($namespace);
        if ($path === false) {
            throw new Exception('Can not find the module "' . $namespace . '".');
        }
        
        // Get the version
        $moduleProperties = $this->parseModuleJson($path);
        $version = $moduleProperties->module->version;
        
        $module = $this->initializeModule($path, $activateDependencies);
        $module->activate($version, 0);
        
        // Save the path in the activated modules array
        $this->activatedModules[$namespace] = array('version' => $version, 'path' => $path);
        $this->saveActivatedModules();
        
        return true;
    }
public function activateModule ( $ namespace , $ activateDependencies = false ) { $ namespace = Framework :: prepareNamespace ( $ namespace ) ; // If the module already is activated we won't activate it again if ( isset ( $ this -> activatedModules [ $ namespace ] ) ) { return true ; } // Search the path for the module and initialize it $ path = $ this -> searchModulePath ( $ namespace ) ; if ( $ path === false ) { throw new Exception ( 'Can not find the module "' . $ namespace . '".' ) ; } // Get the version $ moduleProperties = $ this -> parseModuleJson ( $ path ) ; $ version = $ moduleProperties -> module -> version ; $ module = $ this -> initializeModule ( $ path , $ activateDependencies ) ; $ module -> activate ( $ version , 0 ) ; // Save the path in the activated modules array $ this -> activatedModules [ $ namespace ] = array ( 'version' => $ version , 'path' => $ path ) ; $ this -> saveActivatedModules ( ) ; return true ; }
Searches and activates the module with the given
namespace. The register method of the module will
be executed.

@access public
@param string $namespace
@param boolean $activateDependencies
@return boolean

@throws Zepi\Turbo\Exception Can not find the module "$namespace".
Searches and activates the module with the given namespace . The register method of the module will be executed .