/[cvs]/nfo/php/libs/net.php.smarty/plugins/function.assign.php
ViewVC logotype

Contents of /nfo/php/libs/net.php.smarty/plugins/function.assign.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed Oct 9 00:53:36 2002 UTC (21 years, 9 months ago) by cvsjoko
Branch: MAIN
CVS Tags: HEAD
no message

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 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed