2013-07-14 22:15:45 +00:00
|
|
|
<?php
|
2023-08-08 00:04:14 +02:00
|
|
|
|
|
|
|
|
namespace Smarty\Compile\Modifier;
|
|
|
|
|
|
2013-07-14 22:15:45 +00:00
|
|
|
/**
|
|
|
|
|
* Smarty cat modifier plugin
|
2017-11-11 07:11:33 +01:00
|
|
|
* Type: modifier
|
|
|
|
|
* Name: cat
|
|
|
|
|
* Date: Feb 24, 2003
|
|
|
|
|
* Purpose: catenate a value to a variable
|
|
|
|
|
* Input: string to catenate
|
2013-07-14 22:15:45 +00:00
|
|
|
* Example: {$var|cat:"foo"}
|
|
|
|
|
*
|
2018-06-12 09:58:15 +02:00
|
|
|
* @author Uwe Tews
|
2013-07-14 22:15:45 +00:00
|
|
|
*/
|
2023-08-08 00:04:14 +02:00
|
|
|
|
|
|
|
|
class CatModifierCompiler extends Base {
|
|
|
|
|
|
|
|
|
|
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
|
|
|
|
return '(' . implode(').(', $params) . ')';
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-14 22:15:45 +00:00
|
|
|
}
|
2023-08-08 00:04:14 +02:00
|
|
|
|
|
|
|
|
|