Public Member Functions | Protected Member Functions | Protected Attributes

oxModuleInstaller Class Reference

Inheritance diagram for oxModuleInstaller:
Collaboration diagram for oxModuleInstaller:

List of all members.

Public Member Functions

 __construct (oxModuleCache $oxModuleCache=null)
 setModuleCache ($oModuleCache)
 getModuleCache ()
 activate (oxModule $oModule)
 deactivate (oxModule $oModule)
 getModulesWithExtendedClass ()
 buildModuleChains ($aModuleArray)
 diffModuleArrays ($aAllModuleArray, $aRemModuleArray)

Protected Member Functions

 _addToDisabledList ($sModuleId)
 _deleteModule ($sModuleId)
 _deleteBlock ($sModuleId)
 _deleteTemplateFiles ($sModuleId)
 _deleteModuleFiles ($sModuleId)
 _deleteModuleEvents ($sModuleId)
 _deleteModuleVersions ($sModuleId)
 _addExtensions (oxModule $oModule)
 _mergeModuleArrays ($aAllModuleArray, $aAddModuleArray)
 _removeFromDisabledList ($sModuleId)
 _addTemplateBlocks ($aModuleBlocks, $sModuleId)
 _addModuleFiles ($aModuleFiles, $sModuleId)
 _addTemplateFiles ($aModuleTemplates, $sModuleId)
 _addModuleSettings ($aModuleSettings, $sModuleId)
 _addModuleEvents ($aModuleEvents, $sModuleId)
 _addModuleVersion ($sModuleVersion, $sModuleId)
 _callEvent ($sEvent, $sModuleId)
 _removeNotUsedExtensions ($aInstalledExtensions, oxModule $oModule)
 _getModuleExtensionsGarbage ($aModuleMetaDataExtensions, $aModuleInstalledExtensions)
 _removeGarbage ($aInstalledExtensions, $aGarbage)
 _removeNotUsedSettings ($aModuleSettings, $sModuleId)
 _getModuleConfigs ($sModuleId)
 _parseModuleSettings ($aModuleSettings)
 _removeModuleConfigs ($sModuleId, $aConfigsToRemove)
 _filterModuleArray ($aModules, $sModuleId)
 _saveToConfig ($sVariableName, $sVariableValue, $sVariableType= 'aarr')

Protected Attributes

 $_oModuleCache

Detailed Description

Modules installer class.

Definition at line 9 of file oxmoduleinstaller.php.


Constructor & Destructor Documentation

oxModuleInstaller.__construct ( oxModuleCache oxModuleCache = null  ) 

Sets dependencies.

Parameters:
oxModuleCache $oxModuleCache

Definition at line 22 of file oxmoduleinstaller.php.


Member Function Documentation

oxModuleInstaller._addExtensions ( oxModule oModule  )  [protected]

Add extension to module

Parameters:
oxModule $oModule

Definition at line 289 of file oxmoduleinstaller.php.

oxModuleInstaller._addModuleEvents ( aModuleEvents,
sModuleId 
) [protected]

Add module events to config.

Parameters:
array $aModuleEvents Module events
string $sModuleId Module id

Definition at line 463 of file oxmoduleinstaller.php.

oxModuleInstaller._addModuleFiles ( aModuleFiles,
sModuleId 
) [protected]

Add module files to config for auto loader.

Parameters:
array $aModuleFiles Module files array
string $sModuleId Module id

Definition at line 384 of file oxmoduleinstaller.php.

oxModuleInstaller._addModuleSettings ( aModuleSettings,
sModuleId 
) [protected]

Add module settings to database.

Parameters:
array $aModuleSettings Module settings array
string $sModuleId Module id

Definition at line 417 of file oxmoduleinstaller.php.

oxModuleInstaller._addModuleVersion ( sModuleVersion,
sModuleId 
) [protected]

Add module version to config.

Parameters:
string $sModuleVersion Module version
string $sModuleId Module id

Definition at line 479 of file oxmoduleinstaller.php.

oxModuleInstaller._addTemplateBlocks ( aModuleBlocks,
sModuleId 
) [protected]

Add module templates to database.

Parameters:
array $aModuleBlocks Module blocks array
string $sModuleId Module id

Definition at line 355 of file oxmoduleinstaller.php.

oxModuleInstaller._addTemplateFiles ( aModuleTemplates,
sModuleId 
) [protected]

Add module template files to config for smarty.

Parameters:
array $aModuleTemplates Module templates array
string $sModuleId Module id

Definition at line 401 of file oxmoduleinstaller.php.

oxModuleInstaller._addToDisabledList ( sModuleId  )  [protected]

Add module to disable list

Parameters:
string $sModuleId Module id

Definition at line 195 of file oxmoduleinstaller.php.

oxModuleInstaller._callEvent ( sEvent,
sModuleId 
) [protected]

Call module event.

Parameters:
string $sEvent Event name
string $sModuleId Module Id

Definition at line 495 of file oxmoduleinstaller.php.

oxModuleInstaller._deleteBlock ( sModuleId  )  [protected]

Deactivates or activates oxBlocks of a module

Parameters:
string $sModuleId Module id

Definition at line 225 of file oxmoduleinstaller.php.

oxModuleInstaller._deleteModule ( sModuleId  )  [protected]

Removes extension from modules array

Parameters:
string $sModuleId Module id

Definition at line 210 of file oxmoduleinstaller.php.

oxModuleInstaller._deleteModuleEvents ( sModuleId  )  [protected]

Removes module events

Parameters:
string $sModuleId Module id

Definition at line 263 of file oxmoduleinstaller.php.

oxModuleInstaller._deleteModuleFiles ( sModuleId  )  [protected]

Add module files

Parameters:
string $sModuleId Module id

