Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZPackageHandler Class Referenceabstract

The class eZPackageHandler does. More...

Inheritance diagram for eZPackageHandler:

## Public Member Functions
| __construct ( $handlerType, $parameters=array())
| extractInstallContent ()
| install ( $package, $installType, $parameters, $name, $os, $filename, $subdirectory, $content, &$installParameters, &$installData)
| uninstall ( $package, $installType, $parameters, $name, $os, $filename, $subdirectory, $content, &$installParameters, &$installData)
| handlerType ()
| reset ()
| explainInstallItem ( $package, $installItem, $requestedInfo=array())
| add ( $packageType, $package, $cli, $parameters)
| handleAddParameters ( $packageType, $package, $cli, $arguments)
| createDependencyNode ( $package, &$dependencyNode, $dependencyItem, $dependencySection)
| parseDependencyNode ( $package, &$dependencyNode, &$dependencyParameters, $dependencySection)
| createDependencyText ( $package, $dependencyItem, $dependencySection)
| createInstallNode ( $package, $installNode, $installItem, $installType)
| parseInstallNode ( $package, $installNode, &$installParameters, $isInstall)
| isErrorElement ( $elementID, &$installParameters)

## Static Public Member Functions
static | errorChoosenAction ( $errorCode, &$installParameters, $description, $handlerType, $resetError=true)

## Public Attributes
| $ExtractInstallContent
| $HandlerType

## Detailed Description

The class eZPackageHandler does.

Definition at line 17 of file ezpackagehandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZPackageHandler::__construct | ( |  | $handlerType,
|  |  | $parameters = `array()`
| ) |  |

Constructor

Parameters

  string | $handlerType |
  array | $parameters |

Definition at line 27 of file ezpackagehandler.php.

## Member Function Documentation

## ◆ add()

eZPackageHandler::add | ( |  | $packageType,
|  |  | $package,
|  |  | $cli,
|  |  | $parameters
| ) |  |
| pure virtual

Adds items defined in $parameters to the package $package.

Implemented in eZInstallScriptPackageHandler, eZFilePackageHandler, eZExtensionPackageHandler, eZDBPackageHandler, eZContentObjectPackageHandler, and eZContentClassPackageHandler.

Definition at line 99 of file ezpackagehandler.php.

## ◆ createDependencyNode()

eZPackageHandler::createDependencyNode | ( |  | $package,
|  | & | $dependencyNode,
|  |  | $dependencyItem,
|  |  | $dependencySection
| ) |  |
| pure virtual

