OXID eShop CE  4.9.7
 All Classes Files Functions Variables Pages
oxModuleInstaller Class Reference
+ Inheritance diagram for oxModuleInstaller:
+ Collaboration diagram for oxModuleInstaller:

Public Member Functions

 __construct (oxModuleCache $oxModuleCache=null)
 setModuleCache ($oModuleCache)
 getModuleCache ()
 activate (oxModule $oModule)
 deactivate (oxModule $oModule)
 getModulesWithExtendedClass ()
 buildModuleChains ($aModuleArray)
 diffModuleArrays ($aAllModuleArray, $aRemModuleArray)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

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

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

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$aModuleEventsModule events
string$sModuleIdModule id

Definition at line 463 of file oxmoduleinstaller.php.

oxModuleInstaller::_addModuleFiles (   $aModuleFiles,
  $sModuleId 
)
protected

Add module files to config for auto loader.

Parameters
array$aModuleFilesModule files array
string$sModuleIdModule id

Definition at line 384 of file oxmoduleinstaller.php.

oxModuleInstaller::_addModuleSettings (   $aModuleSettings,
  $sModuleId 
)
protected

Add module settings to database.

Parameters
array$aModuleSettingsModule settings array
string$sModuleIdModule id

Definition at line 417 of file oxmoduleinstaller.php.

oxModuleInstaller::_addModuleVersion (   $sModuleVersion,
  $sModuleId 
)
protected

Add module version to config.

Parameters
string$sModuleVersionModule version
string$sModuleIdModule id

Definition at line 479 of file oxmoduleinstaller.php.

oxModuleInstaller::_addTemplateBlocks (   $aModuleBlocks,
  $sModuleId 
)
protected

Add module templates to database.

Parameters
array$aModuleBlocksModule blocks array
string$sModuleIdModule id

Definition at line 355 of file oxmoduleinstaller.php.

oxModuleInstaller::_addTemplateFiles (   $aModuleTemplates,
  $sModuleId 
)
protected

Add module template files to config for smarty.

Parameters
array$aModuleTemplatesModule templates array
string$sModuleIdModule id

Definition at line 401 of file oxmoduleinstaller.php.

oxModuleInstaller::_addToDisabledList (   $sModuleId)
protected

Add module to disable list

Parameters
string$sModuleIdModule id

Definition at line 195 of file oxmoduleinstaller.php.

oxModuleInstaller::_callEvent (   $sEvent,
  $sModuleId 
)
protected

Call module event.

Parameters
string$sEventEvent name
string$sModuleIdModule Id

Definition at line 495 of file oxmoduleinstaller.php.

oxModuleInstaller::_deleteBlock (   $sModuleId)
protected

Deactivates or activates oxBlocks of a module

Parameters
string$sModuleIdModule id

Definition at line 225 of file oxmoduleinstaller.php.

oxModuleInstaller::_deleteModule (   $sModuleId)
protected

Removes extension from modules array

Parameters
string$sModuleIdModule id

Definition at line 210 of file oxmoduleinstaller.php.

oxModuleInstaller::_deleteModuleEvents (   $sModuleId)
protected

Removes module events

Parameters
string$sModuleIdModule id

Definition at line 263 of file oxmoduleinstaller.php.

oxModuleInstaller::_deleteModuleFiles (   $sModuleId)
protected

Add module files

Parameters
string$sModuleIdModule id

Definition at line 250 of file oxmoduleinstaller.php.

oxModuleInstaller::_deleteModuleVersions (   $sModuleId)
protected

Removes module versions

Parameters
string$sModuleIdModule id

Definition at line 276 of file oxmoduleinstaller.php.

oxModuleInstaller::_deleteTemplateFiles (   $sModuleId)
protected

Add module template files to config for smarty.

Parameters
string$sModuleIdModule id

Definition at line 237 of file oxmoduleinstaller.php.

oxModuleInstaller::_filterModuleArray (   $aModules,
  $sModuleId 
)
protected

Filter module array using module id

Parameters
array$aModulesModule array (nested format)
string$sModuleIdModule id/folder name
Returns
array

Definition at line 667 of file oxmoduleinstaller.php.

oxModuleInstaller::_getModuleConfigs (   $sModuleId)
protected

Returns module configuration from database

Parameters
string$sModuleIdModule 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$aModuleMetaDataExtensionsextensions defined in metadata.
array$aModuleInstalledExtensionsextensions 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$aAllModuleArrayAll Module array (nested format)
array$aAddModuleArrayAdded 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$aModuleSettingsModule settings
Returns
array

Definition at line 624 of file oxmoduleinstaller.php.

oxModuleInstaller::_removeFromDisabledList (   $sModuleId)
protected

Removes module from disabled module list

Parameters
string$sModuleIdModule 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$aInstalledExtensionsall installed extensions ( from all modules )
array$aGarbageextension 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$sModuleIdModule id
array$aConfigsToRemoveConfigs 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$aInstalledExtensionsInstalled extensions
oxModule$oModuleModule
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$aModuleSettingsModule settings
string$sModuleIdModule id

Definition at line 588 of file oxmoduleinstaller.php.

oxModuleInstaller::_saveToConfig (   $sVariableName,
  $sVariableValue,
  $sVariableType = 'aarr' 
)
protected

Save module parameters to shop config

Parameters
string$sVariableNameconfig name
string$sVariableValueconfig value
string$sVariableTypeconfig 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$aModuleArrayModule 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$aAllModuleArrayAll Module array (nested format)
array$aRemModuleArrayRemove 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: