ultimix
default_template_script.php
Go to the documentation of this file.
1 <?php
2 
3  /*
4  * This source code is a part of the Ultimix Project.
5  * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6  * it's own license wich could be found from the corresponding files or sources.
7  * This source code is provided "as is" without any warranties or garanties.
8  *
9  * Have a nice day!
10  *
11  * @url http://ultimix.sorceforge.net
12  *
13  * @author Alexey "gdever" Dodonov
14  */
15 
27 
38  var $TemplatePackagePath = false;
39 
58  function set_template_path( $theTemplatePackagePath )
59  {
60  try
61  {
62  $this->TemplatePackagePath = $theTemplatePackagePath;
63  }
64  catch( Exception $e )
65  {
66  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
67  }
68  }
69 
88  function process( $PageName )
89  {
90  try
91  {
92  $Changed = false;
93  $this->TemplateParser->process( $this->TemplatePackagePath , $PageName , $Changed );
94  }
95  catch( Exception $e )
96  {
97  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
98  }
99  }
100 
123  function get_placeholder_parameters( $PurePlaceHolderName )
124  {
125  try
126  {
127  return(
128  $this->TemplateParser->get_placeholder_parameters(
129  $this->TemplatePackagePath , $PurePlaceHolderName
130  )
131  );
132  }
133  catch( Exception $e )
134  {
135  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
136  }
137  }
138 
149  var $TemplateParser = false;
150 
165  function __construct()
166  {
167  try
168  {
169  $this->TemplateParser = get_package_object( 'template_manager::base_template' , 'last' , __FILE__ );
170  }
171  catch( Exception $e )
172  {
173  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
174  }
175  }
176 
199  function parse( $Variable , $Value )
200  {
201  try
202  {
203  $this->TemplateParser->parse( $this->TemplatePackagePath , $Variable , $Value );
204  }
205  catch( Exception $e )
206  {
207  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
208  }
209  }
210 
225  function add_stylesheets()
226  {
227  try
228  {
229  $this->TemplateParser->add_stylesheets( $this->TemplatePackagePath );
230  }
231  catch( Exception $e )
232  {
233  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
234  }
235  }
236 
255  function compile_string( $String )
256  {
257  try
258  {
259  return( $this->TemplateParser->compile_string( $this->TemplatePackagePath , $String ) );
260  }
261  catch( Exception $e )
262  {
263  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
264  }
265  }
266 
285  function cleanup( $PageName )
286  {
287  try
288  {
289  $this->TemplateParser->cleanup( $this->TemplatePackagePath , $PageName );
290  }
291  catch( Exception $e )
292  {
293  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
294  }
295  }
296 
315  function get_template()
316  {
317  try
318  {
319  return( $this->TemplateParser->get_template( $this->TemplatePackagePath ) );
320  }
321  catch( Exception $e )
322  {
323  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
324  }
325  }
326 
345  function set_template( $Template )
346  {
347  try
348  {
349  return( $this->TemplateParser->set_template( $Template ) );
350  }
351  catch( Exception $e )
352  {
353  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
354  }
355  }
356  }
357 
358 ?>