Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezwizardbaseclassloader.php
Go to the documentation of this file.
1 <?php
17 class eZWizardBaseClassLoader
18 {
23 static function createClass( $tpl,
24 $module,
25 $stepArray,
26 $basePath,
27 $storageName = false,
28 $metaData = false )
29 {
30 if ( !$storageName )
31 {
32 $storageName = 'eZWizard';
33 }
34
35 if ( !$metaData )
36 {
37 $http = eZHTTPTool::instance();
38 $metaData = $http->sessionVariable( $storageName . '_meta' );
39 }
40
41 if ( !isset( $metaData['current_step'] ) ||
42 $metaData['current_step'] < 0 )
43 {
44 $metaData['current_step'] = 0;
45 eZDebug::writeNotice( 'Setting wizard step to : ' . $metaData['current_step'], __METHOD__ );
46 }
47 $currentStep = $metaData['current_step'];
48
49 if ( count( $stepArray ) <= $currentStep )
50 {
51 eZDebug::writeError( 'Invalid wizard step count: ' . $currentStep, __METHOD__ );
52 return false;
53 }
54
55 $filePath = $basePath . $stepArray[$currentStep]['file'];
56 if ( !file_exists( $filePath ) )
57 {
58 eZDebug::writeError( 'Wizard file not found : ' . $filePath, __METHOD__ );
59 return false;
60 }
61
62 include_once( $filePath );
63
64 $className = $stepArray[$currentStep]['class'];
65 eZDebug::writeNotice( 'Creating class : ' . $className, __METHOD__ );
66 $returnClass = new $className( $tpl, $module, $storageName );
67
68 if ( isset( $stepArray[$currentStep]['operation'] ) )
69 {
70 $operation = $stepArray[$currentStep]['operation'];
71 return $returnClass->$operation();
72 eZDebug::writeNotice( 'Running : "' . $className . '->' . $operation . '()". Specified in StepArray', __METHOD__ );
73 }
74
75 if ( isset( $metaData['current_stage'] ) )
76 {
77 $returnClass->setMetaData( 'current_stage', $metaData['current_stage'] );
78 eZDebug::writeNotice( 'Setting wizard stage to : ' . $metaData['current_stage'], __METHOD__ );
79 }
80
81 return $returnClass;
82 }
83 }
84
85 ?>
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZDebug\writeNotice
static writeNotice( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:459
eZHTTPTool\instance
static instance()
Definition: ezhttptool.php:189
eZWizardBaseClassLoader
The class eZWizardBaseClassLoader does.
Definition: ezwizardbaseclassloader.php:18
eZWizardBaseClassLoader\createClass
static createClass( $tpl, $module, $stepArray, $basePath, $storageName=false, $metaData=false)
Definition: ezwizardbaseclassloader.php:23
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.