Definition at line 250 of file oxmoduleinstaller.php.

oxModuleInstaller._deleteModuleVersions ( sModuleId  )  [protected]

Removes module versions

Parameters:
string $sModuleId Module id

Definition at line 276 of file oxmoduleinstaller.php.

oxModuleInstaller._deleteTemplateFiles ( sModuleId  )  [protected]

Add module template files to config for smarty.

Parameters:
string $sModuleId Module id

Definition at line 237 of file oxmoduleinstaller.php.

oxModuleInstaller._filterModuleArray ( aModules,
sModuleId 
) [protected]

Filter module array using module id

Parameters:
array $aModules Module array (nested format)
string $sModuleId Module id/folder name
Returns:
array

Definition at line 667 of file oxmoduleinstaller.php.

oxModuleInstaller._getModuleConfigs ( sModuleId  )  [protected]

Returns module configuration from database

Parameters:
string $sModuleId Module id
Returns:
array

Definition at line 606 of file oxmoduleinstaller.php.

oxModuleInstaller._getModuleExtensionsGarbage ( aModuleMetaDataExtensions,
aModuleInstalledExtensions 
) [protected]

Returns extension which is no longer in metadata - garbage

Parameters:
array $aModuleMetaDataExtensions extensions defined in metadata.
array $aModuleInstalledExtensions extensions which are installed
Returns:
array

Definition at line 542 of file oxmoduleinstaller.php.

oxModuleInstaller._mergeModuleArrays ( aAllModuleArray,
aAddModuleArray 
) [protected]

Merge two nested module arrays together so that the values of $aAddModuleArray are appended to the end of the $aAllModuleArray

Parameters:
array $aAllModuleArray All Module array (nested format)
array $aAddModuleArray Added Module array (nested format)
Returns:
array

Definition at line 312 of file oxmoduleinstaller.php.

oxModuleInstaller._parseModuleSettings ( aModuleSettings  )  [protected]

Parses module config variable names to array from module settings

Parameters:
array $aModuleSettings Module settings
Returns:
array

Definition at line 624 of file oxmoduleinstaller.php.

oxModuleInstaller._removeFromDisabledList ( sModuleId  )  [protected]

Removes module from disabled module list

Parameters:
string $sModuleId Module id

Definition at line 339 of file oxmoduleinstaller.php.

oxModuleInstaller._removeGarbage ( aInstalledExtensions,
aGarbage 
) [protected]

Removes garbage - not exiting module extensions, returns clean array of installed extensions

Parameters:
array $aInstalledExtensions all installed extensions ( from all modules )
array $aGarbage extension which are not used and should be removed
Returns:
array

Definition at line 566 of file oxmoduleinstaller.php.

oxModuleInstaller._removeModuleConfigs ( sModuleId,
aConfigsToRemove 
) [protected]

Removes module configs from database

Parameters:
string $sModuleId Module id
array $aConfigsToRemove Configs to remove

Definition at line 643 of file oxmoduleinstaller.php.

oxModuleInstaller._removeNotUsedExtensions ( aInstalledExtensions,
oxModule oModule 
) [protected]

Removes garbage ( module not used extensions ) from all installed extensions list

Parameters:
array $aInstalledExtensions Installed extensions
oxModule $oModule Module
Returns:
array

Definition at line 517 of file oxmoduleinstaller.php.

oxModuleInstaller._removeNotUsedSettings ( aModuleSettings,
sModuleId 
) [protected]

Removes configs which are removed from module metadata

Parameters:
array $aModuleSettings Module settings
string $sModuleId Module id

Definition at line 588 of file oxmoduleinstaller.php.

oxModuleInstaller._saveToConfig ( sVariableName,
sVariableValue,
sVariableType = 'aarr' 
) [protected]

Save module parameters to shop config

Parameters:
string $sVariableName config name
string $sVariableValue config value
string $sVariableType config type

Definition at line 688 of file oxmoduleinstaller.php.

oxModuleInstaller.activate ( oxModule oModule  ) 

Activate extension by merging module class inheritance information with shop module array

Parameters:
oxModule $oModule
Returns:
bool

Definition at line 54 of file oxmoduleinstaller.php.

oxModuleInstaller.buildModuleChains ( aModuleArray  ) 

Build module chains from nested array

Parameters:
array $aModuleArray Module array (nested format)
Returns:
array

Definition at line 139 of file oxmoduleinstaller.php.

oxModuleInstaller.deactivate ( oxModule oModule  ) 

Deactivate extension by adding disable module class information to disabled module array

Parameters:
oxModule $oModule
Returns:
bool

Definition at line 92 of file oxmoduleinstaller.php.

oxModuleInstaller.diffModuleArrays ( aAllModuleArray,
aRemModuleArray 
)

Diff two nested module arrays together so that the values of $aRmModuleArray are removed from $aAllModuleArray

Parameters:
array $aAllModuleArray All Module array (nested format)
array $aRemModuleArray Remove Module array (nested format)
Returns:
array

Definition at line 160 of file oxmoduleinstaller.php.

oxModuleInstaller.getModuleCache (  ) 

Gets module cache.

Returns:
oxModuleCache

Definition at line 42 of file oxmoduleinstaller.php.

oxModuleInstaller.getModulesWithExtendedClass (  ) 

Get parsed modules

Returns:
array

Definition at line 127 of file oxmoduleinstaller.php.

oxModuleInstaller.setModuleCache ( oModuleCache  ) 

Sets module cache.

Parameters:
oxModuleCache $oModuleCache

Definition at line 32 of file oxmoduleinstaller.php.


Member Data Documentation

oxModuleInstaller.$_oModuleCache [protected]

Definition at line 15 of file oxmoduleinstaller.php.


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