Massive upgrade
This commit is contained in:
parent
99a9ed919e
commit
c1a3437f9b
396 changed files with 29083 additions and 31939 deletions
19
core/template/src/Compile/Modifier/EmptyModifierCompiler.php
Normal file
19
core/template/src/Compile/Modifier/EmptyModifierCompiler.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
namespace Smarty\Compile\Modifier;
|
||||
use Smarty\CompilerException;
|
||||
|
||||
/**
|
||||
* Smarty empty modifier plugin
|
||||
*/
|
||||
class EmptyModifierCompiler extends Base {
|
||||
|
||||
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
||||
|
||||
if (count($params) !== 1) {
|
||||
throw new CompilerException("Invalid number of arguments for empty. empty expects exactly 1 parameter.");
|
||||
}
|
||||
|
||||
return 'empty(' . $params[0] . ')';
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue