PEEL Shopping
Open source ecommerce : PEEL Shopping
smarty_internal_compile_private_object_function.php
Go to the documentation of this file.
1 <?php
19 
26  public $optional_attributes = array('_any');
27 
38  public function compile($args, $compiler, $parameter, $tag, $method)
39  {
40  // check and get attributes
41  $_attr = $this->getAttributes($compiler, $args);
42  if ($_attr['nocache'] === true) {
43  $compiler->tag_nocache = true;
44  }
45  unset($_attr['nocache']);
46  $_assign = null;
47  if (isset($_attr['assign'])) {
48  $_assign = $_attr['assign'];
49  unset($_attr['assign']);
50  }
51  // convert attributes into parameter array string
52  if ($compiler->smarty->registered_objects[$tag][2]) {
53  $_paramsArray = array();
54  foreach ($_attr as $_key => $_value) {
55  if (is_int($_key)) {
56  $_paramsArray[] = "$_key=>$_value";
57  } else {
58  $_paramsArray[] = "'$_key'=>$_value";
59  }
60  }
61  $_params = 'array(' . implode(",", $_paramsArray) . ')';
62  $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params},\$_smarty_tpl)";
63  } else {
64  $_params = implode(",", $_attr);
65  $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params})";
66  }
67  if (empty($_assign)) {
68  // This tag does create output
69  $compiler->has_output = true;
70  $output = "<?php echo {$return};?>\n";
71  } else {
72  $output = "<?php \$_smarty_tpl->assign({$_assign},{$return});?>\n";
73  }
74  return $output;
75  }
76 
77 }
78 
79 ?>
getAttributes($compiler, $attributes)
This function checks if the attributes passed are valid.
compile($args, $compiler, $parameter, $tag, $method)
Compiles code for the execution of function plugin.

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.