Initial checkin
This commit is contained in:
commit
d75eb444fc
4304 changed files with 369634 additions and 0 deletions
29
core/template/src/Compile/DefaultHandlerBlockCompiler.php
Normal file
29
core/template/src/Compile/DefaultHandlerBlockCompiler.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Smarty\Compile;
|
||||
|
||||
class DefaultHandlerBlockCompiler extends BlockCompiler {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function getIsCallableCode($tag, $function): string {
|
||||
return "\$_smarty_tpl->getSmarty()->getRuntime('DefaultPluginHandler')->hasPlugin(" .
|
||||
var_export($function, true) . ", 'block')";
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function getFullCallbackCode($tag, $function): string {
|
||||
return "\$_smarty_tpl->getSmarty()->getRuntime('DefaultPluginHandler')->getCallback(" .
|
||||
var_export($function, true) . ", 'block')";
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function blockIsCacheable(\Smarty\Smarty $smarty, $function): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue