eZ Publish  [trunk]
eZPackageHandler Class Reference

The class eZPackageHandler does. More...

+ Inheritance diagram for eZPackageHandler:

List of all members.

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.

Definition at line 17 of file ezpackagehandler.php.


Member Function Documentation

eZPackageHandler::add ( packageType,
package,
cli,
parameters 
) [pure virtual]

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

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

Definition at line 94 of file ezpackagehandler.php.

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'

Definition at line 128 of file ezpackagehandler.php.

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.

Definition at line 151 of file ezpackagehandler.php.

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.

Definition at line 163 of file ezpackagehandler.php.

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 207 of file ezpackagehandler.php.

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.

Definition at line 86 of file ezpackagehandler.php.

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

Definition at line 34 of file ezpackagehandler.php.

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.

Definition at line 108 of file ezpackagehandler.php.

Returns:
the name of the type this handler works for.

Definition at line 64 of file ezpackagehandler.php.

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

Definition at line 185 of file ezpackagehandler.php.

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'

Definition at line 140 of file ezpackagehandler.php.

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.

Definition at line 175 of file ezpackagehandler.php.

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

Definition at line 72 of file ezpackagehandler.php.

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: