Class we_app_Installer

Description

class for installing and uninstalling webEdition applications (formerly known as "tools")

Located in /app/Installer.php (line 55)


	
			
Direct descendents
Class Description
we_app_Installer_Dummy dummy class for installation of webEdition applications (formerly known as "tools")
we_app_Installer_Local class for installing and uninstalling webEdition applications (formerly known as "tools")
we_app_Installer_Server class for remote installation of webEdition applications from update server the source files need to be present as a zip file at a specified location
Variable Summary
object reference $_app
string $_appname
object Zend_Config_Xml $_config
object SimpleXML_Element $_files
instance $_instance
installation $_source
string $_tmpDir
object SimpleXML_Element $_toc
Method Summary
we_app_Installer __construct ([string $source = ""], [string $installer = ""])
object instance getInstance ()
void install ()
void uninstall ()
void update ()
void _executeHook ([ $hook = ""])
void _executeQueries ([string $operation = ""])
void _installFiles ()
void _postInstall ()
void _postUninstall ()
void _postUpdate ()
void _preInstall ()
void _prepareInstallationFiles ([string $source = ""])
void _preUninstall ()
void _preUpdate ()
void _uninstallFiles ()
void __toString ()
Variables
object reference $_app = null (line 76)
  • var: to we_app_Application object of the used application
  • access: protected
string $_appname = "" (line 81)
  • var: application name
  • access: protected
object Zend_Config_Xml $_config = null (line 86)
  • var: object for general application handling configuration
  • access: protected
array $_configFiles = array() (line 102)
  • var: with an application's config files that need special treatment (i.e. on uninstall) filled by constructor method
  • access: protected
object SimpleXML_Element $_files = null (line 96)
  • var: object for application file list
  • access: protected
instance $_instance = null (line 61)
  • var: of the used installer class
  • access: protected
installation $_source = "" (line 66)
  • var: source, either path or application name
  • access: protected
string $_tmpDir = "" (line 71)
  • var: path to the temporary installation files of the application
  • access: protected
object SimpleXML_Element $_toc = null (line 91)
  • var: object for application list
  • access: protected
Methods
Constructor __construct (line 112)

constructor method for installer class returns the object instance of an appropriate class for specified application.

-> needed for uninstallation process where the actions to be performed are the same

  • access: public
we_app_Installer __construct ([string $source = ""], [string $installer = ""])
  • string $source: application name or source file path
  • string $installer: name of the installer (without "we_app_Installer_", optional)

Redefined in descendants as:
getInstance (line 230)

get the created instance of the used installer class (created in constructor method)

  • return: of we_app_Installer_*
  • access: public
object instance getInstance ()
install (line 243)

install an application either from a local directory or from the update server

  • check first if there is already an application installed with the same name

  • access: public
void install ()

Redefined in descendants as:
uninstall (line 306)

removes an application permanently

preUninstall:

  • nothing
uninstall:
  • deletes all application files using $this->_uninstallFiles() via conf/toc.xml
  • removes application data (from database) using $this->_uninstallData()
  • removes the manifest file
  • removes the file toc
postinstall:
  • removes the application's toc.xml entry

  • access: public
void uninstall ()

Redefined in descendants as:
update (line 273)
  • access: public
void update ()

Redefined in descendants as:
_executeHook (line 344)
  • access: protected
void _executeHook ([ $hook = ""])
  • $hook
_executeQueries (line 568)

executes all queries according to tox.xml

  • access: protected
void _executeQueries ([string $operation = ""])
  • string $operation: current operation as noted in toc.xml possible values: install, update, uninstall
_installFiles (line 488)

moves all files to their destination according to toc.xml

  • access: protected
void _installFiles ()
_postInstall (line 739)

things to do after a successfull installation

  • access: protected
void _postInstall ()

Redefined in descendants as:
_postUninstall (line 771)

things to do after a having successfully uninstalled an application (clean up)

  • access: protected
void _postUninstall ()
_postUpdate (line 755)

things to do after a successful update

  • access: protected
void _postUpdate ()
_preInstall (line 731)

things to do before starting an installation

  • access: protected
void _preInstall ()

Redefined in descendants as:
_prepareInstallationFiles (line 372)

prepares the installation files, moves them to the temporary installation directory

and extracts the archive (if it is one)

  • access: protected
void _prepareInstallationFiles ([string $source = ""])
  • string $source: path to the source file or directory
_preUninstall (line 763)

preparations before uninstalling an application

  • access: protected
void _preUninstall ()
_preUpdate (line 747)

things to do before starting an update

  • access: protected
void _preUpdate ()
_removeAppConfig (line 629)

deletes an application's configuration files:

  • conf/installhooks.xml
  • conf/manifest.xml
  • conf/toc.xml

  • access: protected
void _removeAppConfig ()
_removeInstallationFiles (line 551)
  • access: protected
void _removeInstallationFiles ()
_uninstallFiles (line 652)

moves all files to their destination according to toc.xml

  • access: protected
void _uninstallFiles ()
_validateInstallationFiles (line 428)

performs some checks if all needed files and informations are present:

  • is there already a tool installed with the same name?
  • is there a manifest file? (checks only its existence)
  • is there a toc file? (checks only its existence)
  • are all files of the toc file present in the temporary installation directory?

  • access: protected
void _validateInstallationFiles ()
__toString (line 215)

returns the capitalized name of the installer without the "we_app_Installer_" prefix

  • access: public
void __toString ()

Documentation generated on Mon, 01 Sep 2008 11:35:40 +0200 by phpDocumentor 1.4.0