eZPackageHandler Class Reference

The class eZPackageHandler does. More...

Inheritance diagram for eZPackageHandler:
eZContentClassPackageHandler eZContentObjectPackageHandler eZDBPackageHandler eZExtensionPackageHandler eZFilePackageHandler eZINIAddonPackageHandler eZInstallScriptPackageHandler

List of all members.

Public Member Functions

 add ($packageType, &$package, $parameters)
 createDependencyNode (&$package, &$dependencyNode, $dependencyItem, $dependencySection)
 createDependencyText (&$package, $dependencyItem, $dependencySection)
 createInstallNode (&$package, &$installNode, $installItem, $installType)
 errorChoosenAction ($errorCode, &$installParameters, $description=false, $handlerType=false, $resetError=true)
 explainInstallItem (&$package, $installItem)
 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, $installParameters, &$installData)

Detailed Description

The class eZPackageHandler does.

Definition at line 40 of file ezpackagehandler.php.


Member Function Documentation

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

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

Definition at line 115 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:
$package The current package.
$dependencyItem Contains all variables for the dependency
$dependencySection The section for the dependency, can be 'provide', 'require', 'obsolete' or 'conflict'

Definition at line 149 of file ezpackagehandler.php.

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 173 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:
$package The current package.
$installItem Contains all variables for the install
$installType The type of install, can be 'install' or 'uninstall'

Implemented in eZFilePackageHandler.

Definition at line 185 of file ezpackagehandler.php.

eZPackageHandler::errorChoosenAction ( errorCode,
&$  installParameters,
description = false,
handlerType = false,
resetError = true 
)

Helper function to process install errors.

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

Definition at line 229 of file ezpackagehandler.php.

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

eZPackageHandler::explainInstallItem ( &$  package,
installItem 
) [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
Note:
This must be implemented for package handlers.

Implemented in eZContentClassPackageHandler, eZContentObjectPackageHandler, eZExtensionPackageHandler, and eZInstallScriptPackageHandler.

Definition at line 107 of file ezpackagehandler.php.

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

eZPackageHandler::eZPackageHandler ( handlerType,
parameters = array() 
)
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 eZContentClassPackageHandler, eZContentObjectPackageHandler, eZDBPackageHandler, eZExtensionPackageHandler, eZFilePackageHandler, and eZInstallScriptPackageHandler.

Definition at line 129 of file ezpackagehandler.php.

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

Definition at line 86 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 207 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:
$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 161 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:
$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 eZDBPackageHandler, and eZFilePackageHandler.

Definition at line 197 of file ezpackagehandler.php.

eZPackageHandler::reset (  ) 

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

Definition at line 95 of file ezpackagehandler.php.

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

Uninstalls the package item

Definition at line 77 of file ezpackagehandler.php.


The documentation for this class was generated from the following file:
Generated on Mon Jul 12 07:10:29 2010 for eZ publish by  doxygen 1.6.3