Legacy_ModuleInstallUtils Class Reference

List of all members.

Public Member Functions

createBlockByInfo (&$module, $block, $func_num)
 installBlock (&$module, &$blockObj, &$block, &$log)
 uninstallBlock (&$block, &$log)
 installAllOfBlockTemplates (&$module, &$block)
 readTemplateFile ($dirname, $fileName, $isblock=false)
getConfigInfosFromManifesto (&$module)
 uninstallAllOfConfigs (&$module, &$log)
 DBquery ($query, &$module, $log)

Static Public Member Functions

 installSQLAutomatically (&$module, &$log)
 installAllOfModuleTemplates (&$module, &$log)
 installModuleTemplate ($module, $template, &$log)
 uninstallAllOfModuleTemplates (&$module, &$log, $defaultOnly=true)
 installAllOfBlocks (&$module, &$log)
 uninstallAllOfBlocks (&$module, &$log)

Detailed Description

This class is collection of static utility functions for module installation. These functions are useful for Legacy modules' system-fixed-installer and modules' custom-installer. All functions for the custom-installer are added notes as "FOR THE CUSTOM-ISNTALLER".

For more attentions, see base classes for the custom-installer.

See also:
Legacy_PhasedUpgrader


Member Function Documentation

Legacy_ModuleInstallUtils::installSQLAutomatically ( &$  module,
&$  log 
) [static]

Executes SQL file which xoops_version of $module specifies. This function is usefull for installers, but it's impossible to control for detail.

Parameters:
XoopsModule $module
Legacy_ModuleUtilsSimpleLog $log
Note:
FOR THE CUSTOM-INSTALLER

Legacy_ModuleInstallUtils::installAllOfModuleTemplates ( &$  module,
&$  log 
) [static]

Installs all of module templates $module specify. This function is usefull for installer and updater. In the case of updater, you should uninstall all of module templates before this function.

This function gets informations about templates from xoops_version.

Attention

This function depends the specific spec of Legacy_RenderSystem, but this static function is needed by the 2nd installer of Legacy System.

Parameters:
XoopsModule $module
Legacy_ModuleUtilsSimpleLog $log
Note:
FOR THE CUSTOM-INSTALLER
See also:
Legacy_ModuleInstallUtils::uninstallAllOfModuleTemplates()

Legacy_ModuleInstallUtils::installModuleTemplate ( module,
template,
&$  log 
) [static]

Inserts the specified template to DB.

Attention

This function depends the specific spec of Legacy_RenderSystem, but this static function is needed by the 2nd installer of Legacy System.

Parameters:
XoopsModule $module
string[][] $template
Legacy_ModuleUtilsSimpleLog $log
Returns:
bool
Note:
This is not usefull a litte for custom-installers.
Todo:
We'll need the way to specify the template by identity or others.

Legacy_ModuleInstallUtils::uninstallAllOfModuleTemplates ( &$  module,
&$  log,
defaultOnly = true 
) [static]

Uninstalls all of module templates $module specify. This function is usefull for uninstaller and updater. In the case of update, you should call this function before installAllOfModuleTemplates(). In the case of uninstall, you must set 'false' to $defaultOnly.

This function gets informations about templates from the database.

Attention

This function depends the specific spec of Legacy_RenderSystem, but this static function is needed by the 2nd installer of Legacy System.

Parameters:
XoopsModule $module
Legacy_ModuleUtilsSimpleLog $log
bool $defaultOnly Indicates whether this function deletes templates from all of tplsets.
Note:
FOR THE CUSTOM-INSTALLER
See also:
Legacy_ModuleInstallUtils::installAllOfModuleTemplates()

Legacy_ModuleInstallUtils::installAllOfBlocks ( &$  module,
&$  log 
) [static]

Installs all of blocks $module specify.

This function gets informations about blocks from xoops_version.

Parameters:
XoopsModule $module
Legacy_ModuleUtilsSimpleLog $log
Note:
FOR THE CUSTOM-INSTALLER
See also:
Legacy_ModuleInstallUtils::uninstallAllOfBlocks()

Legacy_ModuleInstallUtils::uninstallAllOfBlocks ( &$  module,
&$  log 
) [static]

Uninstalls all of blocks which $module specifies, and its permissions.

This function gets informations about templates from the database.

Parameters:
XoopsModule $module
Legacy_ModuleUtilsSimpleLog $log
Returns:
bool
Note:
FOR THE CUSTOM-INSTALLER
See also:
Legacy_ModuleInstallUtils::installAllOfBlocks()

Legacy_ModuleInstallUtils::uninstallBlock()

& Legacy_ModuleInstallUtils::createBlockByInfo ( &$  module,
block,
func_num 
)

Create XoopsBlock object by array that is defined in xoops_version, return it.

Parameters:
$module XoopsModule
$block array
Returns:
XoopsBlock

Legacy_ModuleInstallUtils::installBlock ( &$  module,
&$  blockObj,
&$  block,
&$  log 
)

This function can receive both new and update.

Parameters:
$module XoopsModule
$blockObj XoopsBlock
$block array
Returns:
bool

Legacy_ModuleInstallUtils::uninstallBlock ( &$  block,
&$  log 
)

Uninstalls a block which $block specifies. In the same time, deletes permissions for the block.

Parameters:
XoopsBlock $block
Legacy_ModuleUtilsSimpleLog $log
Note:
FOR THE CUSTOM-INSTALLER
Todo:
error handling & delete the block's template.

Legacy_ModuleInstallUtils::installAllOfBlockTemplates ( &$  module,
&$  block 
)

Save the information of block's template specified and the source code of it to database.

Returns:
bool

Legacy_ModuleInstallUtils::readTemplateFile ( dirname,
fileName,
isblock = false 
)

Read template file, return it.

Note:
This is must, but it depends on ...

& Legacy_ModuleInstallUtils::getConfigInfosFromManifesto ( &$  module  ) 

Get & build config items from Manifesto by specific module object.

Legacy_ModuleInstallUtils::uninstallAllOfConfigs ( &$  module,
&$  log 
)

Delete all configs of $module.

Parameters:
$module XoopsModule

Legacy_ModuleInstallUtils::DBquery ( query,
&$  module,
log 
)

Executes SQL query as cube style.


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 00:27:12 2006 for XOOPS Cube Legacy by  doxygen 1.5.1