Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezpackagehandler.php
Go to the documentation of this file.
1 <?php
17 class eZPackageHandler
18 {
19 public $ExtractInstallContent;
20 public $HandlerType;
27 public function __construct( $handlerType, $parameters = array() )
28 {
29 $parameters = array_merge( array( 'extract-install-content' => false ),
30 $parameters );
31 $this->ExtractInstallContent = $parameters['extract-install-content'];
32 $this->HandlerType = $handlerType;
33 }
34
39 function extractInstallContent()
40 {
41 return $this->ExtractInstallContent;
42 }
43
48 function install( $package, $installType, $parameters,
49 $name, $os, $filename, $subdirectory,
50 $content, &$installParameters,
51 &$installData )
52 {
53 }
54
59 function uninstall( $package, $installType, $parameters,
60 $name, $os, $filename, $subdirectory,
61 $content, &$installParameters,
62 &$installData )
63 {
64 }
65
69 function handlerType()
70 {
71 return $this->HandlerType;
72 }
73
77 function reset()
78 {
79 }
80
91 function explainInstallItem( $package, $installItem, $requestedInfo = array() )
92 {
93 }
94
99 function add( $packageType, $package, $cli, $parameters )
100 {
101 }
102
113 function handleAddParameters( $packageType, $package, $cli, $arguments )
114 {
115 }
116
117 // /*!
118 // \pure
119 // Inteprets the parameters defined in \a $parameters and adds items to \a $package.
120 // */
121 // function handle( $package, $parameters )
122 // {
123 // }
124
133 function createDependencyNode( $package, &$dependencyNode, $dependencyItem, $dependencySection )
134 {
135 }
136
145 function parseDependencyNode( $package, &$dependencyNode, &$dependencyParameters, $dependencySection )
146 {
147 }
148
156 function createDependencyText( $package, $dependencyItem, $dependencySection )
157 {
158 }
159
168 function createInstallNode( $package, $installNode, $installItem, $installType )
169 {
170 }
171
180 function parseInstallNode( $package, $installNode, &$installParameters, $isInstall )
181 {
182 }
183
190 function isErrorElement( $elementID, &$installParameters )
191 {
192 if ( isset( $installParameters['error']['element_id'] ) &&
193 $elementID == $installParameters['error']['element_id'] )
194 {
195 // If action not set - skip this element
196 if ( !isset( $installParameters['error']['choosen_action'] ) )
197 {
198 $installParameters['error'] = array();
199 return false;
200 }
201 return true;
202 }
203 return false;
204
205 }
206
213 static function errorChoosenAction( $errorCode, &$installParameters, $description, $handlerType, $resetError = true )
214 {
215 if ( isset( $installParameters['non-interactive'] ) && $installParameters['non-interactive'] )
216 {
217 if ( $description )
218 {
219 eZDebug::writeNotice( $description, 'Package installation conflict' );
220 }
221 return eZPackage::NON_INTERACTIVE;
222 }
223
224 if ( isset( $installParameters['error_default_actions'][$handlerType][$errorCode] ) )
225 {
226 if ( $resetError && count( $installParameters['error'] ) )
227 $installParameters['error'] = array();
228 return $installParameters['error_default_actions'][$handlerType][$errorCode];
229 }
230
231 if ( isset( $installParameters['error']['error_code'] ) &&
232 $installParameters['error']['error_code'] == $errorCode )
233 {
234 if ( isset( $installParameters['error']['choosen_action'] ) )
235 {
236 $choosenAction = $installParameters['error']['choosen_action'];
237 if ( $resetError )
238 $installParameters['error'] = array();
239 return $choosenAction;
240 }
241 }
242 return false;
243 }
244
245 }
246
247 ?>
eZDebug\writeNotice
static writeNotice( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:459
eZPackageHandler
The class eZPackageHandler does.
Definition: ezpackagehandler.php:18
eZPackageHandler\createInstallNode
createInstallNode( $package, $installNode, $installItem, $installType)
Definition: ezpackagehandler.php:168
eZPackageHandler\reset
reset()
Definition: ezpackagehandler.php:77
eZPackageHandler\add
add( $packageType, $package, $cli, $parameters)
Definition: ezpackagehandler.php:99
eZPackageHandler\$HandlerType
$HandlerType
Definition: ezpackagehandler.php:20
eZPackageHandler\createDependencyNode
createDependencyNode( $package, &$dependencyNode, $dependencyItem, $dependencySection)
Definition: ezpackagehandler.php:133
eZPackageHandler\uninstall
uninstall( $package, $installType, $parameters, $name, $os, $filename, $subdirectory, $content, &$installParameters, &$installData)
Definition: ezpackagehandler.php:59
eZPackageHandler\handleAddParameters
handleAddParameters( $packageType, $package, $cli, $arguments)
Definition: ezpackagehandler.php:113
eZPackageHandler\handlerType
handlerType()
Definition: ezpackagehandler.php:69
eZPackageHandler\isErrorElement
isErrorElement( $elementID, &$installParameters)
Definition: ezpackagehandler.php:190
eZPackageHandler\$ExtractInstallContent
$ExtractInstallContent
Definition: ezpackagehandler.php:19
eZPackageHandler\parseDependencyNode
parseDependencyNode( $package, &$dependencyNode, &$dependencyParameters, $dependencySection)
Definition: ezpackagehandler.php:145
eZPackageHandler\parseInstallNode
parseInstallNode( $package, $installNode, &$installParameters, $isInstall)
Definition: ezpackagehandler.php:180
eZPackageHandler\errorChoosenAction
static errorChoosenAction( $errorCode, &$installParameters, $description, $handlerType, $resetError=true)
Definition: ezpackagehandler.php:213
eZPackageHandler\createDependencyText
createDependencyText( $package, $dependencyItem, $dependencySection)
Definition: ezpackagehandler.php:156
eZPackageHandler\extractInstallContent
extractInstallContent()
Definition: ezpackagehandler.php:39
eZPackageHandler\explainInstallItem
explainInstallItem( $package, $installItem, $requestedInfo=array())
Definition: ezpackagehandler.php:91
eZPackageHandler\install
install( $package, $installType, $parameters, $name, $os, $filename, $subdirectory, $content, &$installParameters, &$installData)
Definition: ezpackagehandler.php:48
eZPackageHandler\__construct
__construct( $handlerType, $parameters=array())
Definition: ezpackagehandler.php:27
eZPackage\NON_INTERACTIVE
const NON_INTERACTIVE
Definition: ezpackage.php:33
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.