Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

eztemplatefunctionelement.php
Go to the documentation of this file.
1 <?php
25 class eZTemplateFunctionElement
26 {
34 public function __construct( $name, $params, $children = array() )
35 {
36 $this->Name = $name;
37 $this->Params =& $params;
38 $this->Children = $children;
39 }
40
41 function setResourceRelation( $resource )
42 {
43 $this->Resource = $resource;
44 }
45
46 function setTemplateNameRelation( $templateName )
47 {
48 $this->TemplateName = $templateName;
49 }
50
51 function resourceRelation()
52 {
53 return $this->Resource;
54 }
55
56 function templateNameRelation()
57 {
58 return $this->TemplateName;
59 }
60
64 function name()
65 {
66 return $this->Name;
67 }
68
69 function serializeData()
70 {
71 return array( 'class_name' => 'eZTemplateFunctionElement',
72 'parameters' => array( 'name', 'parameters', 'children' ),
73 'variables' => array( 'name' => 'Name',
74 'parameters' => 'Params',
75 'children' => 'Children' ) );
76 }
77
82 function process( $tpl, &$text, $nspace, $current_nspace )
83 {
84 $tmp = $tpl->doFunction( $this->Name, $this, $nspace, $current_nspace );
85 if ( $tmp === false )
86 return;
87 $tpl->appendElement( $text, $tmp, $nspace, $current_nspace );
88 }
89
93 function &parameters()
94 {
95 return $this->Params;
96 }
97
101 function &children()
102 {
103 return $this->Children;
104 }
105
109 function appendChild( &$node )
110 {
111 $this->Children[] =& $node;
112 }
113
115 public $Name;
117 public $Params;
119 public $Children = array();
120
121 public $Resource;
122 public $TemplateName;
123 }
124
125 ?>
eZTemplateFunctionElement
Represents a function element in the template tree.
Definition: eztemplatefunctionelement.php:26
eZTemplateFunctionElement\$Children
$Children
The child elements.
Definition: eztemplatefunctionelement.php:119
eZTemplateFunctionElement\$Name
$Name
The name of the function.
Definition: eztemplatefunctionelement.php:115
eZTemplateFunctionElement\process
process( $tpl, &$text, $nspace, $current_nspace)
Definition: eztemplatefunctionelement.php:82
eZTemplateFunctionElement\$Resource
$Resource
Definition: eztemplatefunctionelement.php:121
eZTemplateFunctionElement\$TemplateName
$TemplateName
Definition: eztemplatefunctionelement.php:122
eZTemplateFunctionElement\children
& children()
Definition: eztemplatefunctionelement.php:101
eZTemplateFunctionElement\parameters
& parameters()
Definition: eztemplatefunctionelement.php:93
eZTemplateFunctionElement\templateNameRelation
templateNameRelation()
Definition: eztemplatefunctionelement.php:56
eZTemplateFunctionElement\resourceRelation
resourceRelation()
Definition: eztemplatefunctionelement.php:51
eZTemplateFunctionElement\appendChild
appendChild(&$node)
Definition: eztemplatefunctionelement.php:109
eZTemplateFunctionElement\setTemplateNameRelation
setTemplateNameRelation( $templateName)
Definition: eztemplatefunctionelement.php:46
eZTemplateFunctionElement\__construct
__construct( $name, $params, $children=array())
Definition: eztemplatefunctionelement.php:34
eZTemplateFunctionElement\setResourceRelation
setResourceRelation( $resource)
Definition: eztemplatefunctionelement.php:41
eZTemplateFunctionElement\name
name()
Definition: eztemplatefunctionelement.php:64
eZTemplateFunctionElement\serializeData
serializeData()
Definition: eztemplatefunctionelement.php:69
eZTemplateFunctionElement\$Params
$Params
The parameter list.
Definition: eztemplatefunctionelement.php:117
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.