PEEL Shopping
Open source ecommerce : PEEL Shopping
smarty_internal_resource_registered.php
Go to the documentation of this file.
1 <?php
21 
29  public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
30  {
31  $source->filepath = $source->type . ':' . $source->name;
32  $source->uid = sha1($source->filepath);
33  if ($source->smarty->compile_check) {
34  $source->timestamp = $this->getTemplateTimestamp($source);
35  $source->exists = !!$source->timestamp;
36  }
37  }
38 
45  public function populateTimestamp(Smarty_Template_Source $source)
46  {
47  $source->timestamp = $this->getTemplateTimestamp($source);
48  $source->exists = !!$source->timestamp;
49  }
50 
58  {
59  // return timestamp
60  $time_stamp = false;
61  call_user_func_array($source->smarty->registered_resources[$source->type][0][1], array($source->name, &$time_stamp, $source->smarty));
62  return is_numeric($time_stamp) ? (int) $time_stamp : $time_stamp;
63  }
64 
72  public function getContent(Smarty_Template_Source $source)
73  {
74  // return template string
75  $t = call_user_func_array($source->smarty->registered_resources[$source->type][0][0], array($source->name, &$source->content, $source->smarty));
76  if (is_bool($t) && !$t) {
77  throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
78  }
79  return $source->content;
80  }
81 
88  protected function getBasename(Smarty_Template_Source $source)
89  {
90  return basename($source->name);
91  }
92 
93 }
94 
95 ?>
populateTimestamp(Smarty_Template_Source $source)
populate Source Object with timestamp and exists from Resource
getContent(Smarty_Template_Source $source)
Load template's source by invoking the registered callback into current template object.
populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
populate Source Object with meta data from Resource
getBasename(Smarty_Template_Source $source)
Determine basename for compiled filename.
getTemplateTimestamp(Smarty_Template_Source $source)
Get timestamp (epoch) the template source was modified.

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:17 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.