public function deactivateModule($namespace)
    {
        $namespace = Framework::prepareNamespace($namespace);

        // If the module isn't activated we have nothing to deactivate
        if (!isset($this->activatedModules[$namespace])) {
            return false;
        }
        
        // Load the module to deactivate it
        $namespace = Framework::prepareNamespace($namespace);
        $module = $this->getModule($namespace);

        // If the module isn't initialized it isn't active
        if ($module === false) {
            return false;
        }
        
        // Deactivate the module
        $module->deactivate();
        
        // Remove the module and save the module cache
        unset($this->activatedModules[$namespace]);
        unset($this->modules[$namespace]);
        $this->saveActivatedModules();
        
        return true;
    }
public function deactivateModule($namespace)
    {
        $namespace = Framework::prepareNamespace($namespace);

        // If the module isn't activated we have nothing to deactivate
        if (!isset($this->activatedModules[$namespace])) {
            return false;
        }
        
        // Load the module to deactivate it
        $namespace = Framework::prepareNamespace($namespace);
        $module = $this->getModule($namespace);

        // If the module isn't initialized it isn't active
        if ($module === false) {
            return false;
        }
        
        // Deactivate the module
        $module->deactivate();
        
        // Remove the module and save the module cache
        unset($this->activatedModules[$namespace]);
        unset($this->modules[$namespace]);
        $this->saveActivatedModules();
        
        return true;
    }
public function deactivateModule ( $ namespace ) { $ namespace = Framework :: prepareNamespace ( $ namespace ) ; // If the module isn't activated we have nothing to deactivate if ( ! isset ( $ this -> activatedModules [ $ namespace ] ) ) { return false ; } // Load the module to deactivate it $ namespace = Framework :: prepareNamespace ( $ namespace ) ; $ module = $ this -> getModule ( $ namespace ) ; // If the module isn't initialized it isn't active if ( $ module === false ) { return false ; } // Deactivate the module $ module -> deactivate ( ) ; // Remove the module and save the module cache unset ( $ this -> activatedModules [ $ namespace ] ) ; unset ( $ this -> modules [ $ namespace ] ) ; $ this -> saveActivatedModules ( ) ; return true ; }
Deactivates an activated module. The deregister method
of the module will be executed.

@access public
@param string $namespace
@return boolean
Deactivates an activated module . The deregister method of the module will be executed .