MMCApp Class Reference

(c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com (c) 2007-2008 Mandriva, http://www.mandriva.com More...


Public Member Functions

 addModule ($mod)
 add a module into MMCApp
getInstance ()
 getInstance (return uniq object) fake static element (due to php4 bad object integration) with a global value
getModule ($modname)
 return a specific module
getModules ()
 return all modules list
getStyle ()
 this function return uniq style object this is used to add CSS in an uniq part of the page instead of flooding fragmented css in whole page.
 MMCApp ()
 Constructor private.
 process ()
 This function process all Modules Create old array for retro compatibility etc.
 render ()
 function called at very end of each page (css creation, etc.

Data Fields

 $_modules
 $_styleobj


Detailed Description

(c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com (c) 2007-2008 Mandriva, http://www.mandriva.com

Id
ModulesGenerator.php 3160 2008-11-05 13:40:44Z cdelfosse

This file is part of Mandriva Management Console (MMC).

MMC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

MMC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with MMC; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Singleton objet, register all main mmc data

Definition at line 28 of file ModulesGenerator.php.


Member Function Documentation

MMCApp::addModule ( mod  ) 

add a module into MMCApp

Parameters:
mod Module Object to add

Definition at line 72 of file ModulesGenerator.php.

References $mod.

00072                             {
00073        $this->_modules[$mod->getName()]= $mod;
00074    }

& MMCApp::getInstance (  ) 

getInstance (return uniq object) fake static element (due to php4 bad object integration) with a global value

Definition at line 47 of file ModulesGenerator.php.

References MMCApp().

Referenced by autoGenerateNavbar(), callPluginFunction(), createAclAttrTemplate(), createRedirectAclTemplate(), includeInfoPackage(), isNoHeader(), and SubModule::process().

00047                            {
00048 
00049       if (!isset($GLOBALS["__INSTANCE_MMC_APP__"])) {
00050          $GLOBALS["__INSTANCE_MMC_APP__"] = new MMCApp();
00051       }
00052 
00053       return $GLOBALS["__INSTANCE_MMC_APP__"];
00054 
00055    }

Here is the call graph for this function:

& MMCApp::getModule ( modname  ) 

return a specific module

Parameters:
$modname name
Returns:
Module Object
Warning:
if Module name do not exist... unknown value is return

Definition at line 92 of file ModulesGenerator.php.

00092                                  {
00093         return $this->_modules[$modname];
00094    }

& MMCApp::getModules (  ) 

return all modules list

Returns:
an associeted array like 'base' => 'base object', 'samba'=> 'samba object'

Definition at line 82 of file ModulesGenerator.php.

Referenced by process().

00082                           {
00083        return $this->_modules;
00084    }

& MMCApp::getStyle (  ) 

this function return uniq style object this is used to add CSS in an uniq part of the page instead of flooding fragmented css in whole page.

styleobject id display at the end of the page.

Returns:
unique style object

Definition at line 64 of file ModulesGenerator.php.

00064                         {
00065        return $this->_styleobj;
00066    }

MMCApp::MMCApp (  ) 

Constructor private.

Definition at line 37 of file ModulesGenerator.php.

Referenced by getInstance().

00037                      {
00038         $this->_modules = array();
00039         $this->_styleobj = new StyleGenerator();
00040    }

MMCApp::process (  ) 

This function process all Modules Create old array for retro compatibility etc.

..

Definition at line 107 of file ModulesGenerator.php.

References $module, and getModules().

00107                       {
00108         foreach ($this->getModules() as $module) {
00109             $module->process();
00110         }
00111    }

Here is the call graph for this function:

MMCApp::render (  ) 

function called at very end of each page (css creation, etc.

..)

Definition at line 99 of file ModulesGenerator.php.

00099                      {
00100         $this->_styleobj->render();
00101    }


Field Documentation

MMCApp::$_modules

Definition at line 31 of file ModulesGenerator.php.

MMCApp::$_styleobj

Definition at line 32 of file ModulesGenerator.php.


The documentation for this class was generated from the following file:

Generated on Tue May 4 11:48:13 2010 for MMC web interface by  doxygen 1.5.8