XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
compiler.assign.php
Go to the documentation of this file.
1 <?php
21 function smarty_compiler_assign($tag_attrs, &$compiler)
22 {
23  $_params = $compiler->_parse_attrs($tag_attrs);
24 
25  if (!isset($_params['var'])) {
26  $compiler->_syntax_error("assign: missing 'var' parameter", E_USER_WARNING);
27  return;
28  }
29 
30  if (!isset($_params['value'])) {
31  $compiler->_syntax_error("assign: missing 'value' parameter", E_USER_WARNING);
32  return;
33  }
34 
35  return "\$this->assign({$_params['var']}, {$_params['value']});";
36 }
37 
38 /* vim: set expandtab: */
39 
40 ?>