libs/SmartyBC.class.php Quellcode

SmartyBC.class.php
gehe zur Dokumentation dieser Datei
1 <?php
31 require_once(dirname(__FILE__) . '/Smarty.class.php');
32 
38 class SmartyBC extends Smarty
39 {
45  public $_version = self::SMARTY_VERSION;
46 
52  public function __construct(array $options = array())
53  {
54  parent::__construct($options);
55  }
56 
63  public function assign_by_ref($tpl_var, &$value)
64  {
65  $this->assignByRef($tpl_var, $value);
66  }
67 
75  public function append_by_ref($tpl_var, &$value, $merge = false)
76  {
77  $this->appendByRef($tpl_var, $value, $merge);
78  }
79 
85  public function clear_assign($tpl_var)
86  {
87  $this->clearAssign($tpl_var);
88  }
89 
98  public function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null)
99  {
100  $this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs);
101  }
102 
108  public function unregister_function($function)
109  {
110  $this->unregisterPlugin('function', $function);
111  }
112 
125  public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
126  {
127  settype($allowed, 'array');
128  settype($smarty_args, 'boolean');
129  $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods);
130  }
131 
137  public function unregister_object($object)
138  {
139  $this->unregisterObject($object);
140  }
141 
150  public function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null)
151  {
152  $this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs);
153  }
154 
160  public function unregister_block($block)
161  {
162  $this->unregisterPlugin('block', $block);
163  }
164 
172  public function register_compiler_function($function, $function_impl, $cacheable = true)
173  {
174  $this->registerPlugin('compiler', $function, $function_impl, $cacheable);
175  }
176 
182  public function unregister_compiler_function($function)
183  {
184  $this->unregisterPlugin('compiler', $function);
185  }
186 
193  public function register_modifier($modifier, $modifier_impl)
194  {
195  $this->registerPlugin('modifier', $modifier, $modifier_impl);
196  }
197 
203  public function unregister_modifier($modifier)
204  {
205  $this->unregisterPlugin('modifier', $modifier);
206  }
207 
214  public function register_resource($type, $functions)
215  {
216  $this->registerResource($type, $functions);
217  }
218 
224  public function unregister_resource($type)
225  {
226  $this->unregisterResource($type);
227  }
228 
235  public function register_prefilter($function)
236  {
237  $this->registerFilter('pre', $function);
238  }
239 
245  public function unregister_prefilter($function)
246  {
247  $this->unregisterFilter('pre', $function);
248  }
249 
256  public function register_postfilter($function)
257  {
258  $this->registerFilter('post', $function);
259  }
260 
266  public function unregister_postfilter($function)
267  {
268  $this->unregisterFilter('post', $function);
269  }
270 
277  public function register_outputfilter($function)
278  {
279  $this->registerFilter('output', $function);
280  }
281 
287  public function unregister_outputfilter($function)
288  {
289  $this->unregisterFilter('output', $function);
290  }
291 
298  public function load_filter($type, $name)
299  {
300  $this->loadFilter($type, $name);
301  }
302 
313  public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
314  {
315  return $this->clearCache($tpl_file, $cache_id, $compile_id, $exp_time);
316  }
317 
325  public function clear_all_cache($exp_time = null)
326  {
327  return $this->clearCache(null, null, null, $exp_time);
328  }
329 
339  public function is_cached($tpl_file, $cache_id = null, $compile_id = null)
340  {
341  return $this->isCached($tpl_file, $cache_id, $compile_id);
342  }
343 
347  public function clear_all_assign()
348  {
349  $this->clearAllAssign();
350  }
351 
363  public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
364  {
365  return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time);
366  }
367 
375  public function template_exists($tpl_file)
376  {
377  return $this->templateExists($tpl_file);
378  }
379 
387  public function get_template_vars($name = null)
388  {
389  return $this->getTemplateVars($name);
390  }
391 
399  public function get_config_vars($name = null)
400  {
401  return $this->getConfigVars($name);
402  }
403 
411  public function config_load($file, $section = null, $scope = 'global')
412  {
413  $this->ConfigLoad($file, $section, $scope);
414  }
415 
423  public function get_registered_object($name)
424  {
425  return $this->getRegisteredObject($name);
426  }
427 
433  public function clear_config($var = null)
434  {
435  $this->clearConfig($var);
436  }
437 
444  public function trigger_error($error_msg, $error_type = E_USER_WARNING)
445  {
446  trigger_error("Smarty error: $error_msg", $error_type);
447  }
448 }




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.