Inteprets the parameters defined in $parameters and adds items to $package. ‍/ function handle( $package, $parameters ) { }

    /*!
     \pure
     Fills in extra information on the dependency node \a $dependencyNode which is
     specific to the current handler.
     \param $package The current package.
     \param $dependencyItem Contains all variables for the dependency
     \param $dependencySection The section for the dependency, can be \c 'provide', \c 'require', \c 'obsolete' or \c 'conflict'

Definition at line 133 of file ezpackagehandler.php.

## ◆ createDependencyText()

eZPackageHandler::createDependencyText | ( |  | $package,
|  |  | $dependencyItem,
|  |  | $dependencySection
| ) |  |

Creates a text specific for the dependency item $dependencyItem and returns it.

Parameters

  $package | The current package.
  $dependencyItem | Associative array with dependency values.
  $dependencySection | The section for the dependency, can be `'provide'`, `'require'`, `'obsolete'` or `'conflict'`

Returns
  `false` if no special text is required.

Definition at line 156 of file ezpackagehandler.php.

## ◆ createInstallNode()

eZPackageHandler::createInstallNode | ( |  | $package,
|  |  | $installNode,
|  |  | $installItem,
|  |  | $installType
| ) |  |
| pure virtual

Fills in extra information on the install node $installNode which is specific to the current handler.

Parameters

  $package | The current package.
  $installItem | Contains all variables for the install
  $installType | The type of install, can be `'install'` or `'uninstall'`

Implemented in eZFilePackageHandler, and eZDBPackageHandler.

Definition at line 168 of file ezpackagehandler.php.

## ◆ errorChoosenAction()

static eZPackageHandler::errorChoosenAction | ( |  | $errorCode,
|  | & | $installParameters,
|  |  | $description,
|  |  | $handlerType,
|  |  | $resetError = `true`
| ) |  |
| static

Helper function to process install errors.

Returns
  choosen action code. If $resetError is false, array should be manually reset in handler.

Definition at line 213 of file ezpackagehandler.php.

References eZPackage\NON_INTERACTIVE, and eZDebug\writeNotice().

Referenced by eZContentClassPackageHandler\install(), eZExtensionPackageHandler\install(), eZContentClassPackageHandler\uninstall(), eZContentObjectPackageHandler\uninstall(), and eZContentObjectTreeNode\unserialize().

## ◆ explainInstallItem()

eZPackageHandler::explainInstallItem | ( |  | $package,
|  |  | $installItem,
|  |  | $requestedInfo = `array()`
| ) |  |
| pure virtual

Returns an explanation (human readable) for the install item $installItem. The explanation is an array with the following items.

- description - Textual description of what will be installed

Use $requestedInfo to request portion of info.

Note
  This must be implemented for package handlers.

Implemented in eZInstallScriptPackageHandler, eZExtensionPackageHandler, eZContentObjectPackageHandler, and eZContentClassPackageHandler.

Definition at line 91 of file ezpackagehandler.php.

## ◆ extractInstallContent()

eZPackageHandler::extractInstallContent | ( |  | ) |

Returns
  true if the content of the install item should be extracted from disk before the install() function is called.

Definition at line 39 of file ezpackagehandler.php.

References $ExtractInstallContent.

## ◆ handleAddParameters()

eZPackageHandler::handleAddParameters | ( |  | $packageType,
|  |  | $package,
|  |  | $cli,
|  |  | $arguments
| ) |  |
| pure virtual

Called when command line parameters must be handled by the package handler. This function must return an array with values which can easily be used in the add() function.

Parameters

  $packageType | The type that was specified when using the add command, which is either the name of this handler or an alias for it.
  $package | The package object.
  $cli | Command line interface object, can be used to output errors etc.
  $arguments | An array with string values taken from the command line after the add command.

Implemented in eZInstallScriptPackageHandler, eZFilePackageHandler, eZExtensionPackageHandler, eZDBPackageHandler, eZContentObjectPackageHandler, and eZContentClassPackageHandler.

Definition at line 113 of file ezpackagehandler.php.

## ◆ handlerType()

eZPackageHandler::handlerType | ( |  | ) |

Returns
  the name of the type this handler works for.

Definition at line 69 of file ezpackagehandler.php.

References $HandlerType.

Referenced by eZContentObjectPackageHandler\installContentObjects().

## ◆ install()

eZPackageHandler::install | ( |  | $package,
|  |  | $installType,
|  |  | $parameters,
|  |  | $name,
|  |  | $os,
|  |  | $filename,
|  |  | $subdirectory,
|  |  | $content,
|  | & | $installParameters,
|  | & | $installData
| ) |  |
| pure virtual

Installs the package item

Implemented in eZInstallScriptPackageHandler, eZINIAddonPackageHandler, eZFilePackageHandler, eZExtensionPackageHandler, eZDBPackageHandler, eZContentObjectPackageHandler, and eZContentClassPackageHandler.

Definition at line 48 of file ezpackagehandler.php.

## ◆ isErrorElement()

eZPackageHandler::isErrorElement | ( |  | $elementID,
|  | & | $installParameters
| ) |  |

Helper function to process install errors. Decides to skip current element or not when cycling thru elements Also skips element where error has occured if action is not choosen

Definition at line 190 of file ezpackagehandler.php.

Referenced by eZContentObjectPackageHandler\installContentObjects(), and eZContentObjectPackageHandler\uninstall().

## ◆ parseDependencyNode()

eZPackageHandler::parseDependencyNode | ( |  | $package,
|  | & | $dependencyNode,
|  | & | $dependencyParameters,
|  |  | $dependencySection
| ) |  |
| pure virtual

Parses the XML node `$dependencyNode` and fills in extra information not handled by the package parser.

Parameters

  $package | The current package.
  $dependencyParameters | Reference to an array with must be filled with specific data for the current handler.
  $dependencySection | The section for the dependency, can be `'provide'`, `'require'`, `'obsolete'` or `'conflict'`

Definition at line 145 of file ezpackagehandler.php.

## ◆ parseInstallNode()

eZPackageHandler::parseInstallNode | ( |  | $package,
|  |  | $installNode,
|  | & | $installParameters,
|  |  | $isInstall
| ) |  |
| pure virtual

Parses the XML node `$installNode` and fills in extra information not handled by the package parser.

Parameters

  $package | The current package.
  $installParameters | Reference to an array which must be filled with specific data for the current handler.
  $isInstall | Is `true` if this is an install node, `false` if it is an uninstall node

Implemented in eZFilePackageHandler, and eZDBPackageHandler.

Definition at line 180 of file ezpackagehandler.php.

## ◆ reset()

eZPackageHandler::reset | ( |  | ) |

Resets all data in the handler so that it's ready to handle a new package.

Definition at line 77 of file ezpackagehandler.php.

## ◆ uninstall()

eZPackageHandler::uninstall | ( |  | $package,
|  |  | $installType,
|  |  | $parameters,
|  |  | $name,
|  |  | $os,
|  |  | $filename,
|  |  | $subdirectory,
|  |  | $content,
|  | & | $installParameters,
|  | & | $installData
| ) |  |
| pure virtual

Uninstalls the package item

Implemented in eZInstallScriptPackageHandler, eZExtensionPackageHandler, eZContentObjectPackageHandler, and eZContentClassPackageHandler.

Definition at line 59 of file ezpackagehandler.php.

## Member Data Documentation

## ◆ $ExtractInstallContent

eZPackageHandler::$ExtractInstallContent

Definition at line 19 of file ezpackagehandler.php.

Referenced by extractInstallContent().

## ◆ $HandlerType

eZPackageHandler::$HandlerType

Definition at line 20 of file ezpackagehandler.php.

Referenced by handlerType().

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

- ezpackagehandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.