mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-07 14:04:13 +02:00
26 lines
445 B
PHP
26 lines
445 B
PHP
<?php
|
|
|
|
namespace Smarty\Compile\Modifier;
|
|
|
|
/**
|
|
* Smarty cat modifier plugin
|
|
* Type: modifier
|
|
* Name: cat
|
|
* Date: Feb 24, 2003
|
|
* Purpose: catenate a value to a variable
|
|
* Input: string to catenate
|
|
* Example: {$var|cat:"foo"}
|
|
*
|
|
* @author Uwe Tews
|
|
*/
|
|
|
|
class CatModifierCompiler extends Base {
|
|
|
|
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
|
return '(' . implode(').(', $params) . ')';
|
|
}
|
|
|
|
}
|
|
|
|
|