Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezprocess.php
Go to the documentation of this file.
1 <?php
17 class eZProcess
18 {
19 static function run( $file, $Params = array(), $params_as_var = false )
20 {
21 return eZProcess::instance()->runFile( $Params, $file, $params_as_var );
22 }
23
27 function runFile( $Params, $file, $params_as_var )
28 {
29 $Result = null;
30 if ( $params_as_var )
31 {
32 foreach ( $Params as $key => $dummy )
33 {
34 if ( $key != "Params" and
35 $key != "this" and
36 $key != "file" and
37 !is_numeric( $key ) )
38 {
39 ${$key} = $Params[$key];
40 }
41 }
42 }
43
44 if ( file_exists( $file ) )
45 {
46 $includeResult = include( $file );
47 if ( empty( $Result ) &&
48 $includeResult != 1 )
49 {
50 $Result = $includeResult;
51 }
52 }
53 else
54 eZDebug::writeWarning( "PHP script $file does not exist, cannot run.",
55 "eZProcess" );
56 return $Result;
57 }
58
64 static function instance()
65 {
66 if ( empty( $GLOBALS['eZProcessInstance'] ) )
67 {
68 $GLOBALS['eZProcessInstance'] = new eZProcess();
69 }
70 return $GLOBALS['eZProcessInstance'];
71 }
72 }
73
74 ?>
eZDebug\writeWarning
static writeWarning( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:502
eZProcess
Executes php scripts with parameters safely.
Definition: ezprocess.php:18
eZProcess\run
static run( $file, $Params=array(), $params_as_var=false)
Definition: ezprocess.php:19
eZProcess\instance
static instance()
Definition: ezprocess.php:64
eZProcess\runFile
runFile( $Params, $file, $params_as_var)
Definition: ezprocess.php:27
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.