Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

eztemplate.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: eztemplate.php 9474 2002-04-25 09:28:35Z jhe $
5 //
6 // Definition of eZTemplate class
7 //
8 // Based upon template.inc by Kristian Koehntopp @ NetUSE GmbH
9 //
10 // Created on: <11-Sep-2000 22:10:06 bf>
11 //
12 // This source file is part of Exponential Basic, publishing software.
13 //
14 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
15 //
16 // This program is free software; you can redistribute it and/or
17 // modify it under the terms of the GNU General Public License
18 // as published by the Free Software Foundation; either version 2
19 // of the License, or (at your option) any later version.
20 //
21 // This program is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with this program; if not, write to the Free Software
28 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
29 //
30
33
103 // include_once( "kernel/classes/INIFile.php" );
104 // include_once( "kernel/classes/ezlog.php" );
105
106 class eZTemplate
107 {
108 var $language;
109 var $phpFile;
110 var $intlDir;
111
115 function __construct( $templateDir = "", $intlDir = "", $language = "",
116 $phpFile = "", $style = false, $module_dir = false,
117 $state = false, $mod_time = false )
118 {
119 // check for PHP version, if > 4.0.5 use new and improved str_replace
120 // instead of preg_replace. Enables usage of $ in template variables.
121 $versionArray = explode( ".", phpversion() );
122
123 $major = $versionArray[0];
124 $minor = $versionArray[1];
125 $release = $versionArray[2];
126
127 if ( $major >= 4 && ( ( $minor == 0 && $release >= 5 ) || ( $minor > 0 ) ) )
128 {
129 $this->ReplaceFunc = "str_replace";
130 }
131 else
132 {
133 $this->ReplaceFunc = "preg_replace";
134 }
135
136 // section override variables
137 if ( isset( $GLOBALS["eZLanguageOverride"] ) and $GLOBALS["eZLanguageOverride"] != "" )
138 $language = $GLOBALS["eZLanguageOverride"];
139
140 if ( isset( $GLOBALS["eZTemplateOverride"] ) and $GLOBALS["eZTemplateOverride"] != "" )
141 {
142 // override template dir
143 $templateDir = preg_replace( "#^(.*?)/(.*?)/(.*?)/(.*?)/$#", "\\1/\\2/\\3/" . $GLOBALS["eZTemplateOverride"] . "/", $templateDir );
144 }
145
146 $this->intlDir =& $intlDir;
147 $this->language =& $language;
148 $this->phpFile =& $phpFile;
149 $this->Style = $style;
150 $this->ModuleDir = $module_dir;
151 $this->TextStrings = array();
152 $this->State = $state;
153 $this->ExternModTime = $mod_time;
154
155 $this->set_root( $templateDir );
156 $this->set_unknowns( "remove" );
157 $this->debugINI = eZINI::instance( 'site.ini' );
158
159 if ( is_array( $phpFile ) and is_array( $intlDir ) )
160 {
161 $this->languageFile = array();
162 $this->Ini = eZINI::instance( 'site.ini' );
163
164 foreach ( $phpFile as $php_file )
165 {
166 $lang_file = $intlDir[1] . "/" . $language . "/" . $php_file . ".ini";
167 $this->languageFile[] = $lang_file;
168
169 if ( file_exists( $lang_file ) )
170 {
171 $this->Ini->instance( $lang_file, false );
172 $this->TextStrings = array_merge( $this->TextStrings, $this->Ini->groups( "strings" ) );
173 }
174 else
175 {
176 if ( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" )
177 {
178 print( "<br><b>Error: language file, $lang_file, could not be found.</b><br>" );
179 }
180 }
181
182 }
183 if ( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" )
184 {
185 if ( count( $this->languageFile ) == 0 )
186 {
187 print( "<br><b>Error: no language files found.</b><br>" );
188 }
189 }
190 }
191
192 if ( !is_array( $phpFile ) and !is_array( $intlDir ) )
193 {
194 $this->languageFile = $intlDir . "/" . $language . "/" . $phpFile . ".ini";
195 $this->Ini = eZINI::instance( 'site.ini' );
196
197 // 7x: Add a setting for this debug output statement to be encouraged durring debugging.
198 // Add a setting to enable this statement.
199 if( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" && $GLOBALS["DEBUG_EZTEMPLATE"] == true )
200 {
201 echo "<hr>"; echo $this->languageFile; echo "<hr>";
202 }
203
204 if ( file_exists( $this->languageFile ) )
205 {
206 $this->Ini = eZINI::instance( $this->languageFile, false );
207 $this->TextStrings = $this->Ini->groups( "strings" );
208 }
209 else
210 {
211 if ( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" )
212 {
213 debug_print_backtrace();
214 print( "<br><b>Error: language file, $this->languageFile, could not be found.</b><br>" );
215 }
216 }
217 }
218 else
219 {
220 if ( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" )
221 {
222 print( "<br><b>Error: $" . "intlDir and $" . "phpFile must either be arrays or strings.</b><br>" );
223 }
224 }
225
226 if ( empty( $this->Style ) || empty( $this->ModuleDir ) )
227 {
228 $this->CacheSuffix = "";
229 $this->CacheDir = "";
230 }
231 else
232 {
233 $this->CacheDir = $module_dir . "/cache";
234 if ( !empty( $state ) )
235 $state = "-" . $state;
236 $this->CacheSuffix = $style ."-" . $language . $state . ".cache";
237 }
238 }
239
243 function setAllStrings()
244 {
245 if ( isset( $this->TextStrings ) and is_array( $this->TextStrings ) && isset( $this->TextStrings["strings"] ) )
246 {
247 reset( $this->TextStrings );
248 foreach ($this->TextStrings["strings"] as $i => $tmp)
249 {
250 $tmp_key = "intl-" . strtolower($i);
251 $this->set_var_internal( $tmp_key, $tmp );
252 // Debug pro tools
253 // echo '<hr>';var_dump($tmp_key); echo '<hr>';
254 }
255 }
256 }
257
261 function &cacheFile()
262 {
263 $CacheFile = $this->CacheDir . "/" . $this->files[0] . "-" . $this->CacheSuffix;
264 return $CacheFile;
265 }
266
270 function &cacheFileName()
271 {
272 $CacheFile = $this->files[0] . "-" . $this->CacheSuffix;
273 return $CacheFile;
274 }
275
279 function &cachePath()
280 {
281 $CachePath = $this->CacheDir;
282 return $CachePath;
283 }
284
289 function clearVars( $except = array() )
290 {
291 $tmpkeys = array();
292 $tmpvals = array();
293 foreach ( $except as $key )
294 {
295 if ( isset( $varkeys[$key] ) && isset( $varvals[$key] ) )
296 {
297 $tmpkeys[$key] =& $varkeys[$key];
298 $tmpvals[$key] =& $varvals[$key];
299 }
300 }
301 $varkeys = array();
302 $varvals = array();
303 $varkeys = $tmpkeys;
304 $varvals = $tmpvals;
305 }
306
311 function hasCache()
312 {
313 if ( empty( $this->CacheSuffix ) )
314 return false;
315 if ( empty( $this->files[0] ) )
316 return false;
317 $CacheFile =& $this->cacheFile();
318 if ( file_exists( $CacheFile ) )
319 {
320 $template_m = eZPBFile::filemtime( $this->filename( $this->files[0] ) );
321 if ( is_array( $this->languageFile ) )
322 {
323 $lang_m = 0;
324 foreach ( $this->languageFile as $lang )
325 {
326 $modtime = eZPBFile::filemtime( $lang );
327 if ( $modtime > $lang_m )
328 $lang_m = $modtime;
329 }
330 }
331 else
332 $lang_m = eZPBFile::filemtime( $this->languageFile );
333 $cache_m = eZPBFile::filemtime( $CacheFile );
334 if ( $template_m <= $cache_m && $lang_m <= $cache_m )
335 {
336 if ( isset($this->ExternModtime) or $this->ExternModTime <= $cache_m )
337 return true;
338 }
339 }
340 return false;
341 }
342
348 function &cache()
349 {
350 if ( empty( $this->CacheSuffix ) )
351 return false;
352 if ( empty( $this->files[0] ) )
353 return false;
354 $CacheFile =& $this->cacheFile();
355 if ( file_exists( $CacheFile ) )
356 {
357 $fd = eZPBFile::fopen( $CacheFile, "r" );
358 $str =& fread( $fd, eZPBFile::filesize( $CacheFile ) );
359 fclose( $fd );
360 return $str;
361 }
362 return false;
363 }
364
370 function &storeCache( $target, $handle, $print = true )
371 {
372 if ( empty( $this->CacheSuffix ) )
373 return false;
374 $str =& $this->parse( $target, $handle );
375 $CacheFile =& $this->cacheFile();
376 if ( !file_exists( $this->CacheDir ) )
377 {
378 if ( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" )
379 {
380 print( "<br /><b>TemplateCache: directory $this->CacheDir does not exist, cannot create cache file</b><br />" );
381 }
382 }
383 else
384 {
385 $fd = eZPBFile::fopen( $CacheFile, "w" );
386 fwrite( $fd, $str );
387 fclose( $fd );
388 }
389 if ( $print )
390 {
391 print $str;
392 }
393 return $str;
394 }
395
399 function clearCache()
400 {
401 if ( empty( $this->CacheSuffix ) )
402 return false;
403 $CacheFile =& $this->cacheFile();
404 if ( !file_exists( $this->CacheDir ) )
405 {
406 if ( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" )
407 {
408 print( "<br /><b>TemplateCache: directory $this->CacheDir does not exist, cannot delete cache file</b><br />" );
409 }
410 }
411 else
412 {
413 if ( file_exists( $this->CacheFile ) )
414 return eZPBFile::unlink( $CacheFile );
415 else
416 return true;
417 }
418 return false;
419 }
420
424 function &ini()
425 {
426 return $this->Ini;
427 }
428
432 function set_root($root)
433 {
434 if ( $root != "" )
435 {
436 global $GlobalSiteIni;
437 $root = $GlobalSiteIni->SiteDir . $root;
438 }
439
440 if ( !is_dir( $root ) )
441 {
442 $this->halt( "set_root: $root is not a directory." );
443 return false;
444 }
445
446 $this->root = $root;
447 return true;
448 }
449
453 function set_unknowns( $unknowns = "keep" )
454 {
455 $this->unknowns = $unknowns;
456 }
457
464 function set_file( $handle, $filename = "" )
465 {
466 if ( !is_array( $handle ) )
467 {
468 if ( $filename == "" )
469 {
470 // kracker : Added Support for template filename error tracking
471 $phpFile = $this->phpFile;
472 $this->halt( "set_file ($phpFile): For handle $handle filename is empty." );
473 return false;
474 }
475 $this->file[$handle] = $this->filename( $filename );
476 $this->files = array( $filename );
477 }
478 else
479 {
480 $this->files = array();
481 reset( $handle );
482 foreach ($handle as $h => $f)
483 {
484 $this->file[$h] = $this->filename( $f );
485 $this->files[] = $f;
486 }
487 }
488
489 // For non-virtualhost, non-rewrite setup
490 global $GlobalSiteIni;
491 $this->set_var( 'www_dir', $GlobalSiteIni->WWWDir );
492 $this->set_var( 'index', $GlobalSiteIni->Index );
493 }
494
501 function set_block( $parent, $handle = "", $name = "", $required = true )
502 {
503 if ( !is_array( $parent ) )
504 {
505 if ( !$this->loadfile( $parent ) )
506 {
507 if ( $required )
508 {
509 $phpFile = $this->phpFile;
510 $this->halt("subst ($phpFile): unable to load $parent.");
511 }
512 return false;
513 }
514 if ( $name == "" )
515 $name = $handle;
516
517 $str =& $this->get_var( $parent );
518 $reg = "/<!--\s+BEGIN $handle\s+-->(.*)\n\s*<!--\s+END $handle\s+-->/sm";
519 preg_match( $reg, $str, $m );
520 $str =& preg_replace( $reg, "{" . "$name}", $str );
521
522 if( is_array( $m ) and isset( $m[1] ) )
523 {
524 $handleValue = $m[1];
525 }
526 else {
527 $handleValue = "";
528 //var_dump($m); echo '<hr>';
529 }
530 $this->set_var_internal( $handle, $handleValue );
531 $this->set_var_internal( $parent, $str );
532 }
533 else
534 {
535 foreach ( $parent as $block )
536 {
537 $this->set_block( $block[0], $block[1], $block[2] );
538 }
539 }
540 return true;
541 }
542
546 function set_file_block( $parent )
547 {
548 if ( is_array( $parent ) )
549 {
550 reset( $parent );
551 foreach ( $parent as $file => $val )
552 {
553 if ( !$this->loadfile( $file ) )
554 {
555 $this->halt( "set_file_block: unable to load $parent." );
556 return false;
557 }
558 }
559 }
560 else
561 {
562 if ( !$this->loadfile( $parent ) )
563 {
564 $this->halt( "set_file_block: unable to load $parent." );
565 return false;
566 }
567 }
568 return true;
569 }
570
571
577 function set_var( $varname, $value = "", $substIfEmpty = "" )
578 {
579 if ( is_string( $value ) and $value == "" )
580 $value = $substIfEmpty;
581
582 $this->set_var_internal( $varname, $value );
583 }
584
589 function set_var_internal( &$varname, $value )
590 {
591 if ( !is_array( $varname ) )
592 {
593 if ( $this->ReplaceFunc != "str_replace" )
594 {
595 $this->varkeys[$varname] =& preg_quote("/{".$varname."}/");
596 $this->varvals[$varname] =& $value;
597 }
598 else
599 {
600 $var = "{".$varname."}";
601 $this->varkeys[$varname] =& $var;
602 $this->varvals[$varname] =& $value;
603 }
604 }
605 else
606 {
607 reset( $varname );
608 foreach( $varname as $k => $v )
609 {
610 if ( $this->ReplaceFunc != "str_replace" )
611 {
612 $this->varkeys[$k] =& preg_quote( "/{".$k."}/" );
613 $this->varvals[$k] =& $v;
614 }
615 else
616 {
617 $var = "{".$k."}";
618 $this->varkeys[$k] =& $var;
619 $this->varvals[$k] =& $v;
620 }
621 }
622 }
623 }
624
630 function &subst( $handle )
631 {
632 if ( !$this->loadfile( $handle ) )
633 {
634 $this->halt( "subst: unable to load $handle." );
635 return false;
636 }
637 $replacedString = array();
638 $str = $this->get_var( $handle );
639 $rFunc = $this->ReplaceFunc;
640
641 if( is_string( $str ) )
642 {
643 // 7x - Note: Refactor this code
644 //foreach( (array) $str as $string ) {
645 // $replacedString[] = $string;
646 //}
647 $str = @$rFunc( $this->varkeys, $this->varvals, $str );
648 }
649 else
650 {
651 $replacedString =& $rFunc( $this->varkeys, $this->varvals, $str );
652 }
653
654 return $str;
655 }
656
660 function psubst( $handle )
661 {
662 print $this->subst( $handle );
663
664 return false;
665 }
666
672 function &parse( $target, $handle = "", $append = false )
673 {
674 if ( is_array( $target ) )
675 {
676 reset( $target );
677 foreach ( $target as $targ => $hndl )
678 {
679 unset( $str );
680 $str =& $this->subst( $hndl );
681 if ( $append )
682 {
683 $tmp = $this->get_var( $targ ) . $str;
684 $this->set_var_internal( $targ, $tmp );
685 }
686 else
687 {
688 $this->set_var_internal( $targ, $str );
689 }
690 }
691 }
692 else if ( !is_array( $handle ) )
693 {
694 $str =& $this->subst( $handle );
695 if ( $append )
696 {
697 $tmp = $this->get_var( $target ) . $str;
698 $this->set_var_internal( $target, $tmp );
699 }
700 else
701 {
702 $this->set_var_internal( $target, $str );
703 }
704 }
705 else
706 {
707 reset( $handle );
708 foreach ( $handle as $i => $h )
709 {
710 $str =& $this->subst( $h );
711 $this->set_var_internal( $target, $str );
712 }
713 }
714 return $str;
715 }
716
721 function pparse( $target, $handle, $append = false )
722 {
723 print $this->parse( $target, $handle, $append );
724 return false;
725 }
726
730 function &get_vars()
731 {
732 reset( $this->varkeys );
733 while ( list( $k, $v ) = each( $this->varkeys ) )
734 {
735 $result[$k] = $v;
736 }
737
738 return $result;
739 // return $this->varkeys;
740 }
741
745 function &get_var( $varname )
746 {
747 $err = false;
748 if ( !is_array( $varname ) )
749 {
750 if ( isset( $this->varvals[$varname] ) )
751 {
752 return $this->varvals[$varname];
753 }
754 else
755 {
756 return $err;
757 }
758 // return $this->varkeys[$varname];
759 }
760 else
761 {
762 reset( $varname );
763 while ( list( $k, $v ) = each( $varname ) )
764 {
765 $result[$k] =& $this->varvals[$k];
766 // $result[$k] =& $this->varkeys[$k];
767 }
768
769 return $result;
770 }
771 }
772
784 function get_user_variable( $handle, $var )
785 {
786 $this->loadfile( $handle );
787 preg_match( "#<!--\s+VAR\s+$var=(.*?)\s+-->#", $this->varvals[$handle], $matches );
788
789 if ( isset( $matches[1] ) )
790 return $matches[1];
791 else
792 return false;
793 }
794
798 function get_undefined($handle)
799 {
800 if ( !$this->loadfile( $handle ) )
801 {
802 $this->halt( "get_undefined: unable to load $handle." );
803 return false;
804 }
805
806 preg_match_all( "/\{([^}]+)\}/", $this->get_var( $handle ), $m );
807 $m = $m[1];
808 if ( !is_array( $m ) )
809 return false;
810
811 reset( $m );
812 while ( list( $k, $v ) = each( $m ) )
813 {
814 if ( !isset( $this->varkeys[$v] ) )
815 $result[$v] = $v;
816 }
817
818 if ( count( $result ) )
819 return $result;
820 else
821 return false;
822 }
823
833 function &finish( $str )
834 {
835 switch ( $this->unknowns )
836 {
837 case "keep":
838 break;
839
840 case "remove":
841 $str =& preg_replace( '/{[^ \t\r\n}]+}/', "", $str );
842 break;
843
844 case "comment":
845 $str =& preg_replace( '/{([^ \t\r\n}]+)}/', "<!-- Template $handle: Variable \\1 undefined -->", $str );
846 break;
847
848 case "nbsp":
849 $str =& preg_replace( '/{[^ \t\r\n}]+}/', "&nbsp;", $str );
850 }
851 return $str;
852 }
853
858 function p( $varname )
859 {
860 print $this->finish( $this->get_var( $varname ) );
861 }
862
868 function get( $varname )
869 {
870 return $this->finish( $this->get_var( $varname ) );
871 }
872
877 function filename( $filename )
878 {
879 $root = $this->root;
880 if ( is_array( $filename ) )
881 {
882 $root = $filename[0];
883 $filename = $filename[1];
884 }
885 if ( substr( $filename, 0, 1 ) != "/" )
886 {
887 $filename = $root."/".$filename;
888 }
889
890 if ( !file_exists( $filename ) )
891 $this->halt( "filename: file $filename does not exist." );
892
893 return $filename;
894 }
895
899 function loadfile( $handle )
900 {
901 if ( isset( $this->varkeys[$handle] ) and !empty( $this->varvals[$handle] ) )
902 return true;
903
904 // if (isset($this->varkeys[$handle]) and !empty($this->varkeys[$handle]))
905 // return true;
906 // var_dump( $this->file );
907 if ( !isset( $this->file[$handle] ) )
908 {
909 $this->halt( "loadfile: $handle is not a valid handle." );
910 return false;
911 }
912
913 $file = $this->file[$handle];
914 $filename = $this->file[$handle];
915
916 if ( file_exists( $filename ) )
917 {
918 $fd = fopen( $filename, "r" );
919 $str =& fread( $fd, filesize( $filename ) );
920 fclose( $fd );
921 if ( empty( $str ) )
922 {
923 $this->halt( "loadfile: While loading $handle, $filename does not exist or is empty." );
924 return false;
925 }
926 }
927 else
928 {
929 $this->halt( "loadfile: Cannot find template file \"$filename\"" );
930 return false;
931 }
932
933 $this->set_var_internal( $handle, $str );
934
935 return true;
936 }
937
943 function halt( $msg )
944 {
945 $this->last_error = $msg;
946
947 if ( $this->halt_on_error != "no" )
948 $this->haltmsg($msg);
949
950 if ( $this->halt_on_error == "yes" )
951 die( "<b>Halted.</b>" );
952
953 return false;
954 }
955
960 function haltmsg( $msg )
961 {
962 $this->debugINI = eZINI::instance( "site.ini" );
963
964 $err_msg = "<b>Template Error:</b> $msg<br>\n";
965
966 if ( $this->debugINI->variable( "site", "DebugOutput" ) == "enabled" )
967 {
968 print( $err_msg );
969 }
970 eZPBLog::writeNotice( $err_msg );
971 }
972
973 var $TextStrings;
974 var $Ini;
975 var $debugINI;
976 var $Style;
977 var $ModuleDir;
978 var $State;
979 var $languageFile;
980 var $CacheSuffix;
981 var $CacheDir;
982 var $ExternModTime;
983
984 var $files = array();
985
986 /* $file[handle] = "filename"; */
987 var $file = array();
988
989 /* relative filenames are relative to this pathname */
990 var $root = "";
991
992 /* $varkeys[key] = "key"; $varvals[key] = "value"; */
993 var $varkeys = array();
994 var $varvals = array();
995
996 /* "remove" => remove undefined variables
997 * "comment" => replace undefined variables with comments
998 * "keep" => keep undefined variables
999 * "nbsp" => replace all undefined variables with &nbsp; (very nice in tables with bg color)
1000 */
1001 var $unknowns = "remove";
1002
1003 /* "yes" => halt, "report" => report error, continue, "no" => ignore error quietly */
1004 var $halt_on_error = "report";
1005
1006 /* last error message is retained here */
1007 var $last_error = "";
1008
1009 var $ReplaceFunc;
1010 }
1011
1012 ?>
$i
$i
Definition: admin/adlist.php:91
$tmp
$tmp
Definition: bugview.php:99
eZPBFile\fopen
static fopen( $filename, $options)
Definition: ezpbfile.php:326
eZPBFile\unlink
static unlink( $filename)
Definition: ezpbfile.php:352
eZPBFile\filemtime
static filemtime( $filename)
Definition: ezpbfile.php:306
eZPBFile\filesize
static filesize( $filename)
Definition: ezpbfile.php:339
eZPBLog\writeNotice
static writeNotice( $notice)
Definition: ezpblog.php:166
eZTemplate
Definition: eztemplate.php:107
eZTemplate\set_file
set_file( $handle, $filename="")
Definition: eztemplate.php:464
eZTemplate\set_root
set_root($root)
Definition: eztemplate.php:432
eZTemplate\$intlDir
$intlDir
Definition: eztemplate.php:110
eZTemplate\$Style
$Style
Definition: eztemplate.php:976
eZTemplate\setAllStrings
setAllStrings()
Definition: eztemplate.php:243
eZTemplate\get_undefined
get_undefined($handle)
Definition: eztemplate.php:798
eZTemplate\loadfile
loadfile( $handle)
Definition: eztemplate.php:899
eZTemplate\subst
& subst( $handle)
Definition: eztemplate.php:630
eZTemplate\hasCache
hasCache()
Definition: eztemplate.php:311
eZTemplate\cache
& cache()
Definition: eztemplate.php:348
eZTemplate\$TextStrings
$TextStrings
Definition: eztemplate.php:973
eZTemplate\$ReplaceFunc
$ReplaceFunc
Definition: eztemplate.php:1009
eZTemplate\finish
& finish( $str)
Definition: eztemplate.php:833
eZTemplate\cacheFile
& cacheFile()
Definition: eztemplate.php:261
eZTemplate\$CacheDir
$CacheDir
Definition: eztemplate.php:981
eZTemplate\$unknowns
$unknowns
Definition: eztemplate.php:1001
eZTemplate\$debugINI
$debugINI
Definition: eztemplate.php:975
eZTemplate\clearCache
clearCache()
Definition: eztemplate.php:399
eZTemplate\storeCache
& storeCache( $target, $handle, $print=true)
Definition: eztemplate.php:370
eZTemplate\$Ini
$Ini
Definition: eztemplate.php:974
eZTemplate\ini
& ini()
Definition: eztemplate.php:424
eZTemplate\cachePath
& cachePath()
Definition: eztemplate.php:279
eZTemplate\$last_error
$last_error
Definition: eztemplate.php:1007
eZTemplate\$ExternModTime
$ExternModTime
Definition: eztemplate.php:982
eZTemplate\get_vars
& get_vars()
Definition: eztemplate.php:730
eZTemplate\set_var
set_var( $varname, $value="", $substIfEmpty="")
Definition: eztemplate.php:577
eZTemplate\get_user_variable
get_user_variable( $handle, $var)
Definition: eztemplate.php:784
eZTemplate\$varkeys
$varkeys
Definition: eztemplate.php:993
eZTemplate\$languageFile
$languageFile
Definition: eztemplate.php:979
eZTemplate\$language
$language
Definition: eztemplate.php:108
eZTemplate\set_unknowns
set_unknowns( $unknowns="keep")
Definition: eztemplate.php:453
eZTemplate\$varvals
$varvals
Definition: eztemplate.php:994
eZTemplate\set_var_internal
set_var_internal(&$varname, $value)
Definition: eztemplate.php:589
eZTemplate\halt
halt( $msg)
Definition: eztemplate.php:943
eZTemplate\$State
$State
Definition: eztemplate.php:978
eZTemplate\$root
$root
Definition: eztemplate.php:990
eZTemplate\pparse
pparse( $target, $handle, $append=false)
Definition: eztemplate.php:721
eZTemplate\p
p( $varname)
Definition: eztemplate.php:858
eZTemplate\get_var
& get_var( $varname)
Definition: eztemplate.php:745
eZTemplate\parse
& parse( $target, $handle="", $append=false)
Definition: eztemplate.php:672
eZTemplate\$halt_on_error
$halt_on_error
Definition: eztemplate.php:1004
eZTemplate\clearVars
clearVars( $except=array())
Definition: eztemplate.php:289
eZTemplate\__construct
__construct( $templateDir="", $intlDir="", $language="", $phpFile="", $style=false, $module_dir=false, $state=false, $mod_time=false)
Definition: eztemplate.php:115
eZTemplate\$files
$files
Definition: eztemplate.php:984
eZTemplate\$file
$file
Definition: eztemplate.php:987
eZTemplate\$phpFile
$phpFile
Definition: eztemplate.php:109
eZTemplate\$ModuleDir
$ModuleDir
Definition: eztemplate.php:977
eZTemplate\set_file_block
set_file_block( $parent)
Definition: eztemplate.php:546
eZTemplate\set_block
set_block( $parent, $handle="", $name="", $required=true)
Definition: eztemplate.php:501
eZTemplate\cacheFileName
& cacheFileName()
Definition: eztemplate.php:270
eZTemplate\$CacheSuffix
$CacheSuffix
Definition: eztemplate.php:980
eZTemplate\haltmsg
haltmsg( $msg)
Definition: eztemplate.php:960
eZTemplate\filename
filename( $filename)
Definition: eztemplate.php:877
eZTemplate\psubst
psubst( $handle)
Definition: eztemplate.php:660
$result
$result
Definition: companysearch.php:94
$name
$name
Definition: companytypelist.php:194
file_exists
static file_exists( $inifilename)
Definition: eZPBINIFile.php:195
$lang
$lang
Definition: ecommerce/jscalendar/test.php:4
$msg
$msg
Definition: editmessage.php:47
$str
$str
Definition: ezarticle/modules/content.php:30
$GlobalSiteIni
$GlobalSiteIni
Definition: ezarticle/xmlrpc/xmlrpcserver.php:33
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.