library/smarty/libs/plugins/modifiercompiler.cat.php
changeset 46 f11c31f7fa3e
parent 45 a56e7f9a0463
child 47 03388ec805b4
equal deleted inserted replaced
45:a56e7f9a0463 46:f11c31f7fa3e
     1 <?php
       
     2 /**
       
     3  * Smarty plugin
       
     4  *
       
     5  * @package    Smarty
       
     6  * @subpackage PluginsModifierCompiler
       
     7  */
       
     8 
       
     9 /**
       
    10  * Smarty cat modifier plugin
       
    11  * Type:     modifier<br>
       
    12  * Name:     cat<br>
       
    13  * Date:     Feb 24, 2003<br>
       
    14  * Purpose:  catenate a value to a variable<br>
       
    15  * Input:    string to catenate<br>
       
    16  * Example:  {$var|cat:"foo"}
       
    17  *
       
    18  * @link     http://smarty.php.net/manual/en/language.modifier.cat.php cat
       
    19  *           (Smarty online manual)
       
    20  * @author   Uwe Tews
       
    21  *
       
    22  * @param array $params parameters
       
    23  *
       
    24  * @return string with compiled code
       
    25  */
       
    26 function smarty_modifiercompiler_cat($params) {
       
    27     return '(' . implode(').(', $params) . ')';
       
    28 }