eZPublish(LegacyStack)  5.1
eZPackageHandler Class Referenceabstract

The class eZPackageHandler does. More...

+ Inheritance diagram for eZPackageHandler:

Public Member Functions

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

Static Public Member Functions

static errorChoosenAction ($errorCode, &$installParameters, $description, $handlerType, $resetError=true)
 

Detailed Description

The class eZPackageHandler does.

Member Function Documentation

eZPackageHandler::add (   $packageType,
  $package,
  $cli,
  $parameters 
)
pure virtual
eZPackageHandler::createDependencyNode (   $package,
$dependencyNode,
  $dependencyItem,
  $dependencySection 
)
pure virtual

Inteprets the parameters defined in $parameters and adds items to $package.

Fills in extra information on the dependency node $dependencyNode which is specific to the current handler.

Parameters
$packageThe current package.
$dependencyItemContains all variables for the dependency
$dependencySectionThe section for the dependency, can be 'provide', 'require', 'obsolete' or 'conflict'
eZPackageHandler::createDependencyText (   $package,
  $dependencyItem,
  $dependencySection 
)

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

Parameters
$packageThe current package.
$dependencyItemAssociative array with dependency values.
$dependencySectionThe section for the dependency, can be 'provide', 'require', 'obsolete' or 'conflict'
Returns
false if no special text is required.
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
$packageThe current package.
$installItemContains all variables for the install
$installTypeThe type of install, can be 'install' or 'uninstall'

Implemented in eZFilePackageHandler, and eZDBPackageHandler.

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.

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

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 eZContentObjectPackageHandler, eZContentClassPackageHandler, eZExtensionPackageHandler, and eZInstallScriptPackageHandler.

eZPackageHandler::extractInstallContent ( )
Returns
true if the content of the install item should be extracted from disk before the install() function is called.
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
$packageTypeThe type that was specified when using the add command, which is either the name of this handler or an alias for it.
$packageThe package object.
$cliCommand line interface object, can be used to output errors etc.
$argumentsAn array with string values taken from the command line after the add command.

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

eZPackageHandler::handlerType ( )
Returns
the name of the type this handler works for.

Referenced by eZContentObjectPackageHandler\installContentObjects().

eZPackageHandler::install (   $package,
  $installType,
  $parameters,
  $name,
  $os,
  $filename,
  $subdirectory,
  $content,
$installParameters,
$installData 
)
pure virtual
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

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

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
$packageThe current package.
$dependencyParametersReference to an array with must be filled with specific data for the current handler.
$dependencySectionThe section for the dependency, can be 'provide', 'require', 'obsolete' or 'conflict'
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
$packageThe current package.
$installParametersReference to an array which must be filled with specific data for the current handler.
$isInstallIs true if this is an install node, false if it is an uninstall node

Implemented in eZFilePackageHandler, and eZDBPackageHandler.

eZPackageHandler::reset ( )

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

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

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