Fix scoping / global state problems in tests by using DI in Default Extension. Also removing a bunch of old fashioned phpdoc annotations that are superseded by namespaces.

This commit is contained in:
Simon Wisselink
2023-01-05 23:07:45 +01:00
parent f07e342d61
commit 608a400e66
100 changed files with 355 additions and 353 deletions

View File

@@ -2,7 +2,7 @@
/** /**
* Example Application * Example Application
* *
* @package Example-application
*/ */
$smarty = new \Smarty\Smarty; $smarty = new \Smarty\Smarty;

View File

@@ -63,7 +63,7 @@ to invoke your custom CacheResource implementation.
* INDEX(`modified`) * INDEX(`modified`)
* ) ENGINE = InnoDB;</pre> * ) ENGINE = InnoDB;</pre>
* *
* @package CacheResource-examples
* @author Rodney Rehm * @author Rodney Rehm
*/ */
class My_CacheResource_Mysql extends \Smarty\Cacheresource\Custom { class My_CacheResource_Mysql extends \Smarty\Cacheresource\Custom {
@@ -211,7 +211,7 @@ to invoke your custom CacheResource implementation.
* Note that memcache has a limitation of 256 characters per cache-key. * Note that memcache has a limitation of 256 characters per cache-key.
* To avoid complications all cache-keys are translated to a sha1 hash. * To avoid complications all cache-keys are translated to a sha1 hash.
* *
* @package CacheResource-examples
* @author Rodney Rehm * @author Rodney Rehm
*/ */
class My_CacheResource_Memcache extends \Smarty\Cacheresource\KeyValueStore { class My_CacheResource_Memcache extends \Smarty\Cacheresource\KeyValueStore {

View File

@@ -48,7 +48,7 @@ example.
* Demo data: * Demo data:
* <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre> * <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre>
* *
* @package Resource-examples
* @author Rodney Rehm * @author Rodney Rehm
*/ */
class My_Resource_Mysql extends \Smarty\Resource\CustomPlugin { class My_Resource_Mysql extends \Smarty\Resource\CustomPlugin {

View File

@@ -34,7 +34,7 @@ on the functions you are supposed to provide.
* Demo data: * Demo data:
* <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre> * <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre>
* *
* @package Resource-examples
* @author Rodney Rehm * @author Rodney Rehm
*/ */
class My_Resource_Mysql extends \Smarty\Resource\Custom { class My_Resource_Mysql extends \Smarty\Resource\Custom {

View File

@@ -44,7 +44,7 @@ on the functions you are supposed to provide.
* Demo data: * Demo data:
* <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre> * <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre>
* *
* @package Resource-examples
* @author Rodney Rehm * @author Rodney Rehm
*/ */
class My_Resource_Mysql extends \Smarty\Resource\Custom { class My_Resource_Mysql extends \Smarty\Resource\Custom {

View File

@@ -4,7 +4,7 @@
bootstrap="tests/Bootstrap.php" bootstrap="tests/Bootstrap.php"
colors="true" colors="true"
backupGlobals="false" backupGlobals="false"
backupStaticAttributes="true" backupStaticAttributes="false"
forceCoversAnnotation="false" forceCoversAnnotation="false"
processIsolation="false" processIsolation="false"
stopOnError="false" stopOnError="false"

View File

@@ -9,15 +9,15 @@ use Smarty\Template\Cached;
/** /**
* Smarty Internal Plugin * Smarty Internal Plugin
* *
* @package Smarty
* @subpackage Cacher
*/ */
/** /**
* Cache Handler API * Cache Handler API
* *
* @package Smarty
* @subpackage Cacher
* @author Rodney Rehm * @author Rodney Rehm
*/ */
abstract class Base abstract class Base

View File

@@ -5,8 +5,8 @@ namespace Smarty\Cacheresource;
/** /**
* Smarty Internal Plugin * Smarty Internal Plugin
* *
* @package Smarty
* @subpackage Cacher
*/ */
use Smarty\Smarty; use Smarty\Smarty;
@@ -16,8 +16,8 @@ use Smarty\Template\Cached;
/** /**
* Cache Handler API * Cache Handler API
* *
* @package Smarty
* @subpackage Cacher
* @author Rodney Rehm * @author Rodney Rehm
*/ */
abstract class Custom extends Base abstract class Custom extends Base

View File

@@ -11,8 +11,8 @@ use Smarty\Template\Cached;
/** /**
* Smarty Internal Plugin CacheResource File * Smarty Internal Plugin CacheResource File
* *
* @package Smarty
* @subpackage Cacher
* @author Uwe Tews * @author Uwe Tews
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -21,8 +21,8 @@ use Smarty\Template\Cached;
* This class does contain all necessary methods for the HTML cache on file system * This class does contain all necessary methods for the HTML cache on file system
* Implements the file system as resource for the HTML cache Version ussing nocache inserts. * Implements the file system as resource for the HTML cache Version ussing nocache inserts.
* *
* @package Smarty
* @subpackage Cacher
*/ */
class File extends Base class File extends Base
{ {

View File

@@ -9,8 +9,8 @@ use Smarty\Template\Cached;
/** /**
* Smarty Internal Plugin * Smarty Internal Plugin
* *
* @package Smarty
* @subpackage Cacher
*/ */
/** /**
@@ -31,8 +31,8 @@ use Smarty\Template\Cached;
* cache groups: if your cache groups look somewhat like »a|b|$page|$items|$whatever« * cache groups: if your cache groups look somewhat like »a|b|$page|$items|$whatever«
* consider using »a|b|c|$page-$items-$whatever« instead. * consider using »a|b|c|$page-$items-$whatever« instead.
* *
* @package Smarty
* @subpackage Cacher
* @author Rodney Rehm * @author Rodney Rehm
*/ */
abstract class KeyValueStore extends Base abstract class KeyValueStore extends Base

View File

@@ -8,8 +8,8 @@ namespace Smarty\Compile;
/** /**
* This class does extend all internal compile plugins * This class does extend all internal compile plugins
* *
* @package Smarty
* @subpackage Compiler
*/ */
abstract class Base implements CompilerInterface { abstract class Base implements CompilerInterface {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Block Plugin * Smarty Internal Plugin Compile Block Plugin
* Compiles code for the execution of block plugin * Compiles code for the execution of block plugin
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -17,8 +17,8 @@ use Smarty\Exception;
/** /**
* Smarty Internal Plugin Compile Block Plugin Class * Smarty Internal Plugin Compile Block Plugin Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class BlockCompiler extends Base { class BlockCompiler extends Base {

View File

@@ -5,8 +5,8 @@ namespace Smarty\Compile;
/** /**
* This class does extend all internal compile plugins * This class does extend all internal compile plugins
* *
* @package Smarty
* @subpackage Compiler
*/ */
interface CompilerInterface { interface CompilerInterface {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Registered Function * Smarty Internal Plugin Compile Registered Function
* Compiles code for the execution of a registered function * Compiles code for the execution of a registered function
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compiler\Template;
/** /**
* Smarty Internal Plugin Compile Registered Function Class * Smarty Internal Plugin Compile Registered Function Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class FunctionCallCompiler extends Base { class FunctionCallCompiler extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Modifier * Smarty Internal Plugin Compile Modifier
* Compiles code for modifier execution * Compiles code for modifier execution
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Modifier Class * Smarty Internal Plugin Compile Modifier Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ModifierCompiler extends Base { class ModifierCompiler extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Object Block Function * Smarty Internal Plugin Compile Object Block Function
* Compiles code for registered objects as block function * Compiles code for registered objects as block function
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -13,8 +13,8 @@ namespace Smarty\Compile;
/** /**
* Smarty Internal Plugin Compile Object Block Function Class * Smarty Internal Plugin Compile Object Block Function Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ObjectMethodBlockCompiler extends BlockCompiler { class ObjectMethodBlockCompiler extends BlockCompiler {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Object Function * Smarty Internal Plugin Compile Object Function
* Compiles code for registered objects as function * Compiles code for registered objects as function
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -13,8 +13,8 @@ namespace Smarty\Compile;
/** /**
* Smarty Internal Plugin Compile Object Function Class * Smarty Internal Plugin Compile Object Function Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ObjectMethodCallCompiler extends Base { class ObjectMethodCallCompiler extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Print Expression * Smarty Internal Plugin Compile Print Expression
* Compiles any tag which will output an expression or variable * Compiles any tag which will output an expression or variable
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -16,8 +16,8 @@ use Smarty\Compiler\BaseCompiler;
/** /**
* Smarty Internal Plugin Compile Print Expression Class * Smarty Internal Plugin Compile Print Expression Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class PrintExpressionCompiler extends Base { class PrintExpressionCompiler extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Special Smarty Variable * Smarty Internal Plugin Compile Special Smarty Variable
* Compiles the special $smarty variables * Compiles the special $smarty variables
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -20,8 +20,8 @@ use Smarty\CompilerException;
/** /**
* Smarty Internal Plugin Compile special Smarty Variable Class * Smarty Internal Plugin Compile special Smarty Variable Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class SpecialVariableCompiler extends Base { class SpecialVariableCompiler extends Base {

View File

@@ -6,16 +6,16 @@ namespace Smarty\Compile\Tag;
* Smarty Internal Plugin Compile Append * Smarty Internal Plugin Compile Append
* Compiles the {append} tag * Compiles the {append} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
/** /**
* Smarty Internal Plugin Compile Append Class * Smarty Internal Plugin Compile Append Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Append extends Assign class Append extends Assign
{ {

View File

@@ -9,16 +9,16 @@ use Smarty\Smarty;
* Smarty Internal Plugin Compile Assign * Smarty Internal Plugin Compile Assign
* Compiles the {assign} tag * Compiles the {assign} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
/** /**
* Smarty Internal Plugin Compile Assign Class * Smarty Internal Plugin Compile Assign Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Assign extends Base class Assign extends Base
{ {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Break * Smarty Internal Plugin Compile Break
* Compiles the {break} tag * Compiles the {break} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Break Class * Smarty Internal Plugin Compile Break Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class BreakTag extends Base { class BreakTag extends Base {

View File

@@ -3,8 +3,6 @@
* Smarty Internal Plugin Compile Function_Call * Smarty Internal Plugin Compile Function_Call
* Compiles the calls of user defined tags defined by {function} * Compiles the calls of user defined tags defined by {function}
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -14,9 +12,6 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Function_Call Class * Smarty Internal Plugin Compile Function_Call Class
*
* @package Smarty
* @subpackage Compiler
*/ */
class Call extends Base { class Call extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Capture Class * Smarty Internal Plugin Compile Capture Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Capture extends Base { class Capture extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Capture * Smarty Internal Plugin Compile Capture
* Compiles the {capture} tag * Compiles the {capture} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Captureclose Class * Smarty Internal Plugin Compile Captureclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class CaptureClose extends Base { class CaptureClose extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Config Load * Smarty Internal Plugin Compile Config Load
* Compiles the {config load} tag * Compiles the {config load} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -16,8 +16,8 @@ use Smarty\Smarty;
/** /**
* Smarty Internal Plugin Compile Config Load Class * Smarty Internal Plugin Compile Config Load Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ConfigLoad extends Base { class ConfigLoad extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Continue * Smarty Internal Plugin Compile Continue
* Compiles the {continue} tag * Compiles the {continue} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -13,8 +13,8 @@ namespace Smarty\Compile\Tag;
/** /**
* Smarty Internal Plugin Compile Continue Class * Smarty Internal Plugin Compile Continue Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ContinueTag extends BreakTag { class ContinueTag extends BreakTag {

View File

@@ -4,8 +4,8 @@
* Compiles the {debug} tag. * Compiles the {debug} tag.
* It opens a window the the Smarty Debugging Console. * It opens a window the the Smarty Debugging Console.
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -16,8 +16,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Debug Class * Smarty Internal Plugin Compile Debug Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Debug extends Base { class Debug extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile ElseIf Class * Smarty Internal Plugin Compile ElseIf Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ElseIfTag extends Base { class ElseIfTag extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Else Class * Smarty Internal Plugin Compile Else Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ElseTag extends Base { class ElseTag extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Eval * Smarty Internal Plugin Compile Eval
* Compiles the {eval} tag. * Compiles the {eval} tag.
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Eval Class * Smarty Internal Plugin Compile Eval Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class EvalTag extends Base { class EvalTag extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile extend * Smarty Internal Plugin Compile extend
* Compiles the {extends} tag * Compiles the {extends} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -13,8 +13,8 @@ namespace Smarty\Compile\Tag;
/** /**
* Smarty Internal Plugin Compile extend Class * Smarty Internal Plugin Compile extend Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ExtendsTag extends Inheritance { class ExtendsTag extends Inheritance {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile For * Smarty Internal Plugin Compile For
* Compiles the {for} {forelse} {/for} tags * Compiles the {for} {forelse} {/for} tags
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Forclose Class * Smarty Internal Plugin Compile Forclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ForClose extends Base { class ForClose extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Forelse Class * Smarty Internal Plugin Compile Forelse Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ForElse extends Base { class ForElse extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile For Class * Smarty Internal Plugin Compile For Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ForTag extends Base { class ForTag extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Foreach * Smarty Internal Plugin Compile Foreach
* Compiles the {foreach} {foreachelse} {/foreach} tags * Compiles the {foreach} {foreachelse} {/foreach} tags
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Foreachclose Class * Smarty Internal Plugin Compile Foreachclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ForeachClose extends Base { class ForeachClose extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Foreachelse Class * Smarty Internal Plugin Compile Foreachelse Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ForeachElse extends Base { class ForeachElse extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile ForeachSection * Smarty Internal Plugin Compile ForeachSection
* Shared methods for {foreach} {section} tags * Shared methods for {foreach} {section} tags
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile ForeachSection Class * Smarty Internal Plugin Compile ForeachSection Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
abstract class ForeachSection extends Base { abstract class ForeachSection extends Base {

View File

@@ -5,8 +5,8 @@ namespace Smarty\Compile\Tag;
/** /**
* Smarty Internal Plugin Compile Foreach Class * Smarty Internal Plugin Compile Foreach Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class ForeachTag extends ForeachSection { class ForeachTag extends ForeachSection {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Function * Smarty Internal Plugin Compile Function
* Compiles the {function} {/function} tags * Compiles the {function} {/function} tags
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Functionclose Class * Smarty Internal Plugin Compile Functionclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class FunctionClose extends Base { class FunctionClose extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Function Class * Smarty Internal Plugin Compile Function Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class FunctionTag extends Base { class FunctionTag extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile If * Smarty Internal Plugin Compile If
* Compiles the {if} {else} {elseif} {/if} tags * Compiles the {if} {else} {elseif} {/if} tags
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Ifclose Class * Smarty Internal Plugin Compile Ifclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class IfClose extends Base { class IfClose extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile If Class * Smarty Internal Plugin Compile If Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class IfTag extends Base { class IfTag extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Include * Smarty Internal Plugin Compile Include
* Compiles the {include} tag * Compiles the {include} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -18,8 +18,8 @@ use Smarty\Template\Compiled;
/** /**
* Smarty Internal Plugin Compile Include Class * Smarty Internal Plugin Compile Include Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class IncludeTag extends Base { class IncludeTag extends Base {

View File

@@ -8,16 +8,16 @@ use Smarty\Compile\Base;
* Smarty Internal Plugin Compile Shared Inheritance * Smarty Internal Plugin Compile Shared Inheritance
* Shared methods for {extends} and {block} tags * Shared methods for {extends} and {block} tags
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
/** /**
* Smarty Internal Plugin Compile Shared Inheritance Class * Smarty Internal Plugin Compile Shared Inheritance Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
abstract class Inheritance extends Base abstract class Inheritance extends Base
{ {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Ldelim * Smarty Internal Plugin Compile Ldelim
* Compiles the {ldelim} tag * Compiles the {ldelim} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Ldelim Class * Smarty Internal Plugin Compile Ldelim Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Ldelim extends Base { class Ldelim extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Make_Nocache * Smarty Internal Plugin Compile Make_Nocache
* Compiles the {make_nocache} tag * Compiles the {make_nocache} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Make_Nocache Class * Smarty Internal Plugin Compile Make_Nocache Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class MakeNocache extends Base { class MakeNocache extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Nocache Class * Smarty Internal Plugin Compile Nocache Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Nocache extends Base { class Nocache extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Nocache * Smarty Internal Plugin Compile Nocache
* Compiles the {nocache} {/nocache} tags. * Compiles the {nocache} {/nocache} tags.
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Nocacheclose Class * Smarty Internal Plugin Compile Nocacheclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class NocacheClose extends Base { class NocacheClose extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Rdelim * Smarty Internal Plugin Compile Rdelim
* Compiles the {rdelim} tag * Compiles the {rdelim} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -13,8 +13,8 @@ namespace Smarty\Compile\Tag;
/** /**
* Smarty Internal Plugin Compile Rdelim Class * Smarty Internal Plugin Compile Rdelim Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Rdelim extends Ldelim { class Rdelim extends Ldelim {

View File

@@ -5,8 +5,8 @@ namespace Smarty\Compile\Tag;
/** /**
* Smarty Internal Plugin Compile Section Class * Smarty Internal Plugin Compile Section Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Section extends ForeachSection { class Section extends ForeachSection {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Section * Smarty Internal Plugin Compile Section
* Compiles the {section} {sectionelse} {/section} tags * Compiles the {section} {sectionelse} {/section} tags
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Sectionclose Class * Smarty Internal Plugin Compile Sectionclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class SectionClose extends Base { class SectionClose extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Sectionelse Class * Smarty Internal Plugin Compile Sectionelse Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class SectionElse extends Base { class SectionElse extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Setfilter Class * Smarty Internal Plugin Compile Setfilter Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Setfilter extends Base { class Setfilter extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile Setfilter * Smarty Internal Plugin Compile Setfilter
* Compiles code for setfilter tag * Compiles code for setfilter tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Setfilterclose Class * Smarty Internal Plugin Compile Setfilterclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class SetfilterClose extends Base { class SetfilterClose extends Base {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Compile While * Smarty Internal Plugin Compile While
* Compiles the {while} tag * Compiles the {while} tag
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile Whileclose Class * Smarty Internal Plugin Compile Whileclose Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class WhileClose extends Base { class WhileClose extends Base {

View File

@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
/** /**
* Smarty Internal Plugin Compile While Class * Smarty Internal Plugin Compile While Class
* *
* @package Smarty
* @subpackage Compiler
*/ */
class WhileTag extends Base { class WhileTag extends Base {

View File

@@ -4,8 +4,8 @@
* This is the config file compiler class. It calls the lexer and parser to * This is the config file compiler class. It calls the lexer and parser to
* perform the compiling. * perform the compiling.
* *
* @package Smarty
* @subpackage Config
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -19,8 +19,8 @@ use Smarty\CompilerException;
/** /**
* Main config file compiler class * Main config file compiler class
* *
* @package Smarty
* @subpackage Config
*/ */
class Configfile extends BaseCompiler { class Configfile extends BaseCompiler {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Smarty Template Compiler Base * Smarty Internal Plugin Smarty Template Compiler Base
* This file contains the basic classes and methods for compiling Smarty templates with lexer/parser * This file contains the basic classes and methods for compiling Smarty templates with lexer/parser
* *
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -31,8 +31,8 @@ use function substr;
/** /**
* Class SmartyTemplateCompiler * Class SmartyTemplateCompiler
* *
* @package Smarty
* @subpackage Compiler
*/ */
class Template extends BaseCompiler { class Template extends BaseCompiler {

View File

@@ -5,7 +5,7 @@ namespace Smarty;
/** /**
* Smarty compiler exception class * Smarty compiler exception class
* *
* @package Smarty
*/ */
class CompilerException extends Exception { class CompilerException extends Exception {

View File

@@ -6,8 +6,8 @@ namespace Smarty;
* Smarty Internal Plugin Data * Smarty Internal Plugin Data
* This file contains the basic classes and methods for template and variable creation * This file contains the basic classes and methods for template and variable creation
* *
* @package Smarty
* @subpackage Template
* @author Uwe Tews * @author Uwe Tews
*/ */

View File

@@ -3,8 +3,8 @@
* Smarty Plugin Data * Smarty Plugin Data
* This file contains the data object * This file contains the data object
* *
* @package Smarty
* @subpackage Template
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -16,8 +16,8 @@ use Smarty\Exception;
* class for the Smarty data object * class for the Smarty data object
* The Smarty data object will hold Smarty variables in the current scope * The Smarty data object will hold Smarty variables in the current scope
* *
* @package Smarty
* @subpackage Template
*/ */
class DataObject extends Data { class DataObject extends Data {

View File

@@ -6,16 +6,16 @@ namespace Smarty;
* Smarty Internal Plugin Debug * Smarty Internal Plugin Debug
* Class to collect data for the Smarty Debugging Console * Class to collect data for the Smarty Debugging Console
* *
* @package Smarty
* @subpackage Debug
* @author Uwe Tews * @author Uwe Tews
*/ */
/** /**
* Smarty Internal Plugin Debug Class * Smarty Internal Plugin Debug Class
* *
* @package Smarty
* @subpackage Debug
*/ */
class Debug extends Data class Debug extends Data
{ {

View File

@@ -5,8 +5,8 @@ namespace Smarty;
/** /**
* Smarty error handler to fix new error levels in PHP8 for backwards compatibility * Smarty error handler to fix new error levels in PHP8 for backwards compatibility
* *
* @package Smarty
* @subpackage PluginsInternal
* @author Simon Wisselink * @author Simon Wisselink
* *
*/ */

View File

@@ -3,32 +3,58 @@
namespace Smarty\Extension; namespace Smarty\Extension;
class DefaultExtension extends Base { class DefaultExtension extends Base {
private $modifiers = [];
private $functionHandlers = [];
private $blockHandlers = [];
public function __construct() {
// modifiers
$this->modifiers['cat'] = new \Smarty\Compile\Modifier\CatModifierCompiler();
$this->modifiers['count_characters'] = new \Smarty\Compile\Modifier\CountCharactersModifierCompiler();
$this->modifiers['count_paragraphs'] = new \Smarty\Compile\Modifier\CountParagraphsModifierCompiler();
$this->modifiers['count_sentences'] = new \Smarty\Compile\Modifier\CountSentencesModifierCompiler();
$this->modifiers['count_words'] = new \Smarty\Compile\Modifier\CountWordsModifierCompiler();
$this->modifiers['default'] = new \Smarty\Compile\Modifier\DefaultModifierCompiler();
$this->modifiers['escape'] = new \Smarty\Compile\Modifier\EscapeModifierCompiler();
$this->modifiers['from_charset'] = new \Smarty\Compile\Modifier\FromCharsetModifierCompiler();
$this->modifiers['indent'] = new \Smarty\Compile\Modifier\IndentModifierCompiler();
$this->modifiers['lower'] = new \Smarty\Compile\Modifier\LowerModifierCompiler();
$this->modifiers['nl2br'] = new \Smarty\Compile\Modifier\Nl2brModifierCompiler();
$this->modifiers['noprint'] = new \Smarty\Compile\Modifier\NoPrintModifierCompiler();
$this->modifiers['round'] = new \Smarty\Compile\Modifier\RoundModifierCompiler();
$this->modifiers['str_repeat'] = new \Smarty\Compile\Modifier\StrRepeatModifierCompiler();
$this->modifiers['string_format'] = new \Smarty\Compile\Modifier\StringFormatModifierCompiler();
$this->modifiers['strip'] = new \Smarty\Compile\Modifier\StripModifierCompiler();
$this->modifiers['strip_tags'] = new \Smarty\Compile\Modifier\StripTagsModifierCompiler();
$this->modifiers['strlen'] = new \Smarty\Compile\Modifier\StrlenModifierCompiler();
$this->modifiers['to_charset'] = new \Smarty\Compile\Modifier\ToCharsetModifierCompiler();
$this->modifiers['unescape'] = new \Smarty\Compile\Modifier\UnescapeModifierCompiler();
$this->modifiers['upper'] = new \Smarty\Compile\Modifier\UpperModifierCompiler();
$this->modifiers['wordwrap'] = new \Smarty\Compile\Modifier\WordWrapModifierCompiler();
// function handlers
$this->functionHandlers['counter'] = new \Smarty\FunctionHandler\Counter();
$this->functionHandlers['cycle'] = new \Smarty\FunctionHandler\Cycle();
$this->functionHandlers['fetch'] = new \Smarty\FunctionHandler\Fetch();
$this->functionHandlers['html_checkboxes'] = new \Smarty\FunctionHandler\HtmlCheckboxes();
$this->functionHandlers['html_image'] = new \Smarty\FunctionHandler\HtmlImage();
$this->functionHandlers['html_options'] = new \Smarty\FunctionHandler\HtmlOptions();
$this->functionHandlers['html_radios'] = new \Smarty\FunctionHandler\HtmlRadios();
$this->functionHandlers['html_select_date'] = new \Smarty\FunctionHandler\HtmlSelectDate();
$this->functionHandlers['html_select_time'] = new \Smarty\FunctionHandler\HtmlSelectTime();
$this->functionHandlers['html_table'] = new \Smarty\FunctionHandler\HtmlTable();
$this->functionHandlers['mailto'] = new \Smarty\FunctionHandler\Mailto();
$this->functionHandlers['math'] = new \Smarty\FunctionHandler\Math();
// blockhandlers
$this->blockHandlers['textformat'] = new \Smarty\BlockHandler\TextFormat();
}
public function getModifierCompiler(string $modifier): ?\Smarty\Compile\Modifier\ModifierCompilerInterface { public function getModifierCompiler(string $modifier): ?\Smarty\Compile\Modifier\ModifierCompilerInterface {
switch ($modifier) { return $this->modifiers[$modifier] ?? null;
case 'cat': return new \Smarty\Compile\Modifier\CatModifierCompiler();
case 'count_characters': return new \Smarty\Compile\Modifier\CountCharactersModifierCompiler();
case 'count_paragraphs': return new \Smarty\Compile\Modifier\CountParagraphsModifierCompiler();
case 'count_sentences': return new \Smarty\Compile\Modifier\CountSentencesModifierCompiler();
case 'count_words': return new \Smarty\Compile\Modifier\CountWordsModifierCompiler();
case 'default': return new \Smarty\Compile\Modifier\DefaultModifierCompiler();
case 'escape': return new \Smarty\Compile\Modifier\EscapeModifierCompiler();
case 'from_charset': return new \Smarty\Compile\Modifier\FromCharsetModifierCompiler();
case 'indent': return new \Smarty\Compile\Modifier\IndentModifierCompiler();
case 'lower': return new \Smarty\Compile\Modifier\LowerModifierCompiler();
case 'nl2br': return new \Smarty\Compile\Modifier\Nl2brModifierCompiler();
case 'noprint': return new \Smarty\Compile\Modifier\NoPrintModifierCompiler();
case 'round': return new \Smarty\Compile\Modifier\RoundModifierCompiler();
case 'str_repeat': return new \Smarty\Compile\Modifier\StrRepeatModifierCompiler();
case 'string_format': return new \Smarty\Compile\Modifier\StringFormatModifierCompiler();
case 'strip': return new \Smarty\Compile\Modifier\StripModifierCompiler();
case 'strip_tags': return new \Smarty\Compile\Modifier\StripTagsModifierCompiler();
case 'strlen': return new \Smarty\Compile\Modifier\StrlenModifierCompiler();
case 'to_charset': return new \Smarty\Compile\Modifier\ToCharsetModifierCompiler();
case 'unescape': return new \Smarty\Compile\Modifier\UnescapeModifierCompiler();
case 'upper': return new \Smarty\Compile\Modifier\UpperModifierCompiler();
case 'wordwrap': return new \Smarty\Compile\Modifier\WordWrapModifierCompiler();
}
return null;
} }
public function getModifierCallback(string $modifierName) { public function getModifierCallback(string $modifierName) {
@@ -50,28 +76,11 @@ class DefaultExtension extends Base {
} }
public function getFunctionHandler(string $functionName): ?\Smarty\FunctionHandler\FunctionHandlerInterface { public function getFunctionHandler(string $functionName): ?\Smarty\FunctionHandler\FunctionHandlerInterface {
switch ($functionName) { return $this->functionHandlers[$functionName] ?? null;
case 'counter': return new \Smarty\FunctionHandler\Counter();
case 'cycle': return new \Smarty\FunctionHandler\Cycle();
case 'fetch': return new \Smarty\FunctionHandler\Fetch();
case 'html_checkboxes': return new \Smarty\FunctionHandler\HtmlCheckboxes();
case 'html_image': return new \Smarty\FunctionHandler\HtmlImage();
case 'html_options': return new \Smarty\FunctionHandler\HtmlOptions();
case 'html_radios': return new \Smarty\FunctionHandler\HtmlRadios();
case 'html_select_date': return new \Smarty\FunctionHandler\HtmlSelectDate();
case 'html_select_time': return new \Smarty\FunctionHandler\HtmlSelectTime();
case 'html_table': return new \Smarty\FunctionHandler\HtmlTable();
case 'mailto': return new \Smarty\FunctionHandler\Mailto();
case 'math': return new \Smarty\FunctionHandler\Math();
}
return null;
} }
public function getBlockHandler(string $blockTagName): ?\Smarty\BlockHandler\BlockHandlerInterface { public function getBlockHandler(string $blockTagName): ?\Smarty\BlockHandler\BlockHandlerInterface {
switch ($blockTagName) { return $this->blockHandlers[$blockTagName] ?? null;
case 'textformat': return new \Smarty\BlockHandler\TextFormat();
}
return null;
} }
/** /**

View File

@@ -20,13 +20,14 @@ use Smarty\Template;
*/ */
class Counter extends Base { class Counter extends Base {
private $counters = [];
public function handle($params, Template $template) { public function handle($params, Template $template) {
static $counters = [];
$name = (isset($params['name'])) ? $params['name'] : 'default'; $name = (isset($params['name'])) ? $params['name'] : 'default';
if (!isset($counters[$name])) { if (!isset($this->counters[$name])) {
$counters[$name] = ['start' => 1, 'skip' => 1, 'direction' => 'up', 'count' => 1]; $this->counters[$name] = ['start' => 1, 'skip' => 1, 'direction' => 'up', 'count' => 1];
} }
$counter =& $counters[$name]; $counter =& $this->counters[$name];
if (isset($params['start'])) { if (isset($params['start'])) {
$counter['start'] = $counter['count'] = (int)$params['start']; $counter['start'] = $counter['count'] = (int)$params['start'];
} }

View File

@@ -6,15 +6,15 @@ namespace Smarty\ParseTree;
* Smarty Internal Plugin Templateparser ParseTree * Smarty Internal Plugin Templateparser ParseTree
* These are classes to build parsetree in the template parser * These are classes to build parsetree in the template parser
* *
* @package Smarty
* @subpackage Compiler
* @author Thue Kristensen * @author Thue Kristensen
* @author Uwe Tews * @author Uwe Tews
*/ */
/** /**
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
abstract class Base abstract class Base

View File

@@ -6,8 +6,8 @@ namespace Smarty\ParseTree;
* Smarty Internal Plugin Templateparser Parse Tree * Smarty Internal Plugin Templateparser Parse Tree
* These are classes to build parse trees in the template parser * These are classes to build parse trees in the template parser
* *
* @package Smarty
* @subpackage Compiler
* @author Thue Kristensen * @author Thue Kristensen
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ namespace Smarty\ParseTree;
/** /**
* Code fragment inside a tag . * Code fragment inside a tag .
* *
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
class Code extends Base class Code extends Base

View File

@@ -4,16 +4,16 @@ namespace Smarty\ParseTree;
/** /**
* Double-quoted string inside a tag. * Double-quoted string inside a tag.
* *
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
/** /**
* Double quoted string inside a tag. * Double quoted string inside a tag.
* *
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
class Dq extends Base class Dq extends Base

View File

@@ -5,8 +5,8 @@ namespace Smarty\ParseTree;
* Smarty Internal Plugin Templateparser Parse Tree * Smarty Internal Plugin Templateparser Parse Tree
* These are classes to build parse tree in the template parser * These are classes to build parse tree in the template parser
* *
* @package Smarty
* @subpackage Compiler
* @author Thue Kristensen * @author Thue Kristensen
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -14,8 +14,8 @@ namespace Smarty\ParseTree;
/** /**
* Raw chars as part of a double-quoted string. * Raw chars as part of a double-quoted string.
* *
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
class DqContent extends Base class DqContent extends Base

View File

@@ -6,8 +6,8 @@ namespace Smarty\ParseTree;
* Smarty Internal Plugin Templateparser Parse Tree * Smarty Internal Plugin Templateparser Parse Tree
* These are classes to build parse tree in the template parser * These are classes to build parse tree in the template parser
* *
* @package Smarty
* @subpackage Compiler
* @author Thue Kristensen * @author Thue Kristensen
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ namespace Smarty\ParseTree;
/** /**
* A complete smarty tag. * A complete smarty tag.
* *
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
class Tag extends Base class Tag extends Base

View File

@@ -6,8 +6,8 @@ namespace Smarty\ParseTree;
* Smarty Internal Plugin Templateparser Parse Tree * Smarty Internal Plugin Templateparser Parse Tree
* These are classes to build parse tree in the template parser * These are classes to build parse tree in the template parser
* *
* @package Smarty
* @subpackage Compiler
* @author Thue Kristensen * @author Thue Kristensen
* @author Uwe Tews * @author Uwe Tews
*/ */
@@ -15,8 +15,8 @@ namespace Smarty\ParseTree;
/** /**
* Template element * Template element
* *
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
class Template extends Base class Template extends Base

View File

@@ -6,14 +6,14 @@ namespace Smarty\ParseTree;
* Smarty Internal Plugin Templateparser Parse Tree * Smarty Internal Plugin Templateparser Parse Tree
* These are classes to build parse tree in the template parser * These are classes to build parse tree in the template parser
* *
* @package Smarty
* @subpackage Compiler
* @author Thue Kristensen * @author Thue Kristensen
* @author Uwe Tews * @author Uwe Tews
* * * *
* template text * template text
* @package Smarty
* @subpackage Compiler
* @ignore * @ignore
*/ */
class Text extends Base class Text extends Base

View File

@@ -7,8 +7,8 @@ use Smarty\Smarty;
/** /**
* Smarty Resource Plugin * Smarty Resource Plugin
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -16,8 +16,8 @@ use Smarty\Smarty;
* Smarty Resource Plugin * Smarty Resource Plugin
* Base implementation for resource plugins * Base implementation for resource plugins
* *
* @package Smarty
* @subpackage TemplateResources
* *
* @method renderUncompiled(\Smarty\Template\Source $source, \Smarty\Template $_template) * @method renderUncompiled(\Smarty\Template\Source $source, \Smarty\Template $_template)
* @method populateCompiledFilepath(\Smarty\Template\Compiled $compiled, \Smarty\Template $_template) * @method populateCompiledFilepath(\Smarty\Template\Compiled $compiled, \Smarty\Template $_template)

View File

@@ -2,8 +2,8 @@
/** /**
* Smarty Resource Plugin * Smarty Resource Plugin
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -17,8 +17,8 @@ use Smarty\Exception;
* Smarty Resource Plugin * Smarty Resource Plugin
* Wrapper Implementation for custom resource plugins * Wrapper Implementation for custom resource plugins
* *
* @package Smarty
* @subpackage TemplateResources
*/ */
abstract class CustomPlugin extends BasePlugin { abstract class CustomPlugin extends BasePlugin {

View File

@@ -5,8 +5,8 @@ namespace Smarty\Resource;
/** /**
* Smarty Internal Plugin Resource Extends * Smarty Internal Plugin Resource Extends
* *
* @package Smarty
* @subpackage TemplateResources
* @author Uwe Tews * @author Uwe Tews
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -15,8 +15,8 @@ namespace Smarty\Resource;
* Smarty Internal Plugin Resource Extends * Smarty Internal Plugin Resource Extends
* Implements the file system as resource for Smarty which {extend}s a chain of template files templates * Implements the file system as resource for Smarty which {extend}s a chain of template files templates
* *
* @package Smarty
* @subpackage TemplateResources
*/ */
class ExtendsPlugin extends BasePlugin class ExtendsPlugin extends BasePlugin
{ {

View File

@@ -2,8 +2,8 @@
/** /**
* Smarty Internal Plugin Resource File * Smarty Internal Plugin Resource File
* *
* @package Smarty
* @subpackage TemplateResources
* @author Uwe Tews * @author Uwe Tews
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -18,8 +18,8 @@ use Smarty\Exception;
* Smarty Internal Plugin Resource File * Smarty Internal Plugin Resource File
* Implements the file system as resource for Smarty templates * Implements the file system as resource for Smarty templates
* *
* @package Smarty
* @subpackage TemplateResources
*/ */
class FilePlugin extends BasePlugin { class FilePlugin extends BasePlugin {

View File

@@ -11,8 +11,8 @@ use Smarty\Exception;
* Smarty Internal Plugin Resource PHP * Smarty Internal Plugin Resource PHP
* Implements the file system as resource for PHP templates * Implements the file system as resource for PHP templates
* *
* @package Smarty
* @subpackage TemplateResources
* @author Uwe Tews * @author Uwe Tews
* @author Rodney Rehm * @author Rodney Rehm
*/ */

View File

@@ -2,8 +2,8 @@
/** /**
* Smarty Resource Plugin * Smarty Resource Plugin
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -17,8 +17,8 @@ use Smarty\Template\Compiled;
* Smarty Resource Plugin * Smarty Resource Plugin
* Base implementation for resource plugins that don't compile cache * Base implementation for resource plugins that don't compile cache
* *
* @package Smarty
* @subpackage TemplateResources
*/ */
abstract class RecompiledPlugin extends BasePlugin { abstract class RecompiledPlugin extends BasePlugin {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Resource Stream * Smarty Internal Plugin Resource Stream
* Implements the streams as resource for Smarty template * Implements the streams as resource for Smarty template
* *
* @package Smarty
* @subpackage TemplateResources
* @author Uwe Tews * @author Uwe Tews
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -20,8 +20,8 @@ use Smarty\Template\Source;
* Implements the streams as resource for Smarty template * Implements the streams as resource for Smarty template
* *
* @link https://php.net/streams * @link https://php.net/streams
* @package Smarty
* @subpackage TemplateResources
*/ */
class StreamPlugin extends RecompiledPlugin { class StreamPlugin extends RecompiledPlugin {

View File

@@ -7,8 +7,8 @@ use Smarty\Smarty;
/** /**
* Smarty Internal Plugin Resource Eval * Smarty Internal Plugin Resource Eval
* *
* @package Smarty
* @subpackage TemplateResources
* @author Uwe Tews * @author Uwe Tews
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -18,8 +18,8 @@ use Smarty\Smarty;
* Implements the strings as resource for Smarty template * Implements the strings as resource for Smarty template
* {@internal unlike string-resources the compiled state of eval-resources is NOT saved for subsequent access}} * {@internal unlike string-resources the compiled state of eval-resources is NOT saved for subsequent access}}
* *
* @package Smarty
* @subpackage TemplateResources
*/ */
class StringEval extends RecompiledPlugin class StringEval extends RecompiledPlugin
{ {

View File

@@ -2,8 +2,8 @@
/** /**
* Smarty Internal Plugin Resource String * Smarty Internal Plugin Resource String
* *
* @package Smarty
* @subpackage TemplateResources
* @author Uwe Tews * @author Uwe Tews
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -18,8 +18,8 @@ use Smarty\Template\Source;
* Implements the strings as resource for Smarty template * Implements the strings as resource for Smarty template
* {@internal unlike eval-resources the compiled state of string-resources is saved for subsequent access}} * {@internal unlike eval-resources the compiled state of string-resources is saved for subsequent access}}
* *
* @package Smarty
* @subpackage TemplateResources
*/ */
class StringPlugin extends BasePlugin { class StringPlugin extends BasePlugin {

View File

@@ -2,8 +2,8 @@
/** /**
* Smarty Resource Plugin * Smarty Resource Plugin
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
*/ */
@@ -17,8 +17,8 @@ use Smarty\Template\Compiled;
* Smarty Resource Plugin * Smarty Resource Plugin
* Base implementation for resource plugins that don't use the compiler * Base implementation for resource plugins that don't use the compiler
* *
* @package Smarty
* @subpackage TemplateResources
*/ */
abstract class UncompiledPlugin extends BasePlugin { abstract class UncompiledPlugin extends BasePlugin {

View File

@@ -5,8 +5,8 @@ namespace Smarty\Runtime;
/** /**
* Smarty {block} tag class * Smarty {block} tag class
* *
* @package Smarty
* @subpackage PluginsInternal
* @author Uwe Tews * @author Uwe Tews
*/ */
class Block class Block

View File

@@ -6,8 +6,8 @@ use Smarty\Template;
/** /**
* Runtime Extension Capture * Runtime Extension Capture
* *
* @package Smarty
* @subpackage PluginsInternal
* @author Uwe Tews * @author Uwe Tews
*/ */
class CaptureRuntime { class CaptureRuntime {

View File

@@ -6,8 +6,8 @@ use Smarty\Template;
/** /**
* Foreach Runtime Methods count(), init(), restore() * Foreach Runtime Methods count(), init(), restore()
* *
* @package Smarty
* @subpackage PluginsInternal
* @author Uwe Tews * @author Uwe Tews
*/ */
class ForeachRuntime { class ForeachRuntime {

View File

@@ -8,8 +8,8 @@ use Smarty\Exception;
/** /**
* Inheritance Runtime Methods processBlock, endChild, init * Inheritance Runtime Methods processBlock, endChild, init
* *
* @package Smarty
* @subpackage PluginsInternal
* @author Uwe Tews * @author Uwe Tews
**/ **/
class InheritanceRuntime { class InheritanceRuntime {

View File

@@ -6,8 +6,8 @@ use Smarty\Template;
/** /**
* {make_nocache} Runtime Methods save(), store() * {make_nocache} Runtime Methods save(), store()
* *
* @package Smarty
* @subpackage PluginsInternal
* @author Uwe Tews * @author Uwe Tews
*/ */
class MakeNocacheRuntime { class MakeNocacheRuntime {

View File

@@ -7,8 +7,8 @@ use Smarty\TemplateBase;
/** /**
* TplFunction Runtime Methods callTemplateFunction * TplFunction Runtime Methods callTemplateFunction
* *
* @package Smarty
* @subpackage PluginsInternal
* @author Uwe Tews * @author Uwe Tews
**/ **/
class TplFunctionRuntime { class TplFunctionRuntime {

View File

@@ -2,8 +2,8 @@
/** /**
* Smarty plugin * Smarty plugin
* *
* @package Smarty
* @subpackage Security
* @author Uwe Tews * @author Uwe Tews
*/ */

View File

@@ -38,13 +38,10 @@ use Smarty\Smarty\Runtime\TplFunctionRuntime;
* smarty-discussion-subscribe@googlegroups.com * smarty-discussion-subscribe@googlegroups.com
* *
* @link https://www.smarty.net/ * @link https://www.smarty.net/
* @copyright 2018 New Digital Group, Inc.
* @copyright 2018 Uwe Tews
* @author Monte Ohrt <monte at ohrt dot com> * @author Monte Ohrt <monte at ohrt dot com>
* @author Uwe Tews <uwe dot tews at gmail dot com> * @author Uwe Tews <uwe dot tews at gmail dot com>
* @author Rodney Rehm * @author Rodney Rehm
* @author Simon Wisselink * @author Simon Wisselink
* @package Smarty
*/ */
/** /**
@@ -1372,7 +1369,7 @@ class Smarty extends \Smarty\TemplateBase
/** /**
* Indicates if Smarty will mute errors for "undefined index", "undefined array key" and "trying to read property of null". * Indicates if Smarty will mute errors for "undefined index", "undefined array key" and "trying to read property of null".
* @bool * @return bool
*/ */
public function isMutingUndefinedOrNullWarnings(): bool { public function isMutingUndefinedOrNullWarnings(): bool {
return $this->isMutingUndefinedOrNullWarnings; return $this->isMutingUndefinedOrNullWarnings;

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Template * Smarty Internal Plugin Template
* This file contains the Smarty template engine * This file contains the Smarty template engine
* *
* @package Smarty
* @subpackage Template
* @author Uwe Tews * @author Uwe Tews
*/ */

View File

@@ -10,8 +10,8 @@ use Smarty\Template\Source;
* Smarty Resource Data Object * Smarty Resource Data Object
* Cache Data Container for Template Files * Cache Data Container for Template Files
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
*/ */
class Cached extends ResourceBase { class Cached extends ResourceBase {

View File

@@ -8,8 +8,8 @@ use Smarty\Template;
* Smarty Resource Data Object * Smarty Resource Data Object
* Meta Data Container for Template Files * Meta Data Container for Template Files
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
* @property string $content compiled content * @property string $content compiled content
*/ */

View File

@@ -7,8 +7,8 @@ use Smarty\Template;
/** /**
* Smarty Template Resource Base Object * Smarty Template Resource Base Object
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
*/ */
abstract class ResourceBase { abstract class ResourceBase {

View File

@@ -10,8 +10,8 @@ use Smarty\Exception;
* Smarty Resource Data Object * Smarty Resource Data Object
* Meta Data Container for Template Files * Meta Data Container for Template Files
* *
* @package Smarty
* @subpackage TemplateResources
* @author Rodney Rehm * @author Rodney Rehm
*/ */
class Source { class Source {

View File

@@ -3,8 +3,8 @@
* Smarty Internal Plugin Smarty Template Base * Smarty Internal Plugin Smarty Template Base
* This file contains the basic shared methods for template handling * This file contains the basic shared methods for template handling
* *
* @package Smarty
* @subpackage Template
* @author Uwe Tews * @author Uwe Tews
*/ */

View File

@@ -6,16 +6,16 @@ namespace Smarty;
* Smarty Internal TestInstall * Smarty Internal TestInstall
* Test Smarty installation * Test Smarty installation
* *
* @package Smarty
* @subpackage Utilities
* @author Uwe Tews * @author Uwe Tews
*/ */
/** /**
* TestInstall class * TestInstall class
* *
* @package Smarty
* @subpackage Utilities
*/ */
class TestInstall class TestInstall
{ {

View File

@@ -6,8 +6,8 @@ namespace Smarty;
* class for undefined variable object * class for undefined variable object
* This class defines an object for undefined variable handling * This class defines an object for undefined variable handling
* *
* @package Smarty
* @subpackage Template
*/ */
class UndefinedVariable extends Variable { class UndefinedVariable extends Variable {

View File

@@ -6,8 +6,8 @@ namespace Smarty;
* class for the Smarty variable object * class for the Smarty variable object
* This class defines the Smarty variable object * This class defines the Smarty variable object
* *
* @package Smarty
* @subpackage Template
*/ */
#[\AllowDynamicProperties] #[\AllowDynamicProperties]
class Variable class Variable