Description

PackageInstallation executes package installations and updates.

  • author: Marcel Werk
  • copyright: 2001-2009 WoltLab GmbH
  • license: GNU
PackageInstallationQueue
   |
   --PackageInstallation

Direct descendents

Class Description
PackageInstallationInfo PackageInstallationInfo is used to calculate the progress bar of a package installation.

Constant Summary

Name Value
CONFIG_FILE 'config.inc.php'

Method Summary

Return Name
PackageInstallation __construct(integer $queueID)
void assignPackageInfo()
void calcProgress( $currentStep)
void checkArchive()
void checkExclusions()
Installer extractFiles(string $targetDir, string $sourceArchive, [FileHandler $fileHandler = null])
string finishInstallation()
PackageArchive getArchive()
void getCurrentStep( $currentStep)
void getInstallationInfo()
array getInstructions()
void getTotalStep()
string getXMLTag(string $tagName)
boolean hasPackageInstallationPlugins()
void install()
void installPackage()
void installPackageInstallationPlugins()
void installPackageOptionals()
void installPackageParent()
boolean installPackageRequirements()
void installSelectablePackageRequirements()
void rebuildConfigFiles()
void saveParentPackage(integer $parentPackageID)
void updatePackageVersion()
boolean XMLTagExists(string $tagName)

Methods

__construct

public PackageInstallation __construct(integer $queueID)

Creates a new PackageInstallation object.

Parameters:

  • $queueID

Redefinition of: PackageInstallationQueue::__construct()

Redefined in descendants as: PackageInstallationInfo::__construct()


assignPackageInfo

protected void assignPackageInfo()


calcProgress

protected void calcProgress( $currentStep)

  • see: PackageInstalltionQueue::calcProgress()

Parameters:

  • $currentStep

Redefinition of: PackageInstallationQueue::calcProgress()


checkArchive

protected void checkArchive()

Checks the correctness of the package archive.


checkExclusions

protected void checkExclusions()

Checks for conflicted exclusions.


extractFiles

public Installer extractFiles(string $targetDir, string $sourceArchive, [FileHandler $fileHandler = null])

Extracts files from .tar (or .tar.gz) archive and installs them

Parameters:

  • $targetDir
  • $sourceArchive
  • $fileHandler

finishInstallation

protected string finishInstallation()

finalises installation of this package.

  • return: nextStep

getArchive

public PackageArchive getArchive()

Returns the package archive.


getCurrentStep

protected void getCurrentStep( $currentStep)


getInstallationInfo

protected void getInstallationInfo()


getInstructions

public array getInstructions()

Returns the package installation instructions.


getTotalStep

protected void getTotalStep()


getXMLTag

public string getXMLTag(string $tagName)

Returns the content of the tag with the given tag name in package.xml file.

  • return: content

Parameters:

  • $tagName

hasPackageInstallationPlugins

protected boolean hasPackageInstallationPlugins()

checks if this package has packageInstallationPlugins to add.


install

protected void install()

Steps through the installation process of a package.


installPackage

protected void installPackage()

Registers package information into database.


installPackageInstallationPlugins

protected void installPackageInstallationPlugins()

Finds and extracts userexits archive in package archive and start extraction


installPackageOptionals

protected void installPackageOptionals()

Installs optional packages for this package.


installPackageParent

protected void installPackageParent()

determines if the package that's about to install does have a "parent" package, and if so, associates the package with that parent.


installPackageRequirements

protected boolean installPackageRequirements()

Installs the requirements of the current package.

Inserts needed package installations or updates into the package installation queue. Returns true, if no package installations are needed. Otherwise false.


installSelectablePackageRequirements

protected void installSelectablePackageRequirements()

Shows a select form if multiple instances of a reqiured package are installed.


rebuildConfigFiles

protected void rebuildConfigFiles()

Rebuilds config.inc.php files after package updates or plugin installations.


saveParentPackage

protected void saveParentPackage(integer $parentPackageID)

Saves the given parent package id as parent package for this package.

Parameters:

  • $parentPackageID

updatePackageVersion

protected void updatePackageVersion()

Updates the version of a package.


XMLTagExists

public boolean XMLTagExists(string $tagName)

checks if a tag named $tagName exists in package.xml file and has contents (either cdata or attributes)

Parameters:

  • $tagName

Inherited methods from PackageInstallationQueue

PackageInstallationQueue::__construct(), PackageInstallationQueue::assignPackageInfo(), PackageInstallationQueue::assignQueueInfo(), PackageInstallationQueue::calcProgress(), PackageInstallationQueue::checkPackageInstallationQueue(), PackageInstallationQueue::checkSafeMode(), PackageInstallationQueue::executePackageInstallationPlugin(), PackageInstallationQueue::getAction(), PackageInstallationQueue::getCurrentStep(), PackageInstallationQueue::getInstallationInfo(), PackageInstallationQueue::getNewProcessNo(), PackageInstallationQueue::getNextPackageInstallationPlugin(), PackageInstallationQueue::getPackage(), PackageInstallationQueue::getPackageID(), PackageInstallationQueue::getPackageInstallationPlugin(), PackageInstallationQueue::getTotalStep(), PackageInstallationQueue::loadPackageInstallationPlugins(), PackageInstallationQueue::makeClear(), PackageInstallationQueue::openQueue(), PackageInstallationQueue::showPackageInstallationException()

Constants

CONFIG_FILE

CONFIG_FILE = 'config.inc.php'