| [ Index ] |
krapohl.info |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * Smarty plugin 5 * ------------------------------------------------------------- 6 * Type: function 7 * Name: assign 8 * Purpose: assign a value to a template variable 9 * ------------------------------------------------------------- 10 */ 11 function smarty_function_assign($params, &$smarty) 12 { 13 extract($params); 14 15 if (empty($var)) { 16 $smarty->trigger_error("assign: missing 'var' parameter"); 17 return; 18 } 19 20 if (!in_array('value', array_keys($params))) { 21 $smarty->trigger_error("assign: missing 'value' parameter"); 22 return; 23 } 24 25 $smarty->assign($var, $value); 26 } 27 28 /* vim: set expandtab: */ 29 30 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Feb 16 22:40:07 2005 | Cross-referenced by PHPXref 0.6 |