mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 01:44:26 +02:00
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:
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Example Application
|
||||
*
|
||||
* @package Example-application
|
||||
|
||||
*/
|
||||
|
||||
$smarty = new \Smarty\Smarty;
|
||||
|
@@ -63,7 +63,7 @@ to invoke your custom CacheResource implementation.
|
||||
* INDEX(`modified`)
|
||||
* ) ENGINE = InnoDB;</pre>
|
||||
*
|
||||
* @package CacheResource-examples
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
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.
|
||||
* To avoid complications all cache-keys are translated to a sha1 hash.
|
||||
*
|
||||
* @package CacheResource-examples
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
class My_CacheResource_Memcache extends \Smarty\Cacheresource\KeyValueStore {
|
||||
|
@@ -48,7 +48,7 @@ example.
|
||||
* Demo data:
|
||||
* <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
|
||||
*/
|
||||
class My_Resource_Mysql extends \Smarty\Resource\CustomPlugin {
|
||||
|
@@ -34,7 +34,7 @@ on the functions you are supposed to provide.
|
||||
* Demo data:
|
||||
* <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
|
||||
*/
|
||||
class My_Resource_Mysql extends \Smarty\Resource\Custom {
|
||||
|
@@ -44,7 +44,7 @@ on the functions you are supposed to provide.
|
||||
* Demo data:
|
||||
* <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
|
||||
*/
|
||||
class My_Resource_Mysql extends \Smarty\Resource\Custom {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
bootstrap="tests/Bootstrap.php"
|
||||
colors="true"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="true"
|
||||
backupStaticAttributes="false"
|
||||
forceCoversAnnotation="false"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
|
@@ -9,15 +9,15 @@ use Smarty\Template\Cached;
|
||||
/**
|
||||
* Smarty Internal Plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Cacher
|
||||
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Cache Handler API
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Cacher
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
abstract class Base
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty\Cacheresource;
|
||||
/**
|
||||
* Smarty Internal Plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Cacher
|
||||
|
||||
|
||||
*/
|
||||
|
||||
use Smarty\Smarty;
|
||||
@@ -16,8 +16,8 @@ use Smarty\Template\Cached;
|
||||
/**
|
||||
* Cache Handler API
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Cacher
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
abstract class Custom extends Base
|
||||
|
@@ -11,8 +11,8 @@ use Smarty\Template\Cached;
|
||||
/**
|
||||
* Smarty Internal Plugin CacheResource File
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Cacher
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
* @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
|
||||
* Implements the file system as resource for the HTML cache Version ussing nocache inserts.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Cacher
|
||||
|
||||
|
||||
*/
|
||||
class File extends Base
|
||||
{
|
||||
|
@@ -9,8 +9,8 @@ use Smarty\Template\Cached;
|
||||
/**
|
||||
* 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«
|
||||
* consider using »a|b|c|$page-$items-$whatever« instead.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Cacher
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
abstract class KeyValueStore extends Base
|
||||
|
@@ -8,8 +8,8 @@ namespace Smarty\Compile;
|
||||
/**
|
||||
* This class does extend all internal compile plugins
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
abstract class Base implements CompilerInterface {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Block Plugin
|
||||
* Compiles code for the execution of block plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -17,8 +17,8 @@ use Smarty\Exception;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Block Plugin Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class BlockCompiler extends Base {
|
||||
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty\Compile;
|
||||
/**
|
||||
* This class does extend all internal compile plugins
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
interface CompilerInterface {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Registered Function
|
||||
* Compiles code for the execution of a registered function
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compiler\Template;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Registered Function Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class FunctionCallCompiler extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Modifier
|
||||
* Compiles code for modifier execution
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Modifier Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ModifierCompiler extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Object Block Function
|
||||
* Compiles code for registered objects as block function
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Smarty\Compile;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Object Block Function Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ObjectMethodBlockCompiler extends BlockCompiler {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Object Function
|
||||
* Compiles code for registered objects as function
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Smarty\Compile;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Object Function Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ObjectMethodCallCompiler extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Print Expression
|
||||
* Compiles any tag which will output an expression or variable
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -16,8 +16,8 @@ use Smarty\Compiler\BaseCompiler;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Print Expression Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class PrintExpressionCompiler extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Special Smarty Variable
|
||||
* Compiles the special $smarty variables
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -20,8 +20,8 @@ use Smarty\CompilerException;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile special Smarty Variable Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class SpecialVariableCompiler extends Base {
|
||||
|
||||
|
@@ -6,16 +6,16 @@ namespace Smarty\Compile\Tag;
|
||||
* Smarty Internal Plugin Compile Append
|
||||
* Compiles the {append} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Append Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Append extends Assign
|
||||
{
|
||||
|
@@ -9,16 +9,16 @@ use Smarty\Smarty;
|
||||
* Smarty Internal Plugin Compile Assign
|
||||
* Compiles the {assign} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Assign Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Assign extends Base
|
||||
{
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Break
|
||||
* Compiles the {break} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Break Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class BreakTag extends Base {
|
||||
|
||||
|
@@ -3,8 +3,6 @@
|
||||
* Smarty Internal Plugin Compile Function_Call
|
||||
* Compiles the calls of user defined tags defined by {function}
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -14,9 +12,6 @@ use Smarty\Compile\Base;
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Function_Call Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
*/
|
||||
class Call extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Capture Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Capture extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Capture
|
||||
* Compiles the {capture} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Captureclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class CaptureClose extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Config Load
|
||||
* Compiles the {config load} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -16,8 +16,8 @@ use Smarty\Smarty;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Config Load Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ConfigLoad extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Continue
|
||||
* Compiles the {continue} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Smarty\Compile\Tag;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Continue Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ContinueTag extends BreakTag {
|
||||
|
||||
|
@@ -4,8 +4,8 @@
|
||||
* Compiles the {debug} tag.
|
||||
* It opens a window the the Smarty Debugging Console.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -16,8 +16,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Debug Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Debug extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile ElseIf Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ElseIfTag extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Else Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ElseTag extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Eval
|
||||
* Compiles the {eval} tag.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Eval Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class EvalTag extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile extend
|
||||
* Compiles the {extends} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Smarty\Compile\Tag;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile extend Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ExtendsTag extends Inheritance {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile For
|
||||
* Compiles the {for} {forelse} {/for} tags
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Forclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ForClose extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Forelse Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ForElse extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile For Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ForTag extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Foreach
|
||||
* Compiles the {foreach} {foreachelse} {/foreach} tags
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Foreachclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ForeachClose extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Foreachelse Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ForeachElse extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile ForeachSection
|
||||
* Shared methods for {foreach} {section} tags
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile ForeachSection Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
abstract class ForeachSection extends Base {
|
||||
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty\Compile\Tag;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Foreach Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class ForeachTag extends ForeachSection {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Function
|
||||
* Compiles the {function} {/function} tags
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Functionclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class FunctionClose extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Function Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class FunctionTag extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile If
|
||||
* Compiles the {if} {else} {elseif} {/if} tags
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Ifclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class IfClose extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile If Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class IfTag extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Include
|
||||
* Compiles the {include} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -18,8 +18,8 @@ use Smarty\Template\Compiled;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Include Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class IncludeTag extends Base {
|
||||
|
||||
|
@@ -8,16 +8,16 @@ use Smarty\Compile\Base;
|
||||
* Smarty Internal Plugin Compile Shared Inheritance
|
||||
* Shared methods for {extends} and {block} tags
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Shared Inheritance Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
abstract class Inheritance extends Base
|
||||
{
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Ldelim
|
||||
* Compiles the {ldelim} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Ldelim Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Ldelim extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Make_Nocache
|
||||
* Compiles the {make_nocache} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Make_Nocache Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class MakeNocache extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Nocache Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Nocache extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Nocache
|
||||
* Compiles the {nocache} {/nocache} tags.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Nocacheclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class NocacheClose extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Rdelim
|
||||
* Compiles the {rdelim} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Smarty\Compile\Tag;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Rdelim Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Rdelim extends Ldelim {
|
||||
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty\Compile\Tag;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Section Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Section extends ForeachSection {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Section
|
||||
* Compiles the {section} {sectionelse} {/section} tags
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Sectionclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class SectionClose extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Sectionelse Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class SectionElse extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Setfilter Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Setfilter extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile Setfilter
|
||||
* Compiles code for setfilter tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Setfilterclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class SetfilterClose extends Base {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Compile While
|
||||
* Compiles the {while} tag
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Whileclose Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class WhileClose extends Base {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Compile\Base;
|
||||
/**
|
||||
* Smarty Internal Plugin Compile While Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class WhileTag extends Base {
|
||||
|
||||
|
@@ -4,8 +4,8 @@
|
||||
* This is the config file compiler class. It calls the lexer and parser to
|
||||
* perform the compiling.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Config
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -19,8 +19,8 @@ use Smarty\CompilerException;
|
||||
/**
|
||||
* Main config file compiler class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Config
|
||||
|
||||
|
||||
*/
|
||||
class Configfile extends BaseCompiler {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Smarty Template Compiler Base
|
||||
* This file contains the basic classes and methods for compiling Smarty templates with lexer/parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -31,8 +31,8 @@ use function substr;
|
||||
/**
|
||||
* Class SmartyTemplateCompiler
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
*/
|
||||
class Template extends BaseCompiler {
|
||||
|
||||
|
@@ -5,7 +5,7 @@ namespace Smarty;
|
||||
/**
|
||||
* Smarty compiler exception class
|
||||
*
|
||||
* @package Smarty
|
||||
|
||||
*/
|
||||
class CompilerException extends Exception {
|
||||
|
||||
|
@@ -6,8 +6,8 @@ namespace Smarty;
|
||||
* Smarty Internal Plugin Data
|
||||
* This file contains the basic classes and methods for template and variable creation
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Template
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Plugin Data
|
||||
* This file contains the data object
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Template
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
@@ -16,8 +16,8 @@ use Smarty\Exception;
|
||||
* class for the Smarty data object
|
||||
* The Smarty data object will hold Smarty variables in the current scope
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Template
|
||||
|
||||
|
||||
*/
|
||||
class DataObject extends Data {
|
||||
|
||||
|
@@ -6,16 +6,16 @@ namespace Smarty;
|
||||
* Smarty Internal Plugin Debug
|
||||
* Class to collect data for the Smarty Debugging Console
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Debug
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Debug Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Debug
|
||||
|
||||
|
||||
*/
|
||||
class Debug extends Data
|
||||
{
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty;
|
||||
/**
|
||||
* Smarty error handler to fix new error levels in PHP8 for backwards compatibility
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage PluginsInternal
|
||||
|
||||
|
||||
* @author Simon Wisselink
|
||||
*
|
||||
*/
|
||||
|
@@ -3,32 +3,58 @@
|
||||
namespace Smarty\Extension;
|
||||
|
||||
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 {
|
||||
switch ($modifier) {
|
||||
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;
|
||||
return $this->modifiers[$modifier] ?? null;
|
||||
}
|
||||
|
||||
public function getModifierCallback(string $modifierName) {
|
||||
@@ -50,28 +76,11 @@ class DefaultExtension extends Base {
|
||||
}
|
||||
|
||||
public function getFunctionHandler(string $functionName): ?\Smarty\FunctionHandler\FunctionHandlerInterface {
|
||||
switch ($functionName) {
|
||||
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;
|
||||
return $this->functionHandlers[$functionName] ?? null;
|
||||
}
|
||||
|
||||
public function getBlockHandler(string $blockTagName): ?\Smarty\BlockHandler\BlockHandlerInterface {
|
||||
switch ($blockTagName) {
|
||||
case 'textformat': return new \Smarty\BlockHandler\TextFormat();
|
||||
}
|
||||
return null;
|
||||
return $this->blockHandlers[$blockTagName] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -20,13 +20,14 @@ use Smarty\Template;
|
||||
*/
|
||||
class Counter extends Base {
|
||||
|
||||
private $counters = [];
|
||||
|
||||
public function handle($params, Template $template) {
|
||||
static $counters = [];
|
||||
$name = (isset($params['name'])) ? $params['name'] : 'default';
|
||||
if (!isset($counters[$name])) {
|
||||
$counters[$name] = ['start' => 1, 'skip' => 1, 'direction' => 'up', 'count' => 1];
|
||||
if (!isset($this->counters[$name])) {
|
||||
$this->counters[$name] = ['start' => 1, 'skip' => 1, 'direction' => 'up', 'count' => 1];
|
||||
}
|
||||
$counter =& $counters[$name];
|
||||
$counter =& $this->counters[$name];
|
||||
if (isset($params['start'])) {
|
||||
$counter['start'] = $counter['count'] = (int)$params['start'];
|
||||
}
|
||||
|
@@ -6,15 +6,15 @@ namespace Smarty\ParseTree;
|
||||
* Smarty Internal Plugin Templateparser ParseTree
|
||||
* These are classes to build parsetree in the template parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Thue Kristensen
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
abstract class Base
|
||||
|
@@ -6,8 +6,8 @@ namespace Smarty\ParseTree;
|
||||
* Smarty Internal Plugin Templateparser Parse Tree
|
||||
* These are classes to build parse trees in the template parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Thue Kristensen
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
@@ -15,8 +15,8 @@ namespace Smarty\ParseTree;
|
||||
/**
|
||||
* Code fragment inside a tag .
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
class Code extends Base
|
||||
|
@@ -4,16 +4,16 @@ namespace Smarty\ParseTree;
|
||||
/**
|
||||
* Double-quoted string inside a tag.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
/**
|
||||
* Double quoted string inside a tag.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
class Dq extends Base
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty\ParseTree;
|
||||
* Smarty Internal Plugin Templateparser Parse Tree
|
||||
* These are classes to build parse tree in the template parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Thue Kristensen
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
@@ -14,8 +14,8 @@ namespace Smarty\ParseTree;
|
||||
/**
|
||||
* Raw chars as part of a double-quoted string.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
class DqContent extends Base
|
||||
|
@@ -6,8 +6,8 @@ namespace Smarty\ParseTree;
|
||||
* Smarty Internal Plugin Templateparser Parse Tree
|
||||
* These are classes to build parse tree in the template parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Thue Kristensen
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
@@ -15,8 +15,8 @@ namespace Smarty\ParseTree;
|
||||
/**
|
||||
* A complete smarty tag.
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
class Tag extends Base
|
||||
|
@@ -6,8 +6,8 @@ namespace Smarty\ParseTree;
|
||||
* Smarty Internal Plugin Templateparser Parse Tree
|
||||
* These are classes to build parse tree in the template parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Thue Kristensen
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
@@ -15,8 +15,8 @@ namespace Smarty\ParseTree;
|
||||
/**
|
||||
* Template element
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
class Template extends Base
|
||||
|
@@ -6,14 +6,14 @@ namespace Smarty\ParseTree;
|
||||
* Smarty Internal Plugin Templateparser Parse Tree
|
||||
* These are classes to build parse tree in the template parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @author Thue Kristensen
|
||||
* @author Uwe Tews
|
||||
* *
|
||||
* template text
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
|
||||
|
||||
* @ignore
|
||||
*/
|
||||
class Text extends Base
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Smarty;
|
||||
/**
|
||||
* Smarty Resource Plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
|
||||
@@ -16,8 +16,8 @@ use Smarty\Smarty;
|
||||
* Smarty Resource Plugin
|
||||
* Base implementation for resource plugins
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*
|
||||
* @method renderUncompiled(\Smarty\Template\Source $source, \Smarty\Template $_template)
|
||||
* @method populateCompiledFilepath(\Smarty\Template\Compiled $compiled, \Smarty\Template $_template)
|
||||
|
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* Smarty Resource Plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
|
||||
@@ -17,8 +17,8 @@ use Smarty\Exception;
|
||||
* Smarty Resource Plugin
|
||||
* Wrapper Implementation for custom resource plugins
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*/
|
||||
abstract class CustomPlugin extends BasePlugin {
|
||||
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty\Resource;
|
||||
/**
|
||||
* Smarty Internal Plugin Resource Extends
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
@@ -15,8 +15,8 @@ namespace Smarty\Resource;
|
||||
* Smarty Internal Plugin Resource Extends
|
||||
* 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
|
||||
{
|
||||
|
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* Smarty Internal Plugin Resource File
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
@@ -18,8 +18,8 @@ use Smarty\Exception;
|
||||
* Smarty Internal Plugin Resource File
|
||||
* Implements the file system as resource for Smarty templates
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*/
|
||||
class FilePlugin extends BasePlugin {
|
||||
|
||||
|
@@ -11,8 +11,8 @@ use Smarty\Exception;
|
||||
* Smarty Internal Plugin Resource PHP
|
||||
* Implements the file system as resource for PHP templates
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
|
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* Smarty Resource Plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
|
||||
@@ -17,8 +17,8 @@ use Smarty\Template\Compiled;
|
||||
* Smarty Resource Plugin
|
||||
* Base implementation for resource plugins that don't compile cache
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*/
|
||||
abstract class RecompiledPlugin extends BasePlugin {
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Resource Stream
|
||||
* Implements the streams as resource for Smarty template
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
@@ -20,8 +20,8 @@ use Smarty\Template\Source;
|
||||
* Implements the streams as resource for Smarty template
|
||||
*
|
||||
* @link https://php.net/streams
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*/
|
||||
class StreamPlugin extends RecompiledPlugin {
|
||||
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Smarty;
|
||||
/**
|
||||
* Smarty Internal Plugin Resource Eval
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
@@ -18,8 +18,8 @@ use Smarty\Smarty;
|
||||
* Implements the strings as resource for Smarty template
|
||||
* {@internal unlike string-resources the compiled state of eval-resources is NOT saved for subsequent access}}
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*/
|
||||
class StringEval extends RecompiledPlugin
|
||||
{
|
||||
|
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* Smarty Internal Plugin Resource String
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
@@ -18,8 +18,8 @@ use Smarty\Template\Source;
|
||||
* Implements the strings as resource for Smarty template
|
||||
* {@internal unlike eval-resources the compiled state of string-resources is saved for subsequent access}}
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*/
|
||||
class StringPlugin extends BasePlugin {
|
||||
|
||||
|
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* Smarty Resource Plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
|
||||
@@ -17,8 +17,8 @@ use Smarty\Template\Compiled;
|
||||
* Smarty Resource Plugin
|
||||
* Base implementation for resource plugins that don't use the compiler
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
*/
|
||||
abstract class UncompiledPlugin extends BasePlugin {
|
||||
|
||||
|
@@ -5,8 +5,8 @@ namespace Smarty\Runtime;
|
||||
/**
|
||||
* Smarty {block} tag class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage PluginsInternal
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
class Block
|
||||
|
@@ -6,8 +6,8 @@ use Smarty\Template;
|
||||
/**
|
||||
* Runtime Extension Capture
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage PluginsInternal
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
class CaptureRuntime {
|
||||
|
@@ -6,8 +6,8 @@ use Smarty\Template;
|
||||
/**
|
||||
* Foreach Runtime Methods count(), init(), restore()
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage PluginsInternal
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
class ForeachRuntime {
|
||||
|
@@ -8,8 +8,8 @@ use Smarty\Exception;
|
||||
/**
|
||||
* Inheritance Runtime Methods processBlock, endChild, init
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage PluginsInternal
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
**/
|
||||
class InheritanceRuntime {
|
||||
|
@@ -6,8 +6,8 @@ use Smarty\Template;
|
||||
/**
|
||||
* {make_nocache} Runtime Methods save(), store()
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage PluginsInternal
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
class MakeNocacheRuntime {
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\TemplateBase;
|
||||
/**
|
||||
* TplFunction Runtime Methods callTemplateFunction
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage PluginsInternal
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
**/
|
||||
class TplFunctionRuntime {
|
||||
|
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* Smarty plugin
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Security
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
|
@@ -38,13 +38,10 @@ use Smarty\Smarty\Runtime\TplFunctionRuntime;
|
||||
* smarty-discussion-subscribe@googlegroups.com
|
||||
*
|
||||
* @link https://www.smarty.net/
|
||||
* @copyright 2018 New Digital Group, Inc.
|
||||
* @copyright 2018 Uwe Tews
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @author Uwe Tews <uwe dot tews at gmail dot com>
|
||||
* @author Rodney Rehm
|
||||
* @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".
|
||||
* @bool
|
||||
* @return bool
|
||||
*/
|
||||
public function isMutingUndefinedOrNullWarnings(): bool {
|
||||
return $this->isMutingUndefinedOrNullWarnings;
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Template
|
||||
* This file contains the Smarty template engine
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Template
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
|
@@ -10,8 +10,8 @@ use Smarty\Template\Source;
|
||||
* Smarty Resource Data Object
|
||||
* Cache Data Container for Template Files
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
class Cached extends ResourceBase {
|
||||
|
@@ -8,8 +8,8 @@ use Smarty\Template;
|
||||
* Smarty Resource Data Object
|
||||
* Meta Data Container for Template Files
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
* @property string $content compiled content
|
||||
*/
|
||||
|
@@ -7,8 +7,8 @@ use Smarty\Template;
|
||||
/**
|
||||
* Smarty Template Resource Base Object
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
abstract class ResourceBase {
|
||||
|
@@ -10,8 +10,8 @@ use Smarty\Exception;
|
||||
* Smarty Resource Data Object
|
||||
* Meta Data Container for Template Files
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
|
||||
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
class Source {
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* Smarty Internal Plugin Smarty Template Base
|
||||
* This file contains the basic shared methods for template handling
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Template
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
|
@@ -6,16 +6,16 @@ namespace Smarty;
|
||||
* Smarty Internal TestInstall
|
||||
* Test Smarty installation
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Utilities
|
||||
|
||||
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* TestInstall class
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Utilities
|
||||
|
||||
|
||||
*/
|
||||
class TestInstall
|
||||
{
|
||||
|
@@ -6,8 +6,8 @@ namespace Smarty;
|
||||
* class for undefined variable object
|
||||
* This class defines an object for undefined variable handling
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Template
|
||||
|
||||
|
||||
*/
|
||||
class UndefinedVariable extends Variable {
|
||||
|
||||
|
@@ -6,8 +6,8 @@ namespace Smarty;
|
||||
* class for the Smarty variable object
|
||||
* This class defines the Smarty variable object
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Template
|
||||
|
||||
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Variable
|
||||
|
Reference in New Issue
Block a user