Version Description
- Fixed included Twig version. In the plugin version 1.21.0 of Timber, Twig version 2.15.3 was accidentally included instead of Twig version 1.44.7.
- Removed official support for PHP 8.1 in the plugin version. If you need to support PHP 8.1 in the future, please install Timber through Composer instead of installing Timber as a plugin. This will the only supported way of installing Timber when Timber version 2 will be released.
- Updated minimum required WordPress version to 5.3.
Download this release
Release Info
Developer | jarednova |
Plugin | Timber |
Version | 1.22.0 |
Comparing to | |
See all releases |
Code changes from version 1.21.0 to 1.22.0
- lib/Timber.php +1 -1
- readme.txt +9 -3
- timber.php +2 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +9 -27
- vendor/composer/autoload_classmap.php +0 -526
- vendor/composer/autoload_files.php +0 -2
- vendor/composer/autoload_psr4.php +0 -2
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +6 -544
- vendor/composer/installed.json +11 -178
- vendor/composer/installed.php +9 -27
- vendor/symfony/polyfill-mbstring/LICENSE +0 -19
- vendor/symfony/polyfill-mbstring/Mbstring.php +0 -873
- vendor/symfony/polyfill-mbstring/README.md +0 -13
- vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +0 -1397
- vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +0 -5
- vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +0 -1489
- vendor/symfony/polyfill-mbstring/bootstrap.php +0 -147
- vendor/symfony/polyfill-mbstring/bootstrap80.php +0 -143
- vendor/symfony/polyfill-mbstring/composer.json +0 -41
- vendor/symfony/polyfill-php72/LICENSE +0 -19
- vendor/symfony/polyfill-php72/Php72.php +0 -217
- vendor/symfony/polyfill-php72/README.md +0 -35
- vendor/symfony/polyfill-php72/bootstrap.php +0 -57
- vendor/symfony/polyfill-php72/composer.json +0 -35
- vendor/twig/twig/.gitattributes +2 -3
- vendor/twig/twig/.github/workflows/ci.yml +19 -67
- vendor/twig/twig/.github/workflows/documentation.yml +22 -26
- vendor/twig/twig/.gitignore +2 -2
- vendor/twig/twig/CHANGELOG +996 -208
- vendor/twig/twig/LICENSE +1 -1
- vendor/twig/twig/README.rst +5 -1
- vendor/twig/twig/composer.json +5 -7
- vendor/twig/twig/lib/Twig/Autoloader.php +52 -0
- vendor/twig/twig/lib/Twig/BaseNodeVisitor.php +1 -4
- vendor/twig/twig/lib/Twig/Cache/Filesystem.php +1 -4
- vendor/twig/twig/lib/Twig/Cache/Null.php +1 -4
- vendor/twig/twig/lib/Twig/CacheInterface.php +1 -4
- vendor/twig/twig/lib/Twig/Compiler.php +1 -4
- vendor/twig/twig/lib/Twig/CompilerInterface.php +34 -0
- vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php +1 -4
- vendor/twig/twig/lib/Twig/Environment.php +1 -4
- vendor/twig/twig/lib/Twig/Error.php +1 -4
- vendor/twig/twig/lib/Twig/Error/Loader.php +1 -4
- vendor/twig/twig/lib/Twig/Error/Runtime.php +1 -4
- vendor/twig/twig/lib/Twig/Error/Syntax.php +1 -4
- vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php +1 -4
- vendor/twig/twig/lib/Twig/ExpressionParser.php +1 -4
- vendor/twig/twig/lib/Twig/Extension.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/Core.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/Debug.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/Escaper.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/Optimizer.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/Profiler.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/Sandbox.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/Staging.php +1 -4
- vendor/twig/twig/lib/Twig/Extension/StringLoader.php +1 -4
- vendor/twig/twig/lib/Twig/ExtensionInterface.php +1 -4
- vendor/twig/twig/lib/Twig/ExtensionSet.php +0 -14
- vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php +1 -4
- vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php +1 -4
- vendor/twig/twig/lib/Twig/Filter.php +78 -6
- vendor/twig/twig/lib/Twig/Filter/Function.php +40 -0
- vendor/twig/twig/lib/Twig/Filter/Method.php +44 -0
- vendor/twig/twig/lib/Twig/Filter/Node.php +42 -0
- vendor/twig/twig/lib/Twig/FilterCallableInterface.php +24 -0
- vendor/twig/twig/lib/Twig/FilterInterface.php +45 -0
- vendor/twig/twig/lib/Twig/Function.php +68 -6
- vendor/twig/twig/lib/Twig/Function/Function.php +41 -0
- vendor/twig/twig/lib/Twig/Function/Method.php +45 -0
- vendor/twig/twig/lib/Twig/Function/Node.php +42 -0
- vendor/twig/twig/lib/Twig/FunctionCallableInterface.php +24 -0
- vendor/twig/twig/lib/Twig/FunctionInterface.php +42 -0
- vendor/twig/twig/lib/Twig/Lexer.php +1 -4
- vendor/twig/twig/lib/Twig/LexerInterface.php +36 -0
- vendor/twig/twig/lib/Twig/Loader/Array.php +1 -4
- vendor/twig/twig/lib/Twig/Loader/Chain.php +1 -4
- vendor/twig/twig/lib/Twig/Loader/Filesystem.php +1 -4
- vendor/twig/twig/lib/Twig/Loader/String.php +63 -0
- vendor/twig/twig/lib/Twig/LoaderInterface.php +1 -4
- vendor/twig/twig/lib/Twig/Markup.php +1 -4
- vendor/twig/twig/lib/Twig/Node.php +1 -4
- vendor/twig/twig/lib/Twig/Node/AutoEscape.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Block.php +1 -4
- vendor/twig/twig/lib/Twig/Node/BlockReference.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Body.php +1 -4
- vendor/twig/twig/lib/Twig/Node/CheckSecurity.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Deprecated.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Do.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Embed.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Array.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Call.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Constant.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php +35 -0
- vendor/twig/twig/lib/Twig/Node/Expression/Filter.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Function.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Name.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Parent.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/TempName.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Unary.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Flush.php +1 -4
- vendor/twig/twig/lib/Twig/Node/For.php +1 -4
- vendor/twig/twig/lib/Twig/Node/ForLoop.php +1 -4
- vendor/twig/twig/lib/Twig/Node/If.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Import.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Include.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Macro.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Module.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Print.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Sandbox.php +1 -4
- vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Set.php +1 -4
- vendor/twig/twig/lib/Twig/Node/SetTemp.php +11 -0
- vendor/twig/twig/lib/Twig/Node/Spaceless.php +1 -4
- vendor/twig/twig/lib/Twig/Node/Text.php +1 -4
- vendor/twig/twig/lib/Twig/Node/With.php +1 -4
- vendor/twig/twig/lib/Twig/NodeCaptureInterface.php +1 -4
- vendor/twig/twig/lib/Twig/NodeInterface.php +34 -0
- vendor/twig/twig/lib/Twig/NodeOutputInterface.php +1 -4
- vendor/twig/twig/lib/Twig/NodeTraverser.php +1 -4
- vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php +1 -4
- vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php +1 -4
- vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php +1 -4
- vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php +1 -4
- vendor/twig/twig/lib/Twig/NodeVisitorInterface.php +1 -4
- vendor/twig/twig/lib/Twig/Parser.php +1 -4
- vendor/twig/twig/lib/Twig/ParserInterface.php +33 -0
- vendor/twig/twig/lib/Twig/Profiler/Dumper/Base.php +1 -4
- vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php +1 -4
- vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php +1 -4
- vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php +1 -4
- vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php +1 -4
- vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php +1 -4
- vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php +1 -4
- vendor/twig/twig/lib/Twig/Profiler/Profile.php +1 -4
- vendor/twig/twig/lib/Twig/RuntimeLoaderInterface.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php +1 -4
- vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php +1 -4
- vendor/twig/twig/lib/Twig/SimpleFilter.php +3 -18
- vendor/twig/twig/lib/Twig/SimpleFunction.php +3 -18
- vendor/twig/twig/lib/Twig/SimpleTest.php +3 -18
- vendor/twig/twig/lib/Twig/Source.php +1 -4
- vendor/twig/twig/lib/Twig/SourceContextLoaderInterface.php +1 -4
- vendor/twig/twig/lib/Twig/Template.php +1 -4
- vendor/twig/twig/lib/Twig/TemplateInterface.php +50 -0
- vendor/twig/twig/lib/Twig/TemplateWrapper.php +1 -4
- vendor/twig/twig/lib/Twig/Test.php +29 -6
- vendor/twig/twig/lib/Twig/Test/Function.php +38 -0
- vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php +1 -4
- vendor/twig/twig/lib/Twig/Test/Method.php +47 -0
- vendor/twig/twig/lib/Twig/Test/Node.php +40 -0
- vendor/twig/twig/lib/Twig/Test/NodeTestCase.php +1 -4
- vendor/twig/twig/lib/Twig/TestCallableInterface.php +22 -0
- vendor/twig/twig/lib/Twig/TestInterface.php +27 -0
- vendor/twig/twig/lib/Twig/Token.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Block.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Do.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Embed.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Extends.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Filter.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Flush.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/For.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/From.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/If.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Import.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Include.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Macro.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Set.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/Use.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParser/With.php +1 -4
- vendor/twig/twig/lib/Twig/TokenParserBroker.php +122 -0
- vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php +46 -0
- vendor/twig/twig/lib/Twig/TokenParserInterface.php +1 -4
- vendor/twig/twig/lib/Twig/TokenStream.php +1 -4
- vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php +1 -4
- vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php +1 -4
- vendor/twig/twig/src/Cache/FilesystemCache.php +1 -1
- vendor/twig/twig/src/Cache/NullCache.php +3 -1
- vendor/twig/twig/src/Compiler.php +60 -17
- vendor/twig/twig/src/Environment.php +777 -133
- vendor/twig/twig/src/Error/Error.php +91 -23
- vendor/twig/twig/src/Error/SyntaxError.php +15 -6
- vendor/twig/twig/src/ExpressionParser.php +128 -108
- vendor/twig/twig/src/Extension/AbstractExtension.php +25 -0
- vendor/twig/twig/src/Extension/CoreExtension.php +662 -552
- vendor/twig/twig/src/Extension/DebugExtension.php +13 -3
- vendor/twig/twig/src/Extension/EscaperExtension.php +21 -329
- vendor/twig/twig/src/Extension/ExtensionInterface.php +28 -0
- vendor/twig/twig/src/Extension/GlobalsInterface.php +0 -6
- vendor/twig/twig/src/Extension/InitRuntimeInterface.php +0 -10
- vendor/twig/twig/src/Extension/OptimizerExtension.php +10 -2
- vendor/twig/twig/src/Extension/ProfilerExtension.php +5 -0
- vendor/twig/twig/src/Extension/SandboxExtension.php +18 -34
- vendor/twig/twig/src/Extension/StagingExtension.php +39 -24
- vendor/twig/twig/src/Extension/StringLoaderExtension.php +10 -2
- vendor/twig/twig/src/ExtensionSet.php +0 -475
- vendor/twig/twig/src/Lexer.php +86 -53
- vendor/twig/twig/src/Loader/ArrayLoader.php +20 -4
- vendor/twig/twig/src/Loader/ChainLoader.php +51 -7
- vendor/twig/twig/src/Loader/ExistsLoaderInterface.php +13 -3
- vendor/twig/twig/src/Loader/FilesystemLoader.php +30 -15
- vendor/twig/twig/src/Loader/LoaderInterface.php +6 -14
- vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php +19 -2
- vendor/twig/twig/src/Markup.php +4 -14
- vendor/twig/twig/src/Node/AutoEscapeNode.php +1 -1
- vendor/twig/twig/src/Node/BlockNode.php +1 -2
- vendor/twig/twig/src/Node/BlockReferenceNode.php +1 -1
- vendor/twig/twig/src/Node/CheckSecurityNode.php +4 -4
- vendor/twig/twig/src/Node/CheckToStringNode.php +2 -5
- vendor/twig/twig/src/Node/DeprecatedNode.php +1 -1
- vendor/twig/twig/src/Node/DoNode.php +1 -1
- vendor/twig/twig/src/Node/EmbedNode.php +3 -1
- vendor/twig/twig/src/Node/Expression/ArrayExpression.php +2 -2
- vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php +1 -1
- vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php +1 -2
- vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php +15 -0
- vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php +0 -22
- vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php +14 -4
- vendor/twig/twig/src/Node/Expression/CallExpression.php +61 -67
- vendor/twig/twig/src/Node/Expression/ConditionalExpression.php +1 -1
- vendor/twig/twig/src/Node/Expression/ConstantExpression.php +1 -1
- vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php +1 -1
- vendor/twig/twig/src/Node/Expression/FilterExpression.php +9 -4
- vendor/twig/twig/src/Node/Expression/FunctionExpression.php +13 -7
- vendor/twig/twig/src/Node/Expression/GetAttrExpression.php +36 -45
- vendor/twig/twig/src/Node/Expression/MethodCallExpression.php +7 -23
- vendor/twig/twig/src/Node/Expression/NameExpression.php +33 -13
- vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php +2 -2
- vendor/twig/twig/src/Node/Expression/ParentExpression.php +1 -1
- vendor/twig/twig/src/Node/Expression/TempNameExpression.php +1 -1
- vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php +2 -7
- vendor/twig/twig/src/Node/Expression/TestExpression.php +12 -5
- vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php +1 -2
- vendor/twig/twig/src/Node/Expression/VariadicExpression.php +0 -24
- vendor/twig/twig/src/Node/FlushNode.php +1 -1
- vendor/twig/twig/src/Node/ForLoopNode.php +1 -1
- vendor/twig/twig/src/Node/ForNode.php +2 -2
- vendor/twig/twig/src/Node/IfNode.php +1 -1
- vendor/twig/twig/src/Node/ImportNode.php +5 -13
- vendor/twig/twig/src/Node/IncludeNode.php +1 -1
- vendor/twig/twig/src/Node/MacroNode.php +33 -12
- vendor/twig/twig/src/Node/ModuleNode.php +44 -24
- vendor/twig/twig/src/Node/Node.php +84 -23
- vendor/twig/twig/src/Node/PrintNode.php +1 -1
- vendor/twig/twig/src/Node/SandboxNode.php +1 -1
- vendor/twig/twig/src/Node/SandboxedPrintNode.php +19 -4
- vendor/twig/twig/src/Node/SetNode.php +1 -1
- vendor/twig/twig/src/Node/SetTempNode.php +44 -0
- vendor/twig/twig/src/Node/SpacelessNode.php +2 -4
- vendor/twig/twig/src/Node/TextNode.php +1 -1
- vendor/twig/twig/src/Node/WithNode.php +2 -2
- vendor/twig/twig/src/NodeTraverser.php +17 -13
- vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php +11 -3
- vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php +15 -14
- vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php +0 -72
- vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php +4 -5
- vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php +66 -12
- vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php +11 -7
- vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php +9 -7
- vendor/twig/twig/src/Parser.php +111 -65
- vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php +1 -1
- vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php +5 -3
- vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php +3 -1
- vendor/twig/twig/src/Profiler/Dumper/TextDumper.php +3 -1
- vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php +3 -3
- vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php +1 -1
- vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php +18 -10
- vendor/twig/twig/src/Profiler/Profile.php +2 -7
- vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php +1 -1
- vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php +1 -12
- vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php +1 -12
- vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php +1 -12
- vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php +1 -12
- vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php +1 -12
- vendor/twig/twig/src/Sandbox/SecurityPolicy.php +9 -8
- vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php +1 -20
- vendor/twig/twig/src/Source.php +6 -4
- vendor/twig/twig/src/Template.php +312 -16
- vendor/twig/twig/src/TemplateWrapper.php +26 -10
- vendor/twig/twig/src/Test/IntegrationTestCase.php +22 -32
- vendor/twig/twig/src/Test/NodeTestCase.php +14 -2
- vendor/twig/twig/src/Token.php +6 -4
- vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php +36 -5
- vendor/twig/twig/src/TokenParser/BlockTokenParser.php +7 -5
- vendor/twig/twig/src/TokenParser/DoTokenParser.php +4 -2
- vendor/twig/twig/src/TokenParser/EmbedTokenParser.php +10 -8
- vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php +3 -1
- vendor/twig/twig/src/TokenParser/FilterTokenParser.php +7 -12
- vendor/twig/twig/src/TokenParser/FlushTokenParser.php +4 -2
- vendor/twig/twig/src/TokenParser/ForTokenParser.php +10 -11
- vendor/twig/twig/src/TokenParser/FromTokenParser.php +15 -8
- vendor/twig/twig/src/TokenParser/IfTokenParser.php +7 -5
- vendor/twig/twig/src/TokenParser/ImportTokenParser.php +7 -5
- vendor/twig/twig/src/TokenParser/IncludeTokenParser.php +5 -5
- vendor/twig/twig/src/TokenParser/MacroTokenParser.php +7 -5
- vendor/twig/twig/src/TokenParser/SandboxTokenParser.php +5 -3
- vendor/twig/twig/src/TokenParser/SetTokenParser.php +7 -5
- vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php +4 -7
- vendor/twig/twig/src/TokenParser/TokenParserInterface.php +1 -2
- vendor/twig/twig/src/TokenParser/UseTokenParser.php +7 -5
- vendor/twig/twig/src/TokenParser/WithTokenParser.php +7 -5
- vendor/twig/twig/src/TokenStream.php +80 -13
- vendor/twig/twig/src/TwigFilter.php +10 -32
- vendor/twig/twig/src/TwigFunction.php +9 -31
- vendor/twig/twig/src/TwigTest.php +18 -40
- vendor/twig/twig/src/Util/DeprecationCollector.php +20 -7
- vendor/twig/twig/src/Util/TemplateDirIterator.php +0 -8
lib/Timber.php
CHANGED
@@ -35,7 +35,7 @@ use Timber\Loader;
|
|
35 |
*/
|
36 |
class Timber {
|
37 |
|
38 |
-
public static $version = '1.
|
39 |
public static $locations;
|
40 |
public static $dirname = 'views';
|
41 |
public static $twig_cache = false;
|
35 |
*/
|
36 |
class Timber {
|
37 |
|
38 |
+
public static $version = '1.22.0';
|
39 |
public static $locations;
|
40 |
public static $dirname = 'views';
|
41 |
public static $twig_cache = false;
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Timber ===
|
2 |
Contributors: jarednova
|
3 |
Tags: template engine, templates, twig
|
4 |
-
|
5 |
-
|
6 |
-
Stable tag: 1.21.0
|
7 |
Requires PHP: 7.2.5
|
|
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -38,6 +38,12 @@ _Twig is the template language powering Timber; if you need a little background
|
|
38 |
|
39 |
**Fixes and improvements**
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
= 1.21.0 =
|
42 |
|
43 |
* Updated minimum required PHP version to 7.2 to make the included Twig version support PHP 8.0 and 8.1, by @gchtr in #2640.
|
1 |
=== Timber ===
|
2 |
Contributors: jarednova
|
3 |
Tags: template engine, templates, twig
|
4 |
+
Tested up to: 6.1
|
5 |
+
Stable tag: 1.22.0
|
|
|
6 |
Requires PHP: 7.2.5
|
7 |
+
Requires at least: 5.3.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
38 |
|
39 |
**Fixes and improvements**
|
40 |
|
41 |
+
= 1.22.0 =
|
42 |
+
|
43 |
+
* Fixed included Twig version. In the plugin version 1.21.0 of Timber, Twig version 2.15.3 was accidentally included instead of Twig version 1.44.7.
|
44 |
+
* Removed official support for PHP 8.1 in the plugin version. If you need to support PHP 8.1 in the future, please install [Timber through Composer](https://timber.github.io/docs/getting-started/setup/#via-github-for-developers) instead of installing Timber as a plugin. This will the only supported way of installing Timber when Timber version 2 will be released.
|
45 |
+
* Updated minimum required WordPress version to 5.3.
|
46 |
+
|
47 |
= 1.21.0 =
|
48 |
|
49 |
* Updated minimum required PHP version to 7.2 to make the included Twig version support PHP 8.0 and 8.1, by @gchtr in #2640.
|
timber.php
CHANGED
@@ -4,9 +4,10 @@ Plugin Name: Timber
|
|
4 |
Description: The WordPress Timber Library allows you to write themes using the power of Twig templates.
|
5 |
Plugin URI: https://upstatement.com/timber
|
6 |
Author: Jared Novack + Upstatement
|
7 |
-
Version: 1.
|
8 |
Author URI: http://upstatement.com/
|
9 |
Requires PHP: 7.2.5
|
|
|
10 |
*/
|
11 |
// we look for Composer files first in the plugins dir.
|
12 |
// then in the wp-content dir (site install).
|
4 |
Description: The WordPress Timber Library allows you to write themes using the power of Twig templates.
|
5 |
Plugin URI: https://upstatement.com/timber
|
6 |
Author: Jared Novack + Upstatement
|
7 |
+
Version: 1.22.0
|
8 |
Author URI: http://upstatement.com/
|
9 |
Requires PHP: 7.2.5
|
10 |
+
Requires at least: 5.3.0
|
11 |
*/
|
12 |
// we look for Composer files first in the plugins dir.
|
13 |
// then in the wp-content dir (site install).
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit84e42f61074097fdc526963199118ce6::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -25,12 +25,12 @@ class InstalledVersions
|
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
-
'pretty_version' => '
|
29 |
-
'version' => '
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
33 |
-
'reference' => '
|
34 |
'name' => 'timber/timber',
|
35 |
),
|
36 |
'versions' =>
|
@@ -62,32 +62,14 @@ private static $installed = array (
|
|
62 |
),
|
63 |
'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4',
|
64 |
),
|
65 |
-
'symfony/polyfill-mbstring' =>
|
66 |
-
array (
|
67 |
-
'pretty_version' => 'v1.26.0',
|
68 |
-
'version' => '1.26.0.0',
|
69 |
-
'aliases' =>
|
70 |
-
array (
|
71 |
-
),
|
72 |
-
'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e',
|
73 |
-
),
|
74 |
-
'symfony/polyfill-php72' =>
|
75 |
-
array (
|
76 |
-
'pretty_version' => 'v1.26.0',
|
77 |
-
'version' => '1.26.0.0',
|
78 |
-
'aliases' =>
|
79 |
-
array (
|
80 |
-
),
|
81 |
-
'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2',
|
82 |
-
),
|
83 |
'timber/timber' =>
|
84 |
array (
|
85 |
-
'pretty_version' => '
|
86 |
-
'version' => '
|
87 |
'aliases' =>
|
88 |
array (
|
89 |
),
|
90 |
-
'reference' => '
|
91 |
),
|
92 |
'twig/cache-extension' =>
|
93 |
array (
|
@@ -100,12 +82,12 @@ private static $installed = array (
|
|
100 |
),
|
101 |
'twig/twig' =>
|
102 |
array (
|
103 |
-
'pretty_version' => '
|
104 |
-
'version' => '
|
105 |
'aliases' =>
|
106 |
array (
|
107 |
),
|
108 |
-
'reference' => '
|
109 |
),
|
110 |
'upstatement/routes' =>
|
111 |
array (
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
+
'pretty_version' => 'dev-master',
|
29 |
+
'version' => 'dev-master',
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
33 |
+
'reference' => '43be3208bcb35cede75bbc470e079c31e84bf7ea',
|
34 |
'name' => 'timber/timber',
|
35 |
),
|
36 |
'versions' =>
|
62 |
),
|
63 |
'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4',
|
64 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
'timber/timber' =>
|
66 |
array (
|
67 |
+
'pretty_version' => 'dev-master',
|
68 |
+
'version' => 'dev-master',
|
69 |
'aliases' =>
|
70 |
array (
|
71 |
),
|
72 |
+
'reference' => '43be3208bcb35cede75bbc470e079c31e84bf7ea',
|
73 |
),
|
74 |
'twig/cache-extension' =>
|
75 |
array (
|
82 |
),
|
83 |
'twig/twig' =>
|
84 |
array (
|
85 |
+
'pretty_version' => 'v1.44.7',
|
86 |
+
'version' => '1.44.7.0',
|
87 |
'aliases' =>
|
88 |
array (
|
89 |
),
|
90 |
+
'reference' => '0887422319889e442458e48e2f3d9add1a172ad5',
|
91 |
),
|
92 |
'upstatement/routes' =>
|
93 |
array (
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -8,530 +8,4 @@ $baseDir = dirname($vendorDir);
|
|
8 |
return array(
|
9 |
'AltoRouter' => $vendorDir . '/altorouter/altorouter/AltoRouter.php',
|
10 |
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
11 |
-
'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
|
12 |
-
'Composer\\Installers\\AkauntingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
|
13 |
-
'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
|
14 |
-
'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
|
15 |
-
'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
|
16 |
-
'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
|
17 |
-
'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
|
18 |
-
'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
|
19 |
-
'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
|
20 |
-
'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
|
21 |
-
'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
|
22 |
-
'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
|
23 |
-
'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
|
24 |
-
'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
|
25 |
-
'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
|
26 |
-
'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
|
27 |
-
'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
|
28 |
-
'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
|
29 |
-
'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
|
30 |
-
'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
|
31 |
-
'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
|
32 |
-
'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
|
33 |
-
'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
|
34 |
-
'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
|
35 |
-
'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
|
36 |
-
'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
|
37 |
-
'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
|
38 |
-
'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
|
39 |
-
'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
|
40 |
-
'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
|
41 |
-
'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
|
42 |
-
'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
|
43 |
-
'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
|
44 |
-
'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
|
45 |
-
'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
|
46 |
-
'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
|
47 |
-
'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
|
48 |
-
'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
|
49 |
-
'Composer\\Installers\\LavaLiteInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
|
50 |
-
'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
|
51 |
-
'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
|
52 |
-
'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
|
53 |
-
'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
|
54 |
-
'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
|
55 |
-
'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
|
56 |
-
'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
|
57 |
-
'Composer\\Installers\\MatomoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
|
58 |
-
'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
|
59 |
-
'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
|
60 |
-
'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
|
61 |
-
'Composer\\Installers\\MiaoxingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php',
|
62 |
-
'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
|
63 |
-
'Composer\\Installers\\ModxInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
|
64 |
-
'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
|
65 |
-
'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
|
66 |
-
'Composer\\Installers\\OntoWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
|
67 |
-
'Composer\\Installers\\OsclassInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
|
68 |
-
'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
|
69 |
-
'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
|
70 |
-
'Composer\\Installers\\PantheonInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
|
71 |
-
'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
|
72 |
-
'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
|
73 |
-
'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
|
74 |
-
'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
|
75 |
-
'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
|
76 |
-
'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
|
77 |
-
'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
|
78 |
-
'Composer\\Installers\\ProcessWireInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
|
79 |
-
'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
|
80 |
-
'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
|
81 |
-
'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
|
82 |
-
'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
|
83 |
-
'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
|
84 |
-
'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
|
85 |
-
'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
|
86 |
-
'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
|
87 |
-
'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
|
88 |
-
'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
|
89 |
-
'Composer\\Installers\\SiteDirectInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
|
90 |
-
'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
|
91 |
-
'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
|
92 |
-
'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
|
93 |
-
'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
|
94 |
-
'Composer\\Installers\\TastyIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
|
95 |
-
'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
|
96 |
-
'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
|
97 |
-
'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
|
98 |
-
'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
|
99 |
-
'Composer\\Installers\\VgmcpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
|
100 |
-
'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
|
101 |
-
'Composer\\Installers\\WinterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WinterInstaller.php',
|
102 |
-
'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
|
103 |
-
'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
|
104 |
-
'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
|
105 |
-
'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
|
106 |
-
'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
|
107 |
-
'Routes' => $vendorDir . '/upstatement/routes/Routes.php',
|
108 |
-
'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
|
109 |
-
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
|
110 |
-
'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php',
|
111 |
-
'Timber\\Admin' => $baseDir . '/lib/Admin.php',
|
112 |
-
'Timber\\Archives' => $baseDir . '/lib/Archives.php',
|
113 |
-
'Timber\\Cache\\Cleaner' => $baseDir . '/lib/Cache/Cleaner.php',
|
114 |
-
'Timber\\Cache\\KeyGenerator' => $baseDir . '/lib/Cache/KeyGenerator.php',
|
115 |
-
'Timber\\Cache\\TimberKeyGeneratorInterface' => $baseDir . '/lib/Cache/TimberKeyGeneratorInterface.php',
|
116 |
-
'Timber\\Cache\\WPObjectCacheAdapter' => $baseDir . '/lib/Cache/WPObjectCacheAdapter.php',
|
117 |
-
'Timber\\Comment' => $baseDir . '/lib/Comment.php',
|
118 |
-
'Timber\\CommentThread' => $baseDir . '/lib/CommentThread.php',
|
119 |
-
'Timber\\Core' => $baseDir . '/lib/Core.php',
|
120 |
-
'Timber\\CoreInterface' => $baseDir . '/lib/CoreInterface.php',
|
121 |
-
'Timber\\FunctionWrapper' => $baseDir . '/lib/FunctionWrapper.php',
|
122 |
-
'Timber\\Helper' => $baseDir . '/lib/Helper.php',
|
123 |
-
'Timber\\Image' => $baseDir . '/lib/Image.php',
|
124 |
-
'Timber\\ImageHelper' => $baseDir . '/lib/ImageHelper.php',
|
125 |
-
'Timber\\Image\\Operation' => $baseDir . '/lib/Image/Operation.php',
|
126 |
-
'Timber\\Image\\Operation\\Letterbox' => $baseDir . '/lib/Image/Operation/Letterbox.php',
|
127 |
-
'Timber\\Image\\Operation\\Resize' => $baseDir . '/lib/Image/Operation/Resize.php',
|
128 |
-
'Timber\\Image\\Operation\\Retina' => $baseDir . '/lib/Image/Operation/Retina.php',
|
129 |
-
'Timber\\Image\\Operation\\ToJpg' => $baseDir . '/lib/Image/Operation/ToJpg.php',
|
130 |
-
'Timber\\Image\\Operation\\ToWebp' => $baseDir . '/lib/Image/Operation/ToWebp.php',
|
131 |
-
'Timber\\Integrations' => $baseDir . '/lib/Integrations.php',
|
132 |
-
'Timber\\Integrations\\ACF' => $baseDir . '/lib/Integrations/ACF.php',
|
133 |
-
'Timber\\Integrations\\CoAuthorsPlus' => $baseDir . '/lib/Integrations/CoAuthorsPlus.php',
|
134 |
-
'Timber\\Integrations\\CoAuthorsPlusUser' => $baseDir . '/lib/Integrations/CoAuthorsPlusUser.php',
|
135 |
-
'Timber\\Integrations\\Command' => $baseDir . '/lib/Integrations/Command.php',
|
136 |
-
'Timber\\Integrations\\Timber_WP_CLI_Command' => $baseDir . '/lib/Integrations/Timber_WP_CLI_Command.php',
|
137 |
-
'Timber\\Integrations\\WPML' => $baseDir . '/lib/Integrations/WPML.php',
|
138 |
-
'Timber\\Loader' => $baseDir . '/lib/Loader.php',
|
139 |
-
'Timber\\LocationManager' => $baseDir . '/lib/LocationManager.php',
|
140 |
-
'Timber\\Menu' => $baseDir . '/lib/Menu.php',
|
141 |
-
'Timber\\MenuItem' => $baseDir . '/lib/MenuItem.php',
|
142 |
-
'Timber\\Pagination' => $baseDir . '/lib/Pagination.php',
|
143 |
-
'Timber\\PathHelper' => $baseDir . '/lib/PathHelper.php',
|
144 |
-
'Timber\\Post' => $baseDir . '/lib/Post.php',
|
145 |
-
'Timber\\PostCollection' => $baseDir . '/lib/PostCollection.php',
|
146 |
-
'Timber\\PostGetter' => $baseDir . '/lib/PostGetter.php',
|
147 |
-
'Timber\\PostPreview' => $baseDir . '/lib/PostPreview.php',
|
148 |
-
'Timber\\PostQuery' => $baseDir . '/lib/PostQuery.php',
|
149 |
-
'Timber\\PostType' => $baseDir . '/lib/PostType.php',
|
150 |
-
'Timber\\PostsIterator' => $baseDir . '/lib/PostsIterator.php',
|
151 |
-
'Timber\\QueryIterator' => $baseDir . '/lib/QueryIterator.php',
|
152 |
-
'Timber\\Request' => $baseDir . '/lib/Request.php',
|
153 |
-
'Timber\\Site' => $baseDir . '/lib/Site.php',
|
154 |
-
'Timber\\Term' => $baseDir . '/lib/Term.php',
|
155 |
-
'Timber\\TermGetter' => $baseDir . '/lib/TermGetter.php',
|
156 |
-
'Timber\\TextHelper' => $baseDir . '/lib/TextHelper.php',
|
157 |
-
'Timber\\Theme' => $baseDir . '/lib/Theme.php',
|
158 |
-
'Timber\\Timber' => $baseDir . '/lib/Timber.php',
|
159 |
-
'Timber\\Twig' => $baseDir . '/lib/Twig.php',
|
160 |
-
'Timber\\Twig_Filter' => $baseDir . '/lib/Twig_Filter.php',
|
161 |
-
'Timber\\Twig_Function' => $baseDir . '/lib/Twig_Function.php',
|
162 |
-
'Timber\\URLHelper' => $baseDir . '/lib/URLHelper.php',
|
163 |
-
'Timber\\User' => $baseDir . '/lib/User.php',
|
164 |
-
'Twig\\CacheExtension\\CacheProviderInterface' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheProviderInterface.php',
|
165 |
-
'Twig\\CacheExtension\\CacheProvider\\DoctrineCacheAdapter' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheProvider/DoctrineCacheAdapter.php',
|
166 |
-
'Twig\\CacheExtension\\CacheProvider\\PsrCacheAdapter' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheProvider/PsrCacheAdapter.php',
|
167 |
-
'Twig\\CacheExtension\\CacheStrategyInterface' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategyInterface.php',
|
168 |
-
'Twig\\CacheExtension\\CacheStrategy\\BlackholeCacheStrategy' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/BlackholeCacheStrategy.php',
|
169 |
-
'Twig\\CacheExtension\\CacheStrategy\\GenerationalCacheStrategy' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/GenerationalCacheStrategy.php',
|
170 |
-
'Twig\\CacheExtension\\CacheStrategy\\IndexedChainingCacheStrategy' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/IndexedChainingCacheStrategy.php',
|
171 |
-
'Twig\\CacheExtension\\CacheStrategy\\KeyGeneratorInterface' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/KeyGeneratorInterface.php',
|
172 |
-
'Twig\\CacheExtension\\CacheStrategy\\LifetimeCacheStrategy' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/LifetimeCacheStrategy.php',
|
173 |
-
'Twig\\CacheExtension\\Exception\\BaseException' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/BaseException.php',
|
174 |
-
'Twig\\CacheExtension\\Exception\\InvalidCacheKeyException' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/InvalidCacheKeyException.php',
|
175 |
-
'Twig\\CacheExtension\\Exception\\InvalidCacheLifetimeException' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/InvalidCacheLifetimeException.php',
|
176 |
-
'Twig\\CacheExtension\\Exception\\NonExistingStrategyException' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/NonExistingStrategyException.php',
|
177 |
-
'Twig\\CacheExtension\\Exception\\NonExistingStrategyKeyException' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/NonExistingStrategyKeyException.php',
|
178 |
-
'Twig\\CacheExtension\\Extension' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/Extension.php',
|
179 |
-
'Twig\\CacheExtension\\Node\\CacheNode' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/Node/CacheNode.php',
|
180 |
-
'Twig\\CacheExtension\\TokenParser\\Cache' => $vendorDir . '/twig/cache-extension/lib/Twig/CacheExtension/TokenParser/Cache.php',
|
181 |
-
'Twig\\Cache\\CacheInterface' => $vendorDir . '/twig/twig/src/Cache/CacheInterface.php',
|
182 |
-
'Twig\\Cache\\FilesystemCache' => $vendorDir . '/twig/twig/src/Cache/FilesystemCache.php',
|
183 |
-
'Twig\\Cache\\NullCache' => $vendorDir . '/twig/twig/src/Cache/NullCache.php',
|
184 |
-
'Twig\\Compiler' => $vendorDir . '/twig/twig/src/Compiler.php',
|
185 |
-
'Twig\\Environment' => $vendorDir . '/twig/twig/src/Environment.php',
|
186 |
-
'Twig\\Error\\Error' => $vendorDir . '/twig/twig/src/Error/Error.php',
|
187 |
-
'Twig\\Error\\LoaderError' => $vendorDir . '/twig/twig/src/Error/LoaderError.php',
|
188 |
-
'Twig\\Error\\RuntimeError' => $vendorDir . '/twig/twig/src/Error/RuntimeError.php',
|
189 |
-
'Twig\\Error\\SyntaxError' => $vendorDir . '/twig/twig/src/Error/SyntaxError.php',
|
190 |
-
'Twig\\ExpressionParser' => $vendorDir . '/twig/twig/src/ExpressionParser.php',
|
191 |
-
'Twig\\ExtensionSet' => $vendorDir . '/twig/twig/src/ExtensionSet.php',
|
192 |
-
'Twig\\Extension\\AbstractExtension' => $vendorDir . '/twig/twig/src/Extension/AbstractExtension.php',
|
193 |
-
'Twig\\Extension\\CoreExtension' => $vendorDir . '/twig/twig/src/Extension/CoreExtension.php',
|
194 |
-
'Twig\\Extension\\DebugExtension' => $vendorDir . '/twig/twig/src/Extension/DebugExtension.php',
|
195 |
-
'Twig\\Extension\\EscaperExtension' => $vendorDir . '/twig/twig/src/Extension/EscaperExtension.php',
|
196 |
-
'Twig\\Extension\\ExtensionInterface' => $vendorDir . '/twig/twig/src/Extension/ExtensionInterface.php',
|
197 |
-
'Twig\\Extension\\GlobalsInterface' => $vendorDir . '/twig/twig/src/Extension/GlobalsInterface.php',
|
198 |
-
'Twig\\Extension\\InitRuntimeInterface' => $vendorDir . '/twig/twig/src/Extension/InitRuntimeInterface.php',
|
199 |
-
'Twig\\Extension\\OptimizerExtension' => $vendorDir . '/twig/twig/src/Extension/OptimizerExtension.php',
|
200 |
-
'Twig\\Extension\\ProfilerExtension' => $vendorDir . '/twig/twig/src/Extension/ProfilerExtension.php',
|
201 |
-
'Twig\\Extension\\RuntimeExtensionInterface' => $vendorDir . '/twig/twig/src/Extension/RuntimeExtensionInterface.php',
|
202 |
-
'Twig\\Extension\\SandboxExtension' => $vendorDir . '/twig/twig/src/Extension/SandboxExtension.php',
|
203 |
-
'Twig\\Extension\\StagingExtension' => $vendorDir . '/twig/twig/src/Extension/StagingExtension.php',
|
204 |
-
'Twig\\Extension\\StringLoaderExtension' => $vendorDir . '/twig/twig/src/Extension/StringLoaderExtension.php',
|
205 |
-
'Twig\\FileExtensionEscapingStrategy' => $vendorDir . '/twig/twig/src/FileExtensionEscapingStrategy.php',
|
206 |
-
'Twig\\Lexer' => $vendorDir . '/twig/twig/src/Lexer.php',
|
207 |
-
'Twig\\Loader\\ArrayLoader' => $vendorDir . '/twig/twig/src/Loader/ArrayLoader.php',
|
208 |
-
'Twig\\Loader\\ChainLoader' => $vendorDir . '/twig/twig/src/Loader/ChainLoader.php',
|
209 |
-
'Twig\\Loader\\ExistsLoaderInterface' => $vendorDir . '/twig/twig/src/Loader/ExistsLoaderInterface.php',
|
210 |
-
'Twig\\Loader\\FilesystemLoader' => $vendorDir . '/twig/twig/src/Loader/FilesystemLoader.php',
|
211 |
-
'Twig\\Loader\\LoaderInterface' => $vendorDir . '/twig/twig/src/Loader/LoaderInterface.php',
|
212 |
-
'Twig\\Loader\\SourceContextLoaderInterface' => $vendorDir . '/twig/twig/src/Loader/SourceContextLoaderInterface.php',
|
213 |
-
'Twig\\Markup' => $vendorDir . '/twig/twig/src/Markup.php',
|
214 |
-
'Twig\\NodeTraverser' => $vendorDir . '/twig/twig/src/NodeTraverser.php',
|
215 |
-
'Twig\\NodeVisitor\\AbstractNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php',
|
216 |
-
'Twig\\NodeVisitor\\EscaperNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php',
|
217 |
-
'Twig\\NodeVisitor\\MacroAutoImportNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php',
|
218 |
-
'Twig\\NodeVisitor\\NodeVisitorInterface' => $vendorDir . '/twig/twig/src/NodeVisitor/NodeVisitorInterface.php',
|
219 |
-
'Twig\\NodeVisitor\\OptimizerNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php',
|
220 |
-
'Twig\\NodeVisitor\\SafeAnalysisNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php',
|
221 |
-
'Twig\\NodeVisitor\\SandboxNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php',
|
222 |
-
'Twig\\Node\\AutoEscapeNode' => $vendorDir . '/twig/twig/src/Node/AutoEscapeNode.php',
|
223 |
-
'Twig\\Node\\BlockNode' => $vendorDir . '/twig/twig/src/Node/BlockNode.php',
|
224 |
-
'Twig\\Node\\BlockReferenceNode' => $vendorDir . '/twig/twig/src/Node/BlockReferenceNode.php',
|
225 |
-
'Twig\\Node\\BodyNode' => $vendorDir . '/twig/twig/src/Node/BodyNode.php',
|
226 |
-
'Twig\\Node\\CheckSecurityCallNode' => $vendorDir . '/twig/twig/src/Node/CheckSecurityCallNode.php',
|
227 |
-
'Twig\\Node\\CheckSecurityNode' => $vendorDir . '/twig/twig/src/Node/CheckSecurityNode.php',
|
228 |
-
'Twig\\Node\\CheckToStringNode' => $vendorDir . '/twig/twig/src/Node/CheckToStringNode.php',
|
229 |
-
'Twig\\Node\\DeprecatedNode' => $vendorDir . '/twig/twig/src/Node/DeprecatedNode.php',
|
230 |
-
'Twig\\Node\\DoNode' => $vendorDir . '/twig/twig/src/Node/DoNode.php',
|
231 |
-
'Twig\\Node\\EmbedNode' => $vendorDir . '/twig/twig/src/Node/EmbedNode.php',
|
232 |
-
'Twig\\Node\\Expression\\AbstractExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AbstractExpression.php',
|
233 |
-
'Twig\\Node\\Expression\\ArrayExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrayExpression.php',
|
234 |
-
'Twig\\Node\\Expression\\ArrowFunctionExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php',
|
235 |
-
'Twig\\Node\\Expression\\AssignNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AssignNameExpression.php',
|
236 |
-
'Twig\\Node\\Expression\\Binary\\AbstractBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php',
|
237 |
-
'Twig\\Node\\Expression\\Binary\\AddBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AddBinary.php',
|
238 |
-
'Twig\\Node\\Expression\\Binary\\AndBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AndBinary.php',
|
239 |
-
'Twig\\Node\\Expression\\Binary\\BitwiseAndBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php',
|
240 |
-
'Twig\\Node\\Expression\\Binary\\BitwiseOrBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php',
|
241 |
-
'Twig\\Node\\Expression\\Binary\\BitwiseXorBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php',
|
242 |
-
'Twig\\Node\\Expression\\Binary\\ConcatBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/ConcatBinary.php',
|
243 |
-
'Twig\\Node\\Expression\\Binary\\DivBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/DivBinary.php',
|
244 |
-
'Twig\\Node\\Expression\\Binary\\EndsWithBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php',
|
245 |
-
'Twig\\Node\\Expression\\Binary\\EqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/EqualBinary.php',
|
246 |
-
'Twig\\Node\\Expression\\Binary\\FloorDivBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php',
|
247 |
-
'Twig\\Node\\Expression\\Binary\\GreaterBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/GreaterBinary.php',
|
248 |
-
'Twig\\Node\\Expression\\Binary\\GreaterEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php',
|
249 |
-
'Twig\\Node\\Expression\\Binary\\InBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/InBinary.php',
|
250 |
-
'Twig\\Node\\Expression\\Binary\\LessBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/LessBinary.php',
|
251 |
-
'Twig\\Node\\Expression\\Binary\\LessEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php',
|
252 |
-
'Twig\\Node\\Expression\\Binary\\MatchesBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/MatchesBinary.php',
|
253 |
-
'Twig\\Node\\Expression\\Binary\\ModBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/ModBinary.php',
|
254 |
-
'Twig\\Node\\Expression\\Binary\\MulBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/MulBinary.php',
|
255 |
-
'Twig\\Node\\Expression\\Binary\\NotEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php',
|
256 |
-
'Twig\\Node\\Expression\\Binary\\NotInBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/NotInBinary.php',
|
257 |
-
'Twig\\Node\\Expression\\Binary\\OrBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/OrBinary.php',
|
258 |
-
'Twig\\Node\\Expression\\Binary\\PowerBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/PowerBinary.php',
|
259 |
-
'Twig\\Node\\Expression\\Binary\\RangeBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/RangeBinary.php',
|
260 |
-
'Twig\\Node\\Expression\\Binary\\SpaceshipBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php',
|
261 |
-
'Twig\\Node\\Expression\\Binary\\StartsWithBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php',
|
262 |
-
'Twig\\Node\\Expression\\Binary\\SubBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/SubBinary.php',
|
263 |
-
'Twig\\Node\\Expression\\BlockReferenceExpression' => $vendorDir . '/twig/twig/src/Node/Expression/BlockReferenceExpression.php',
|
264 |
-
'Twig\\Node\\Expression\\CallExpression' => $vendorDir . '/twig/twig/src/Node/Expression/CallExpression.php',
|
265 |
-
'Twig\\Node\\Expression\\ConditionalExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ConditionalExpression.php',
|
266 |
-
'Twig\\Node\\Expression\\ConstantExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ConstantExpression.php',
|
267 |
-
'Twig\\Node\\Expression\\FilterExpression' => $vendorDir . '/twig/twig/src/Node/Expression/FilterExpression.php',
|
268 |
-
'Twig\\Node\\Expression\\Filter\\DefaultFilter' => $vendorDir . '/twig/twig/src/Node/Expression/Filter/DefaultFilter.php',
|
269 |
-
'Twig\\Node\\Expression\\FunctionExpression' => $vendorDir . '/twig/twig/src/Node/Expression/FunctionExpression.php',
|
270 |
-
'Twig\\Node\\Expression\\GetAttrExpression' => $vendorDir . '/twig/twig/src/Node/Expression/GetAttrExpression.php',
|
271 |
-
'Twig\\Node\\Expression\\InlinePrint' => $vendorDir . '/twig/twig/src/Node/Expression/InlinePrint.php',
|
272 |
-
'Twig\\Node\\Expression\\MethodCallExpression' => $vendorDir . '/twig/twig/src/Node/Expression/MethodCallExpression.php',
|
273 |
-
'Twig\\Node\\Expression\\NameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/NameExpression.php',
|
274 |
-
'Twig\\Node\\Expression\\NullCoalesceExpression' => $vendorDir . '/twig/twig/src/Node/Expression/NullCoalesceExpression.php',
|
275 |
-
'Twig\\Node\\Expression\\ParentExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ParentExpression.php',
|
276 |
-
'Twig\\Node\\Expression\\TempNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/TempNameExpression.php',
|
277 |
-
'Twig\\Node\\Expression\\TestExpression' => $vendorDir . '/twig/twig/src/Node/Expression/TestExpression.php',
|
278 |
-
'Twig\\Node\\Expression\\Test\\ConstantTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/ConstantTest.php',
|
279 |
-
'Twig\\Node\\Expression\\Test\\DefinedTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/DefinedTest.php',
|
280 |
-
'Twig\\Node\\Expression\\Test\\DivisiblebyTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php',
|
281 |
-
'Twig\\Node\\Expression\\Test\\EvenTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/EvenTest.php',
|
282 |
-
'Twig\\Node\\Expression\\Test\\NullTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/NullTest.php',
|
283 |
-
'Twig\\Node\\Expression\\Test\\OddTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/OddTest.php',
|
284 |
-
'Twig\\Node\\Expression\\Test\\SameasTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/SameasTest.php',
|
285 |
-
'Twig\\Node\\Expression\\Unary\\AbstractUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/AbstractUnary.php',
|
286 |
-
'Twig\\Node\\Expression\\Unary\\NegUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/NegUnary.php',
|
287 |
-
'Twig\\Node\\Expression\\Unary\\NotUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/NotUnary.php',
|
288 |
-
'Twig\\Node\\Expression\\Unary\\PosUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/PosUnary.php',
|
289 |
-
'Twig\\Node\\Expression\\VariadicExpression' => $vendorDir . '/twig/twig/src/Node/Expression/VariadicExpression.php',
|
290 |
-
'Twig\\Node\\FlushNode' => $vendorDir . '/twig/twig/src/Node/FlushNode.php',
|
291 |
-
'Twig\\Node\\ForLoopNode' => $vendorDir . '/twig/twig/src/Node/ForLoopNode.php',
|
292 |
-
'Twig\\Node\\ForNode' => $vendorDir . '/twig/twig/src/Node/ForNode.php',
|
293 |
-
'Twig\\Node\\IfNode' => $vendorDir . '/twig/twig/src/Node/IfNode.php',
|
294 |
-
'Twig\\Node\\ImportNode' => $vendorDir . '/twig/twig/src/Node/ImportNode.php',
|
295 |
-
'Twig\\Node\\IncludeNode' => $vendorDir . '/twig/twig/src/Node/IncludeNode.php',
|
296 |
-
'Twig\\Node\\MacroNode' => $vendorDir . '/twig/twig/src/Node/MacroNode.php',
|
297 |
-
'Twig\\Node\\ModuleNode' => $vendorDir . '/twig/twig/src/Node/ModuleNode.php',
|
298 |
-
'Twig\\Node\\Node' => $vendorDir . '/twig/twig/src/Node/Node.php',
|
299 |
-
'Twig\\Node\\NodeCaptureInterface' => $vendorDir . '/twig/twig/src/Node/NodeCaptureInterface.php',
|
300 |
-
'Twig\\Node\\NodeOutputInterface' => $vendorDir . '/twig/twig/src/Node/NodeOutputInterface.php',
|
301 |
-
'Twig\\Node\\PrintNode' => $vendorDir . '/twig/twig/src/Node/PrintNode.php',
|
302 |
-
'Twig\\Node\\SandboxNode' => $vendorDir . '/twig/twig/src/Node/SandboxNode.php',
|
303 |
-
'Twig\\Node\\SandboxedPrintNode' => $vendorDir . '/twig/twig/src/Node/SandboxedPrintNode.php',
|
304 |
-
'Twig\\Node\\SetNode' => $vendorDir . '/twig/twig/src/Node/SetNode.php',
|
305 |
-
'Twig\\Node\\SpacelessNode' => $vendorDir . '/twig/twig/src/Node/SpacelessNode.php',
|
306 |
-
'Twig\\Node\\TextNode' => $vendorDir . '/twig/twig/src/Node/TextNode.php',
|
307 |
-
'Twig\\Node\\WithNode' => $vendorDir . '/twig/twig/src/Node/WithNode.php',
|
308 |
-
'Twig\\Parser' => $vendorDir . '/twig/twig/src/Parser.php',
|
309 |
-
'Twig\\Profiler\\Dumper\\BaseDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/BaseDumper.php',
|
310 |
-
'Twig\\Profiler\\Dumper\\BlackfireDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/BlackfireDumper.php',
|
311 |
-
'Twig\\Profiler\\Dumper\\HtmlDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/HtmlDumper.php',
|
312 |
-
'Twig\\Profiler\\Dumper\\TextDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/TextDumper.php',
|
313 |
-
'Twig\\Profiler\\NodeVisitor\\ProfilerNodeVisitor' => $vendorDir . '/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php',
|
314 |
-
'Twig\\Profiler\\Node\\EnterProfileNode' => $vendorDir . '/twig/twig/src/Profiler/Node/EnterProfileNode.php',
|
315 |
-
'Twig\\Profiler\\Node\\LeaveProfileNode' => $vendorDir . '/twig/twig/src/Profiler/Node/LeaveProfileNode.php',
|
316 |
-
'Twig\\Profiler\\Profile' => $vendorDir . '/twig/twig/src/Profiler/Profile.php',
|
317 |
-
'Twig\\RuntimeLoader\\ContainerRuntimeLoader' => $vendorDir . '/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php',
|
318 |
-
'Twig\\RuntimeLoader\\FactoryRuntimeLoader' => $vendorDir . '/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php',
|
319 |
-
'Twig\\RuntimeLoader\\RuntimeLoaderInterface' => $vendorDir . '/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php',
|
320 |
-
'Twig\\Sandbox\\SecurityError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityError.php',
|
321 |
-
'Twig\\Sandbox\\SecurityNotAllowedFilterError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php',
|
322 |
-
'Twig\\Sandbox\\SecurityNotAllowedFunctionError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php',
|
323 |
-
'Twig\\Sandbox\\SecurityNotAllowedMethodError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php',
|
324 |
-
'Twig\\Sandbox\\SecurityNotAllowedPropertyError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php',
|
325 |
-
'Twig\\Sandbox\\SecurityNotAllowedTagError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php',
|
326 |
-
'Twig\\Sandbox\\SecurityPolicy' => $vendorDir . '/twig/twig/src/Sandbox/SecurityPolicy.php',
|
327 |
-
'Twig\\Sandbox\\SecurityPolicyInterface' => $vendorDir . '/twig/twig/src/Sandbox/SecurityPolicyInterface.php',
|
328 |
-
'Twig\\Source' => $vendorDir . '/twig/twig/src/Source.php',
|
329 |
-
'Twig\\Template' => $vendorDir . '/twig/twig/src/Template.php',
|
330 |
-
'Twig\\TemplateWrapper' => $vendorDir . '/twig/twig/src/TemplateWrapper.php',
|
331 |
-
'Twig\\Test\\IntegrationTestCase' => $vendorDir . '/twig/twig/src/Test/IntegrationTestCase.php',
|
332 |
-
'Twig\\Test\\NodeTestCase' => $vendorDir . '/twig/twig/src/Test/NodeTestCase.php',
|
333 |
-
'Twig\\Token' => $vendorDir . '/twig/twig/src/Token.php',
|
334 |
-
'Twig\\TokenParser\\AbstractTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AbstractTokenParser.php',
|
335 |
-
'Twig\\TokenParser\\ApplyTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ApplyTokenParser.php',
|
336 |
-
'Twig\\TokenParser\\AutoEscapeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php',
|
337 |
-
'Twig\\TokenParser\\BlockTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/BlockTokenParser.php',
|
338 |
-
'Twig\\TokenParser\\DeprecatedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php',
|
339 |
-
'Twig\\TokenParser\\DoTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DoTokenParser.php',
|
340 |
-
'Twig\\TokenParser\\EmbedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/EmbedTokenParser.php',
|
341 |
-
'Twig\\TokenParser\\ExtendsTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ExtendsTokenParser.php',
|
342 |
-
'Twig\\TokenParser\\FilterTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/FilterTokenParser.php',
|
343 |
-
'Twig\\TokenParser\\FlushTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/FlushTokenParser.php',
|
344 |
-
'Twig\\TokenParser\\ForTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ForTokenParser.php',
|
345 |
-
'Twig\\TokenParser\\FromTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/FromTokenParser.php',
|
346 |
-
'Twig\\TokenParser\\IfTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/IfTokenParser.php',
|
347 |
-
'Twig\\TokenParser\\ImportTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ImportTokenParser.php',
|
348 |
-
'Twig\\TokenParser\\IncludeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/IncludeTokenParser.php',
|
349 |
-
'Twig\\TokenParser\\MacroTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/MacroTokenParser.php',
|
350 |
-
'Twig\\TokenParser\\SandboxTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/SandboxTokenParser.php',
|
351 |
-
'Twig\\TokenParser\\SetTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/SetTokenParser.php',
|
352 |
-
'Twig\\TokenParser\\SpacelessTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/SpacelessTokenParser.php',
|
353 |
-
'Twig\\TokenParser\\TokenParserInterface' => $vendorDir . '/twig/twig/src/TokenParser/TokenParserInterface.php',
|
354 |
-
'Twig\\TokenParser\\UseTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/UseTokenParser.php',
|
355 |
-
'Twig\\TokenParser\\WithTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/WithTokenParser.php',
|
356 |
-
'Twig\\TokenStream' => $vendorDir . '/twig/twig/src/TokenStream.php',
|
357 |
-
'Twig\\TwigFilter' => $vendorDir . '/twig/twig/src/TwigFilter.php',
|
358 |
-
'Twig\\TwigFunction' => $vendorDir . '/twig/twig/src/TwigFunction.php',
|
359 |
-
'Twig\\TwigTest' => $vendorDir . '/twig/twig/src/TwigTest.php',
|
360 |
-
'Twig\\Util\\DeprecationCollector' => $vendorDir . '/twig/twig/src/Util/DeprecationCollector.php',
|
361 |
-
'Twig\\Util\\TemplateDirIterator' => $vendorDir . '/twig/twig/src/Util/TemplateDirIterator.php',
|
362 |
-
'Twig_BaseNodeVisitor' => $vendorDir . '/twig/twig/lib/Twig/BaseNodeVisitor.php',
|
363 |
-
'Twig_CacheInterface' => $vendorDir . '/twig/twig/lib/Twig/CacheInterface.php',
|
364 |
-
'Twig_Cache_Filesystem' => $vendorDir . '/twig/twig/lib/Twig/Cache/Filesystem.php',
|
365 |
-
'Twig_Cache_Null' => $vendorDir . '/twig/twig/lib/Twig/Cache/Null.php',
|
366 |
-
'Twig_Compiler' => $vendorDir . '/twig/twig/lib/Twig/Compiler.php',
|
367 |
-
'Twig_ContainerRuntimeLoader' => $vendorDir . '/twig/twig/lib/Twig/ContainerRuntimeLoader.php',
|
368 |
-
'Twig_Environment' => $vendorDir . '/twig/twig/lib/Twig/Environment.php',
|
369 |
-
'Twig_Error' => $vendorDir . '/twig/twig/lib/Twig/Error.php',
|
370 |
-
'Twig_Error_Loader' => $vendorDir . '/twig/twig/lib/Twig/Error/Loader.php',
|
371 |
-
'Twig_Error_Runtime' => $vendorDir . '/twig/twig/lib/Twig/Error/Runtime.php',
|
372 |
-
'Twig_Error_Syntax' => $vendorDir . '/twig/twig/lib/Twig/Error/Syntax.php',
|
373 |
-
'Twig_ExistsLoaderInterface' => $vendorDir . '/twig/twig/lib/Twig/ExistsLoaderInterface.php',
|
374 |
-
'Twig_ExpressionParser' => $vendorDir . '/twig/twig/lib/Twig/ExpressionParser.php',
|
375 |
-
'Twig_Extension' => $vendorDir . '/twig/twig/lib/Twig/Extension.php',
|
376 |
-
'Twig_ExtensionInterface' => $vendorDir . '/twig/twig/lib/Twig/ExtensionInterface.php',
|
377 |
-
'Twig_ExtensionSet' => $vendorDir . '/twig/twig/lib/Twig/ExtensionSet.php',
|
378 |
-
'Twig_Extension_Core' => $vendorDir . '/twig/twig/lib/Twig/Extension/Core.php',
|
379 |
-
'Twig_Extension_Debug' => $vendorDir . '/twig/twig/lib/Twig/Extension/Debug.php',
|
380 |
-
'Twig_Extension_Escaper' => $vendorDir . '/twig/twig/lib/Twig/Extension/Escaper.php',
|
381 |
-
'Twig_Extension_GlobalsInterface' => $vendorDir . '/twig/twig/lib/Twig/Extension/GlobalsInterface.php',
|
382 |
-
'Twig_Extension_InitRuntimeInterface' => $vendorDir . '/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php',
|
383 |
-
'Twig_Extension_Optimizer' => $vendorDir . '/twig/twig/lib/Twig/Extension/Optimizer.php',
|
384 |
-
'Twig_Extension_Profiler' => $vendorDir . '/twig/twig/lib/Twig/Extension/Profiler.php',
|
385 |
-
'Twig_Extension_Sandbox' => $vendorDir . '/twig/twig/lib/Twig/Extension/Sandbox.php',
|
386 |
-
'Twig_Extension_Staging' => $vendorDir . '/twig/twig/lib/Twig/Extension/Staging.php',
|
387 |
-
'Twig_Extension_StringLoader' => $vendorDir . '/twig/twig/lib/Twig/Extension/StringLoader.php',
|
388 |
-
'Twig_FactoryRuntimeLoader' => $vendorDir . '/twig/twig/lib/Twig/FactoryRuntimeLoader.php',
|
389 |
-
'Twig_FileExtensionEscapingStrategy' => $vendorDir . '/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php',
|
390 |
-
'Twig_Filter' => $vendorDir . '/twig/twig/lib/Twig/Filter.php',
|
391 |
-
'Twig_Function' => $vendorDir . '/twig/twig/lib/Twig/Function.php',
|
392 |
-
'Twig_Lexer' => $vendorDir . '/twig/twig/lib/Twig/Lexer.php',
|
393 |
-
'Twig_LoaderInterface' => $vendorDir . '/twig/twig/lib/Twig/LoaderInterface.php',
|
394 |
-
'Twig_Loader_Array' => $vendorDir . '/twig/twig/lib/Twig/Loader/Array.php',
|
395 |
-
'Twig_Loader_Chain' => $vendorDir . '/twig/twig/lib/Twig/Loader/Chain.php',
|
396 |
-
'Twig_Loader_Filesystem' => $vendorDir . '/twig/twig/lib/Twig/Loader/Filesystem.php',
|
397 |
-
'Twig_Markup' => $vendorDir . '/twig/twig/lib/Twig/Markup.php',
|
398 |
-
'Twig_Node' => $vendorDir . '/twig/twig/lib/Twig/Node.php',
|
399 |
-
'Twig_NodeCaptureInterface' => $vendorDir . '/twig/twig/lib/Twig/NodeCaptureInterface.php',
|
400 |
-
'Twig_NodeOutputInterface' => $vendorDir . '/twig/twig/lib/Twig/NodeOutputInterface.php',
|
401 |
-
'Twig_NodeTraverser' => $vendorDir . '/twig/twig/lib/Twig/NodeTraverser.php',
|
402 |
-
'Twig_NodeVisitorInterface' => $vendorDir . '/twig/twig/lib/Twig/NodeVisitorInterface.php',
|
403 |
-
'Twig_NodeVisitor_Escaper' => $vendorDir . '/twig/twig/lib/Twig/NodeVisitor/Escaper.php',
|
404 |
-
'Twig_NodeVisitor_Optimizer' => $vendorDir . '/twig/twig/lib/Twig/NodeVisitor/Optimizer.php',
|
405 |
-
'Twig_NodeVisitor_SafeAnalysis' => $vendorDir . '/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php',
|
406 |
-
'Twig_NodeVisitor_Sandbox' => $vendorDir . '/twig/twig/lib/Twig/NodeVisitor/Sandbox.php',
|
407 |
-
'Twig_Node_AutoEscape' => $vendorDir . '/twig/twig/lib/Twig/Node/AutoEscape.php',
|
408 |
-
'Twig_Node_Block' => $vendorDir . '/twig/twig/lib/Twig/Node/Block.php',
|
409 |
-
'Twig_Node_BlockReference' => $vendorDir . '/twig/twig/lib/Twig/Node/BlockReference.php',
|
410 |
-
'Twig_Node_Body' => $vendorDir . '/twig/twig/lib/Twig/Node/Body.php',
|
411 |
-
'Twig_Node_CheckSecurity' => $vendorDir . '/twig/twig/lib/Twig/Node/CheckSecurity.php',
|
412 |
-
'Twig_Node_Deprecated' => $vendorDir . '/twig/twig/lib/Twig/Node/Deprecated.php',
|
413 |
-
'Twig_Node_Do' => $vendorDir . '/twig/twig/lib/Twig/Node/Do.php',
|
414 |
-
'Twig_Node_Embed' => $vendorDir . '/twig/twig/lib/Twig/Node/Embed.php',
|
415 |
-
'Twig_Node_Expression' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression.php',
|
416 |
-
'Twig_Node_Expression_Array' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Array.php',
|
417 |
-
'Twig_Node_Expression_AssignName' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/AssignName.php',
|
418 |
-
'Twig_Node_Expression_Binary' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary.php',
|
419 |
-
'Twig_Node_Expression_Binary_Add' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Add.php',
|
420 |
-
'Twig_Node_Expression_Binary_And' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/And.php',
|
421 |
-
'Twig_Node_Expression_Binary_BitwiseAnd' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php',
|
422 |
-
'Twig_Node_Expression_Binary_BitwiseOr' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php',
|
423 |
-
'Twig_Node_Expression_Binary_BitwiseXor' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php',
|
424 |
-
'Twig_Node_Expression_Binary_Concat' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php',
|
425 |
-
'Twig_Node_Expression_Binary_Div' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Div.php',
|
426 |
-
'Twig_Node_Expression_Binary_EndsWith' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php',
|
427 |
-
'Twig_Node_Expression_Binary_Equal' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php',
|
428 |
-
'Twig_Node_Expression_Binary_FloorDiv' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php',
|
429 |
-
'Twig_Node_Expression_Binary_Greater' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php',
|
430 |
-
'Twig_Node_Expression_Binary_GreaterEqual' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php',
|
431 |
-
'Twig_Node_Expression_Binary_In' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/In.php',
|
432 |
-
'Twig_Node_Expression_Binary_Less' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Less.php',
|
433 |
-
'Twig_Node_Expression_Binary_LessEqual' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php',
|
434 |
-
'Twig_Node_Expression_Binary_Matches' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php',
|
435 |
-
'Twig_Node_Expression_Binary_Mod' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php',
|
436 |
-
'Twig_Node_Expression_Binary_Mul' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php',
|
437 |
-
'Twig_Node_Expression_Binary_NotEqual' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php',
|
438 |
-
'Twig_Node_Expression_Binary_NotIn' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php',
|
439 |
-
'Twig_Node_Expression_Binary_Or' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Or.php',
|
440 |
-
'Twig_Node_Expression_Binary_Power' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Power.php',
|
441 |
-
'Twig_Node_Expression_Binary_Range' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Range.php',
|
442 |
-
'Twig_Node_Expression_Binary_StartsWith' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php',
|
443 |
-
'Twig_Node_Expression_Binary_Sub' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php',
|
444 |
-
'Twig_Node_Expression_BlockReference' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/BlockReference.php',
|
445 |
-
'Twig_Node_Expression_Call' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Call.php',
|
446 |
-
'Twig_Node_Expression_Conditional' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Conditional.php',
|
447 |
-
'Twig_Node_Expression_Constant' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Constant.php',
|
448 |
-
'Twig_Node_Expression_Filter' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Filter.php',
|
449 |
-
'Twig_Node_Expression_Filter_Default' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Filter/Default.php',
|
450 |
-
'Twig_Node_Expression_Function' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Function.php',
|
451 |
-
'Twig_Node_Expression_GetAttr' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/GetAttr.php',
|
452 |
-
'Twig_Node_Expression_MethodCall' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/MethodCall.php',
|
453 |
-
'Twig_Node_Expression_Name' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Name.php',
|
454 |
-
'Twig_Node_Expression_NullCoalesce' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php',
|
455 |
-
'Twig_Node_Expression_Parent' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Parent.php',
|
456 |
-
'Twig_Node_Expression_TempName' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/TempName.php',
|
457 |
-
'Twig_Node_Expression_Test' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test.php',
|
458 |
-
'Twig_Node_Expression_Test_Constant' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test/Constant.php',
|
459 |
-
'Twig_Node_Expression_Test_Defined' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test/Defined.php',
|
460 |
-
'Twig_Node_Expression_Test_Divisibleby' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php',
|
461 |
-
'Twig_Node_Expression_Test_Even' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test/Even.php',
|
462 |
-
'Twig_Node_Expression_Test_Null' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test/Null.php',
|
463 |
-
'Twig_Node_Expression_Test_Odd' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test/Odd.php',
|
464 |
-
'Twig_Node_Expression_Test_Sameas' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php',
|
465 |
-
'Twig_Node_Expression_Unary' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Unary.php',
|
466 |
-
'Twig_Node_Expression_Unary_Neg' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php',
|
467 |
-
'Twig_Node_Expression_Unary_Not' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Unary/Not.php',
|
468 |
-
'Twig_Node_Expression_Unary_Pos' => $vendorDir . '/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php',
|
469 |
-
'Twig_Node_Flush' => $vendorDir . '/twig/twig/lib/Twig/Node/Flush.php',
|
470 |
-
'Twig_Node_For' => $vendorDir . '/twig/twig/lib/Twig/Node/For.php',
|
471 |
-
'Twig_Node_ForLoop' => $vendorDir . '/twig/twig/lib/Twig/Node/ForLoop.php',
|
472 |
-
'Twig_Node_If' => $vendorDir . '/twig/twig/lib/Twig/Node/If.php',
|
473 |
-
'Twig_Node_Import' => $vendorDir . '/twig/twig/lib/Twig/Node/Import.php',
|
474 |
-
'Twig_Node_Include' => $vendorDir . '/twig/twig/lib/Twig/Node/Include.php',
|
475 |
-
'Twig_Node_Macro' => $vendorDir . '/twig/twig/lib/Twig/Node/Macro.php',
|
476 |
-
'Twig_Node_Module' => $vendorDir . '/twig/twig/lib/Twig/Node/Module.php',
|
477 |
-
'Twig_Node_Print' => $vendorDir . '/twig/twig/lib/Twig/Node/Print.php',
|
478 |
-
'Twig_Node_Sandbox' => $vendorDir . '/twig/twig/lib/Twig/Node/Sandbox.php',
|
479 |
-
'Twig_Node_SandboxedPrint' => $vendorDir . '/twig/twig/lib/Twig/Node/SandboxedPrint.php',
|
480 |
-
'Twig_Node_Set' => $vendorDir . '/twig/twig/lib/Twig/Node/Set.php',
|
481 |
-
'Twig_Node_Spaceless' => $vendorDir . '/twig/twig/lib/Twig/Node/Spaceless.php',
|
482 |
-
'Twig_Node_Text' => $vendorDir . '/twig/twig/lib/Twig/Node/Text.php',
|
483 |
-
'Twig_Node_With' => $vendorDir . '/twig/twig/lib/Twig/Node/With.php',
|
484 |
-
'Twig_Parser' => $vendorDir . '/twig/twig/lib/Twig/Parser.php',
|
485 |
-
'Twig_Profiler_Dumper_Base' => $vendorDir . '/twig/twig/lib/Twig/Profiler/Dumper/Base.php',
|
486 |
-
'Twig_Profiler_Dumper_Blackfire' => $vendorDir . '/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php',
|
487 |
-
'Twig_Profiler_Dumper_Html' => $vendorDir . '/twig/twig/lib/Twig/Profiler/Dumper/Html.php',
|
488 |
-
'Twig_Profiler_Dumper_Text' => $vendorDir . '/twig/twig/lib/Twig/Profiler/Dumper/Text.php',
|
489 |
-
'Twig_Profiler_NodeVisitor_Profiler' => $vendorDir . '/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php',
|
490 |
-
'Twig_Profiler_Node_EnterProfile' => $vendorDir . '/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php',
|
491 |
-
'Twig_Profiler_Node_LeaveProfile' => $vendorDir . '/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php',
|
492 |
-
'Twig_Profiler_Profile' => $vendorDir . '/twig/twig/lib/Twig/Profiler/Profile.php',
|
493 |
-
'Twig_RuntimeLoaderInterface' => $vendorDir . '/twig/twig/lib/Twig/RuntimeLoaderInterface.php',
|
494 |
-
'Twig_Sandbox_SecurityError' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityError.php',
|
495 |
-
'Twig_Sandbox_SecurityNotAllowedFilterError' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php',
|
496 |
-
'Twig_Sandbox_SecurityNotAllowedFunctionError' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php',
|
497 |
-
'Twig_Sandbox_SecurityNotAllowedMethodError' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php',
|
498 |
-
'Twig_Sandbox_SecurityNotAllowedPropertyError' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php',
|
499 |
-
'Twig_Sandbox_SecurityNotAllowedTagError' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php',
|
500 |
-
'Twig_Sandbox_SecurityPolicy' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php',
|
501 |
-
'Twig_Sandbox_SecurityPolicyInterface' => $vendorDir . '/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php',
|
502 |
-
'Twig_SimpleFilter' => $vendorDir . '/twig/twig/lib/Twig/SimpleFilter.php',
|
503 |
-
'Twig_SimpleFunction' => $vendorDir . '/twig/twig/lib/Twig/SimpleFunction.php',
|
504 |
-
'Twig_SimpleTest' => $vendorDir . '/twig/twig/lib/Twig/SimpleTest.php',
|
505 |
-
'Twig_Source' => $vendorDir . '/twig/twig/lib/Twig/Source.php',
|
506 |
-
'Twig_SourceContextLoaderInterface' => $vendorDir . '/twig/twig/lib/Twig/SourceContextLoaderInterface.php',
|
507 |
-
'Twig_Template' => $vendorDir . '/twig/twig/lib/Twig/Template.php',
|
508 |
-
'Twig_TemplateWrapper' => $vendorDir . '/twig/twig/lib/Twig/TemplateWrapper.php',
|
509 |
-
'Twig_Test' => $vendorDir . '/twig/twig/lib/Twig/Test.php',
|
510 |
-
'Twig_Test_IntegrationTestCase' => $vendorDir . '/twig/twig/lib/Twig/Test/IntegrationTestCase.php',
|
511 |
-
'Twig_Test_NodeTestCase' => $vendorDir . '/twig/twig/lib/Twig/Test/NodeTestCase.php',
|
512 |
-
'Twig_Token' => $vendorDir . '/twig/twig/lib/Twig/Token.php',
|
513 |
-
'Twig_TokenParser' => $vendorDir . '/twig/twig/lib/Twig/TokenParser.php',
|
514 |
-
'Twig_TokenParserInterface' => $vendorDir . '/twig/twig/lib/Twig/TokenParserInterface.php',
|
515 |
-
'Twig_TokenParser_AutoEscape' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/AutoEscape.php',
|
516 |
-
'Twig_TokenParser_Block' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Block.php',
|
517 |
-
'Twig_TokenParser_Deprecated' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Deprecated.php',
|
518 |
-
'Twig_TokenParser_Do' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Do.php',
|
519 |
-
'Twig_TokenParser_Embed' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Embed.php',
|
520 |
-
'Twig_TokenParser_Extends' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Extends.php',
|
521 |
-
'Twig_TokenParser_Filter' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Filter.php',
|
522 |
-
'Twig_TokenParser_Flush' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Flush.php',
|
523 |
-
'Twig_TokenParser_For' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/For.php',
|
524 |
-
'Twig_TokenParser_From' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/From.php',
|
525 |
-
'Twig_TokenParser_If' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/If.php',
|
526 |
-
'Twig_TokenParser_Import' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Import.php',
|
527 |
-
'Twig_TokenParser_Include' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Include.php',
|
528 |
-
'Twig_TokenParser_Macro' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Macro.php',
|
529 |
-
'Twig_TokenParser_Sandbox' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Sandbox.php',
|
530 |
-
'Twig_TokenParser_Set' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Set.php',
|
531 |
-
'Twig_TokenParser_Spaceless' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Spaceless.php',
|
532 |
-
'Twig_TokenParser_Use' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/Use.php',
|
533 |
-
'Twig_TokenParser_With' => $vendorDir . '/twig/twig/lib/Twig/TokenParser/With.php',
|
534 |
-
'Twig_TokenStream' => $vendorDir . '/twig/twig/lib/Twig/TokenStream.php',
|
535 |
-
'Twig_Util_DeprecationCollector' => $vendorDir . '/twig/twig/lib/Twig/Util/DeprecationCollector.php',
|
536 |
-
'Twig_Util_TemplateDirIterator' => $vendorDir . '/twig/twig/lib/Twig/Util/TemplateDirIterator.php',
|
537 |
);
|
8 |
return array(
|
9 |
'AltoRouter' => $vendorDir . '/altorouter/altorouter/AltoRouter.php',
|
10 |
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
);
|
vendor/composer/autoload_files.php
CHANGED
@@ -6,7 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
-
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
|
10 |
-
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
11 |
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
12 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
|
|
9 |
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
10 |
);
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -8,8 +8,6 @@ $baseDir = dirname($vendorDir);
|
|
8 |
return array(
|
9 |
'Twig\\' => array($vendorDir . '/twig/twig/src'),
|
10 |
'Timber\\' => array($baseDir . '/lib'),
|
11 |
-
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
|
12 |
-
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
13 |
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
14 |
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
|
15 |
'' => array($vendorDir . '/twig/cache-extension/lib'),
|
8 |
return array(
|
9 |
'Twig\\' => array($vendorDir . '/twig/twig/src'),
|
10 |
'Timber\\' => array($baseDir . '/lib'),
|
|
|
|
|
11 |
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
12 |
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
|
13 |
'' => array($vendorDir . '/twig/cache-extension/lib'),
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit989702ef2dea046e4eae802005e7b013
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -53,19 +53,19 @@ class ComposerAutoloaderInit989702ef2dea046e4eae802005e7b013
|
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
function
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit84e42f61074097fdc526963199118ce6
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit84e42f61074097fdc526963199118ce6', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit84e42f61074097fdc526963199118ce6', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit84e42f61074097fdc526963199118ce6::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit84e42f61074097fdc526963199118ce6::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequire84e42f61074097fdc526963199118ce6($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
+
function composerRequire84e42f61074097fdc526963199118ce6($fileIdentifier, $file)
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,11 +4,9 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
-
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
11 |
-
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
12 |
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
13 |
);
|
14 |
|
@@ -20,8 +18,6 @@ class ComposerStaticInit989702ef2dea046e4eae802005e7b013
|
|
20 |
),
|
21 |
'S' =>
|
22 |
array (
|
23 |
-
'Symfony\\Polyfill\\Php72\\' => 23,
|
24 |
-
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
25 |
'Symfony\\Polyfill\\Ctype\\' => 23,
|
26 |
),
|
27 |
'C' =>
|
@@ -39,14 +35,6 @@ class ComposerStaticInit989702ef2dea046e4eae802005e7b013
|
|
39 |
array (
|
40 |
0 => __DIR__ . '/../..' . '/lib',
|
41 |
),
|
42 |
-
'Symfony\\Polyfill\\Php72\\' =>
|
43 |
-
array (
|
44 |
-
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
|
45 |
-
),
|
46 |
-
'Symfony\\Polyfill\\Mbstring\\' =>
|
47 |
-
array (
|
48 |
-
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
|
49 |
-
),
|
50 |
'Symfony\\Polyfill\\Ctype\\' =>
|
51 |
array (
|
52 |
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
@@ -81,542 +69,16 @@ class ComposerStaticInit989702ef2dea046e4eae802005e7b013
|
|
81 |
public static $classMap = array (
|
82 |
'AltoRouter' => __DIR__ . '/..' . '/altorouter/altorouter/AltoRouter.php',
|
83 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
84 |
-
'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
|
85 |
-
'Composer\\Installers\\AkauntingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
|
86 |
-
'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
|
87 |
-
'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
|
88 |
-
'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
|
89 |
-
'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
|
90 |
-
'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
|
91 |
-
'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
|
92 |
-
'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
|
93 |
-
'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
|
94 |
-
'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
|
95 |
-
'Composer\\Installers\\ClanCatsFrameworkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
|
96 |
-
'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
|
97 |
-
'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
|
98 |
-
'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
|
99 |
-
'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
|
100 |
-
'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
|
101 |
-
'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
|
102 |
-
'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
|
103 |
-
'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
|
104 |
-
'Composer\\Installers\\DrupalInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
|
105 |
-
'Composer\\Installers\\ElggInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
|
106 |
-
'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
|
107 |
-
'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
|
108 |
-
'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
|
109 |
-
'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
|
110 |
-
'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
|
111 |
-
'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php',
|
112 |
-
'Composer\\Installers\\HuradInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
|
113 |
-
'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
|
114 |
-
'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php',
|
115 |
-
'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
|
116 |
-
'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
|
117 |
-
'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
|
118 |
-
'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
|
119 |
-
'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
|
120 |
-
'Composer\\Installers\\LanManagementSystemInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
|
121 |
-
'Composer\\Installers\\LaravelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
|
122 |
-
'Composer\\Installers\\LavaLiteInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
|
123 |
-
'Composer\\Installers\\LithiumInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
|
124 |
-
'Composer\\Installers\\MODULEWorkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
|
125 |
-
'Composer\\Installers\\MODXEvoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
|
126 |
-
'Composer\\Installers\\MagentoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
|
127 |
-
'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
|
128 |
-
'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
|
129 |
-
'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
|
130 |
-
'Composer\\Installers\\MatomoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
|
131 |
-
'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
|
132 |
-
'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
|
133 |
-
'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
|
134 |
-
'Composer\\Installers\\MiaoxingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php',
|
135 |
-
'Composer\\Installers\\MicroweberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
|
136 |
-
'Composer\\Installers\\ModxInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
|
137 |
-
'Composer\\Installers\\MoodleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
|
138 |
-
'Composer\\Installers\\OctoberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
|
139 |
-
'Composer\\Installers\\OntoWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
|
140 |
-
'Composer\\Installers\\OsclassInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
|
141 |
-
'Composer\\Installers\\OxidInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
|
142 |
-
'Composer\\Installers\\PPIInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
|
143 |
-
'Composer\\Installers\\PantheonInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
|
144 |
-
'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
|
145 |
-
'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
|
146 |
-
'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
|
147 |
-
'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
|
148 |
-
'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php',
|
149 |
-
'Composer\\Installers\\PortoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
|
150 |
-
'Composer\\Installers\\PrestashopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
|
151 |
-
'Composer\\Installers\\ProcessWireInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
|
152 |
-
'Composer\\Installers\\PuppetInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
|
153 |
-
'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
|
154 |
-
'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
|
155 |
-
'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
|
156 |
-
'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
|
157 |
-
'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
|
158 |
-
'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
|
159 |
-
'Composer\\Installers\\SMFInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
|
160 |
-
'Composer\\Installers\\ShopwareInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
|
161 |
-
'Composer\\Installers\\SilverStripeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
|
162 |
-
'Composer\\Installers\\SiteDirectInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
|
163 |
-
'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
|
164 |
-
'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
|
165 |
-
'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
|
166 |
-
'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
|
167 |
-
'Composer\\Installers\\TastyIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
|
168 |
-
'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
|
169 |
-
'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
|
170 |
-
'Composer\\Installers\\UserFrostingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
|
171 |
-
'Composer\\Installers\\VanillaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
|
172 |
-
'Composer\\Installers\\VgmcpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
|
173 |
-
'Composer\\Installers\\WHMCSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
|
174 |
-
'Composer\\Installers\\WinterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WinterInstaller.php',
|
175 |
-
'Composer\\Installers\\WolfCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
|
176 |
-
'Composer\\Installers\\WordPressInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
|
177 |
-
'Composer\\Installers\\YawikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
|
178 |
-
'Composer\\Installers\\ZendInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
|
179 |
-
'Composer\\Installers\\ZikulaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
|
180 |
-
'Routes' => __DIR__ . '/..' . '/upstatement/routes/Routes.php',
|
181 |
-
'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
|
182 |
-
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
|
183 |
-
'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php',
|
184 |
-
'Timber\\Admin' => __DIR__ . '/../..' . '/lib/Admin.php',
|
185 |
-
'Timber\\Archives' => __DIR__ . '/../..' . '/lib/Archives.php',
|
186 |
-
'Timber\\Cache\\Cleaner' => __DIR__ . '/../..' . '/lib/Cache/Cleaner.php',
|
187 |
-
'Timber\\Cache\\KeyGenerator' => __DIR__ . '/../..' . '/lib/Cache/KeyGenerator.php',
|
188 |
-
'Timber\\Cache\\TimberKeyGeneratorInterface' => __DIR__ . '/../..' . '/lib/Cache/TimberKeyGeneratorInterface.php',
|
189 |
-
'Timber\\Cache\\WPObjectCacheAdapter' => __DIR__ . '/../..' . '/lib/Cache/WPObjectCacheAdapter.php',
|
190 |
-
'Timber\\Comment' => __DIR__ . '/../..' . '/lib/Comment.php',
|
191 |
-
'Timber\\CommentThread' => __DIR__ . '/../..' . '/lib/CommentThread.php',
|
192 |
-
'Timber\\Core' => __DIR__ . '/../..' . '/lib/Core.php',
|
193 |
-
'Timber\\CoreInterface' => __DIR__ . '/../..' . '/lib/CoreInterface.php',
|
194 |
-
'Timber\\FunctionWrapper' => __DIR__ . '/../..' . '/lib/FunctionWrapper.php',
|
195 |
-
'Timber\\Helper' => __DIR__ . '/../..' . '/lib/Helper.php',
|
196 |
-
'Timber\\Image' => __DIR__ . '/../..' . '/lib/Image.php',
|
197 |
-
'Timber\\ImageHelper' => __DIR__ . '/../..' . '/lib/ImageHelper.php',
|
198 |
-
'Timber\\Image\\Operation' => __DIR__ . '/../..' . '/lib/Image/Operation.php',
|
199 |
-
'Timber\\Image\\Operation\\Letterbox' => __DIR__ . '/../..' . '/lib/Image/Operation/Letterbox.php',
|
200 |
-
'Timber\\Image\\Operation\\Resize' => __DIR__ . '/../..' . '/lib/Image/Operation/Resize.php',
|
201 |
-
'Timber\\Image\\Operation\\Retina' => __DIR__ . '/../..' . '/lib/Image/Operation/Retina.php',
|
202 |
-
'Timber\\Image\\Operation\\ToJpg' => __DIR__ . '/../..' . '/lib/Image/Operation/ToJpg.php',
|
203 |
-
'Timber\\Image\\Operation\\ToWebp' => __DIR__ . '/../..' . '/lib/Image/Operation/ToWebp.php',
|
204 |
-
'Timber\\Integrations' => __DIR__ . '/../..' . '/lib/Integrations.php',
|
205 |
-
'Timber\\Integrations\\ACF' => __DIR__ . '/../..' . '/lib/Integrations/ACF.php',
|
206 |
-
'Timber\\Integrations\\CoAuthorsPlus' => __DIR__ . '/../..' . '/lib/Integrations/CoAuthorsPlus.php',
|
207 |
-
'Timber\\Integrations\\CoAuthorsPlusUser' => __DIR__ . '/../..' . '/lib/Integrations/CoAuthorsPlusUser.php',
|
208 |
-
'Timber\\Integrations\\Command' => __DIR__ . '/../..' . '/lib/Integrations/Command.php',
|
209 |
-
'Timber\\Integrations\\Timber_WP_CLI_Command' => __DIR__ . '/../..' . '/lib/Integrations/Timber_WP_CLI_Command.php',
|
210 |
-
'Timber\\Integrations\\WPML' => __DIR__ . '/../..' . '/lib/Integrations/WPML.php',
|
211 |
-
'Timber\\Loader' => __DIR__ . '/../..' . '/lib/Loader.php',
|
212 |
-
'Timber\\LocationManager' => __DIR__ . '/../..' . '/lib/LocationManager.php',
|
213 |
-
'Timber\\Menu' => __DIR__ . '/../..' . '/lib/Menu.php',
|
214 |
-
'Timber\\MenuItem' => __DIR__ . '/../..' . '/lib/MenuItem.php',
|
215 |
-
'Timber\\Pagination' => __DIR__ . '/../..' . '/lib/Pagination.php',
|
216 |
-
'Timber\\PathHelper' => __DIR__ . '/../..' . '/lib/PathHelper.php',
|
217 |
-
'Timber\\Post' => __DIR__ . '/../..' . '/lib/Post.php',
|
218 |
-
'Timber\\PostCollection' => __DIR__ . '/../..' . '/lib/PostCollection.php',
|
219 |
-
'Timber\\PostGetter' => __DIR__ . '/../..' . '/lib/PostGetter.php',
|
220 |
-
'Timber\\PostPreview' => __DIR__ . '/../..' . '/lib/PostPreview.php',
|
221 |
-
'Timber\\PostQuery' => __DIR__ . '/../..' . '/lib/PostQuery.php',
|
222 |
-
'Timber\\PostType' => __DIR__ . '/../..' . '/lib/PostType.php',
|
223 |
-
'Timber\\PostsIterator' => __DIR__ . '/../..' . '/lib/PostsIterator.php',
|
224 |
-
'Timber\\QueryIterator' => __DIR__ . '/../..' . '/lib/QueryIterator.php',
|
225 |
-
'Timber\\Request' => __DIR__ . '/../..' . '/lib/Request.php',
|
226 |
-
'Timber\\Site' => __DIR__ . '/../..' . '/lib/Site.php',
|
227 |
-
'Timber\\Term' => __DIR__ . '/../..' . '/lib/Term.php',
|
228 |
-
'Timber\\TermGetter' => __DIR__ . '/../..' . '/lib/TermGetter.php',
|
229 |
-
'Timber\\TextHelper' => __DIR__ . '/../..' . '/lib/TextHelper.php',
|
230 |
-
'Timber\\Theme' => __DIR__ . '/../..' . '/lib/Theme.php',
|
231 |
-
'Timber\\Timber' => __DIR__ . '/../..' . '/lib/Timber.php',
|
232 |
-
'Timber\\Twig' => __DIR__ . '/../..' . '/lib/Twig.php',
|
233 |
-
'Timber\\Twig_Filter' => __DIR__ . '/../..' . '/lib/Twig_Filter.php',
|
234 |
-
'Timber\\Twig_Function' => __DIR__ . '/../..' . '/lib/Twig_Function.php',
|
235 |
-
'Timber\\URLHelper' => __DIR__ . '/../..' . '/lib/URLHelper.php',
|
236 |
-
'Timber\\User' => __DIR__ . '/../..' . '/lib/User.php',
|
237 |
-
'Twig\\CacheExtension\\CacheProviderInterface' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheProviderInterface.php',
|
238 |
-
'Twig\\CacheExtension\\CacheProvider\\DoctrineCacheAdapter' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheProvider/DoctrineCacheAdapter.php',
|
239 |
-
'Twig\\CacheExtension\\CacheProvider\\PsrCacheAdapter' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheProvider/PsrCacheAdapter.php',
|
240 |
-
'Twig\\CacheExtension\\CacheStrategyInterface' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategyInterface.php',
|
241 |
-
'Twig\\CacheExtension\\CacheStrategy\\BlackholeCacheStrategy' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/BlackholeCacheStrategy.php',
|
242 |
-
'Twig\\CacheExtension\\CacheStrategy\\GenerationalCacheStrategy' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/GenerationalCacheStrategy.php',
|
243 |
-
'Twig\\CacheExtension\\CacheStrategy\\IndexedChainingCacheStrategy' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/IndexedChainingCacheStrategy.php',
|
244 |
-
'Twig\\CacheExtension\\CacheStrategy\\KeyGeneratorInterface' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/KeyGeneratorInterface.php',
|
245 |
-
'Twig\\CacheExtension\\CacheStrategy\\LifetimeCacheStrategy' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/CacheStrategy/LifetimeCacheStrategy.php',
|
246 |
-
'Twig\\CacheExtension\\Exception\\BaseException' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/BaseException.php',
|
247 |
-
'Twig\\CacheExtension\\Exception\\InvalidCacheKeyException' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/InvalidCacheKeyException.php',
|
248 |
-
'Twig\\CacheExtension\\Exception\\InvalidCacheLifetimeException' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/InvalidCacheLifetimeException.php',
|
249 |
-
'Twig\\CacheExtension\\Exception\\NonExistingStrategyException' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/NonExistingStrategyException.php',
|
250 |
-
'Twig\\CacheExtension\\Exception\\NonExistingStrategyKeyException' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/Exception/NonExistingStrategyKeyException.php',
|
251 |
-
'Twig\\CacheExtension\\Extension' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/Extension.php',
|
252 |
-
'Twig\\CacheExtension\\Node\\CacheNode' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/Node/CacheNode.php',
|
253 |
-
'Twig\\CacheExtension\\TokenParser\\Cache' => __DIR__ . '/..' . '/twig/cache-extension/lib/Twig/CacheExtension/TokenParser/Cache.php',
|
254 |
-
'Twig\\Cache\\CacheInterface' => __DIR__ . '/..' . '/twig/twig/src/Cache/CacheInterface.php',
|
255 |
-
'Twig\\Cache\\FilesystemCache' => __DIR__ . '/..' . '/twig/twig/src/Cache/FilesystemCache.php',
|
256 |
-
'Twig\\Cache\\NullCache' => __DIR__ . '/..' . '/twig/twig/src/Cache/NullCache.php',
|
257 |
-
'Twig\\Compiler' => __DIR__ . '/..' . '/twig/twig/src/Compiler.php',
|
258 |
-
'Twig\\Environment' => __DIR__ . '/..' . '/twig/twig/src/Environment.php',
|
259 |
-
'Twig\\Error\\Error' => __DIR__ . '/..' . '/twig/twig/src/Error/Error.php',
|
260 |
-
'Twig\\Error\\LoaderError' => __DIR__ . '/..' . '/twig/twig/src/Error/LoaderError.php',
|
261 |
-
'Twig\\Error\\RuntimeError' => __DIR__ . '/..' . '/twig/twig/src/Error/RuntimeError.php',
|
262 |
-
'Twig\\Error\\SyntaxError' => __DIR__ . '/..' . '/twig/twig/src/Error/SyntaxError.php',
|
263 |
-
'Twig\\ExpressionParser' => __DIR__ . '/..' . '/twig/twig/src/ExpressionParser.php',
|
264 |
-
'Twig\\ExtensionSet' => __DIR__ . '/..' . '/twig/twig/src/ExtensionSet.php',
|
265 |
-
'Twig\\Extension\\AbstractExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/AbstractExtension.php',
|
266 |
-
'Twig\\Extension\\CoreExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/CoreExtension.php',
|
267 |
-
'Twig\\Extension\\DebugExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/DebugExtension.php',
|
268 |
-
'Twig\\Extension\\EscaperExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/EscaperExtension.php',
|
269 |
-
'Twig\\Extension\\ExtensionInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/ExtensionInterface.php',
|
270 |
-
'Twig\\Extension\\GlobalsInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/GlobalsInterface.php',
|
271 |
-
'Twig\\Extension\\InitRuntimeInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/InitRuntimeInterface.php',
|
272 |
-
'Twig\\Extension\\OptimizerExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/OptimizerExtension.php',
|
273 |
-
'Twig\\Extension\\ProfilerExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/ProfilerExtension.php',
|
274 |
-
'Twig\\Extension\\RuntimeExtensionInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/RuntimeExtensionInterface.php',
|
275 |
-
'Twig\\Extension\\SandboxExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/SandboxExtension.php',
|
276 |
-
'Twig\\Extension\\StagingExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/StagingExtension.php',
|
277 |
-
'Twig\\Extension\\StringLoaderExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/StringLoaderExtension.php',
|
278 |
-
'Twig\\FileExtensionEscapingStrategy' => __DIR__ . '/..' . '/twig/twig/src/FileExtensionEscapingStrategy.php',
|
279 |
-
'Twig\\Lexer' => __DIR__ . '/..' . '/twig/twig/src/Lexer.php',
|
280 |
-
'Twig\\Loader\\ArrayLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/ArrayLoader.php',
|
281 |
-
'Twig\\Loader\\ChainLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/ChainLoader.php',
|
282 |
-
'Twig\\Loader\\ExistsLoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/Loader/ExistsLoaderInterface.php',
|
283 |
-
'Twig\\Loader\\FilesystemLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/FilesystemLoader.php',
|
284 |
-
'Twig\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/Loader/LoaderInterface.php',
|
285 |
-
'Twig\\Loader\\SourceContextLoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/Loader/SourceContextLoaderInterface.php',
|
286 |
-
'Twig\\Markup' => __DIR__ . '/..' . '/twig/twig/src/Markup.php',
|
287 |
-
'Twig\\NodeTraverser' => __DIR__ . '/..' . '/twig/twig/src/NodeTraverser.php',
|
288 |
-
'Twig\\NodeVisitor\\AbstractNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php',
|
289 |
-
'Twig\\NodeVisitor\\EscaperNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php',
|
290 |
-
'Twig\\NodeVisitor\\MacroAutoImportNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php',
|
291 |
-
'Twig\\NodeVisitor\\NodeVisitorInterface' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/NodeVisitorInterface.php',
|
292 |
-
'Twig\\NodeVisitor\\OptimizerNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php',
|
293 |
-
'Twig\\NodeVisitor\\SafeAnalysisNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php',
|
294 |
-
'Twig\\NodeVisitor\\SandboxNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php',
|
295 |
-
'Twig\\Node\\AutoEscapeNode' => __DIR__ . '/..' . '/twig/twig/src/Node/AutoEscapeNode.php',
|
296 |
-
'Twig\\Node\\BlockNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BlockNode.php',
|
297 |
-
'Twig\\Node\\BlockReferenceNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BlockReferenceNode.php',
|
298 |
-
'Twig\\Node\\BodyNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BodyNode.php',
|
299 |
-
'Twig\\Node\\CheckSecurityCallNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckSecurityCallNode.php',
|
300 |
-
'Twig\\Node\\CheckSecurityNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckSecurityNode.php',
|
301 |
-
'Twig\\Node\\CheckToStringNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckToStringNode.php',
|
302 |
-
'Twig\\Node\\DeprecatedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/DeprecatedNode.php',
|
303 |
-
'Twig\\Node\\DoNode' => __DIR__ . '/..' . '/twig/twig/src/Node/DoNode.php',
|
304 |
-
'Twig\\Node\\EmbedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/EmbedNode.php',
|
305 |
-
'Twig\\Node\\Expression\\AbstractExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AbstractExpression.php',
|
306 |
-
'Twig\\Node\\Expression\\ArrayExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrayExpression.php',
|
307 |
-
'Twig\\Node\\Expression\\ArrowFunctionExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php',
|
308 |
-
'Twig\\Node\\Expression\\AssignNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AssignNameExpression.php',
|
309 |
-
'Twig\\Node\\Expression\\Binary\\AbstractBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php',
|
310 |
-
'Twig\\Node\\Expression\\Binary\\AddBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AddBinary.php',
|
311 |
-
'Twig\\Node\\Expression\\Binary\\AndBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AndBinary.php',
|
312 |
-
'Twig\\Node\\Expression\\Binary\\BitwiseAndBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php',
|
313 |
-
'Twig\\Node\\Expression\\Binary\\BitwiseOrBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php',
|
314 |
-
'Twig\\Node\\Expression\\Binary\\BitwiseXorBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php',
|
315 |
-
'Twig\\Node\\Expression\\Binary\\ConcatBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/ConcatBinary.php',
|
316 |
-
'Twig\\Node\\Expression\\Binary\\DivBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/DivBinary.php',
|
317 |
-
'Twig\\Node\\Expression\\Binary\\EndsWithBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php',
|
318 |
-
'Twig\\Node\\Expression\\Binary\\EqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/EqualBinary.php',
|
319 |
-
'Twig\\Node\\Expression\\Binary\\FloorDivBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php',
|
320 |
-
'Twig\\Node\\Expression\\Binary\\GreaterBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/GreaterBinary.php',
|
321 |
-
'Twig\\Node\\Expression\\Binary\\GreaterEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php',
|
322 |
-
'Twig\\Node\\Expression\\Binary\\InBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/InBinary.php',
|
323 |
-
'Twig\\Node\\Expression\\Binary\\LessBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/LessBinary.php',
|
324 |
-
'Twig\\Node\\Expression\\Binary\\LessEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php',
|
325 |
-
'Twig\\Node\\Expression\\Binary\\MatchesBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/MatchesBinary.php',
|
326 |
-
'Twig\\Node\\Expression\\Binary\\ModBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/ModBinary.php',
|
327 |
-
'Twig\\Node\\Expression\\Binary\\MulBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/MulBinary.php',
|
328 |
-
'Twig\\Node\\Expression\\Binary\\NotEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php',
|
329 |
-
'Twig\\Node\\Expression\\Binary\\NotInBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/NotInBinary.php',
|
330 |
-
'Twig\\Node\\Expression\\Binary\\OrBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/OrBinary.php',
|
331 |
-
'Twig\\Node\\Expression\\Binary\\PowerBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/PowerBinary.php',
|
332 |
-
'Twig\\Node\\Expression\\Binary\\RangeBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/RangeBinary.php',
|
333 |
-
'Twig\\Node\\Expression\\Binary\\SpaceshipBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php',
|
334 |
-
'Twig\\Node\\Expression\\Binary\\StartsWithBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php',
|
335 |
-
'Twig\\Node\\Expression\\Binary\\SubBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/SubBinary.php',
|
336 |
-
'Twig\\Node\\Expression\\BlockReferenceExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/BlockReferenceExpression.php',
|
337 |
-
'Twig\\Node\\Expression\\CallExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/CallExpression.php',
|
338 |
-
'Twig\\Node\\Expression\\ConditionalExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ConditionalExpression.php',
|
339 |
-
'Twig\\Node\\Expression\\ConstantExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ConstantExpression.php',
|
340 |
-
'Twig\\Node\\Expression\\FilterExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/FilterExpression.php',
|
341 |
-
'Twig\\Node\\Expression\\Filter\\DefaultFilter' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Filter/DefaultFilter.php',
|
342 |
-
'Twig\\Node\\Expression\\FunctionExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/FunctionExpression.php',
|
343 |
-
'Twig\\Node\\Expression\\GetAttrExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/GetAttrExpression.php',
|
344 |
-
'Twig\\Node\\Expression\\InlinePrint' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/InlinePrint.php',
|
345 |
-
'Twig\\Node\\Expression\\MethodCallExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/MethodCallExpression.php',
|
346 |
-
'Twig\\Node\\Expression\\NameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/NameExpression.php',
|
347 |
-
'Twig\\Node\\Expression\\NullCoalesceExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/NullCoalesceExpression.php',
|
348 |
-
'Twig\\Node\\Expression\\ParentExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ParentExpression.php',
|
349 |
-
'Twig\\Node\\Expression\\TempNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/TempNameExpression.php',
|
350 |
-
'Twig\\Node\\Expression\\TestExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/TestExpression.php',
|
351 |
-
'Twig\\Node\\Expression\\Test\\ConstantTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/ConstantTest.php',
|
352 |
-
'Twig\\Node\\Expression\\Test\\DefinedTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/DefinedTest.php',
|
353 |
-
'Twig\\Node\\Expression\\Test\\DivisiblebyTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php',
|
354 |
-
'Twig\\Node\\Expression\\Test\\EvenTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/EvenTest.php',
|
355 |
-
'Twig\\Node\\Expression\\Test\\NullTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/NullTest.php',
|
356 |
-
'Twig\\Node\\Expression\\Test\\OddTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/OddTest.php',
|
357 |
-
'Twig\\Node\\Expression\\Test\\SameasTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/SameasTest.php',
|
358 |
-
'Twig\\Node\\Expression\\Unary\\AbstractUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/AbstractUnary.php',
|
359 |
-
'Twig\\Node\\Expression\\Unary\\NegUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/NegUnary.php',
|
360 |
-
'Twig\\Node\\Expression\\Unary\\NotUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/NotUnary.php',
|
361 |
-
'Twig\\Node\\Expression\\Unary\\PosUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/PosUnary.php',
|
362 |
-
'Twig\\Node\\Expression\\VariadicExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/VariadicExpression.php',
|
363 |
-
'Twig\\Node\\FlushNode' => __DIR__ . '/..' . '/twig/twig/src/Node/FlushNode.php',
|
364 |
-
'Twig\\Node\\ForLoopNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ForLoopNode.php',
|
365 |
-
'Twig\\Node\\ForNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ForNode.php',
|
366 |
-
'Twig\\Node\\IfNode' => __DIR__ . '/..' . '/twig/twig/src/Node/IfNode.php',
|
367 |
-
'Twig\\Node\\ImportNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ImportNode.php',
|
368 |
-
'Twig\\Node\\IncludeNode' => __DIR__ . '/..' . '/twig/twig/src/Node/IncludeNode.php',
|
369 |
-
'Twig\\Node\\MacroNode' => __DIR__ . '/..' . '/twig/twig/src/Node/MacroNode.php',
|
370 |
-
'Twig\\Node\\ModuleNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ModuleNode.php',
|
371 |
-
'Twig\\Node\\Node' => __DIR__ . '/..' . '/twig/twig/src/Node/Node.php',
|
372 |
-
'Twig\\Node\\NodeCaptureInterface' => __DIR__ . '/..' . '/twig/twig/src/Node/NodeCaptureInterface.php',
|
373 |
-
'Twig\\Node\\NodeOutputInterface' => __DIR__ . '/..' . '/twig/twig/src/Node/NodeOutputInterface.php',
|
374 |
-
'Twig\\Node\\PrintNode' => __DIR__ . '/..' . '/twig/twig/src/Node/PrintNode.php',
|
375 |
-
'Twig\\Node\\SandboxNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SandboxNode.php',
|
376 |
-
'Twig\\Node\\SandboxedPrintNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SandboxedPrintNode.php',
|
377 |
-
'Twig\\Node\\SetNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SetNode.php',
|
378 |
-
'Twig\\Node\\SpacelessNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SpacelessNode.php',
|
379 |
-
'Twig\\Node\\TextNode' => __DIR__ . '/..' . '/twig/twig/src/Node/TextNode.php',
|
380 |
-
'Twig\\Node\\WithNode' => __DIR__ . '/..' . '/twig/twig/src/Node/WithNode.php',
|
381 |
-
'Twig\\Parser' => __DIR__ . '/..' . '/twig/twig/src/Parser.php',
|
382 |
-
'Twig\\Profiler\\Dumper\\BaseDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/BaseDumper.php',
|
383 |
-
'Twig\\Profiler\\Dumper\\BlackfireDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/BlackfireDumper.php',
|
384 |
-
'Twig\\Profiler\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/HtmlDumper.php',
|
385 |
-
'Twig\\Profiler\\Dumper\\TextDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/TextDumper.php',
|
386 |
-
'Twig\\Profiler\\NodeVisitor\\ProfilerNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php',
|
387 |
-
'Twig\\Profiler\\Node\\EnterProfileNode' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Node/EnterProfileNode.php',
|
388 |
-
'Twig\\Profiler\\Node\\LeaveProfileNode' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Node/LeaveProfileNode.php',
|
389 |
-
'Twig\\Profiler\\Profile' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Profile.php',
|
390 |
-
'Twig\\RuntimeLoader\\ContainerRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php',
|
391 |
-
'Twig\\RuntimeLoader\\FactoryRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php',
|
392 |
-
'Twig\\RuntimeLoader\\RuntimeLoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php',
|
393 |
-
'Twig\\Sandbox\\SecurityError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityError.php',
|
394 |
-
'Twig\\Sandbox\\SecurityNotAllowedFilterError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php',
|
395 |
-
'Twig\\Sandbox\\SecurityNotAllowedFunctionError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php',
|
396 |
-
'Twig\\Sandbox\\SecurityNotAllowedMethodError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php',
|
397 |
-
'Twig\\Sandbox\\SecurityNotAllowedPropertyError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php',
|
398 |
-
'Twig\\Sandbox\\SecurityNotAllowedTagError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php',
|
399 |
-
'Twig\\Sandbox\\SecurityPolicy' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityPolicy.php',
|
400 |
-
'Twig\\Sandbox\\SecurityPolicyInterface' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityPolicyInterface.php',
|
401 |
-
'Twig\\Source' => __DIR__ . '/..' . '/twig/twig/src/Source.php',
|
402 |
-
'Twig\\Template' => __DIR__ . '/..' . '/twig/twig/src/Template.php',
|
403 |
-
'Twig\\TemplateWrapper' => __DIR__ . '/..' . '/twig/twig/src/TemplateWrapper.php',
|
404 |
-
'Twig\\Test\\IntegrationTestCase' => __DIR__ . '/..' . '/twig/twig/src/Test/IntegrationTestCase.php',
|
405 |
-
'Twig\\Test\\NodeTestCase' => __DIR__ . '/..' . '/twig/twig/src/Test/NodeTestCase.php',
|
406 |
-
'Twig\\Token' => __DIR__ . '/..' . '/twig/twig/src/Token.php',
|
407 |
-
'Twig\\TokenParser\\AbstractTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AbstractTokenParser.php',
|
408 |
-
'Twig\\TokenParser\\ApplyTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ApplyTokenParser.php',
|
409 |
-
'Twig\\TokenParser\\AutoEscapeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php',
|
410 |
-
'Twig\\TokenParser\\BlockTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/BlockTokenParser.php',
|
411 |
-
'Twig\\TokenParser\\DeprecatedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php',
|
412 |
-
'Twig\\TokenParser\\DoTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DoTokenParser.php',
|
413 |
-
'Twig\\TokenParser\\EmbedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/EmbedTokenParser.php',
|
414 |
-
'Twig\\TokenParser\\ExtendsTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ExtendsTokenParser.php',
|
415 |
-
'Twig\\TokenParser\\FilterTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/FilterTokenParser.php',
|
416 |
-
'Twig\\TokenParser\\FlushTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/FlushTokenParser.php',
|
417 |
-
'Twig\\TokenParser\\ForTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ForTokenParser.php',
|
418 |
-
'Twig\\TokenParser\\FromTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/FromTokenParser.php',
|
419 |
-
'Twig\\TokenParser\\IfTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/IfTokenParser.php',
|
420 |
-
'Twig\\TokenParser\\ImportTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ImportTokenParser.php',
|
421 |
-
'Twig\\TokenParser\\IncludeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/IncludeTokenParser.php',
|
422 |
-
'Twig\\TokenParser\\MacroTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/MacroTokenParser.php',
|
423 |
-
'Twig\\TokenParser\\SandboxTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/SandboxTokenParser.php',
|
424 |
-
'Twig\\TokenParser\\SetTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/SetTokenParser.php',
|
425 |
-
'Twig\\TokenParser\\SpacelessTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/SpacelessTokenParser.php',
|
426 |
-
'Twig\\TokenParser\\TokenParserInterface' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/TokenParserInterface.php',
|
427 |
-
'Twig\\TokenParser\\UseTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/UseTokenParser.php',
|
428 |
-
'Twig\\TokenParser\\WithTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/WithTokenParser.php',
|
429 |
-
'Twig\\TokenStream' => __DIR__ . '/..' . '/twig/twig/src/TokenStream.php',
|
430 |
-
'Twig\\TwigFilter' => __DIR__ . '/..' . '/twig/twig/src/TwigFilter.php',
|
431 |
-
'Twig\\TwigFunction' => __DIR__ . '/..' . '/twig/twig/src/TwigFunction.php',
|
432 |
-
'Twig\\TwigTest' => __DIR__ . '/..' . '/twig/twig/src/TwigTest.php',
|
433 |
-
'Twig\\Util\\DeprecationCollector' => __DIR__ . '/..' . '/twig/twig/src/Util/DeprecationCollector.php',
|
434 |
-
'Twig\\Util\\TemplateDirIterator' => __DIR__ . '/..' . '/twig/twig/src/Util/TemplateDirIterator.php',
|
435 |
-
'Twig_BaseNodeVisitor' => __DIR__ . '/..' . '/twig/twig/lib/Twig/BaseNodeVisitor.php',
|
436 |
-
'Twig_CacheInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/CacheInterface.php',
|
437 |
-
'Twig_Cache_Filesystem' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Cache/Filesystem.php',
|
438 |
-
'Twig_Cache_Null' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Cache/Null.php',
|
439 |
-
'Twig_Compiler' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Compiler.php',
|
440 |
-
'Twig_ContainerRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/lib/Twig/ContainerRuntimeLoader.php',
|
441 |
-
'Twig_Environment' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Environment.php',
|
442 |
-
'Twig_Error' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Error.php',
|
443 |
-
'Twig_Error_Loader' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Error/Loader.php',
|
444 |
-
'Twig_Error_Runtime' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Error/Runtime.php',
|
445 |
-
'Twig_Error_Syntax' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Error/Syntax.php',
|
446 |
-
'Twig_ExistsLoaderInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/ExistsLoaderInterface.php',
|
447 |
-
'Twig_ExpressionParser' => __DIR__ . '/..' . '/twig/twig/lib/Twig/ExpressionParser.php',
|
448 |
-
'Twig_Extension' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension.php',
|
449 |
-
'Twig_ExtensionInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/ExtensionInterface.php',
|
450 |
-
'Twig_ExtensionSet' => __DIR__ . '/..' . '/twig/twig/lib/Twig/ExtensionSet.php',
|
451 |
-
'Twig_Extension_Core' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/Core.php',
|
452 |
-
'Twig_Extension_Debug' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/Debug.php',
|
453 |
-
'Twig_Extension_Escaper' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/Escaper.php',
|
454 |
-
'Twig_Extension_GlobalsInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/GlobalsInterface.php',
|
455 |
-
'Twig_Extension_InitRuntimeInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php',
|
456 |
-
'Twig_Extension_Optimizer' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/Optimizer.php',
|
457 |
-
'Twig_Extension_Profiler' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/Profiler.php',
|
458 |
-
'Twig_Extension_Sandbox' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/Sandbox.php',
|
459 |
-
'Twig_Extension_Staging' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/Staging.php',
|
460 |
-
'Twig_Extension_StringLoader' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Extension/StringLoader.php',
|
461 |
-
'Twig_FactoryRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/lib/Twig/FactoryRuntimeLoader.php',
|
462 |
-
'Twig_FileExtensionEscapingStrategy' => __DIR__ . '/..' . '/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php',
|
463 |
-
'Twig_Filter' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Filter.php',
|
464 |
-
'Twig_Function' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Function.php',
|
465 |
-
'Twig_Lexer' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Lexer.php',
|
466 |
-
'Twig_LoaderInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/LoaderInterface.php',
|
467 |
-
'Twig_Loader_Array' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Loader/Array.php',
|
468 |
-
'Twig_Loader_Chain' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Loader/Chain.php',
|
469 |
-
'Twig_Loader_Filesystem' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Loader/Filesystem.php',
|
470 |
-
'Twig_Markup' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Markup.php',
|
471 |
-
'Twig_Node' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node.php',
|
472 |
-
'Twig_NodeCaptureInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeCaptureInterface.php',
|
473 |
-
'Twig_NodeOutputInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeOutputInterface.php',
|
474 |
-
'Twig_NodeTraverser' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeTraverser.php',
|
475 |
-
'Twig_NodeVisitorInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeVisitorInterface.php',
|
476 |
-
'Twig_NodeVisitor_Escaper' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeVisitor/Escaper.php',
|
477 |
-
'Twig_NodeVisitor_Optimizer' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeVisitor/Optimizer.php',
|
478 |
-
'Twig_NodeVisitor_SafeAnalysis' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php',
|
479 |
-
'Twig_NodeVisitor_Sandbox' => __DIR__ . '/..' . '/twig/twig/lib/Twig/NodeVisitor/Sandbox.php',
|
480 |
-
'Twig_Node_AutoEscape' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/AutoEscape.php',
|
481 |
-
'Twig_Node_Block' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Block.php',
|
482 |
-
'Twig_Node_BlockReference' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/BlockReference.php',
|
483 |
-
'Twig_Node_Body' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Body.php',
|
484 |
-
'Twig_Node_CheckSecurity' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/CheckSecurity.php',
|
485 |
-
'Twig_Node_Deprecated' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Deprecated.php',
|
486 |
-
'Twig_Node_Do' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Do.php',
|
487 |
-
'Twig_Node_Embed' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Embed.php',
|
488 |
-
'Twig_Node_Expression' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression.php',
|
489 |
-
'Twig_Node_Expression_Array' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Array.php',
|
490 |
-
'Twig_Node_Expression_AssignName' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/AssignName.php',
|
491 |
-
'Twig_Node_Expression_Binary' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary.php',
|
492 |
-
'Twig_Node_Expression_Binary_Add' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Add.php',
|
493 |
-
'Twig_Node_Expression_Binary_And' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/And.php',
|
494 |
-
'Twig_Node_Expression_Binary_BitwiseAnd' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php',
|
495 |
-
'Twig_Node_Expression_Binary_BitwiseOr' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php',
|
496 |
-
'Twig_Node_Expression_Binary_BitwiseXor' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php',
|
497 |
-
'Twig_Node_Expression_Binary_Concat' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php',
|
498 |
-
'Twig_Node_Expression_Binary_Div' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Div.php',
|
499 |
-
'Twig_Node_Expression_Binary_EndsWith' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php',
|
500 |
-
'Twig_Node_Expression_Binary_Equal' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php',
|
501 |
-
'Twig_Node_Expression_Binary_FloorDiv' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php',
|
502 |
-
'Twig_Node_Expression_Binary_Greater' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php',
|
503 |
-
'Twig_Node_Expression_Binary_GreaterEqual' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php',
|
504 |
-
'Twig_Node_Expression_Binary_In' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/In.php',
|
505 |
-
'Twig_Node_Expression_Binary_Less' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Less.php',
|
506 |
-
'Twig_Node_Expression_Binary_LessEqual' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php',
|
507 |
-
'Twig_Node_Expression_Binary_Matches' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php',
|
508 |
-
'Twig_Node_Expression_Binary_Mod' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php',
|
509 |
-
'Twig_Node_Expression_Binary_Mul' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php',
|
510 |
-
'Twig_Node_Expression_Binary_NotEqual' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php',
|
511 |
-
'Twig_Node_Expression_Binary_NotIn' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php',
|
512 |
-
'Twig_Node_Expression_Binary_Or' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Or.php',
|
513 |
-
'Twig_Node_Expression_Binary_Power' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Power.php',
|
514 |
-
'Twig_Node_Expression_Binary_Range' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Range.php',
|
515 |
-
'Twig_Node_Expression_Binary_StartsWith' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php',
|
516 |
-
'Twig_Node_Expression_Binary_Sub' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php',
|
517 |
-
'Twig_Node_Expression_BlockReference' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/BlockReference.php',
|
518 |
-
'Twig_Node_Expression_Call' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Call.php',
|
519 |
-
'Twig_Node_Expression_Conditional' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Conditional.php',
|
520 |
-
'Twig_Node_Expression_Constant' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Constant.php',
|
521 |
-
'Twig_Node_Expression_Filter' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Filter.php',
|
522 |
-
'Twig_Node_Expression_Filter_Default' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Filter/Default.php',
|
523 |
-
'Twig_Node_Expression_Function' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Function.php',
|
524 |
-
'Twig_Node_Expression_GetAttr' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/GetAttr.php',
|
525 |
-
'Twig_Node_Expression_MethodCall' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/MethodCall.php',
|
526 |
-
'Twig_Node_Expression_Name' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Name.php',
|
527 |
-
'Twig_Node_Expression_NullCoalesce' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php',
|
528 |
-
'Twig_Node_Expression_Parent' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Parent.php',
|
529 |
-
'Twig_Node_Expression_TempName' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/TempName.php',
|
530 |
-
'Twig_Node_Expression_Test' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test.php',
|
531 |
-
'Twig_Node_Expression_Test_Constant' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test/Constant.php',
|
532 |
-
'Twig_Node_Expression_Test_Defined' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test/Defined.php',
|
533 |
-
'Twig_Node_Expression_Test_Divisibleby' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php',
|
534 |
-
'Twig_Node_Expression_Test_Even' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test/Even.php',
|
535 |
-
'Twig_Node_Expression_Test_Null' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test/Null.php',
|
536 |
-
'Twig_Node_Expression_Test_Odd' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test/Odd.php',
|
537 |
-
'Twig_Node_Expression_Test_Sameas' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php',
|
538 |
-
'Twig_Node_Expression_Unary' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Unary.php',
|
539 |
-
'Twig_Node_Expression_Unary_Neg' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php',
|
540 |
-
'Twig_Node_Expression_Unary_Not' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Unary/Not.php',
|
541 |
-
'Twig_Node_Expression_Unary_Pos' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php',
|
542 |
-
'Twig_Node_Flush' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Flush.php',
|
543 |
-
'Twig_Node_For' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/For.php',
|
544 |
-
'Twig_Node_ForLoop' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/ForLoop.php',
|
545 |
-
'Twig_Node_If' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/If.php',
|
546 |
-
'Twig_Node_Import' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Import.php',
|
547 |
-
'Twig_Node_Include' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Include.php',
|
548 |
-
'Twig_Node_Macro' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Macro.php',
|
549 |
-
'Twig_Node_Module' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Module.php',
|
550 |
-
'Twig_Node_Print' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Print.php',
|
551 |
-
'Twig_Node_Sandbox' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Sandbox.php',
|
552 |
-
'Twig_Node_SandboxedPrint' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/SandboxedPrint.php',
|
553 |
-
'Twig_Node_Set' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Set.php',
|
554 |
-
'Twig_Node_Spaceless' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Spaceless.php',
|
555 |
-
'Twig_Node_Text' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/Text.php',
|
556 |
-
'Twig_Node_With' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Node/With.php',
|
557 |
-
'Twig_Parser' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Parser.php',
|
558 |
-
'Twig_Profiler_Dumper_Base' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/Dumper/Base.php',
|
559 |
-
'Twig_Profiler_Dumper_Blackfire' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php',
|
560 |
-
'Twig_Profiler_Dumper_Html' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/Dumper/Html.php',
|
561 |
-
'Twig_Profiler_Dumper_Text' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/Dumper/Text.php',
|
562 |
-
'Twig_Profiler_NodeVisitor_Profiler' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php',
|
563 |
-
'Twig_Profiler_Node_EnterProfile' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php',
|
564 |
-
'Twig_Profiler_Node_LeaveProfile' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php',
|
565 |
-
'Twig_Profiler_Profile' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Profiler/Profile.php',
|
566 |
-
'Twig_RuntimeLoaderInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/RuntimeLoaderInterface.php',
|
567 |
-
'Twig_Sandbox_SecurityError' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityError.php',
|
568 |
-
'Twig_Sandbox_SecurityNotAllowedFilterError' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php',
|
569 |
-
'Twig_Sandbox_SecurityNotAllowedFunctionError' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php',
|
570 |
-
'Twig_Sandbox_SecurityNotAllowedMethodError' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php',
|
571 |
-
'Twig_Sandbox_SecurityNotAllowedPropertyError' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php',
|
572 |
-
'Twig_Sandbox_SecurityNotAllowedTagError' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php',
|
573 |
-
'Twig_Sandbox_SecurityPolicy' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php',
|
574 |
-
'Twig_Sandbox_SecurityPolicyInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php',
|
575 |
-
'Twig_SimpleFilter' => __DIR__ . '/..' . '/twig/twig/lib/Twig/SimpleFilter.php',
|
576 |
-
'Twig_SimpleFunction' => __DIR__ . '/..' . '/twig/twig/lib/Twig/SimpleFunction.php',
|
577 |
-
'Twig_SimpleTest' => __DIR__ . '/..' . '/twig/twig/lib/Twig/SimpleTest.php',
|
578 |
-
'Twig_Source' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Source.php',
|
579 |
-
'Twig_SourceContextLoaderInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/SourceContextLoaderInterface.php',
|
580 |
-
'Twig_Template' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Template.php',
|
581 |
-
'Twig_TemplateWrapper' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TemplateWrapper.php',
|
582 |
-
'Twig_Test' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Test.php',
|
583 |
-
'Twig_Test_IntegrationTestCase' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Test/IntegrationTestCase.php',
|
584 |
-
'Twig_Test_NodeTestCase' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Test/NodeTestCase.php',
|
585 |
-
'Twig_Token' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Token.php',
|
586 |
-
'Twig_TokenParser' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser.php',
|
587 |
-
'Twig_TokenParserInterface' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParserInterface.php',
|
588 |
-
'Twig_TokenParser_AutoEscape' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/AutoEscape.php',
|
589 |
-
'Twig_TokenParser_Block' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Block.php',
|
590 |
-
'Twig_TokenParser_Deprecated' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Deprecated.php',
|
591 |
-
'Twig_TokenParser_Do' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Do.php',
|
592 |
-
'Twig_TokenParser_Embed' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Embed.php',
|
593 |
-
'Twig_TokenParser_Extends' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Extends.php',
|
594 |
-
'Twig_TokenParser_Filter' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Filter.php',
|
595 |
-
'Twig_TokenParser_Flush' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Flush.php',
|
596 |
-
'Twig_TokenParser_For' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/For.php',
|
597 |
-
'Twig_TokenParser_From' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/From.php',
|
598 |
-
'Twig_TokenParser_If' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/If.php',
|
599 |
-
'Twig_TokenParser_Import' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Import.php',
|
600 |
-
'Twig_TokenParser_Include' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Include.php',
|
601 |
-
'Twig_TokenParser_Macro' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Macro.php',
|
602 |
-
'Twig_TokenParser_Sandbox' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Sandbox.php',
|
603 |
-
'Twig_TokenParser_Set' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Set.php',
|
604 |
-
'Twig_TokenParser_Spaceless' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Spaceless.php',
|
605 |
-
'Twig_TokenParser_Use' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/Use.php',
|
606 |
-
'Twig_TokenParser_With' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenParser/With.php',
|
607 |
-
'Twig_TokenStream' => __DIR__ . '/..' . '/twig/twig/lib/Twig/TokenStream.php',
|
608 |
-
'Twig_Util_DeprecationCollector' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Util/DeprecationCollector.php',
|
609 |
-
'Twig_Util_TemplateDirIterator' => __DIR__ . '/..' . '/twig/twig/lib/Twig/Util/TemplateDirIterator.php',
|
610 |
);
|
611 |
|
612 |
public static function getInitializer(ClassLoader $loader)
|
613 |
{
|
614 |
return \Closure::bind(function () use ($loader) {
|
615 |
-
$loader->prefixLengthsPsr4 =
|
616 |
-
$loader->prefixDirsPsr4 =
|
617 |
-
$loader->fallbackDirsPsr4 =
|
618 |
-
$loader->prefixesPsr0 =
|
619 |
-
$loader->classMap =
|
620 |
|
621 |
}, null, ClassLoader::class);
|
622 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit84e42f61074097fdc526963199118ce6
|
8 |
{
|
9 |
public static $files = array (
|
|
|
|
|
10 |
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
11 |
);
|
12 |
|
18 |
),
|
19 |
'S' =>
|
20 |
array (
|
|
|
|
|
21 |
'Symfony\\Polyfill\\Ctype\\' => 23,
|
22 |
),
|
23 |
'C' =>
|
35 |
array (
|
36 |
0 => __DIR__ . '/../..' . '/lib',
|
37 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
'Symfony\\Polyfill\\Ctype\\' =>
|
39 |
array (
|
40 |
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
69 |
public static $classMap = array (
|
70 |
'AltoRouter' => __DIR__ . '/..' . '/altorouter/altorouter/AltoRouter.php',
|
71 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
);
|
73 |
|
74 |
public static function getInitializer(ClassLoader $loader)
|
75 |
{
|
76 |
return \Closure::bind(function () use ($loader) {
|
77 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit84e42f61074097fdc526963199118ce6::$prefixLengthsPsr4;
|
78 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit84e42f61074097fdc526963199118ce6::$prefixDirsPsr4;
|
79 |
+
$loader->fallbackDirsPsr4 = ComposerStaticInit84e42f61074097fdc526963199118ce6::$fallbackDirsPsr4;
|
80 |
+
$loader->prefixesPsr0 = ComposerStaticInit84e42f61074097fdc526963199118ce6::$prefixesPsr0;
|
81 |
+
$loader->classMap = ComposerStaticInit84e42f61074097fdc526963199118ce6::$classMap;
|
82 |
|
83 |
}, null, ClassLoader::class);
|
84 |
}
|
vendor/composer/installed.json
CHANGED
@@ -296,171 +296,6 @@
|
|
296 |
],
|
297 |
"install-path": "../symfony/polyfill-ctype"
|
298 |
},
|
299 |
-
{
|
300 |
-
"name": "symfony/polyfill-mbstring",
|
301 |
-
"version": "v1.26.0",
|
302 |
-
"version_normalized": "1.26.0.0",
|
303 |
-
"source": {
|
304 |
-
"type": "git",
|
305 |
-
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
306 |
-
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
|
307 |
-
},
|
308 |
-
"dist": {
|
309 |
-
"type": "zip",
|
310 |
-
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
|
311 |
-
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
|
312 |
-
"shasum": ""
|
313 |
-
},
|
314 |
-
"require": {
|
315 |
-
"php": ">=7.1"
|
316 |
-
},
|
317 |
-
"provide": {
|
318 |
-
"ext-mbstring": "*"
|
319 |
-
},
|
320 |
-
"suggest": {
|
321 |
-
"ext-mbstring": "For best performance"
|
322 |
-
},
|
323 |
-
"time": "2022-05-24T11:49:31+00:00",
|
324 |
-
"type": "library",
|
325 |
-
"extra": {
|
326 |
-
"branch-alias": {
|
327 |
-
"dev-main": "1.26-dev"
|
328 |
-
},
|
329 |
-
"thanks": {
|
330 |
-
"name": "symfony/polyfill",
|
331 |
-
"url": "https://github.com/symfony/polyfill"
|
332 |
-
}
|
333 |
-
},
|
334 |
-
"installation-source": "dist",
|
335 |
-
"autoload": {
|
336 |
-
"files": [
|
337 |
-
"bootstrap.php"
|
338 |
-
],
|
339 |
-
"psr-4": {
|
340 |
-
"Symfony\\Polyfill\\Mbstring\\": ""
|
341 |
-
}
|
342 |
-
},
|
343 |
-
"notification-url": "https://packagist.org/downloads/",
|
344 |
-
"license": [
|
345 |
-
"MIT"
|
346 |
-
],
|
347 |
-
"authors": [
|
348 |
-
{
|
349 |
-
"name": "Nicolas Grekas",
|
350 |
-
"email": "p@tchwork.com"
|
351 |
-
},
|
352 |
-
{
|
353 |
-
"name": "Symfony Community",
|
354 |
-
"homepage": "https://symfony.com/contributors"
|
355 |
-
}
|
356 |
-
],
|
357 |
-
"description": "Symfony polyfill for the Mbstring extension",
|
358 |
-
"homepage": "https://symfony.com",
|
359 |
-
"keywords": [
|
360 |
-
"compatibility",
|
361 |
-
"mbstring",
|
362 |
-
"polyfill",
|
363 |
-
"portable",
|
364 |
-
"shim"
|
365 |
-
],
|
366 |
-
"support": {
|
367 |
-
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
|
368 |
-
},
|
369 |
-
"funding": [
|
370 |
-
{
|
371 |
-
"url": "https://symfony.com/sponsor",
|
372 |
-
"type": "custom"
|
373 |
-
},
|
374 |
-
{
|
375 |
-
"url": "https://github.com/fabpot",
|
376 |
-
"type": "github"
|
377 |
-
},
|
378 |
-
{
|
379 |
-
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
380 |
-
"type": "tidelift"
|
381 |
-
}
|
382 |
-
],
|
383 |
-
"install-path": "../symfony/polyfill-mbstring"
|
384 |
-
},
|
385 |
-
{
|
386 |
-
"name": "symfony/polyfill-php72",
|
387 |
-
"version": "v1.26.0",
|
388 |
-
"version_normalized": "1.26.0.0",
|
389 |
-
"source": {
|
390 |
-
"type": "git",
|
391 |
-
"url": "https://github.com/symfony/polyfill-php72.git",
|
392 |
-
"reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
|
393 |
-
},
|
394 |
-
"dist": {
|
395 |
-
"type": "zip",
|
396 |
-
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2",
|
397 |
-
"reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
|
398 |
-
"shasum": ""
|
399 |
-
},
|
400 |
-
"require": {
|
401 |
-
"php": ">=7.1"
|
402 |
-
},
|
403 |
-
"time": "2022-05-24T11:49:31+00:00",
|
404 |
-
"type": "library",
|
405 |
-
"extra": {
|
406 |
-
"branch-alias": {
|
407 |
-
"dev-main": "1.26-dev"
|
408 |
-
},
|
409 |
-
"thanks": {
|
410 |
-
"name": "symfony/polyfill",
|
411 |
-
"url": "https://github.com/symfony/polyfill"
|
412 |
-
}
|
413 |
-
},
|
414 |
-
"installation-source": "dist",
|
415 |
-
"autoload": {
|
416 |
-
"files": [
|
417 |
-
"bootstrap.php"
|
418 |
-
],
|
419 |
-
"psr-4": {
|
420 |
-
"Symfony\\Polyfill\\Php72\\": ""
|
421 |
-
}
|
422 |
-
},
|
423 |
-
"notification-url": "https://packagist.org/downloads/",
|
424 |
-
"license": [
|
425 |
-
"MIT"
|
426 |
-
],
|
427 |
-
"authors": [
|
428 |
-
{
|
429 |
-
"name": "Nicolas Grekas",
|
430 |
-
"email": "p@tchwork.com"
|
431 |
-
},
|
432 |
-
{
|
433 |
-
"name": "Symfony Community",
|
434 |
-
"homepage": "https://symfony.com/contributors"
|
435 |
-
}
|
436 |
-
],
|
437 |
-
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
|
438 |
-
"homepage": "https://symfony.com",
|
439 |
-
"keywords": [
|
440 |
-
"compatibility",
|
441 |
-
"polyfill",
|
442 |
-
"portable",
|
443 |
-
"shim"
|
444 |
-
],
|
445 |
-
"support": {
|
446 |
-
"source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0"
|
447 |
-
},
|
448 |
-
"funding": [
|
449 |
-
{
|
450 |
-
"url": "https://symfony.com/sponsor",
|
451 |
-
"type": "custom"
|
452 |
-
},
|
453 |
-
{
|
454 |
-
"url": "https://github.com/fabpot",
|
455 |
-
"type": "github"
|
456 |
-
},
|
457 |
-
{
|
458 |
-
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
459 |
-
"type": "tidelift"
|
460 |
-
}
|
461 |
-
],
|
462 |
-
"install-path": "../symfony/polyfill-php72"
|
463 |
-
},
|
464 |
{
|
465 |
"name": "twig/cache-extension",
|
466 |
"version": "v1.5.0",
|
@@ -538,34 +373,32 @@
|
|
538 |
},
|
539 |
{
|
540 |
"name": "twig/twig",
|
541 |
-
"version": "
|
542 |
-
"version_normalized": "
|
543 |
"source": {
|
544 |
"type": "git",
|
545 |
"url": "https://github.com/twigphp/Twig.git",
|
546 |
-
"reference": "
|
547 |
},
|
548 |
"dist": {
|
549 |
"type": "zip",
|
550 |
-
"url": "https://api.github.com/repos/twigphp/Twig/zipball/
|
551 |
-
"reference": "
|
552 |
"shasum": ""
|
553 |
},
|
554 |
"require": {
|
555 |
-
"php": ">=7.
|
556 |
-
"symfony/polyfill-ctype": "^1.8"
|
557 |
-
"symfony/polyfill-mbstring": "^1.3",
|
558 |
-
"symfony/polyfill-php72": "^1.8"
|
559 |
},
|
560 |
"require-dev": {
|
561 |
"psr/container": "^1.0",
|
562 |
-
"symfony/phpunit-bridge": "^4.4.9|^5.0.9
|
563 |
},
|
564 |
-
"time": "2022-09-28T08:
|
565 |
"type": "library",
|
566 |
"extra": {
|
567 |
"branch-alias": {
|
568 |
-
"dev-master": "
|
569 |
}
|
570 |
},
|
571 |
"installation-source": "dist",
|
@@ -605,7 +438,7 @@
|
|
605 |
],
|
606 |
"support": {
|
607 |
"issues": "https://github.com/twigphp/Twig/issues",
|
608 |
-
"source": "https://github.com/twigphp/Twig/tree/
|
609 |
},
|
610 |
"funding": [
|
611 |
{
|
296 |
],
|
297 |
"install-path": "../symfony/polyfill-ctype"
|
298 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
{
|
300 |
"name": "twig/cache-extension",
|
301 |
"version": "v1.5.0",
|
373 |
},
|
374 |
{
|
375 |
"name": "twig/twig",
|
376 |
+
"version": "v1.44.7",
|
377 |
+
"version_normalized": "1.44.7.0",
|
378 |
"source": {
|
379 |
"type": "git",
|
380 |
"url": "https://github.com/twigphp/Twig.git",
|
381 |
+
"reference": "0887422319889e442458e48e2f3d9add1a172ad5"
|
382 |
},
|
383 |
"dist": {
|
384 |
"type": "zip",
|
385 |
+
"url": "https://api.github.com/repos/twigphp/Twig/zipball/0887422319889e442458e48e2f3d9add1a172ad5",
|
386 |
+
"reference": "0887422319889e442458e48e2f3d9add1a172ad5",
|
387 |
"shasum": ""
|
388 |
},
|
389 |
"require": {
|
390 |
+
"php": ">=7.2.5",
|
391 |
+
"symfony/polyfill-ctype": "^1.8"
|
|
|
|
|
392 |
},
|
393 |
"require-dev": {
|
394 |
"psr/container": "^1.0",
|
395 |
+
"symfony/phpunit-bridge": "^4.4.9|^5.0.9"
|
396 |
},
|
397 |
+
"time": "2022-09-28T08:38:36+00:00",
|
398 |
"type": "library",
|
399 |
"extra": {
|
400 |
"branch-alias": {
|
401 |
+
"dev-master": "1.44-dev"
|
402 |
}
|
403 |
},
|
404 |
"installation-source": "dist",
|
438 |
],
|
439 |
"support": {
|
440 |
"issues": "https://github.com/twigphp/Twig/issues",
|
441 |
+
"source": "https://github.com/twigphp/Twig/tree/v1.44.7"
|
442 |
},
|
443 |
"funding": [
|
444 |
{
|
vendor/composer/installed.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
-
'pretty_version' => '
|
5 |
-
'version' => '
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
-
'reference' => '
|
10 |
'name' => 'timber/timber',
|
11 |
),
|
12 |
'versions' =>
|
@@ -38,32 +38,14 @@
|
|
38 |
),
|
39 |
'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4',
|
40 |
),
|
41 |
-
'symfony/polyfill-mbstring' =>
|
42 |
-
array (
|
43 |
-
'pretty_version' => 'v1.26.0',
|
44 |
-
'version' => '1.26.0.0',
|
45 |
-
'aliases' =>
|
46 |
-
array (
|
47 |
-
),
|
48 |
-
'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e',
|
49 |
-
),
|
50 |
-
'symfony/polyfill-php72' =>
|
51 |
-
array (
|
52 |
-
'pretty_version' => 'v1.26.0',
|
53 |
-
'version' => '1.26.0.0',
|
54 |
-
'aliases' =>
|
55 |
-
array (
|
56 |
-
),
|
57 |
-
'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2',
|
58 |
-
),
|
59 |
'timber/timber' =>
|
60 |
array (
|
61 |
-
'pretty_version' => '
|
62 |
-
'version' => '
|
63 |
'aliases' =>
|
64 |
array (
|
65 |
),
|
66 |
-
'reference' => '
|
67 |
),
|
68 |
'twig/cache-extension' =>
|
69 |
array (
|
@@ -76,12 +58,12 @@
|
|
76 |
),
|
77 |
'twig/twig' =>
|
78 |
array (
|
79 |
-
'pretty_version' => '
|
80 |
-
'version' => '
|
81 |
'aliases' =>
|
82 |
array (
|
83 |
),
|
84 |
-
'reference' => '
|
85 |
),
|
86 |
'upstatement/routes' =>
|
87 |
array (
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
+
'pretty_version' => 'dev-master',
|
5 |
+
'version' => 'dev-master',
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => '43be3208bcb35cede75bbc470e079c31e84bf7ea',
|
10 |
'name' => 'timber/timber',
|
11 |
),
|
12 |
'versions' =>
|
38 |
),
|
39 |
'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4',
|
40 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
'timber/timber' =>
|
42 |
array (
|
43 |
+
'pretty_version' => 'dev-master',
|
44 |
+
'version' => 'dev-master',
|
45 |
'aliases' =>
|
46 |
array (
|
47 |
),
|
48 |
+
'reference' => '43be3208bcb35cede75bbc470e079c31e84bf7ea',
|
49 |
),
|
50 |
'twig/cache-extension' =>
|
51 |
array (
|
58 |
),
|
59 |
'twig/twig' =>
|
60 |
array (
|
61 |
+
'pretty_version' => 'v1.44.7',
|
62 |
+
'version' => '1.44.7.0',
|
63 |
'aliases' =>
|
64 |
array (
|
65 |
),
|
66 |
+
'reference' => '0887422319889e442458e48e2f3d9add1a172ad5',
|
67 |
),
|
68 |
'upstatement/routes' =>
|
69 |
array (
|
vendor/symfony/polyfill-mbstring/LICENSE
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
Copyright (c) 2015-2019 Fabien Potencier
|
2 |
-
|
3 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
-
of this software and associated documentation files (the "Software"), to deal
|
5 |
-
in the Software without restriction, including without limitation the rights
|
6 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
-
copies of the Software, and to permit persons to whom the Software is furnished
|
8 |
-
to do so, subject to the following conditions:
|
9 |
-
|
10 |
-
The above copyright notice and this permission notice shall be included in all
|
11 |
-
copies or substantial portions of the Software.
|
12 |
-
|
13 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
-
THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-mbstring/Mbstring.php
DELETED
@@ -1,873 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of the Symfony package.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
namespace Symfony\Polyfill\Mbstring;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
|
16 |
-
*
|
17 |
-
* Implemented:
|
18 |
-
* - mb_chr - Returns a specific character from its Unicode code point
|
19 |
-
* - mb_convert_encoding - Convert character encoding
|
20 |
-
* - mb_convert_variables - Convert character code in variable(s)
|
21 |
-
* - mb_decode_mimeheader - Decode string in MIME header field
|
22 |
-
* - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED
|
23 |
-
* - mb_decode_numericentity - Decode HTML numeric string reference to character
|
24 |
-
* - mb_encode_numericentity - Encode character to HTML numeric string reference
|
25 |
-
* - mb_convert_case - Perform case folding on a string
|
26 |
-
* - mb_detect_encoding - Detect character encoding
|
27 |
-
* - mb_get_info - Get internal settings of mbstring
|
28 |
-
* - mb_http_input - Detect HTTP input character encoding
|
29 |
-
* - mb_http_output - Set/Get HTTP output character encoding
|
30 |
-
* - mb_internal_encoding - Set/Get internal character encoding
|
31 |
-
* - mb_list_encodings - Returns an array of all supported encodings
|
32 |
-
* - mb_ord - Returns the Unicode code point of a character
|
33 |
-
* - mb_output_handler - Callback function converts character encoding in output buffer
|
34 |
-
* - mb_scrub - Replaces ill-formed byte sequences with substitute characters
|
35 |
-
* - mb_strlen - Get string length
|
36 |
-
* - mb_strpos - Find position of first occurrence of string in a string
|
37 |
-
* - mb_strrpos - Find position of last occurrence of a string in a string
|
38 |
-
* - mb_str_split - Convert a string to an array
|
39 |
-
* - mb_strtolower - Make a string lowercase
|
40 |
-
* - mb_strtoupper - Make a string uppercase
|
41 |
-
* - mb_substitute_character - Set/Get substitution character
|
42 |
-
* - mb_substr - Get part of string
|
43 |
-
* - mb_stripos - Finds position of first occurrence of a string within another, case insensitive
|
44 |
-
* - mb_stristr - Finds first occurrence of a string within another, case insensitive
|
45 |
-
* - mb_strrchr - Finds the last occurrence of a character in a string within another
|
46 |
-
* - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
|
47 |
-
* - mb_strripos - Finds position of last occurrence of a string within another, case insensitive
|
48 |
-
* - mb_strstr - Finds first occurrence of a string within another
|
49 |
-
* - mb_strwidth - Return width of string
|
50 |
-
* - mb_substr_count - Count the number of substring occurrences
|
51 |
-
*
|
52 |
-
* Not implemented:
|
53 |
-
* - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
|
54 |
-
* - mb_ereg_* - Regular expression with multibyte support
|
55 |
-
* - mb_parse_str - Parse GET/POST/COOKIE data and set global variable
|
56 |
-
* - mb_preferred_mime_name - Get MIME charset string
|
57 |
-
* - mb_regex_encoding - Returns current encoding for multibyte regex as string
|
58 |
-
* - mb_regex_set_options - Set/Get the default options for mbregex functions
|
59 |
-
* - mb_send_mail - Send encoded mail
|
60 |
-
* - mb_split - Split multibyte string using regular expression
|
61 |
-
* - mb_strcut - Get part of string
|
62 |
-
* - mb_strimwidth - Get truncated string with specified width
|
63 |
-
*
|
64 |
-
* @author Nicolas Grekas <p@tchwork.com>
|
65 |
-
*
|
66 |
-
* @internal
|
67 |
-
*/
|
68 |
-
final class Mbstring
|
69 |
-
{
|
70 |
-
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
71 |
-
|
72 |
-
private const CASE_FOLD = [
|
73 |
-
['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
|
74 |
-
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
|
75 |
-
];
|
76 |
-
|
77 |
-
private static $encodingList = ['ASCII', 'UTF-8'];
|
78 |
-
private static $language = 'neutral';
|
79 |
-
private static $internalEncoding = 'UTF-8';
|
80 |
-
|
81 |
-
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
|
82 |
-
{
|
83 |
-
if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) {
|
84 |
-
$fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
|
85 |
-
} else {
|
86 |
-
$fromEncoding = self::getEncoding($fromEncoding);
|
87 |
-
}
|
88 |
-
|
89 |
-
$toEncoding = self::getEncoding($toEncoding);
|
90 |
-
|
91 |
-
if ('BASE64' === $fromEncoding) {
|
92 |
-
$s = base64_decode($s);
|
93 |
-
$fromEncoding = $toEncoding;
|
94 |
-
}
|
95 |
-
|
96 |
-
if ('BASE64' === $toEncoding) {
|
97 |
-
return base64_encode($s);
|
98 |
-
}
|
99 |
-
|
100 |
-
if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) {
|
101 |
-
if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) {
|
102 |
-
$fromEncoding = 'Windows-1252';
|
103 |
-
}
|
104 |
-
if ('UTF-8' !== $fromEncoding) {
|
105 |
-
$s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s);
|
106 |
-
}
|
107 |
-
|
108 |
-
return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
|
109 |
-
}
|
110 |
-
|
111 |
-
if ('HTML-ENTITIES' === $fromEncoding) {
|
112 |
-
$s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8');
|
113 |
-
$fromEncoding = 'UTF-8';
|
114 |
-
}
|
115 |
-
|
116 |
-
return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
|
117 |
-
}
|
118 |
-
|
119 |
-
public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
|
120 |
-
{
|
121 |
-
$ok = true;
|
122 |
-
array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
|
123 |
-
if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
|
124 |
-
$ok = false;
|
125 |
-
}
|
126 |
-
});
|
127 |
-
|
128 |
-
return $ok ? $fromEncoding : false;
|
129 |
-
}
|
130 |
-
|
131 |
-
public static function mb_decode_mimeheader($s)
|
132 |
-
{
|
133 |
-
return \iconv_mime_decode($s, 2, self::$internalEncoding);
|
134 |
-
}
|
135 |
-
|
136 |
-
public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
|
137 |
-
{
|
138 |
-
trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING);
|
139 |
-
}
|
140 |
-
|
141 |
-
public static function mb_decode_numericentity($s, $convmap, $encoding = null)
|
142 |
-
{
|
143 |
-
if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
|
144 |
-
trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);
|
145 |
-
|
146 |
-
return null;
|
147 |
-
}
|
148 |
-
|
149 |
-
if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
|
150 |
-
return false;
|
151 |
-
}
|
152 |
-
|
153 |
-
if (null !== $encoding && !is_scalar($encoding)) {
|
154 |
-
trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);
|
155 |
-
|
156 |
-
return ''; // Instead of null (cf. mb_encode_numericentity).
|
157 |
-
}
|
158 |
-
|
159 |
-
$s = (string) $s;
|
160 |
-
if ('' === $s) {
|
161 |
-
return '';
|
162 |
-
}
|
163 |
-
|
164 |
-
$encoding = self::getEncoding($encoding);
|
165 |
-
|
166 |
-
if ('UTF-8' === $encoding) {
|
167 |
-
$encoding = null;
|
168 |
-
if (!preg_match('//u', $s)) {
|
169 |
-
$s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
|
170 |
-
}
|
171 |
-
} else {
|
172 |
-
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
173 |
-
}
|
174 |
-
|
175 |
-
$cnt = floor(\count($convmap) / 4) * 4;
|
176 |
-
|
177 |
-
for ($i = 0; $i < $cnt; $i += 4) {
|
178 |
-
// collector_decode_htmlnumericentity ignores $convmap[$i + 3]
|
179 |
-
$convmap[$i] += $convmap[$i + 2];
|
180 |
-
$convmap[$i + 1] += $convmap[$i + 2];
|
181 |
-
}
|
182 |
-
|
183 |
-
$s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) {
|
184 |
-
$c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1];
|
185 |
-
for ($i = 0; $i < $cnt; $i += 4) {
|
186 |
-
if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) {
|
187 |
-
return self::mb_chr($c - $convmap[$i + 2]);
|
188 |
-
}
|
189 |
-
}
|
190 |
-
|
191 |
-
return $m[0];
|
192 |
-
}, $s);
|
193 |
-
|
194 |
-
if (null === $encoding) {
|
195 |
-
return $s;
|
196 |
-
}
|
197 |
-
|
198 |
-
return \iconv('UTF-8', $encoding.'//IGNORE', $s);
|
199 |
-
}
|
200 |
-
|
201 |
-
public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
|
202 |
-
{
|
203 |
-
if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
|
204 |
-
trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);
|
205 |
-
|
206 |
-
return null;
|
207 |
-
}
|
208 |
-
|
209 |
-
if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
|
210 |
-
return false;
|
211 |
-
}
|
212 |
-
|
213 |
-
if (null !== $encoding && !is_scalar($encoding)) {
|
214 |
-
trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);
|
215 |
-
|
216 |
-
return null; // Instead of '' (cf. mb_decode_numericentity).
|
217 |
-
}
|
218 |
-
|
219 |
-
if (null !== $is_hex && !is_scalar($is_hex)) {
|
220 |
-
trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING);
|
221 |
-
|
222 |
-
return null;
|
223 |
-
}
|
224 |
-
|
225 |
-
$s = (string) $s;
|
226 |
-
if ('' === $s) {
|
227 |
-
return '';
|
228 |
-
}
|
229 |
-
|
230 |
-
$encoding = self::getEncoding($encoding);
|
231 |
-
|
232 |
-
if ('UTF-8' === $encoding) {
|
233 |
-
$encoding = null;
|
234 |
-
if (!preg_match('//u', $s)) {
|
235 |
-
$s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
|
236 |
-
}
|
237 |
-
} else {
|
238 |
-
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
239 |
-
}
|
240 |
-
|
241 |
-
static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
|
242 |
-
|
243 |
-
$cnt = floor(\count($convmap) / 4) * 4;
|
244 |
-
$i = 0;
|
245 |
-
$len = \strlen($s);
|
246 |
-
$result = '';
|
247 |
-
|
248 |
-
while ($i < $len) {
|
249 |
-
$ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
|
250 |
-
$uchr = substr($s, $i, $ulen);
|
251 |
-
$i += $ulen;
|
252 |
-
$c = self::mb_ord($uchr);
|
253 |
-
|
254 |
-
for ($j = 0; $j < $cnt; $j += 4) {
|
255 |
-
if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) {
|
256 |
-
$cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3];
|
257 |
-
$result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';';
|
258 |
-
continue 2;
|
259 |
-
}
|
260 |
-
}
|
261 |
-
$result .= $uchr;
|
262 |
-
}
|
263 |
-
|
264 |
-
if (null === $encoding) {
|
265 |
-
return $result;
|
266 |
-
}
|
267 |
-
|
268 |
-
return \iconv('UTF-8', $encoding.'//IGNORE', $result);
|
269 |
-
}
|
270 |
-
|
271 |
-
public static function mb_convert_case($s, $mode, $encoding = null)
|
272 |
-
{
|
273 |
-
$s = (string) $s;
|
274 |
-
if ('' === $s) {
|
275 |
-
return '';
|
276 |
-
}
|
277 |
-
|
278 |
-
$encoding = self::getEncoding($encoding);
|
279 |
-
|
280 |
-
if ('UTF-8' === $encoding) {
|
281 |
-
$encoding = null;
|
282 |
-
if (!preg_match('//u', $s)) {
|
283 |
-
$s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
|
284 |
-
}
|
285 |
-
} else {
|
286 |
-
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
287 |
-
}
|
288 |
-
|
289 |
-
if (\MB_CASE_TITLE == $mode) {
|
290 |
-
static $titleRegexp = null;
|
291 |
-
if (null === $titleRegexp) {
|
292 |
-
$titleRegexp = self::getData('titleCaseRegexp');
|
293 |
-
}
|
294 |
-
$s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s);
|
295 |
-
} else {
|
296 |
-
if (\MB_CASE_UPPER == $mode) {
|
297 |
-
static $upper = null;
|
298 |
-
if (null === $upper) {
|
299 |
-
$upper = self::getData('upperCase');
|
300 |
-
}
|
301 |
-
$map = $upper;
|
302 |
-
} else {
|
303 |
-
if (self::MB_CASE_FOLD === $mode) {
|
304 |
-
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
|
305 |
-
}
|
306 |
-
|
307 |
-
static $lower = null;
|
308 |
-
if (null === $lower) {
|
309 |
-
$lower = self::getData('lowerCase');
|
310 |
-
}
|
311 |
-
$map = $lower;
|
312 |
-
}
|
313 |
-
|
314 |
-
static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
|
315 |
-
|
316 |
-
$i = 0;
|
317 |
-
$len = \strlen($s);
|
318 |
-
|
319 |
-
while ($i < $len) {
|
320 |
-
$ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
|
321 |
-
$uchr = substr($s, $i, $ulen);
|
322 |
-
$i += $ulen;
|
323 |
-
|
324 |
-
if (isset($map[$uchr])) {
|
325 |
-
$uchr = $map[$uchr];
|
326 |
-
$nlen = \strlen($uchr);
|
327 |
-
|
328 |
-
if ($nlen == $ulen) {
|
329 |
-
$nlen = $i;
|
330 |
-
do {
|
331 |
-
$s[--$nlen] = $uchr[--$ulen];
|
332 |
-
} while ($ulen);
|
333 |
-
} else {
|
334 |
-
$s = substr_replace($s, $uchr, $i - $ulen, $ulen);
|
335 |
-
$len += $nlen - $ulen;
|
336 |
-
$i += $nlen - $ulen;
|
337 |
-
}
|
338 |
-
}
|
339 |
-
}
|
340 |
-
}
|
341 |
-
|
342 |
-
if (null === $encoding) {
|
343 |
-
return $s;
|
344 |
-
}
|
345 |
-
|
346 |
-
return \iconv('UTF-8', $encoding.'//IGNORE', $s);
|
347 |
-
}
|
348 |
-
|
349 |
-
public static function mb_internal_encoding($encoding = null)
|
350 |
-
{
|
351 |
-
if (null === $encoding) {
|
352 |
-
return self::$internalEncoding;
|
353 |
-
}
|
354 |
-
|
355 |
-
$normalizedEncoding = self::getEncoding($encoding);
|
356 |
-
|
357 |
-
if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
|
358 |
-
self::$internalEncoding = $normalizedEncoding;
|
359 |
-
|
360 |
-
return true;
|
361 |
-
}
|
362 |
-
|
363 |
-
if (80000 > \PHP_VERSION_ID) {
|
364 |
-
return false;
|
365 |
-
}
|
366 |
-
|
367 |
-
throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding));
|
368 |
-
}
|
369 |
-
|
370 |
-
public static function mb_language($lang = null)
|
371 |
-
{
|
372 |
-
if (null === $lang) {
|
373 |
-
return self::$language;
|
374 |
-
}
|
375 |
-
|
376 |
-
switch ($normalizedLang = strtolower($lang)) {
|
377 |
-
case 'uni':
|
378 |
-
case 'neutral':
|
379 |
-
self::$language = $normalizedLang;
|
380 |
-
|
381 |
-
return true;
|
382 |
-
}
|
383 |
-
|
384 |
-
if (80000 > \PHP_VERSION_ID) {
|
385 |
-
return false;
|
386 |
-
}
|
387 |
-
|
388 |
-
throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang));
|
389 |
-
}
|
390 |
-
|
391 |
-
public static function mb_list_encodings()
|
392 |
-
{
|
393 |
-
return ['UTF-8'];
|
394 |
-
}
|
395 |
-
|
396 |
-
public static function mb_encoding_aliases($encoding)
|
397 |
-
{
|
398 |
-
switch (strtoupper($encoding)) {
|
399 |
-
case 'UTF8':
|
400 |
-
case 'UTF-8':
|
401 |
-
return ['utf8'];
|
402 |
-
}
|
403 |
-
|
404 |
-
return false;
|
405 |
-
}
|
406 |
-
|
407 |
-
public static function mb_check_encoding($var = null, $encoding = null)
|
408 |
-
{
|
409 |
-
if (null === $encoding) {
|
410 |
-
if (null === $var) {
|
411 |
-
return false;
|
412 |
-
}
|
413 |
-
$encoding = self::$internalEncoding;
|
414 |
-
}
|
415 |
-
|
416 |
-
return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var);
|
417 |
-
}
|
418 |
-
|
419 |
-
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
|
420 |
-
{
|
421 |
-
if (null === $encodingList) {
|
422 |
-
$encodingList = self::$encodingList;
|
423 |
-
} else {
|
424 |
-
if (!\is_array($encodingList)) {
|
425 |
-
$encodingList = array_map('trim', explode(',', $encodingList));
|
426 |
-
}
|
427 |
-
$encodingList = array_map('strtoupper', $encodingList);
|
428 |
-
}
|
429 |
-
|
430 |
-
foreach ($encodingList as $enc) {
|
431 |
-
switch ($enc) {
|
432 |
-
case 'ASCII':
|
433 |
-
if (!preg_match('/[\x80-\xFF]/', $str)) {
|
434 |
-
return $enc;
|
435 |
-
}
|
436 |
-
break;
|
437 |
-
|
438 |
-
case 'UTF8':
|
439 |
-
case 'UTF-8':
|
440 |
-
if (preg_match('//u', $str)) {
|
441 |
-
return 'UTF-8';
|
442 |
-
}
|
443 |
-
break;
|
444 |
-
|
445 |
-
default:
|
446 |
-
if (0 === strncmp($enc, 'ISO-8859-', 9)) {
|
447 |
-
return $enc;
|
448 |
-
}
|
449 |
-
}
|
450 |
-
}
|
451 |
-
|
452 |
-
return false;
|
453 |
-
}
|
454 |
-
|
455 |
-
public static function mb_detect_order($encodingList = null)
|
456 |
-
{
|
457 |
-
if (null === $encodingList) {
|
458 |
-
return self::$encodingList;
|
459 |
-
}
|
460 |
-
|
461 |
-
if (!\is_array($encodingList)) {
|
462 |
-
$encodingList = array_map('trim', explode(',', $encodingList));
|
463 |
-
}
|
464 |
-
$encodingList = array_map('strtoupper', $encodingList);
|
465 |
-
|
466 |
-
foreach ($encodingList as $enc) {
|
467 |
-
switch ($enc) {
|
468 |
-
default:
|
469 |
-
if (strncmp($enc, 'ISO-8859-', 9)) {
|
470 |
-
return false;
|
471 |
-
}
|
472 |
-
// no break
|
473 |
-
case 'ASCII':
|
474 |
-
case 'UTF8':
|
475 |
-
case 'UTF-8':
|
476 |
-
}
|
477 |
-
}
|
478 |
-
|
479 |
-
self::$encodingList = $encodingList;
|
480 |
-
|
481 |
-
return true;
|
482 |
-
}
|
483 |
-
|
484 |
-
public static function mb_strlen($s, $encoding = null)
|
485 |
-
{
|
486 |
-
$encoding = self::getEncoding($encoding);
|
487 |
-
if ('CP850' === $encoding || 'ASCII' === $encoding) {
|
488 |
-
return \strlen($s);
|
489 |
-
}
|
490 |
-
|
491 |
-
return @\iconv_strlen($s, $encoding);
|
492 |
-
}
|
493 |
-
|
494 |
-
public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
|
495 |
-
{
|
496 |
-
$encoding = self::getEncoding($encoding);
|
497 |
-
if ('CP850' === $encoding || 'ASCII' === $encoding) {
|
498 |
-
return strpos($haystack, $needle, $offset);
|
499 |
-
}
|
500 |
-
|
501 |
-
$needle = (string) $needle;
|
502 |
-
if ('' === $needle) {
|
503 |
-
if (80000 > \PHP_VERSION_ID) {
|
504 |
-
trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING);
|
505 |
-
|
506 |
-
return false;
|
507 |
-
}
|
508 |
-
|
509 |
-
return 0;
|
510 |
-
}
|
511 |
-
|
512 |
-
return \iconv_strpos($haystack, $needle, $offset, $encoding);
|
513 |
-
}
|
514 |
-
|
515 |
-
public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
|
516 |
-
{
|
517 |
-
$encoding = self::getEncoding($encoding);
|
518 |
-
if ('CP850' === $encoding || 'ASCII' === $encoding) {
|
519 |
-
return strrpos($haystack, $needle, $offset);
|
520 |
-
}
|
521 |
-
|
522 |
-
if ($offset != (int) $offset) {
|
523 |
-
$offset = 0;
|
524 |
-
} elseif ($offset = (int) $offset) {
|
525 |
-
if ($offset < 0) {
|
526 |
-
if (0 > $offset += self::mb_strlen($needle)) {
|
527 |
-
$haystack = self::mb_substr($haystack, 0, $offset, $encoding);
|
528 |
-
}
|
529 |
-
$offset = 0;
|
530 |
-
} else {
|
531 |
-
$haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
|
532 |
-
}
|
533 |
-
}
|
534 |
-
|
535 |
-
$pos = '' !== $needle || 80000 > \PHP_VERSION_ID
|
536 |
-
? \iconv_strrpos($haystack, $needle, $encoding)
|
537 |
-
: self::mb_strlen($haystack, $encoding);
|
538 |
-
|
539 |
-
return false !== $pos ? $offset + $pos : false;
|
540 |
-
}
|
541 |
-
|
542 |
-
public static function mb_str_split($string, $split_length = 1, $encoding = null)
|
543 |
-
{
|
544 |
-
if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) {
|
545 |
-
trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING);
|
546 |
-
|
547 |
-
return null;
|
548 |
-
}
|
549 |
-
|
550 |
-
if (1 > $split_length = (int) $split_length) {
|
551 |
-
if (80000 > \PHP_VERSION_ID) {
|
552 |
-
trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING);
|
553 |
-
return false;
|
554 |
-
}
|
555 |
-
|
556 |
-
throw new \ValueError('Argument #2 ($length) must be greater than 0');
|
557 |
-
}
|
558 |
-
|
559 |
-
if (null === $encoding) {
|
560 |
-
$encoding = mb_internal_encoding();
|
561 |
-
}
|
562 |
-
|
563 |
-
if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
|
564 |
-
$rx = '/(';
|
565 |
-
while (65535 < $split_length) {
|
566 |
-
$rx .= '.{65535}';
|
567 |
-
$split_length -= 65535;
|
568 |
-
}
|
569 |
-
$rx .= '.{'.$split_length.'})/us';
|
570 |
-
|
571 |
-
return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
|
572 |
-
}
|
573 |
-
|
574 |
-
$result = [];
|
575 |
-
$length = mb_strlen($string, $encoding);
|
576 |
-
|
577 |
-
for ($i = 0; $i < $length; $i += $split_length) {
|
578 |
-
$result[] = mb_substr($string, $i, $split_length, $encoding);
|
579 |
-
}
|
580 |
-
|
581 |
-
return $result;
|
582 |
-
}
|
583 |
-
|
584 |
-
public static function mb_strtolower($s, $encoding = null)
|
585 |
-
{
|
586 |
-
return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding);
|
587 |
-
}
|
588 |
-
|
589 |
-
public static function mb_strtoupper($s, $encoding = null)
|
590 |
-
{
|
591 |
-
return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding);
|
592 |
-
}
|
593 |
-
|
594 |
-
public static function mb_substitute_character($c = null)
|
595 |
-
{
|
596 |
-
if (null === $c) {
|
597 |
-
return 'none';
|
598 |
-
}
|
599 |
-
if (0 === strcasecmp($c, 'none')) {
|
600 |
-
return true;
|
601 |
-
}
|
602 |
-
if (80000 > \PHP_VERSION_ID) {
|
603 |
-
return false;
|
604 |
-
}
|
605 |
-
if (\is_int($c) || 'long' === $c || 'entity' === $c) {
|
606 |
-
return false;
|
607 |
-
}
|
608 |
-
|
609 |
-
throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
|
610 |
-
}
|
611 |
-
|
612 |
-
public static function mb_substr($s, $start, $length = null, $encoding = null)
|
613 |
-
{
|
614 |
-
$encoding = self::getEncoding($encoding);
|
615 |
-
if ('CP850' === $encoding || 'ASCII' === $encoding) {
|
616 |
-
return (string) substr($s, $start, null === $length ? 2147483647 : $length);
|
617 |
-
}
|
618 |
-
|
619 |
-
if ($start < 0) {
|
620 |
-
$start = \iconv_strlen($s, $encoding) + $start;
|
621 |
-
if ($start < 0) {
|
622 |
-
$start = 0;
|
623 |
-
}
|
624 |
-
}
|
625 |
-
|
626 |
-
if (null === $length) {
|
627 |
-
$length = 2147483647;
|
628 |
-
} elseif ($length < 0) {
|
629 |
-
$length = \iconv_strlen($s, $encoding) + $length - $start;
|
630 |
-
if ($length < 0) {
|
631 |
-
return '';
|
632 |
-
}
|
633 |
-
}
|
634 |
-
|
635 |
-
return (string) \iconv_substr($s, $start, $length, $encoding);
|
636 |
-
}
|
637 |
-
|
638 |
-
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
|
639 |
-
{
|
640 |
-
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
641 |
-
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
642 |
-
|
643 |
-
return self::mb_strpos($haystack, $needle, $offset, $encoding);
|
644 |
-
}
|
645 |
-
|
646 |
-
public static function mb_stristr($haystack, $needle, $part = false, $encoding = null)
|
647 |
-
{
|
648 |
-
$pos = self::mb_stripos($haystack, $needle, 0, $encoding);
|
649 |
-
|
650 |
-
return self::getSubpart($pos, $part, $haystack, $encoding);
|
651 |
-
}
|
652 |
-
|
653 |
-
public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null)
|
654 |
-
{
|
655 |
-
$encoding = self::getEncoding($encoding);
|
656 |
-
if ('CP850' === $encoding || 'ASCII' === $encoding) {
|
657 |
-
$pos = strrpos($haystack, $needle);
|
658 |
-
} else {
|
659 |
-
$needle = self::mb_substr($needle, 0, 1, $encoding);
|
660 |
-
$pos = \iconv_strrpos($haystack, $needle, $encoding);
|
661 |
-
}
|
662 |
-
|
663 |
-
return self::getSubpart($pos, $part, $haystack, $encoding);
|
664 |
-
}
|
665 |
-
|
666 |
-
public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null)
|
667 |
-
{
|
668 |
-
$needle = self::mb_substr($needle, 0, 1, $encoding);
|
669 |
-
$pos = self::mb_strripos($haystack, $needle, $encoding);
|
670 |
-
|
671 |
-
return self::getSubpart($pos, $part, $haystack, $encoding);
|
672 |
-
}
|
673 |
-
|
674 |
-
public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
|
675 |
-
{
|
676 |
-
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
677 |
-
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
678 |
-
|
679 |
-
return self::mb_strrpos($haystack, $needle, $offset, $encoding);
|
680 |
-
}
|
681 |
-
|
682 |
-
public static function mb_strstr($haystack, $needle, $part = false, $encoding = null)
|
683 |
-
{
|
684 |
-
$pos = strpos($haystack, $needle);
|
685 |
-
if (false === $pos) {
|
686 |
-
return false;
|
687 |
-
}
|
688 |
-
if ($part) {
|
689 |
-
return substr($haystack, 0, $pos);
|
690 |
-
}
|
691 |
-
|
692 |
-
return substr($haystack, $pos);
|
693 |
-
}
|
694 |
-
|
695 |
-
public static function mb_get_info($type = 'all')
|
696 |
-
{
|
697 |
-
$info = [
|
698 |
-
'internal_encoding' => self::$internalEncoding,
|
699 |
-
'http_output' => 'pass',
|
700 |
-
'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)',
|
701 |
-
'func_overload' => 0,
|
702 |
-
'func_overload_list' => 'no overload',
|
703 |
-
'mail_charset' => 'UTF-8',
|
704 |
-
'mail_header_encoding' => 'BASE64',
|
705 |
-
'mail_body_encoding' => 'BASE64',
|
706 |
-
'illegal_chars' => 0,
|
707 |
-
'encoding_translation' => 'Off',
|
708 |
-
'language' => self::$language,
|
709 |
-
'detect_order' => self::$encodingList,
|
710 |
-
'substitute_character' => 'none',
|
711 |
-
'strict_detection' => 'Off',
|
712 |
-
];
|
713 |
-
|
714 |
-
if ('all' === $type) {
|
715 |
-
return $info;
|
716 |
-
}
|
717 |
-
if (isset($info[$type])) {
|
718 |
-
return $info[$type];
|
719 |
-
}
|
720 |
-
|
721 |
-
return false;
|
722 |
-
}
|
723 |
-
|
724 |
-
public static function mb_http_input($type = '')
|
725 |
-
{
|
726 |
-
return false;
|
727 |
-
}
|
728 |
-
|
729 |
-
public static function mb_http_output($encoding = null)
|
730 |
-
{
|
731 |
-
return null !== $encoding ? 'pass' === $encoding : 'pass';
|
732 |
-
}
|
733 |
-
|
734 |
-
public static function mb_strwidth($s, $encoding = null)
|
735 |
-
{
|
736 |
-
$encoding = self::getEncoding($encoding);
|
737 |
-
|
738 |
-
if ('UTF-8' !== $encoding) {
|
739 |
-
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
740 |
-
}
|
741 |
-
|
742 |
-
$s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
|
743 |
-
|
744 |
-
return ($wide << 1) + \iconv_strlen($s, 'UTF-8');
|
745 |
-
}
|
746 |
-
|
747 |
-
public static function mb_substr_count($haystack, $needle, $encoding = null)
|
748 |
-
{
|
749 |
-
return substr_count($haystack, $needle);
|
750 |
-
}
|
751 |
-
|
752 |
-
public static function mb_output_handler($contents, $status)
|
753 |
-
{
|
754 |
-
return $contents;
|
755 |
-
}
|
756 |
-
|
757 |
-
public static function mb_chr($code, $encoding = null)
|
758 |
-
{
|
759 |
-
if (0x80 > $code %= 0x200000) {
|
760 |
-
$s = \chr($code);
|
761 |
-
} elseif (0x800 > $code) {
|
762 |
-
$s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
|
763 |
-
} elseif (0x10000 > $code) {
|
764 |
-
$s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
|
765 |
-
} else {
|
766 |
-
$s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
|
767 |
-
}
|
768 |
-
|
769 |
-
if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
|
770 |
-
$s = mb_convert_encoding($s, $encoding, 'UTF-8');
|
771 |
-
}
|
772 |
-
|
773 |
-
return $s;
|
774 |
-
}
|
775 |
-
|
776 |
-
public static function mb_ord($s, $encoding = null)
|
777 |
-
{
|
778 |
-
if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
|
779 |
-
$s = mb_convert_encoding($s, 'UTF-8', $encoding);
|
780 |
-
}
|
781 |
-
|
782 |
-
if (1 === \strlen($s)) {
|
783 |
-
return \ord($s);
|
784 |
-
}
|
785 |
-
|
786 |
-
$code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
|
787 |
-
if (0xF0 <= $code) {
|
788 |
-
return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
|
789 |
-
}
|
790 |
-
if (0xE0 <= $code) {
|
791 |
-
return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
|
792 |
-
}
|
793 |
-
if (0xC0 <= $code) {
|
794 |
-
return (($code - 0xC0) << 6) + $s[2] - 0x80;
|
795 |
-
}
|
796 |
-
|
797 |
-
return $code;
|
798 |
-
}
|
799 |
-
|
800 |
-
private static function getSubpart($pos, $part, $haystack, $encoding)
|
801 |
-
{
|
802 |
-
if (false === $pos) {
|
803 |
-
return false;
|
804 |
-
}
|
805 |
-
if ($part) {
|
806 |
-
return self::mb_substr($haystack, 0, $pos, $encoding);
|
807 |
-
}
|
808 |
-
|
809 |
-
return self::mb_substr($haystack, $pos, null, $encoding);
|
810 |
-
}
|
811 |
-
|
812 |
-
private static function html_encoding_callback(array $m)
|
813 |
-
{
|
814 |
-
$i = 1;
|
815 |
-
$entities = '';
|
816 |
-
$m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8'));
|
817 |
-
|
818 |
-
while (isset($m[$i])) {
|
819 |
-
if (0x80 > $m[$i]) {
|
820 |
-
$entities .= \chr($m[$i++]);
|
821 |
-
continue;
|
822 |
-
}
|
823 |
-
if (0xF0 <= $m[$i]) {
|
824 |
-
$c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
|
825 |
-
} elseif (0xE0 <= $m[$i]) {
|
826 |
-
$c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
|
827 |
-
} else {
|
828 |
-
$c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80;
|
829 |
-
}
|
830 |
-
|
831 |
-
$entities .= '&#'.$c.';';
|
832 |
-
}
|
833 |
-
|
834 |
-
return $entities;
|
835 |
-
}
|
836 |
-
|
837 |
-
private static function title_case(array $s)
|
838 |
-
{
|
839 |
-
return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8');
|
840 |
-
}
|
841 |
-
|
842 |
-
private static function getData($file)
|
843 |
-
{
|
844 |
-
if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
|
845 |
-
return require $file;
|
846 |
-
}
|
847 |
-
|
848 |
-
return false;
|
849 |
-
}
|
850 |
-
|
851 |
-
private static function getEncoding($encoding)
|
852 |
-
{
|
853 |
-
if (null === $encoding) {
|
854 |
-
return self::$internalEncoding;
|
855 |
-
}
|
856 |
-
|
857 |
-
if ('UTF-8' === $encoding) {
|
858 |
-
return 'UTF-8';
|
859 |
-
}
|
860 |
-
|
861 |
-
$encoding = strtoupper($encoding);
|
862 |
-
|
863 |
-
if ('8BIT' === $encoding || 'BINAR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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-mbstring/README.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
Symfony Polyfill / Mbstring
|
2 |
-
===========================
|
3 |
-
|
4 |
-
This component provides a partial, native PHP implementation for the
|
5 |
-
[Mbstring](https://php.net/mbstring) extension.
|
6 |
-
|
7 |
-
More information can be found in the
|
8 |
-
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
|
9 |
-
|
10 |
-
License
|
11 |
-
=======
|
12 |
-
|
13 |
-
This library is released under the [MIT license](LICENSE).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
DELETED
@@ -1,1397 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
return array (
|
4 |
-
'A' => 'a',
|
5 |
-
'B' => 'b',
|
6 |
-
'C' => 'c',
|
7 |
-
'D' => 'd',
|
8 |
-
'E' => 'e',
|
9 |
-
'F' => 'f',
|
10 |
-
'G' => 'g',
|
11 |
-
'H' => 'h',
|
12 |
-
'I' => 'i',
|
13 |
-
'J' => 'j',
|
14 |
-
'K' => 'k',
|
15 |
-
'L' => 'l',
|
16 |
-
'M' => 'm',
|
17 |
-
'N' => 'n',
|
18 |
-
'O' => 'o',
|
19 |
-
'P' => 'p',
|
20 |
-
'Q' => 'q',
|
21 |
-
'R' => 'r',
|
22 |
-
'S' => 's',
|
23 |
-
'T' => 't',
|
24 |
-
'U' => 'u',
|
25 |
-
'V' => 'v',
|
26 |
-
'W' => 'w',
|
27 |
-
'X' => 'x',
|
28 |
-
'Y' => 'y',
|
29 |
-
'Z' => 'z',
|
30 |
-
'À' => 'à',
|
31 |
-
'Á' => 'á',
|
32 |
-
'Â' => 'â',
|
33 |
-
'Ã' => 'ã',
|
34 |
-
'Ä' => 'ä',
|
35 |
-
'Å' => 'å',
|
36 |
-
'Æ' => 'æ',
|
37 |
-
'Ç' => 'ç',
|
38 |
-
'È' => 'è',
|
39 |
-
'É' => 'é',
|
40 |
-
'Ê' => 'ê',
|
41 |
-
'Ë' => 'ë',
|
42 |
-
'Ì' => 'ì',
|
43 |
-
'Í' => 'í',
|
44 |
-
'Î' => 'î',
|
45 |
-
'Ï' => 'ï',
|
46 |
-
'Ð' => 'ð',
|
47 |
-
'Ñ' => 'ñ',
|
48 |
-
'Ò' => 'ò',
|
49 |
-
'Ó' => 'ó',
|
50 |
-
'Ô' => 'ô',
|
51 |
-
'Õ' => 'õ',
|
52 |
-
'Ö' => 'ö',
|
53 |
-
'Ø' => 'ø',
|
54 |
-
'Ù' => 'ù',
|
55 |
-
'Ú' => 'ú',
|
56 |
-
'Û' => 'û',
|
57 |
-
'Ü' => 'ü',
|
58 |
-
'Ý' => 'ý',
|
59 |
-
'Þ' => 'þ',
|
60 |
-
'Ā' => 'ā',
|
61 |
-
'Ă' => 'ă',
|
62 |
-
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|
-
'Ђ' => 'ђ',
|
290 |
-
'Ѓ' => 'ѓ',
|
291 |
-
'Є' => 'є',
|
292 |
-
'Ѕ' => 'ѕ',
|
293 |
-
'І' => 'і',
|
294 |
-
'Ї' => 'ї',
|
295 |
-
'Ј' => 'ј',
|
296 |
-
'Љ' => 'љ',
|
297 |
-
'Њ' => 'њ',
|
298 |
-
'Ћ' => 'ћ',
|
299 |
-
'Ќ' => 'ќ',
|
300 |
-
'Ѝ' => 'ѝ',
|
301 |
-
'Ў' => 'ў',
|
302 |
-
'Џ' => 'џ',
|
303 |
-
'А' => 'а',
|
304 |
-
'Б' => 'б',
|
305 |
-
'В' => 'в',
|
306 |
-
'Г' => 'г',
|
307 |
-
'Д' => 'д',
|
308 |
-
'Е' => 'е',
|
309 |
-
'Ж' => 'ж',
|
310 |
-
'З' => 'з',
|
311 |
-
'И' => 'и',
|
312 |
-
'Й' => 'й',
|
313 |
-
'К' => 'к',
|
314 |
-
'Л' => 'л',
|
315 |
-
'М' => 'м',
|
316 |
-
'Н' => 'н',
|
317 |
-
'О' => 'о',
|
318 |
-
'П' => 'п',
|
319 |
-
'Р' => 'р',
|
320 |
-
'С' => 'с',
|
321 |
-
'Т' => 'т',
|
322 |
-
'У' => 'у',
|
323 |
-
'Ф' => 'ф',
|
324 |
-
'Х' => 'х',
|
325 |
-
'Ц' => 'ц',
|
326 |
-
'Ч' => 'ч',
|
327 |
-
'Ш' => 'ш',
|
328 |
-
'Щ' => 'щ',
|
329 |
-
'Ъ' => 'ъ',
|
330 |
-
'Ы' => 'ы',
|
331 |
-
'Ь' => 'ь',
|
332 |
-
'Э' => 'э',
|
333 |
-
'Ю' => 'ю',
|
334 |
-
'Я' => 'я',
|
335 |
-
'Ѡ' => 'ѡ',
|
336 |
-
'Ѣ' => 'ѣ',
|
337 |
-
'Ѥ' => 'ѥ',
|
338 |
-
'Ѧ' => 'ѧ',
|
339 |
-
'Ѩ' => 'ѩ',
|
340 |
-
'Ѫ' => 'ѫ',
|
341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',
|
428 |
-
'Ԣ' => 'ԣ',
|
429 |
-
'Ԥ' => 'ԥ',
|
430 |
-
'Ԧ' => 'ԧ',
|
431 |
-
'Ԩ' => 'ԩ',
|
432 |
-
'Ԫ' => 'ԫ',
|
433 |
-
'Ԭ' => 'ԭ',
|
434 |
-
'Ԯ' => 'ԯ',
|
435 |
-
'Ա' => 'ա',
|
436 |
-
'Բ' => 'բ',
|
437 |
-
'Գ' => 'գ',
|
438 |
-
'Դ' => 'դ',
|
439 |
-
'Ե' => 'ե',
|
440 |
-
'Զ' => 'զ',
|
441 |
-
'Է' => 'է',
|
442 |
-
'Ը' => 'ը',
|
443 |
-
'Թ' => 'թ',
|
444 |
-
'Ժ' => 'ժ',
|
445 |
-
'Ի' => 'ի',
|
446 |
-
'Լ' => 'լ',
|
447 |
-
'Խ' => 'խ',
|
448 |
-
'Ծ' => 'ծ',
|
449 |
-
'Կ' => 'կ',
|
450 |
-
'Հ' => 'հ',
|
451 |
-
'Ձ' => 'ձ',
|
452 |
-
'Ղ' => 'ղ',
|
453 |
-
'Ճ' => 'ճ',
|
454 |
-
'Մ' => 'մ',
|
455 |
-
'Յ' => 'յ',
|
456 |
-
'Ն' => 'ն',
|
457 |
-
'Շ' => 'շ',
|
458 |
-
'Ո' => 'ո',
|
459 |
-
'Չ' => 'չ',
|
460 |
-
'Պ' => 'պ',
|
461 |
-
'Ջ' => 'ջ',
|
462 |
-
'Ռ' => 'ռ',
|
463 |
-
'Ս' => 'ս',
|
464 |
-
'Վ' => 'վ',
|
465 |
-
'Տ' => 'տ',
|
466 |
-
'Ր' => 'ր',
|
467 |
-
'Ց' => 'ց',
|
468 |
-
'Ւ' => 'ւ',
|
469 |
-
'Փ' => 'փ',
|
470 |
-
'Ք' => 'ք',
|
471 |
-
'Օ' => 'օ',
|
472 |
-
'Ֆ' => 'ֆ',
|
473 |
-
'Ⴀ' => 'ⴀ',
|
474 |
-
'Ⴁ' => 'ⴁ',
|
475 |
-
'Ⴂ' => 'ⴂ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
594 |
-
'Ᏹ' => 'ᏹ',
|
595 |
-
'Ᏺ' => 'ᏺ',
|
596 |
-
'Ᏻ' => 'ᏻ',
|
597 |
-
'Ᏼ' => 'ᏼ',
|
598 |
-
'Ᏽ' => 'ᏽ',
|
599 |
-
'Ა' => 'ა',
|
600 |
-
'Ბ' => 'ბ',
|
601 |
-
'Გ' => 'გ',
|
602 |
-
'Დ' => 'დ',
|
603 |
-
'Ე' => 'ე',
|
604 |
-
'Ვ' => 'ვ',
|
605 |
-
'Ზ' => 'ზ',
|
606 |
-
'Თ' => 'თ',
|
607 |
-
'Ი' => 'ი',
|
608 |
-
'Კ' => 'კ',
|
609 |
-
'Ლ' => 'ლ',
|
610 |
-
'Მ' => 'მ',
|
611 |
-
'Ნ' => 'ნ',
|
612 |
-
'Ო' => 'ო',
|
613 |
-
'Პ' => 'პ',
|
614 |
-
'Ჟ' => 'ჟ',
|
615 |
-
'Რ' => 'რ',
|
616 |
-
'Ს' => 'ს',
|
617 |
-
'Ტ' => 'ტ',
|
618 |
-
'Უ' => 'უ',
|
619 |
-
'Ფ' => 'ფ',
|
620 |
-
'Ქ' => 'ქ',
|
621 |
-
'Ღ' => 'ღ',
|
622 |
-
'Ყ' => 'ყ',
|
623 |
-
'Შ' => 'შ',
|
624 |
-
'Ჩ' => 'ჩ',
|
625 |
-
'Ც' => 'ც',
|
626 |
-
'Ძ' => 'ძ',
|
627 |
-
'Წ' => 'წ',
|
628 |
-
'Ჭ' => 'ჭ',
|
629 |
-
'Ხ' => 'ხ',
|
630 |
-
'Ჯ' => 'ჯ',
|
631 |
-
'Ჰ' => 'ჰ',
|
632 |
-
'Ჱ' => 'ჱ',
|
633 |
-
'Ჲ' => 'ჲ',
|
634 |
-
'Ჳ' => 'ჳ',
|
635 |
-
'Ჴ' => 'ჴ',
|
636 |
-
'Ჵ' => 'ჵ',
|
637 |
-
'Ჶ' => 'ჶ',
|
638 |
-
'Ჷ' => 'ჷ',
|
639 |
-
'Ჸ' => 'ჸ',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',
|
726 |
-
'Ẫ' => 'ẫ',
|
727 |
-
'Ậ' => 'ậ',
|
728 |
-
'Ắ' => 'ắ',
|
729 |
-
'Ằ' => 'ằ',
|
730 |
-
'Ẳ' => 'ẳ',
|
731 |
-
'Ẵ' => 'ẵ',
|
732 |
-
'Ặ' => 'ặ',
|
733 |
-
'Ẹ' => 'ẹ',
|
734 |
-
'Ẻ' => 'ẻ',
|
735 |
-
'Ẽ' => 'ẽ',
|
736 |
-
'Ế' => 'ế',
|
737 |
-
'Ề' => 'ề',
|
738 |
-
'Ể' => 'ể',
|
739 |
-
'Ễ' => 'ễ',
|
740 |
-
'Ệ' => 'ệ',
|
741 |
-
'Ỉ' => 'ỉ',
|
742 |
-
'Ị' => 'ị',
|
743 |
-
'Ọ' => 'ọ',
|
744 |
-
'Ỏ' => 'ỏ',
|
745 |
-
'Ố' => 'ố',
|
746 |
-
'Ồ' => 'ồ',
|
747 |
-
'Ổ' => 'ổ',
|
748 |
-
'Ỗ' => 'ỗ',
|
749 |
-
'Ộ' => 'ộ',
|
750 |
-
'Ớ' => 'ớ',
|
751 |
-
'Ờ' => 'ờ',
|
752 |
-
'Ở' => 'ở',
|
753 |
-
'Ỡ' => 'ỡ',
|
754 |
-
'Ợ' => 'ợ',
|
755 |
-
'Ụ' => 'ụ',
|
756 |
-
'Ủ' => 'ủ',
|
757 |
-
'Ứ' => 'ứ',
|
758 |
-
'Ừ' => 'ừ',
|
759 |
-
'Ử' => 'ử',
|
760 |
-
'Ữ' => 'ữ',
|
761 |
-
'Ự' => 'ự',
|
762 |
-
'Ỳ' => 'ỳ',
|
763 |
-
'Ỵ' => 'ỵ',
|
764 |
-
'Ỷ' => 'ỷ',
|
765 |
-
'Ỹ' => 'ỹ',
|
766 |
-
'Ỻ' => 'ỻ',
|
767 |
-
'Ỽ' => 'ỽ',
|
768 |
-
'Ỿ' => 'ỿ',
|
769 |
-
'Ἀ' => 'ἀ',
|
770 |
-
'Ἁ' => 'ἁ',
|
771 |
-
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|
1130 |
-
'Ʇ' => 'ʇ',
|
1131 |
-
'Ʝ' => 'ʝ',
|
1132 |
-
'Ꭓ' => 'ꭓ',
|
1133 |
-
'Ꞵ' => 'ꞵ',
|
1134 |
-
'Ꞷ' => 'ꞷ',
|
1135 |
-
'Ꞹ' => 'ꞹ',
|
1136 |
-
'Ꞻ' => 'ꞻ',
|
1137 |
-
'Ꞽ' => 'ꞽ',
|
1138 |
-
'Ꞿ' => 'ꞿ',
|
1139 |
-
'Ꟃ' => 'ꟃ',
|
1140 |
-
'Ꞔ' => 'ꞔ',
|
1141 |
-
'Ʂ' => 'ʂ',
|
1142 |
-
'Ᶎ' => 'ᶎ',
|
1143 |
-
'Ꟈ' => 'ꟈ',
|
1144 |
-
'Ꟊ' => 'ꟊ',
|
1145 |
-
'Ꟶ' => 'ꟶ',
|
1146 |
-
'A' => 'a',
|
1147 |
-
'B' => 'b',
|
1148 |
-
'C' => 'c',
|
1149 |
-
'D' => 'd',
|
1150 |
-
'E' => 'e',
|
1151 |
-
'F' => 'f',
|
1152 |
-
'G' => 'g',
|
1153 |
-
'H' => 'h',
|
1154 |
-
'I' => 'i',
|
1155 |
-
'J' => 'j',
|
1156 |
-
'K' => 'k',
|
1157 |
-
'L' => 'l',
|
1158 |
-
'M' => 'm',
|
1159 |
-
'N' => 'n',
|
1160 |
-
'O' => 'o',
|
1161 |
-
'P' => 'p',
|
1162 |
-
'Q' => 'q',
|
1163 |
-
'R' => 'r',
|
1164 |
-
'S' => 's',
|
1165 |
-
'T' => 't',
|
1166 |
-
'U' => 'u',
|
1167 |
-
'V' => 'v',
|
1168 |
-
'W' => 'w',
|
1169 |
-
'X' => 'x',
|
1170 |
-
'Y' => 'y',
|
1171 |
-
'Z' => 'z',
|
1172 |
-
'𐐀' => '𐐨',
|
1173 |
-
'𐐁' => '𐐩',
|
1174 |
-
'𐐂' => '𐐪',
|
1175 |
-
'𐐃' => '𐐫',
|
1176 |
-
'𐐄' => '𐐬',
|
1177 |
-
'𐐅' => '𐐭',
|
1178 |
-
'𐐆' => '𐐮',
|
1179 |
-
'𐐇' => '𐐯',
|
1180 |
-
'𐐈' => '𐐰',
|
1181 |
-
'𐐉' => '𐐱',
|
1182 |
-
'𐐊' => '𐐲',
|
1183 |
-
'𐐋' => '𐐳',
|
1184 |
-
'𐐌' => '𐐴',
|
1185 |
-
'𐐍' => '𐐵',
|
1186 |
-
'𐐎' => '𐐶',
|
1187 |
-
'𐐏' => '𐐷',
|
1188 |
-
'𐐐' => '𐐸',
|
1189 |
-
'𐐑' => '𐐹',
|
1190 |
-
'𐐒' => '𐐺',
|
1191 |
-
'𐐓' => '𐐻',
|
1192 |
-
'𐐔' => '𐐼',
|
1193 |
-
'𐐕' => '𐐽',
|
1194 |
-
'𐐖' => '𐐾',
|
1195 |
-
'𐐗' => '𐐿',
|
1196 |
-
'𐐘' => '𐑀',
|
1197 |
-
'𐐙' => '𐑁',
|
1198 |
-
'𐐚' => '𐑂',
|
1199 |
-
'𐐛' => '𐑃',
|
1200 |
-
'𐐜' => '𐑄',
|
1201 |
-
'𐐝' => '𐑅',
|
1202 |
-
'𐐞' => '𐑆',
|
1203 |
-
'𐐟' => '𐑇',
|
1204 |
-
'𐐠' => '𐑈',
|
1205 |
-
'𐐡' => '𐑉',
|
1206 |
-
'𐐢' => '𐑊',
|
1207 |
-
'𐐣' => '𐑋',
|
1208 |
-
'𐐤' => '𐑌',
|
1209 |
-
'𐐥' => '𐑍',
|
1210 |
-
'𐐦' => '𐑎',
|
1211 |
-
'𐐧' => '𐑏',
|
1212 |
-
'𐒰' => '𐓘',
|
1213 |
-
'𐒱' => '𐓙',
|
1214 |
-
'𐒲' => '𐓚',
|
1215 |
-
'𐒳' => '𐓛',
|
1216 |
-
'𐒴' => '𐓜',
|
1217 |
-
'𐒵' => '𐓝',
|
1218 |
-
'𐒶' => '𐓞',
|
1219 |
-
'𐒷' => '𐓟',
|
1220 |
-
'𐒸' => '𐓠',
|
1221 |
-
'𐒹' => '𐓡',
|
1222 |
-
'𐒺' => '𐓢',
|
1223 |
-
'𐒻' => '𐓣',
|
1224 |
-
'𐒼' => '𐓤',
|
1225 |
-
'𐒽' => '𐓥',
|
1226 |
-
'𐒾' => '𐓦',
|
1227 |
-
'𐒿' => '𐓧',
|
1228 |
-
'𐓀' => '𐓨',
|
1229 |
-
'𐓁' => '𐓩',
|
1230 |
-
'𐓂' => '𐓪',
|
1231 |
-
'𐓃' => '𐓫',
|
1232 |
-
'𐓄' => '𐓬',
|
1233 |
-
'𐓅' => '𐓭',
|
1234 |
-
'𐓆' => '𐓮',
|
1235 |
-
'𐓇' => '𐓯',
|
1236 |
-
'𐓈' => '𐓰',
|
1237 |
-
'𐓉' => '𐓱',
|
1238 |
-
'𐓊' => '𐓲',
|
1239 |
-
'𐓋' => '𐓳',
|
1240 |
-
'𐓌' => '𐓴',
|
1241 |
-
'𐓍' => '𐓵',
|
1242 |
-
'𐓎' => '𐓶',
|
1243 |
-
'𐓏' => '𐓷',
|
1244 |
-
'𐓐' => '𐓸',
|
1245 |
-
'𐓑' => '𐓹',
|
1246 |
-
'𐓒' => '𐓺',
|
1247 |
-
'𐓓' => '𐓻',
|
1248 |
-
'𐲀' => '𐳀',
|
1249 |
-
'𐲁' => '𐳁',
|
1250 |
-
'𐲂' => '𐳂',
|
1251 |
-
'𐲃' => '𐳃',
|
1252 |
-
'𐲄' => '𐳄',
|
1253 |
-
'𐲅' => '𐳅',
|
1254 |
-
'𐲆' => '𐳆',
|
1255 |
-
'𐲇' => '𐳇',
|
1256 |
-
'𐲈' => '𐳈',
|
1257 |
-
'𐲉' => '𐳉',
|
1258 |
-
'𐲊' => '𐳊',
|
1259 |
-
'𐲋' => '𐳋',
|
1260 |
-
'𐲌' => '𐳌',
|
1261 |
-
'𐲍' => '𐳍',
|
1262 |
-
'𐲎' => '𐳎',
|
1263 |
-
'𐲏' => '𐳏',
|
1264 |
-
'𐲐' => '𐳐',
|
1265 |
-
'𐲑' => '𐳑',
|
1266 |
-
'𐲒' => '𐳒',
|
1267 |
-
'𐲓' => '𐳓',
|
1268 |
-
'𐲔' => '𐳔',
|
1269 |
-
'𐲕' => '𐳕',
|
1270 |
-
'𐲖' => '𐳖',
|
1271 |
-
'𐲗' => '𐳗',
|
1272 |
-
'𐲘' => '𐳘',
|
1273 |
-
'𐲙' => '𐳙',
|
1274 |
-
'𐲚' => '𐳚',
|
1275 |
-
'𐲛' => '𐳛',
|
1276 |
-
'𐲜' => '𐳜',
|
1277 |
-
'𐲝' => '𐳝',
|
1278 |
-
'𐲞' => '𐳞',
|
1279 |
-
'𐲟' => '𐳟',
|
1280 |
-
'𐲠' => '𐳠',
|
1281 |
-
'𐲡' => '𐳡',
|
1282 |
-
'𐲢' => '𐳢',
|
1283 |
-
'𐲣' => '𐳣',
|
1284 |
-
'𐲤' => '𐳤',
|
1285 |
-
'𐲥' => '𐳥',
|
1286 |
-
'𐲦' => '𐳦',
|
1287 |
-
'𐲧' => '𐳧',
|
1288 |
-
'𐲨' => '𐳨',
|
1289 |
-
'𐲩' => '𐳩',
|
1290 |
-
'𐲪' => '𐳪',
|
1291 |
-
'𐲫' => '𐳫',
|
1292 |
-
'𐲬' => '𐳬',
|
1293 |
-
'𐲭' => '𐳭',
|
1294 |
-
'𐲮' => '𐳮',
|
1295 |
-
'𐲯' => '𐳯',
|
1296 |
-
'𐲰' => '𐳰',
|
1297 |
-
'𐲱' => '𐳱',
|
1298 |
-
'𐲲' => '𐳲',
|
1299 |
-
'𑢠' => '𑣀',
|
1300 |
-
'𑢡' => '𑣁',
|
1301 |
-
'𑢢' => '𑣂',
|
1302 |
-
'𑢣' => '𑣃',
|
1303 |
-
'𑢤' => '𑣄',
|
1304 |
-
'𑢥' => '𑣅',
|
1305 |
-
'𑢦' => '𑣆',
|
1306 |
-
'𑢧' => '𑣇',
|
1307 |
-
'𑢨' => '𑣈',
|
1308 |
-
'𑢩' => '𑣉',
|
1309 |
-
'𑢪' => '𑣊',
|
1310 |
-
'𑢫' => '𑣋',
|
1311 |
-
'𑢬' => '𑣌',
|
1312 |
-
'𑢭' => '𑣍',
|
1313 |
-
'𑢮' => '𑣎',
|
1314 |
-
'𑢯' => '𑣏',
|
1315 |
-
'𑢰' => '𑣐',
|
1316 |
-
'𑢱' => '𑣑',
|
1317 |
-
'𑢲' => '𑣒',
|
1318 |
-
'𑢳' => '𑣓',
|
1319 |
-
'𑢴' => '𑣔',
|
1320 |
-
'𑢵' => '𑣕',
|
1321 |
-
'𑢶' => '𑣖',
|
1322 |
-
'𑢷' => '𑣗',
|
1323 |
-
'𑢸' => '𑣘',
|
1324 |
-
'𑢹' => '𑣙',
|
1325 |
-
'𑢺' => '𑣚',
|
1326 |
-
'𑢻' => '𑣛',
|
1327 |
-
'𑢼' => '𑣜',
|
1328 |
-
'𑢽' => '𑣝',
|
1329 |
-
'𑢾' => '𑣞',
|
1330 |
-
'𑢿' => '𑣟',
|
1331 |
-
'𖹀' => '𖹠',
|
1332 |
-
'𖹁' => '𖹡',
|
1333 |
-
'𖹂' => '𖹢',
|
1334 |
-
'𖹃' => '𖹣',
|
1335 |
-
'𖹄' => '𖹤',
|
1336 |
-
'𖹅' => '𖹥',
|
1337 |
-
'𖹆' => '𖹦',
|
1338 |
-
'𖹇' => '𖹧',
|
1339 |
-
'𖹈' => '𖹨',
|
1340 |
-
'𖹉' => '𖹩',
|
1341 |
-
'𖹊' => '𖹪',
|
1342 |
-
'𖹋' => '𖹫',
|
1343 |
-
'𖹌' => '𖹬',
|
1344 |
-
'𖹍' => '𖹭',
|
1345 |
-
'𖹎' => '𖹮',
|
1346 |
-
'𖹏' => '𖹯',
|
1347 |
-
'𖹐' => '𖹰',
|
1348 |
-
'𖹑' => '𖹱',
|
1349 |
-
'𖹒' => '𖹲',
|
1350 |
-
'𖹓' => '𖹳',
|
1351 |
-
'𖹔' => '𖹴',
|
1352 |
-
'𖹕' => '𖹵',
|
1353 |
-
'𖹖' => '𖹶',
|
1354 |
-
'𖹗' => '𖹷',
|
1355 |
-
'𖹘' => '𖹸',
|
1356 |
-
'𖹙' => '𖹹',
|
1357 |
-
'𖹚' => '𖹺',
|
1358 |
-
'𖹛' => '𖹻',
|
1359 |
-
'𖹜' => '𖹼',
|
1360 |
-
'𖹝' => '𖹽',
|
1361 |
-
'𖹞' => '𖹾',
|
1362 |
-
'𖹟' => '𖹿',
|
1363 |
-
'𞤀' => '𞤢',
|
1364 |
-
'𞤁' => '𞤣',
|
1365 |
-
'𞤂' => '𞤤',
|
1366 |
-
'𞤃' => '𞤥',
|
1367 |
-
'𞤄' => '𞤦',
|
1368 |
-
'𞤅' => '𞤧',
|
1369 |
-
'𞤆' => '𞤨',
|
1370 |
-
'𞤇' => '𞤩',
|
1371 |
-
'𞤈' => '𞤪',
|
1372 |
-
'𞤉' => '𞤫',
|
1373 |
-
'𞤊' => '𞤬',
|
1374 |
-
'𞤋' => '𞤭',
|
1375 |
-
'𞤌' => '𞤮',
|
1376 |
-
'𞤍' => '𞤯',
|
1377 |
-
'𞤎' => '𞤰',
|
1378 |
-
'𞤏' => '𞤱',
|
1379 |
-
'𞤐' => '𞤲',
|
1380 |
-
'𞤑' => '𞤳',
|
1381 |
-
'𞤒' => '𞤴',
|
1382 |
-
'𞤓' => '𞤵',
|
1383 |
-
'𞤔' => '𞤶',
|
1384 |
-
'𞤕' => '𞤷',
|
1385 |
-
'𞤖' => '𞤸',
|
1386 |
-
'𞤗' => '𞤹',
|
1387 |
-
'𞤘' => '𞤺',
|
1388 |
-
'𞤙' => '𞤻',
|
1389 |
-
'𞤚' => '𞤼',
|
1390 |
-
'𞤛' => '𞤽',
|
1391 |
-
'𞤜' => '𞤾',
|
1392 |
-
'𞤝' => '𞤿',
|
1393 |
-
'𞤞' => '𞥀',
|
1394 |
-
'𞤟' => '𞥁',
|
1395 |
-
'𞤠' => '𞥂',
|
1396 |
-
'𞤡' => '𞥃',
|
1397 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
|
4 |
-
|
5 |
-
return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0971}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{10FC}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}\x{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u';
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
DELETED
@@ -1,1489 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
return array (
|
4 |
-
'a' => 'A',
|
5 |
-
'b' => 'B',
|
6 |
-
'c' => 'C',
|
7 |
-
'd' => 'D',
|
8 |
-
'e' => 'E',
|
9 |
-
'f' => 'F',
|
10 |
-
'g' => 'G',
|
11 |
-
'h' => 'H',
|
12 |
-
'i' => 'I',
|
13 |
-
'j' => 'J',
|
14 |
-
'k' => 'K',
|
15 |
-
'l' => 'L',
|
16 |
-
'm' => 'M',
|
17 |
-
'n' => 'N',
|
18 |
-
'o' => 'O',
|
19 |
-
'p' => 'P',
|
20 |
-
'q' => 'Q',
|
21 |
-
'r' => 'R',
|
22 |
-
's' => 'S',
|
23 |
-
't' => 'T',
|
24 |
-
'u' => 'U',
|
25 |
-
'v' => 'V',
|
26 |
-
'w' => 'W',
|
27 |
-
'x' => 'X',
|
28 |
-
'y' => 'Y',
|
29 |
-
'z' => 'Z',
|
30 |
-
'µ' => 'Μ',
|
31 |
-
'à' => 'À',
|
32 |
-
'á' => 'Á',
|
33 |
-
'â' => 'Â',
|
34 |
-
'ã' => 'Ã',
|
35 |
-
'ä' => 'Ä',
|
36 |
-
'å' => 'Å',
|
37 |
-
'æ' => 'Æ',
|
38 |
-
'ç' => 'Ç',
|
39 |
-
'è' => 'È',
|
40 |
-
'é' => 'É',
|
41 |
-
'ê' => 'Ê',
|
42 |
-
'ë' => 'Ë',
|
43 |
-
'ì' => 'Ì',
|
44 |
-
'í' => 'Í',
|
45 |
-
'î' => 'Î',
|
46 |
-
'ï' => 'Ï',
|
47 |
-
'ð' => 'Ð',
|
48 |
-
'ñ' => 'Ñ',
|
49 |
-
'ò' => 'Ò',
|
50 |
-
'ó' => 'Ó',
|
51 |
-
'ô' => 'Ô',
|
52 |
-
'õ' => 'Õ',
|
53 |
-
'ö' => 'Ö',
|
54 |
-
'ø' => 'Ø',
|
55 |
-
'ù' => 'Ù',
|
56 |
-
'ú' => 'Ú',
|
57 |
-
'û' => 'Û',
|
58 |
-
'ü' => 'Ü',
|
59 |
-
'ý' => 'Ý',
|
60 |
-
'þ' => 'Þ',
|
61 |
-
'ÿ' => 'Ÿ',
|
62 |
-
'ā' => 'Ā',
|
63 |
-
'ă' => 'Ă',
|
64 |
-
'ą' => 'Ą',
|
65 |
-
'ć' => 'Ć',
|
66 |
-
'ĉ' => 'Ĉ',
|
67 |
-
'ċ' => 'Ċ',
|
68 |
-
'č' => 'Č',
|
69 |
-
'ď' => 'Ď',
|
70 |
-
'đ' => 'Đ',
|
71 |
-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' => 'Ͱ',
|
250 |
-
'ͳ' => 'Ͳ',
|
251 |
-
'ͷ' => 'Ͷ',
|
252 |
-
'ͻ' => 'Ͻ',
|
253 |
-
'ͼ' => 'Ͼ',
|
254 |
-
'ͽ' => 'Ͽ',
|
255 |
-
'ά' => 'Ά',
|
256 |
-
'έ' => 'Έ',
|
257 |
-
'ή' => 'Ή',
|
258 |
-
'ί' => 'Ί',
|
259 |
-
'α' => 'Α',
|
260 |
-
'β' => 'Β',
|
261 |
-
'γ' => 'Γ',
|
262 |
-
'δ' => 'Δ',
|
263 |
-
'ε' => 'Ε',
|
264 |
-
'ζ' => 'Ζ',
|
265 |
-
'η' => 'Η',
|
266 |
-
'θ' => 'Θ',
|
267 |
-
'ι' => 'Ι',
|
268 |
-
'κ' => 'Κ',
|
269 |
-
'λ' => 'Λ',
|
270 |
-
'μ' => 'Μ',
|
271 |
-
'ν' => 'Ν',
|
272 |
-
'ξ' => 'Ξ',
|
273 |
-
'ο' => 'Ο',
|
274 |
-
'π' => 'Π',
|
275 |
-
'ρ' => 'Ρ',
|
276 |
-
'ς' => 'Σ',
|
277 |
-
'σ' => 'Σ',
|
278 |
-
'τ' => 'Τ',
|
279 |
-
'υ' => 'Υ',
|
280 |
-
'φ' => 'Φ',
|
281 |
-
'χ' => 'Χ',
|
282 |
-
'ψ' => 'Ψ',
|
283 |
-
'ω' => 'Ω',
|
284 |
-
'ϊ' => 'Ϊ',
|
285 |
-
'ϋ' => 'Ϋ',
|
286 |
-
'ό' => 'Ό',
|
287 |
-
'ύ' => 'Ύ',
|
288 |
-
'ώ' => 'Ώ',
|
289 |
-
'ϐ' => 'Β',
|
290 |
-
'ϑ' => 'Θ',
|
291 |
-
'ϕ' => 'Φ',
|
292 |
-
'ϖ' => 'Π',
|
293 |
-
'ϗ' => 'Ϗ',
|
294 |
-
'ϙ' => 'Ϙ',
|
295 |
-
'ϛ' => 'Ϛ',
|
296 |
-
'ϝ' => 'Ϝ',
|
297 |
-
'ϟ' => 'Ϟ',
|
298 |
-
'ϡ' => 'Ϡ',
|
299 |
-
'ϣ' => 'Ϣ',
|
300 |
-
'ϥ' => 'Ϥ',
|
301 |
-
'ϧ' => 'Ϧ',
|
302 |
-
'ϩ' => 'Ϩ',
|
303 |
-
'ϫ' => 'Ϫ',
|
304 |
-
'ϭ' => 'Ϭ',
|
305 |
-
'ϯ' => 'Ϯ',
|
306 |
-
'ϰ' => 'Κ',
|
307 |
-
'ϱ' => 'Ρ',
|
308 |
-
'ϲ' => 'Ϲ',
|
309 |
-
'ϳ' => 'Ϳ',
|
310 |
-
'ϵ' => 'Ε',
|
311 |
-
'ϸ' => 'Ϸ',
|
312 |
-
'ϻ' => 'Ϻ',
|
313 |
-
'а' => 'А',
|
314 |
-
'б' => 'Б',
|
315 |
-
'в' => 'В',
|
316 |
-
'г' => 'Г',
|
317 |
-
'д' => 'Д',
|
318 |
-
'е' => 'Е',
|
319 |
-
'ж' => 'Ж',
|
320 |
-
'з' => 'З',
|
321 |
-
'и' => 'И',
|
322 |
-
'й' => 'Й',
|
323 |
-
'к' => 'К',
|
324 |
-
'л' => 'Л',
|
325 |
-
'м' => 'М',
|
326 |
-
'н' => 'Н',
|
327 |
-
'о' => 'О',
|
328 |
-
'п' => 'П',
|
329 |
-
'р' => 'Р',
|
330 |
-
'с' => 'С',
|
331 |
-
'т' => 'Т',
|
332 |
-
'у' => 'У',
|
333 |
-
'ф' => 'Ф',
|
334 |
-
'х' => 'Х',
|
335 |
-
'ц' => 'Ц',
|
336 |
-
'ч' => 'Ч',
|
337 |
-
'ш' => 'Ш',
|
338 |
-
'щ' => 'Щ',
|
339 |
-
'ъ' => 'Ъ',
|
340 |
-
'ы' => 'Ы',
|
341 |
-
'ь' => 'Ь',
|
342 |
-
'э' => 'Э',
|
343 |
-
'ю' => 'Ю',
|
344 |
-
'я' => 'Я',
|
345 |
-
'ѐ' => 'Ѐ',
|
346 |
-
'ё' => 'Ё',
|
347 |
-
'ђ' => 'Ђ',
|
348 |
-
'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ն',
|
483 |
-
'շ' => 'Շ',
|
484 |
-
'ո' => 'Ո',
|
485 |
-
'չ' => 'Չ',
|
486 |
-
'պ' => 'Պ',
|
487 |
-
'ջ' => 'Ջ',
|
488 |
-
'ռ' => 'Ռ',
|
489 |
-
'ս' => 'Ս',
|
490 |
-
'վ' => 'Վ',
|
491 |
-
'տ' => 'Տ',
|
492 |
-
'ր' => 'Ր',
|
493 |
-
'ց' => 'Ց',
|
494 |
-
'ւ' => 'Ւ',
|
495 |
-
'փ' => 'Փ',
|
496 |
-
'ք' => 'Ք',
|
497 |
-
'օ' => 'Օ',
|
498 |
-
'ֆ' => 'Ֆ',
|
499 |
-
'ა' => 'Ა',
|
500 |
-
'ბ' => 'Ბ',
|
501 |
-
'გ' => 'Გ',
|
502 |
-
'დ' => 'Დ',
|
503 |
-
'ე' => 'Ე',
|
504 |
-
'ვ' => 'Ვ',
|
505 |
-
'ზ' => 'Ზ',
|
506 |
-
'თ' => 'Თ',
|
507 |
-
'ი' => 'Ი',
|
508 |
-
'კ' => 'Კ',
|
509 |
-
'ლ' => 'Ლ',
|
510 |
-
'მ' => 'Მ',
|
511 |
-
'ნ' => 'Ნ',
|
512 |
-
'ო' => 'Ო',
|
513 |
-
'პ' => 'Პ',
|
514 |
-
'ჟ' => 'Ჟ',
|
515 |
-
'რ' => 'Რ',
|
516 |
-
'ს' => 'Ს',
|
517 |
-
'ტ' => 'Ტ',
|
518 |
-
'უ' => 'Უ',
|
519 |
-
'ფ' => 'Ფ',
|
520 |
-
'ქ' => 'Ქ',
|
521 |
-
'ღ' => 'Ღ',
|
522 |
-
'ყ' => 'Ყ',
|
523 |
-
'შ' => 'Შ',
|
524 |
-
'ჩ' => 'Ჩ',
|
525 |
-
'ც' => 'Ც',
|
526 |
-
'ძ' => 'Ძ',
|
527 |
-
'წ' => 'Წ',
|
528 |
-
'ჭ' => 'Ჭ',
|
529 |
-
'ხ' => 'Ხ',
|
530 |
-
'ჯ' => 'Ჯ',
|
531 |
-
'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' => 'Ṫ',
|
617 |
-
'ṭ' => 'Ṭ',
|
618 |
-
'ṯ' => 'Ṯ',
|
619 |
-
'ṱ' => 'Ṱ',
|
620 |
-
'ṳ' => 'Ṳ',
|
621 |
-
'ṵ' => 'Ṵ',
|
622 |
-
'ṷ' => 'Ṷ',
|
623 |
-
'ṹ' => 'Ṹ',
|
624 |
-
'ṻ' => 'Ṻ',
|
625 |
-
'ṽ' => 'Ṽ',
|
626 |
-
'ṿ' => 'Ṿ',
|
627 |
-
'ẁ' => 'Ẁ',
|
628 |
-
'ẃ' => 'Ẃ',
|
629 |
-
'ẅ' => 'Ẅ',
|
630 |
-
'ẇ' => 'Ẇ',
|
631 |
-
'ẉ' => 'Ẉ',
|
632 |
-
'ẋ' => 'Ẋ',
|
633 |
-
'ẍ' => 'Ẍ',
|
634 |
-
'ẏ' => 'Ẏ',
|
635 |
-
'ẑ' => 'Ẑ',
|
636 |
-
'ẓ' => 'Ẓ',
|
637 |
-
'ẕ' => 'Ẕ',
|
638 |
-
'ẛ' => 'Ṡ',
|
639 |
-
'ạ' => 'Ạ',
|
640 |
-
'ả' => 'Ả',
|
641 |
-
'ấ' => 'Ấ',
|
642 |
-
'ầ' => 'Ầ',
|
643 |
-
'ẩ' => 'Ẩ',
|
644 |
-
'ẫ' => 'Ẫ',
|
645 |
-
'ậ' => 'Ậ',
|
646 |
-
'ắ' => 'Ắ',
|
647 |
-
'ằ' => 'Ằ',
|
648 |
-
'ẳ' => 'Ẳ',
|
649 |
-
'ẵ' => 'Ẵ',
|
650 |
-
'ặ' => 'Ặ',
|
651 |
-
'ẹ' => 'Ẹ',
|
652 |
-
'ẻ' => 'Ẻ',
|
653 |
-
'ẽ' => 'Ẽ',
|
654 |
-
'ế' => 'Ế',
|
655 |
-
'ề' => 'Ề',
|
656 |
-
'ể' => 'Ể',
|
657 |
-
'ễ' => 'Ễ',
|
658 |
-
'ệ' => 'Ệ',
|
659 |
-
'ỉ' => 'Ỉ',
|
660 |
-
'ị' => 'Ị',
|
661 |
-
'ọ' => 'Ọ',
|
662 |
-
'ỏ' => 'Ỏ',
|
663 |
-
'ố' => 'Ố',
|
664 |
-
'ồ' => 'Ồ',
|
665 |
-
'ổ' => 'Ổ',
|
666 |
-
'ỗ' => 'Ỗ',
|
667 |
-
'ộ' => 'Ộ',
|
668 |
-
'ớ' => 'Ớ',
|
669 |
-
'ờ' => 'Ờ',
|
670 |
-
'ở' => 'Ở',
|
671 |
-
'ỡ' => 'Ỡ',
|
672 |
-
'ợ' => 'Ợ',
|
673 |
-
'ụ' => 'Ụ',
|
674 |
-
'ủ' => 'Ủ',
|
675 |
-
'ứ' => 'Ứ',
|
676 |
-
'ừ' => 'Ừ',
|
677 |
-
'ử' => 'Ử',
|
678 |
-
'ữ' => 'Ữ',
|
679 |
-
'ự' => 'Ự',
|
680 |
-
'ỳ' => 'Ỳ',
|
681 |
-
'ỵ' => 'Ỵ',
|
682 |
-
'ỷ' => 'Ỷ',
|
683 |
-
'ỹ' => 'Ỹ',
|
684 |
-
'ỻ' => 'Ỻ',
|
685 |
-
'ỽ' => 'Ỽ',
|
686 |
-
'ỿ' => 'Ỿ',
|
687 |
-
'ἀ' => 'Ἀ',
|
688 |
-
'ἁ' => 'Ἁ',
|
689 |
-
'ἂ' => 'Ἂ',
|
690 |
-
'ἃ' => 'Ἃ',
|
691 |
-
'ἄ' => 'Ἄ',
|
692 |
-
'ἅ' => 'Ἅ',
|
693 |
-
'ἆ' => 'Ἆ',
|
694 |
-
'ἇ' => 'Ἇ',
|
695 |
-
'ἐ' => 'Ἐ',
|
696 |
-
'ἑ' => 'Ἑ',
|
697 |
-
'ἒ' => 'Ἒ',
|
698 |
-
'ἓ' => 'Ἓ',
|
699 |
-
'ἔ' => 'Ἔ',
|
700 |
-
'ἕ' => 'Ἕ',
|
701 |
-
'ἠ' => 'Ἠ',
|
702 |
-
'ἡ' => 'Ἡ',
|
703 |
-
'ἢ' => 'Ἢ',
|
704 |
-
'ἣ' => 'Ἣ',
|
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't' => 'T',
|
1183 |
-
'u' => 'U',
|
1184 |
-
'v' => 'V',
|
1185 |
-
'w' => 'W',
|
1186 |
-
'x' => 'X',
|
1187 |
-
'y' => 'Y',
|
1188 |
-
'z' => 'Z',
|
1189 |
-
'𐐨' => '𐐀',
|
1190 |
-
'𐐩' => '𐐁',
|
1191 |
-
'𐐪' => '𐐂',
|
1192 |
-
'𐐫' => '𐐃',
|
1193 |
-
'𐐬' => '𐐄',
|
1194 |
-
'𐐭' => '𐐅',
|
1195 |
-
'𐐮' => '𐐆',
|
1196 |
-
'𐐯' => '𐐇',
|
1197 |
-
'𐐰' => '𐐈',
|
1198 |
-
'𐐱' => '𐐉',
|
1199 |
-
'𐐲' => '𐐊',
|
1200 |
-
'𐐳' => '𐐋',
|
1201 |
-
'𐐴' => '𐐌',
|
1202 |
-
'𐐵' => '𐐍',
|
1203 |
-
'𐐶' => '𐐎',
|
1204 |
-
'𐐷' => '𐐏',
|
1205 |
-
'𐐸' => '𐐐',
|
1206 |
-
'𐐹' => '𐐑',
|
1207 |
-
'𐐺' => '𐐒',
|
1208 |
-
'𐐻' => '𐐓',
|
1209 |
-
'𐐼' => '𐐔',
|
1210 |
-
'𐐽' => '𐐕',
|
1211 |
-
'𐐾' => '𐐖',
|
1212 |
-
'𐐿' => '𐐗',
|
1213 |
-
'𐑀' => '𐐘',
|
1214 |
-
'𐑁' => '𐐙',
|
1215 |
-
'𐑂' => '𐐚',
|
1216 |
-
'𐑃' => '𐐛',
|
1217 |
-
'𐑄' => '𐐜',
|
1218 |
-
'𐑅' => '𐐝',
|
1219 |
-
'𐑆' => '𐐞',
|
1220 |
-
'𐑇' => '𐐟',
|
1221 |
-
'𐑈' => '𐐠',
|
1222 |
-
'𐑉' => '𐐡',
|
1223 |
-
'𐑊' => '𐐢',
|
1224 |
-
'𐑋' => '𐐣',
|
1225 |
-
'𐑌' => '𐐤',
|
1226 |
-
'𐑍' => '𐐥',
|
1227 |
-
'𐑎' => '𐐦',
|
1228 |
-
'𐑏' => '𐐧',
|
1229 |
-
'𐓘' => '𐒰',
|
1230 |
-
'𐓙' => '𐒱',
|
1231 |
-
'𐓚' => '𐒲',
|
1232 |
-
'𐓛' => '𐒳',
|
1233 |
-
'𐓜' => '𐒴',
|
1234 |
-
'𐓝' => '𐒵',
|
1235 |
-
'𐓞' => '𐒶',
|
1236 |
-
'𐓟' => '𐒷',
|
1237 |
-
'𐓠' => '𐒸',
|
1238 |
-
'𐓡' => '𐒹',
|
1239 |
-
'𐓢' => '𐒺',
|
1240 |
-
'𐓣' => '𐒻',
|
1241 |
-
'𐓤' => '𐒼',
|
1242 |
-
'𐓥' => '𐒽',
|
1243 |
-
'𐓦' => '𐒾',
|
1244 |
-
'𐓧' => '𐒿',
|
1245 |
-
'𐓨' => '𐓀',
|
1246 |
-
'𐓩' => '𐓁',
|
1247 |
-
'𐓪' => '𐓂',
|
1248 |
-
'𐓫' => '𐓃',
|
1249 |
-
'𐓬' => '𐓄',
|
1250 |
-
'𐓭' => '𐓅',
|
1251 |
-
'𐓮' => '𐓆',
|
1252 |
-
'𐓯' => '𐓇',
|
1253 |
-
'𐓰' => '𐓈',
|
1254 |
-
'𐓱' => '𐓉',
|
1255 |
-
'𐓲' => '𐓊',
|
1256 |
-
'𐓳' => '𐓋',
|
1257 |
-
'𐓴' => '𐓌',
|
1258 |
-
'𐓵' => '𐓍',
|
1259 |
-
'𐓶' => '𐓎',
|
1260 |
-
'𐓷' => '𐓏',
|
1261 |
-
'𐓸' => '𐓐',
|
1262 |
-
'𐓹' => '𐓑',
|
1263 |
-
'𐓺' => '𐓒',
|
1264 |
-
'𐓻' => '𐓓',
|
1265 |
-
'𐳀' => '𐲀',
|
1266 |
-
'𐳁' => '𐲁',
|
1267 |
-
'𐳂' => '𐲂',
|
1268 |
-
'𐳃' => '𐲃',
|
1269 |
-
'𐳄' => '𐲄',
|
1270 |
-
'𐳅' => '𐲅',
|
1271 |
-
'𐳆' => '𐲆',
|
1272 |
-
'𐳇' => '𐲇',
|
1273 |
-
'𐳈' => '𐲈',
|
1274 |
-
'𐳉' => '𐲉',
|
1275 |
-
'𐳊' => '𐲊',
|
1276 |
-
'𐳋' => '𐲋',
|
1277 |
-
'𐳌' => '𐲌',
|
1278 |
-
'𐳍' => '𐲍',
|
1279 |
-
'𐳎' => '𐲎',
|
1280 |
-
'𐳏' => '𐲏',
|
1281 |
-
'𐳐' => '𐲐',
|
1282 |
-
'𐳑' => '𐲑',
|
1283 |
-
'𐳒' => '𐲒',
|
1284 |
-
'𐳓' => '𐲓',
|
1285 |
-
'𐳔' => '𐲔',
|
1286 |
-
'𐳕' => '𐲕',
|
1287 |
-
'𐳖' => '𐲖',
|
1288 |
-
'𐳗' => '𐲗',
|
1289 |
-
'𐳘' => '𐲘',
|
1290 |
-
'𐳙' => '𐲙',
|
1291 |
-
'𐳚' => '𐲚',
|
1292 |
-
'𐳛' => '𐲛',
|
1293 |
-
'𐳜' => '𐲜',
|
1294 |
-
'𐳝' => '𐲝',
|
1295 |
-
'𐳞' => '𐲞',
|
1296 |
-
'𐳟' => '𐲟',
|
1297 |
-
'𐳠' => '𐲠',
|
1298 |
-
'𐳡' => '𐲡',
|
1299 |
-
'𐳢' => '𐲢',
|
1300 |
-
'𐳣' => '𐲣',
|
1301 |
-
'𐳤' => '𐲤',
|
1302 |
-
'𐳥' => '𐲥',
|
1303 |
-
'𐳦' => '𐲦',
|
1304 |
-
'𐳧' => '𐲧',
|
1305 |
-
'𐳨' => '𐲨',
|
1306 |
-
'𐳩' => '𐲩',
|
1307 |
-
'𐳪' => '𐲪',
|
1308 |
-
'𐳫' => '𐲫',
|
1309 |
-
'𐳬' => '𐲬',
|
1310 |
-
'𐳭' => '𐲭',
|
1311 |
-
'𐳮' => '𐲮',
|
1312 |
-
'𐳯' => '𐲯',
|
1313 |
-
'𐳰' => '𐲰',
|
1314 |
-
'𐳱' => '𐲱',
|
1315 |
-
'𐳲' => '𐲲',
|
1316 |
-
'𑣀' => '𑢠',
|
1317 |
-
'𑣁' => '𑢡',
|
1318 |
-
'𑣂' => '𑢢',
|
1319 |
-
'𑣃' => '𑢣',
|
1320 |
-
'𑣄' => '𑢤',
|
1321 |
-
'𑣅' => '𑢥',
|
1322 |
-
'𑣆' => '𑢦',
|
1323 |
-
'𑣇' => '𑢧',
|
1324 |
-
'𑣈' => '𑢨',
|
1325 |
-
'𑣉' => '𑢩',
|
1326 |
-
'𑣊' => '𑢪',
|
1327 |
-
'𑣋' => '𑢫',
|
1328 |
-
'𑣌' => '𑢬',
|
1329 |
-
'𑣍' => '𑢭',
|
1330 |
-
'𑣎' => '𑢮',
|
1331 |
-
'𑣏' => '𑢯',
|
1332 |
-
'𑣐' => '𑢰',
|
1333 |
-
'𑣑' => '𑢱',
|
1334 |
-
'𑣒' => '𑢲',
|
1335 |
-
'𑣓' => '𑢳',
|
1336 |
-
'𑣔' => '𑢴',
|
1337 |
-
'𑣕' => '𑢵',
|
1338 |
-
'𑣖' => '𑢶',
|
1339 |
-
'𑣗' => '𑢷',
|
1340 |
-
'𑣘' => '𑢸',
|
1341 |
-
'𑣙' => '𑢹',
|
1342 |
-
'𑣚' => '𑢺',
|
1343 |
-
'𑣛' => '𑢻',
|
1344 |
-
'𑣜' => '𑢼',
|
1345 |
-
'𑣝' => '𑢽',
|
1346 |
-
'𑣞' => '𑢾',
|
1347 |
-
'𑣟' => '𑢿',
|
1348 |
-
'𖹠' => '𖹀',
|
1349 |
-
'𖹡' => '𖹁',
|
1350 |
-
'𖹢' => '𖹂',
|
1351 |
-
'𖹣' => '𖹃',
|
1352 |
-
'𖹤' => '𖹄',
|
1353 |
-
'𖹥' => '𖹅',
|
1354 |
-
'𖹦' => '𖹆',
|
1355 |
-
'𖹧' => '𖹇',
|
1356 |
-
'𖹨' => '𖹈',
|
1357 |
-
'𖹩' => '𖹉',
|
1358 |
-
'𖹪' => '𖹊',
|
1359 |
-
'𖹫' => '𖹋',
|
1360 |
-
'𖹬' => '𖹌',
|
1361 |
-
'𖹭' => '𖹍',
|
1362 |
-
'𖹮' => '𖹎',
|
1363 |
-
'𖹯' => '𖹏',
|
1364 |
-
'𖹰' => '𖹐',
|
1365 |
-
'𖹱' => '𖹑',
|
1366 |
-
'𖹲' => '𖹒',
|
1367 |
-
'𖹳' => '𖹓',
|
1368 |
-
'𖹴' => '𖹔',
|
1369 |
-
'𖹵' => '𖹕',
|
1370 |
-
'𖹶' => '𖹖',
|
1371 |
-
'𖹷' => '𖹗',
|
1372 |
-
'𖹸' => '𖹘',
|
1373 |
-
'𖹹' => '𖹙',
|
1374 |
-
'𖹺' => '𖹚',
|
1375 |
-
'𖹻' => '𖹛',
|
1376 |
-
'𖹼' => '𖹜',
|
1377 |
-
'𖹽' => '𖹝',
|
1378 |
-
'𖹾' => '𖹞',
|
1379 |
-
'𖹿' => '𖹟',
|
1380 |
-
'𞤢' => '𞤀',
|
1381 |
-
'𞤣' => '𞤁',
|
1382 |
-
'𞤤' => '𞤂',
|
1383 |
-
'𞤥' => '𞤃',
|
1384 |
-
'𞤦' => '𞤄',
|
1385 |
-
'𞤧' => '𞤅',
|
1386 |
-
'𞤨' => '𞤆',
|
1387 |
-
'𞤩' => '𞤇',
|
1388 |
-
'𞤪' => '𞤈',
|
1389 |
-
'𞤫' => '𞤉',
|
1390 |
-
'𞤬' => '𞤊',
|
1391 |
-
'𞤭' => '𞤋',
|
1392 |
-
'𞤮' => '𞤌',
|
1393 |
-
'𞤯' => '𞤍',
|
1394 |
-
'𞤰' => '𞤎',
|
1395 |
-
'𞤱' => '𞤏',
|
1396 |
-
'𞤲' => '𞤐',
|
1397 |
-
'𞤳' => '𞤑',
|
1398 |
-
'𞤴' => '𞤒',
|
1399 |
-
'𞤵' => '𞤓',
|
1400 |
-
'𞤶' => '𞤔',
|
1401 |
-
'𞤷' => '𞤕',
|
1402 |
-
'𞤸' => '𞤖',
|
1403 |
-
'𞤹' => '𞤗',
|
1404 |
-
'𞤺' => '𞤘',
|
1405 |
-
'𞤻' => '𞤙',
|
1406 |
-
'𞤼' => '𞤚',
|
1407 |
-
'𞤽' => '𞤛',
|
1408 |
-
'𞤾' => '𞤜',
|
1409 |
-
'𞤿' => '𞤝',
|
1410 |
-
'𞥀' => '𞤞',
|
1411 |
-
'𞥁' => '𞤟',
|
1412 |
-
'𞥂' => '𞤠',
|
1413 |
-
'𞥃' => '𞤡',
|
1414 |
-
'ß' => 'SS',
|
1415 |
-
'ff' => 'FF',
|
1416 |
-
'fi' => 'FI',
|
1417 |
-
'fl' => 'FL',
|
1418 |
-
'ffi' => 'FFI',
|
1419 |
-
'ffl' => 'FFL',
|
1420 |
-
'ſt' => 'ST',
|
1421 |
-
'st' => 'ST',
|
1422 |
-
'և' => 'ԵՒ',
|
1423 |
-
'ﬓ' => 'ՄՆ',
|
1424 |
-
'ﬔ' => 'ՄԵ',
|
1425 |
-
'ﬕ' => 'ՄԻ',
|
1426 |
-
'ﬖ' => 'ՎՆ',
|
1427 |
-
'ﬗ' => 'ՄԽ',
|
1428 |
-
'ʼn' => 'ʼN',
|
1429 |
-
'ΐ' => 'Ϊ́',
|
1430 |
-
'ΰ' => 'Ϋ́',
|
1431 |
-
'ǰ' => 'J̌',
|
1432 |
-
'ẖ' => 'H̱',
|
1433 |
-
'ẗ' => 'T̈',
|
1434 |
-
'ẘ' => 'W̊',
|
1435 |
-
'ẙ' => 'Y̊',
|
1436 |
-
'ẚ' => 'Aʾ',
|
1437 |
-
'ὐ' => 'Υ̓',
|
1438 |
-
'ὒ' => 'Υ̓̀',
|
1439 |
-
'ὔ' => 'Υ̓́',
|
1440 |
-
'ὖ' => 'Υ̓͂',
|
1441 |
-
'ᾶ' => 'Α͂',
|
1442 |
-
'ῆ' => 'Η͂',
|
1443 |
-
'ῒ' => 'Ϊ̀',
|
1444 |
-
'ΐ' => 'Ϊ́',
|
1445 |
-
'ῖ' => 'Ι͂',
|
1446 |
-
'ῗ' => 'Ϊ͂',
|
1447 |
-
'ῢ' => 'Ϋ̀',
|
1448 |
-
'ΰ' => 'Ϋ́',
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potencier <fabien@symfony.com>
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
use Symfony\Polyfill\Mbstring as p;
|
13 |
-
|
14 |
-
if (\PHP_VERSION_ID >= 80000) {
|
15 |
-
return require __DIR__.'/bootstrap80.php';
|
16 |
-
}
|
17 |
-
|
18 |
-
if (!function_exists('mb_convert_encoding')) {
|
19 |
-
function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
|
20 |
-
}
|
21 |
-
if (!function_exists('mb_decode_mimeheader')) {
|
22 |
-
function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); }
|
23 |
-
}
|
24 |
-
if (!function_exists('mb_encode_mimeheader')) {
|
25 |
-
function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
|
26 |
-
}
|
27 |
-
if (!function_exists('mb_decode_numericentity')) {
|
28 |
-
function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
|
29 |
-
}
|
30 |
-
if (!function_exists('mb_encode_numericentity')) {
|
31 |
-
function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
|
32 |
-
}
|
33 |
-
if (!function_exists('mb_convert_case')) {
|
34 |
-
function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
|
35 |
-
}
|
36 |
-
if (!function_exists('mb_internal_encoding')) {
|
37 |
-
function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
|
38 |
-
}
|
39 |
-
if (!function_exists('mb_language')) {
|
40 |
-
function mb_language($language = null) { return p\Mbstring::mb_language($language); }
|
41 |
-
}
|
42 |
-
if (!function_exists('mb_list_encodings')) {
|
43 |
-
function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
|
44 |
-
}
|
45 |
-
if (!function_exists('mb_encoding_aliases')) {
|
46 |
-
function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
|
47 |
-
}
|
48 |
-
if (!function_exists('mb_check_encoding')) {
|
49 |
-
function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); }
|
50 |
-
}
|
51 |
-
if (!function_exists('mb_detect_encoding')) {
|
52 |
-
function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
|
53 |
-
}
|
54 |
-
if (!function_exists('mb_detect_order')) {
|
55 |
-
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
|
56 |
-
}
|
57 |
-
if (!function_exists('mb_parse_str')) {
|
58 |
-
function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; }
|
59 |
-
}
|
60 |
-
if (!function_exists('mb_strlen')) {
|
61 |
-
function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
|
62 |
-
}
|
63 |
-
if (!function_exists('mb_strpos')) {
|
64 |
-
function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
|
65 |
-
}
|
66 |
-
if (!function_exists('mb_strtolower')) {
|
67 |
-
function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); }
|
68 |
-
}
|
69 |
-
if (!function_exists('mb_strtoupper')) {
|
70 |
-
function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); }
|
71 |
-
}
|
72 |
-
if (!function_exists('mb_substitute_character')) {
|
73 |
-
function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
|
74 |
-
}
|
75 |
-
if (!function_exists('mb_substr')) {
|
76 |
-
function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
|
77 |
-
}
|
78 |
-
if (!function_exists('mb_stripos')) {
|
79 |
-
function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
|
80 |
-
}
|
81 |
-
if (!function_exists('mb_stristr')) {
|
82 |
-
function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
|
83 |
-
}
|
84 |
-
if (!function_exists('mb_strrchr')) {
|
85 |
-
function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
|
86 |
-
}
|
87 |
-
if (!function_exists('mb_strrichr')) {
|
88 |
-
function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
|
89 |
-
}
|
90 |
-
if (!function_exists('mb_strripos')) {
|
91 |
-
function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
|
92 |
-
}
|
93 |
-
if (!function_exists('mb_strrpos')) {
|
94 |
-
function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
|
95 |
-
}
|
96 |
-
if (!function_exists('mb_strstr')) {
|
97 |
-
function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
|
98 |
-
}
|
99 |
-
if (!function_exists('mb_get_info')) {
|
100 |
-
function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
|
101 |
-
}
|
102 |
-
if (!function_exists('mb_http_output')) {
|
103 |
-
function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); }
|
104 |
-
}
|
105 |
-
if (!function_exists('mb_strwidth')) {
|
106 |
-
function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); }
|
107 |
-
}
|
108 |
-
if (!function_exists('mb_substr_count')) {
|
109 |
-
function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
|
110 |
-
}
|
111 |
-
if (!function_exists('mb_output_handler')) {
|
112 |
-
function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); }
|
113 |
-
}
|
114 |
-
if (!function_exists('mb_http_input')) {
|
115 |
-
function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); }
|
116 |
-
}
|
117 |
-
|
118 |
-
if (!function_exists('mb_convert_variables')) {
|
119 |
-
function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); }
|
120 |
-
}
|
121 |
-
|
122 |
-
if (!function_exists('mb_ord')) {
|
123 |
-
function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); }
|
124 |
-
}
|
125 |
-
if (!function_exists('mb_chr')) {
|
126 |
-
function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); }
|
127 |
-
}
|
128 |
-
if (!function_exists('mb_scrub')) {
|
129 |
-
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
|
130 |
-
}
|
131 |
-
if (!function_exists('mb_str_split')) {
|
132 |
-
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
|
133 |
-
}
|
134 |
-
|
135 |
-
if (extension_loaded('mbstring')) {
|
136 |
-
return;
|
137 |
-
}
|
138 |
-
|
139 |
-
if (!defined('MB_CASE_UPPER')) {
|
140 |
-
define('MB_CASE_UPPER', 0);
|
141 |
-
}
|
142 |
-
if (!defined('MB_CASE_LOWER')) {
|
143 |
-
define('MB_CASE_LOWER', 1);
|
144 |
-
}
|
145 |
-
if (!defined('MB_CASE_TITLE')) {
|
146 |
-
define('MB_CASE_TITLE', 2);
|
147 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-mbstring/bootstrap80.php
DELETED
@@ -1,143 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of the Symfony package.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
use Symfony\Polyfill\Mbstring as p;
|
13 |
-
|
14 |
-
if (!function_exists('mb_convert_encoding')) {
|
15 |
-
function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
|
16 |
-
}
|
17 |
-
if (!function_exists('mb_decode_mimeheader')) {
|
18 |
-
function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); }
|
19 |
-
}
|
20 |
-
if (!function_exists('mb_encode_mimeheader')) {
|
21 |
-
function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); }
|
22 |
-
}
|
23 |
-
if (!function_exists('mb_decode_numericentity')) {
|
24 |
-
function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); }
|
25 |
-
}
|
26 |
-
if (!function_exists('mb_encode_numericentity')) {
|
27 |
-
function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); }
|
28 |
-
}
|
29 |
-
if (!function_exists('mb_convert_case')) {
|
30 |
-
function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); }
|
31 |
-
}
|
32 |
-
if (!function_exists('mb_internal_encoding')) {
|
33 |
-
function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); }
|
34 |
-
}
|
35 |
-
if (!function_exists('mb_language')) {
|
36 |
-
function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); }
|
37 |
-
}
|
38 |
-
if (!function_exists('mb_list_encodings')) {
|
39 |
-
function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); }
|
40 |
-
}
|
41 |
-
if (!function_exists('mb_encoding_aliases')) {
|
42 |
-
function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); }
|
43 |
-
}
|
44 |
-
if (!function_exists('mb_check_encoding')) {
|
45 |
-
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
|
46 |
-
}
|
47 |
-
if (!function_exists('mb_detect_encoding')) {
|
48 |
-
function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
|
49 |
-
}
|
50 |
-
if (!function_exists('mb_detect_order')) {
|
51 |
-
function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); }
|
52 |
-
}
|
53 |
-
if (!function_exists('mb_parse_str')) {
|
54 |
-
function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; }
|
55 |
-
}
|
56 |
-
if (!function_exists('mb_strlen')) {
|
57 |
-
function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); }
|
58 |
-
}
|
59 |
-
if (!function_exists('mb_strpos')) {
|
60 |
-
function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
61 |
-
}
|
62 |
-
if (!function_exists('mb_strtolower')) {
|
63 |
-
function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); }
|
64 |
-
}
|
65 |
-
if (!function_exists('mb_strtoupper')) {
|
66 |
-
function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); }
|
67 |
-
}
|
68 |
-
if (!function_exists('mb_substitute_character')) {
|
69 |
-
function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); }
|
70 |
-
}
|
71 |
-
if (!function_exists('mb_substr')) {
|
72 |
-
function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); }
|
73 |
-
}
|
74 |
-
if (!function_exists('mb_stripos')) {
|
75 |
-
function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
76 |
-
}
|
77 |
-
if (!function_exists('mb_stristr')) {
|
78 |
-
function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
79 |
-
}
|
80 |
-
if (!function_exists('mb_strrchr')) {
|
81 |
-
function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
82 |
-
}
|
83 |
-
if (!function_exists('mb_strrichr')) {
|
84 |
-
function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
85 |
-
}
|
86 |
-
if (!function_exists('mb_strripos')) {
|
87 |
-
function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
88 |
-
}
|
89 |
-
if (!function_exists('mb_strrpos')) {
|
90 |
-
function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
91 |
-
}
|
92 |
-
if (!function_exists('mb_strstr')) {
|
93 |
-
function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
94 |
-
}
|
95 |
-
if (!function_exists('mb_get_info')) {
|
96 |
-
function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
|
97 |
-
}
|
98 |
-
if (!function_exists('mb_http_output')) {
|
99 |
-
function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
|
100 |
-
}
|
101 |
-
if (!function_exists('mb_strwidth')) {
|
102 |
-
function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); }
|
103 |
-
}
|
104 |
-
if (!function_exists('mb_substr_count')) {
|
105 |
-
function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); }
|
106 |
-
}
|
107 |
-
if (!function_exists('mb_output_handler')) {
|
108 |
-
function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); }
|
109 |
-
}
|
110 |
-
if (!function_exists('mb_http_input')) {
|
111 |
-
function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); }
|
112 |
-
}
|
113 |
-
|
114 |
-
if (!function_exists('mb_convert_variables')) {
|
115 |
-
function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); }
|
116 |
-
}
|
117 |
-
|
118 |
-
if (!function_exists('mb_ord')) {
|
119 |
-
function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); }
|
120 |
-
}
|
121 |
-
if (!function_exists('mb_chr')) {
|
122 |
-
function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); }
|
123 |
-
}
|
124 |
-
if (!function_exists('mb_scrub')) {
|
125 |
-
function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); }
|
126 |
-
}
|
127 |
-
if (!function_exists('mb_str_split')) {
|
128 |
-
function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); }
|
129 |
-
}
|
130 |
-
|
131 |
-
if (extension_loaded('mbstring')) {
|
132 |
-
return;
|
133 |
-
}
|
134 |
-
|
135 |
-
if (!defined('MB_CASE_UPPER')) {
|
136 |
-
define('MB_CASE_UPPER', 0);
|
137 |
-
}
|
138 |
-
if (!defined('MB_CASE_LOWER')) {
|
139 |
-
define('MB_CASE_LOWER', 1);
|
140 |
-
}
|
141 |
-
if (!defined('MB_CASE_TITLE')) {
|
142 |
-
define('MB_CASE_TITLE', 2);
|
143 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-mbstring/composer.json
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "symfony/polyfill-mbstring",
|
3 |
-
"type": "library",
|
4 |
-
"description": "Symfony polyfill for the Mbstring extension",
|
5 |
-
"keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
|
6 |
-
"homepage": "https://symfony.com",
|
7 |
-
"license": "MIT",
|
8 |
-
"authors": [
|
9 |
-
{
|
10 |
-
"name": "Nicolas Grekas",
|
11 |
-
"email": "p@tchwork.com"
|
12 |
-
},
|
13 |
-
{
|
14 |
-
"name": "Symfony Community",
|
15 |
-
"homepage": "https://symfony.com/contributors"
|
16 |
-
}
|
17 |
-
],
|
18 |
-
"require": {
|
19 |
-
"php": ">=7.1"
|
20 |
-
},
|
21 |
-
"provide": {
|
22 |
-
"ext-mbstring": "*"
|
23 |
-
},
|
24 |
-
"autoload": {
|
25 |
-
"psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
|
26 |
-
"files": [ "bootstrap.php" ]
|
27 |
-
},
|
28 |
-
"suggest": {
|
29 |
-
"ext-mbstring": "For best performance"
|
30 |
-
},
|
31 |
-
"minimum-stability": "dev",
|
32 |
-
"extra": {
|
33 |
-
"branch-alias": {
|
34 |
-
"dev-main": "1.26-dev"
|
35 |
-
},
|
36 |
-
"thanks": {
|
37 |
-
"name": "symfony/polyfill",
|
38 |
-
"url": "https://github.com/symfony/polyfill"
|
39 |
-
}
|
40 |
-
}
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-php72/LICENSE
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
Copyright (c) 2015-2019 Fabien Potencier
|
2 |
-
|
3 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
-
of this software and associated documentation files (the "Software"), to deal
|
5 |
-
in the Software without restriction, including without limitation the rights
|
6 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
-
copies of the Software, and to permit persons to whom the Software is furnished
|
8 |
-
to do so, subject to the following conditions:
|
9 |
-
|
10 |
-
The above copyright notice and this permission notice shall be included in all
|
11 |
-
copies or substantial portions of the Software.
|
12 |
-
|
13 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
-
THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-php72/Php72.php
DELETED
@@ -1,217 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of the Symfony package.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
namespace Symfony\Polyfill\Php72;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @author Nicolas Grekas <p@tchwork.com>
|
16 |
-
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
17 |
-
*
|
18 |
-
* @internal
|
19 |
-
*/
|
20 |
-
final class Php72
|
21 |
-
{
|
22 |
-
private static $hashMask;
|
23 |
-
|
24 |
-
public static function utf8_encode($s)
|
25 |
-
{
|
26 |
-
$s .= $s;
|
27 |
-
$len = \strlen($s);
|
28 |
-
|
29 |
-
for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) {
|
30 |
-
switch (true) {
|
31 |
-
case $s[$i] < "\x80": $s[$j] = $s[$i]; break;
|
32 |
-
case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break;
|
33 |
-
default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
-
return substr($s, 0, $j);
|
38 |
-
}
|
39 |
-
|
40 |
-
public static function utf8_decode($s)
|
41 |
-
{
|
42 |
-
$s = (string) $s;
|
43 |
-
$len = \strlen($s);
|
44 |
-
|
45 |
-
for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {
|
46 |
-
switch ($s[$i] & "\xF0") {
|
47 |
-
case "\xC0":
|
48 |
-
case "\xD0":
|
49 |
-
$c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F");
|
50 |
-
$s[$j] = $c < 256 ? \chr($c) : '?';
|
51 |
-
break;
|
52 |
-
|
53 |
-
case "\xF0":
|
54 |
-
++$i;
|
55 |
-
// no break
|
56 |
-
|
57 |
-
case "\xE0":
|
58 |
-
$s[$j] = '?';
|
59 |
-
$i += 2;
|
60 |
-
break;
|
61 |
-
|
62 |
-
default:
|
63 |
-
$s[$j] = $s[$i];
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
return substr($s, 0, $j);
|
68 |
-
}
|
69 |
-
|
70 |
-
public static function php_os_family()
|
71 |
-
{
|
72 |
-
if ('\\' === \DIRECTORY_SEPARATOR) {
|
73 |
-
return 'Windows';
|
74 |
-
}
|
75 |
-
|
76 |
-
$map = [
|
77 |
-
'Darwin' => 'Darwin',
|
78 |
-
'DragonFly' => 'BSD',
|
79 |
-
'FreeBSD' => 'BSD',
|
80 |
-
'NetBSD' => 'BSD',
|
81 |
-
'OpenBSD' => 'BSD',
|
82 |
-
'Linux' => 'Linux',
|
83 |
-
'SunOS' => 'Solaris',
|
84 |
-
];
|
85 |
-
|
86 |
-
return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown';
|
87 |
-
}
|
88 |
-
|
89 |
-
public static function spl_object_id($object)
|
90 |
-
{
|
91 |
-
if (null === self::$hashMask) {
|
92 |
-
self::initHashMask();
|
93 |
-
}
|
94 |
-
if (null === $hash = spl_object_hash($object)) {
|
95 |
-
return;
|
96 |
-
}
|
97 |
-
|
98 |
-
// On 32-bit systems, PHP_INT_SIZE is 4,
|
99 |
-
return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1)));
|
100 |
-
}
|
101 |
-
|
102 |
-
public static function sapi_windows_vt100_support($stream, $enable = null)
|
103 |
-
{
|
104 |
-
if (!\is_resource($stream)) {
|
105 |
-
trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
|
106 |
-
|
107 |
-
return false;
|
108 |
-
}
|
109 |
-
|
110 |
-
$meta = stream_get_meta_data($stream);
|
111 |
-
|
112 |
-
if ('STDIO' !== $meta['stream_type']) {
|
113 |
-
trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING);
|
114 |
-
|
115 |
-
return false;
|
116 |
-
}
|
117 |
-
|
118 |
-
// We cannot actually disable vt100 support if it is set
|
119 |
-
if (false === $enable || !self::stream_isatty($stream)) {
|
120 |
-
return false;
|
121 |
-
}
|
122 |
-
|
123 |
-
// The native function does not apply to stdin
|
124 |
-
$meta = array_map('strtolower', $meta);
|
125 |
-
$stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri'];
|
126 |
-
|
127 |
-
return !$stdin
|
128 |
-
&& (false !== getenv('ANSICON')
|
129 |
-
|| 'ON' === getenv('ConEmuANSI')
|
130 |
-
|| 'xterm' === getenv('TERM')
|
131 |
-
|| 'Hyper' === getenv('TERM_PROGRAM'));
|
132 |
-
}
|
133 |
-
|
134 |
-
public static function stream_isatty($stream)
|
135 |
-
{
|
136 |
-
if (!\is_resource($stream)) {
|
137 |
-
trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
|
138 |
-
|
139 |
-
return false;
|
140 |
-
}
|
141 |
-
|
142 |
-
if ('\\' === \DIRECTORY_SEPARATOR) {
|
143 |
-
$stat = @fstat($stream);
|
144 |
-
// Check if formatted mode is S_IFCHR
|
145 |
-
return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
|
146 |
-
}
|
147 |
-
|
148 |
-
return \function_exists('posix_isatty') && @posix_isatty($stream);
|
149 |
-
}
|
150 |
-
|
151 |
-
private static function initHashMask()
|
152 |
-
{
|
153 |
-
$obj = (object) [];
|
154 |
-
self::$hashMask = -1;
|
155 |
-
|
156 |
-
// check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
|
157 |
-
$obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'];
|
158 |
-
foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) {
|
159 |
-
if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) {
|
160 |
-
$frame['line'] = 0;
|
161 |
-
break;
|
162 |
-
}
|
163 |
-
}
|
164 |
-
if (!empty($frame['line'])) {
|
165 |
-
ob_start();
|
166 |
-
debug_zval_dump($obj);
|
167 |
-
self::$hashMask = (int) substr(ob_get_clean(), 17);
|
168 |
-
}
|
169 |
-
|
170 |
-
self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1)));
|
171 |
-
}
|
172 |
-
|
173 |
-
public static function mb_chr($code, $encoding = null)
|
174 |
-
{
|
175 |
-
if (0x80 > $code %= 0x200000) {
|
176 |
-
$s = \chr($code);
|
177 |
-
} elseif (0x800 > $code) {
|
178 |
-
$s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
|
179 |
-
} elseif (0x10000 > $code) {
|
180 |
-
$s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
|
181 |
-
} else {
|
182 |
-
$s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
|
183 |
-
}
|
184 |
-
|
185 |
-
if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) {
|
186 |
-
$s = mb_convert_encoding($s, $encoding, 'UTF-8');
|
187 |
-
}
|
188 |
-
|
189 |
-
return $s;
|
190 |
-
}
|
191 |
-
|
192 |
-
public static function mb_ord($s, $encoding = null)
|
193 |
-
{
|
194 |
-
if (null === $encoding) {
|
195 |
-
$s = mb_convert_encoding($s, 'UTF-8');
|
196 |
-
} elseif ('UTF-8' !== $encoding) {
|
197 |
-
$s = mb_convert_encoding($s, 'UTF-8', $encoding);
|
198 |
-
}
|
199 |
-
|
200 |
-
if (1 === \strlen($s)) {
|
201 |
-
return \ord($s);
|
202 |
-
}
|
203 |
-
|
204 |
-
$code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
|
205 |
-
if (0xF0 <= $code) {
|
206 |
-
return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
|
207 |
-
}
|
208 |
-
if (0xE0 <= $code) {
|
209 |
-
return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
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 @@
|
|
1 |
-
Symfony Polyfill / Php72
|
2 |
-
========================
|
3 |
-
|
4 |
-
This component provides functions added to PHP 7.2 core:
|
5 |
-
|
6 |
-
- [`spl_object_id`](https://php.net/spl_object_id)
|
7 |
-
- [`stream_isatty`](https://php.net/stream_isatty)
|
8 |
-
|
9 |
-
And also functions added to PHP 7.2 mbstring:
|
10 |
-
|
11 |
-
- [`mb_ord`](https://php.net/mb_ord)
|
12 |
-
- [`mb_chr`](https://php.net/mb_chr)
|
13 |
-
- [`mb_scrub`](https://php.net/mb_scrub)
|
14 |
-
|
15 |
-
On Windows only:
|
16 |
-
|
17 |
-
- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support)
|
18 |
-
|
19 |
-
Moved to core since 7.2 (was in the optional XML extension earlier):
|
20 |
-
|
21 |
-
- [`utf8_encode`](https://php.net/utf8_encode)
|
22 |
-
- [`utf8_decode`](https://php.net/utf8_decode)
|
23 |
-
|
24 |
-
Also, it provides constants added to PHP 7.2:
|
25 |
-
|
26 |
-
- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig)
|
27 |
-
- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family)
|
28 |
-
|
29 |
-
More information can be found in the
|
30 |
-
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
|
31 |
-
|
32 |
-
License
|
33 |
-
=======
|
34 |
-
|
35 |
-
This library is released under the [MIT license](LICENSE).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-php72/bootstrap.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of the Symfony package.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
use Symfony\Polyfill\Php72 as p;
|
13 |
-
|
14 |
-
if (\PHP_VERSION_ID >= 70200) {
|
15 |
-
return;
|
16 |
-
}
|
17 |
-
|
18 |
-
if (!defined('PHP_FLOAT_DIG')) {
|
19 |
-
define('PHP_FLOAT_DIG', 15);
|
20 |
-
}
|
21 |
-
if (!defined('PHP_FLOAT_EPSILON')) {
|
22 |
-
define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
|
23 |
-
}
|
24 |
-
if (!defined('PHP_FLOAT_MIN')) {
|
25 |
-
define('PHP_FLOAT_MIN', 2.2250738585072E-308);
|
26 |
-
}
|
27 |
-
if (!defined('PHP_FLOAT_MAX')) {
|
28 |
-
define('PHP_FLOAT_MAX', 1.7976931348623157E+308);
|
29 |
-
}
|
30 |
-
if (!defined('PHP_OS_FAMILY')) {
|
31 |
-
define('PHP_OS_FAMILY', p\Php72::php_os_family());
|
32 |
-
}
|
33 |
-
|
34 |
-
if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
|
35 |
-
function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
|
36 |
-
}
|
37 |
-
if (!function_exists('stream_isatty')) {
|
38 |
-
function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
|
39 |
-
}
|
40 |
-
if (!function_exists('utf8_encode')) {
|
41 |
-
function utf8_encode($string) { return p\Php72::utf8_encode($string); }
|
42 |
-
}
|
43 |
-
if (!function_exists('utf8_decode')) {
|
44 |
-
function utf8_decode($string) { return p\Php72::utf8_decode($string); }
|
45 |
-
}
|
46 |
-
if (!function_exists('spl_object_id')) {
|
47 |
-
function spl_object_id($object) { return p\Php72::spl_object_id($object); }
|
48 |
-
}
|
49 |
-
if (!function_exists('mb_ord')) {
|
50 |
-
function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); }
|
51 |
-
}
|
52 |
-
if (!function_exists('mb_chr')) {
|
53 |
-
function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); }
|
54 |
-
}
|
55 |
-
if (!function_exists('mb_scrub')) {
|
56 |
-
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/symfony/polyfill-php72/composer.json
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "symfony/polyfill-php72",
|
3 |
-
"type": "library",
|
4 |
-
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
|
5 |
-
"keywords": ["polyfill", "shim", "compatibility", "portable"],
|
6 |
-
"homepage": "https://symfony.com",
|
7 |
-
"license": "MIT",
|
8 |
-
"authors": [
|
9 |
-
{
|
10 |
-
"name": "Nicolas Grekas",
|
11 |
-
"email": "p@tchwork.com"
|
12 |
-
},
|
13 |
-
{
|
14 |
-
"name": "Symfony Community",
|
15 |
-
"homepage": "https://symfony.com/contributors"
|
16 |
-
}
|
17 |
-
],
|
18 |
-
"require": {
|
19 |
-
"php": ">=7.1"
|
20 |
-
},
|
21 |
-
"autoload": {
|
22 |
-
"psr-4": { "Symfony\\Polyfill\\Php72\\": "" },
|
23 |
-
"files": [ "bootstrap.php" ]
|
24 |
-
},
|
25 |
-
"minimum-stability": "dev",
|
26 |
-
"extra": {
|
27 |
-
"branch-alias": {
|
28 |
-
"dev-main": "1.26-dev"
|
29 |
-
},
|
30 |
-
"thanks": {
|
31 |
-
"name": "symfony/polyfill",
|
32 |
-
"url": "https://github.com/symfony/polyfill"
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/.gitattributes
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
/doc
|
2 |
-
/
|
3 |
-
/tests/ export-ignore
|
4 |
/phpunit.xml.dist export-ignore
|
1 |
+
/doc/** export-ignore
|
2 |
+
/tests export-ignore
|
|
|
3 |
/phpunit.xml.dist export-ignore
|
vendor/twig/twig/.github/workflows/ci.yml
CHANGED
@@ -4,14 +4,11 @@ on:
|
|
4 |
pull_request:
|
5 |
push:
|
6 |
branches:
|
7 |
-
- '
|
8 |
|
9 |
env:
|
10 |
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1
|
11 |
|
12 |
-
permissions:
|
13 |
-
contents: read
|
14 |
-
|
15 |
jobs:
|
16 |
tests:
|
17 |
name: "PHP ${{ matrix.php-version }}"
|
@@ -23,82 +20,42 @@ jobs:
|
|
23 |
strategy:
|
24 |
matrix:
|
25 |
php-version:
|
26 |
-
- '7.1.3'
|
27 |
- '7.2.5'
|
28 |
- '7.3'
|
29 |
- '7.4'
|
30 |
- '8.0'
|
31 |
-
|
32 |
experimental: [false]
|
|
|
|
|
33 |
|
34 |
steps:
|
35 |
- name: "Checkout code"
|
36 |
-
uses: actions/checkout@v2
|
37 |
|
38 |
- name: "Install PHP with extensions"
|
39 |
-
uses: shivammathur/setup-php@
|
40 |
with:
|
41 |
coverage: "none"
|
42 |
php-version: ${{ matrix.php-version }}
|
43 |
ini-values: memory_limit=-1
|
|
|
44 |
|
45 |
- name: "Add PHPUnit matcher"
|
46 |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
47 |
|
48 |
-
-
|
49 |
-
|
50 |
-
|
51 |
-
run: vendor/bin/simple-phpunit install
|
52 |
-
|
53 |
-
- name: "PHPUnit version"
|
54 |
-
run: vendor/bin/simple-phpunit --version
|
55 |
-
|
56 |
-
- name: "Run tests"
|
57 |
-
run: vendor/bin/simple-phpunit
|
58 |
-
|
59 |
-
extension-tests:
|
60 |
-
needs:
|
61 |
-
- 'tests'
|
62 |
-
|
63 |
-
name: "${{ matrix.extension }} with PHP ${{ matrix.php-version }}"
|
64 |
-
|
65 |
-
runs-on: 'ubuntu-latest'
|
66 |
-
|
67 |
-
continue-on-error: true
|
68 |
-
|
69 |
-
strategy:
|
70 |
-
matrix:
|
71 |
-
php-version:
|
72 |
-
- '7.2.5'
|
73 |
-
- '7.3'
|
74 |
-
- '7.4'
|
75 |
-
- '8.0'
|
76 |
-
- '8.1'
|
77 |
-
extension:
|
78 |
-
- 'extra/cssinliner-extra'
|
79 |
-
- 'extra/html-extra'
|
80 |
-
- 'extra/inky-extra'
|
81 |
-
- 'extra/intl-extra'
|
82 |
-
- 'extra/markdown-extra'
|
83 |
-
- 'extra/string-extra'
|
84 |
-
- 'extra/twig-extra-bundle'
|
85 |
-
experimental: [false]
|
86 |
-
|
87 |
-
steps:
|
88 |
-
- name: "Checkout code"
|
89 |
-
uses: actions/checkout@v2
|
90 |
|
91 |
-
- name: "
|
92 |
-
uses:
|
93 |
with:
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
|
98 |
-
-
|
99 |
-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
100 |
-
|
101 |
-
- run: composer install
|
102 |
|
103 |
- name: "Install PHPUnit"
|
104 |
run: vendor/bin/simple-phpunit install
|
@@ -106,13 +63,8 @@ jobs:
|
|
106 |
- name: "PHPUnit version"
|
107 |
run: vendor/bin/simple-phpunit --version
|
108 |
|
109 |
-
- name: "Composer install"
|
110 |
-
working-directory: ${{ matrix.extension}}
|
111 |
-
run: composer install
|
112 |
-
|
113 |
- name: "Run tests"
|
114 |
-
|
115 |
-
run: ../../vendor/bin/simple-phpunit
|
116 |
|
117 |
integration-tests:
|
118 |
needs:
|
@@ -131,10 +83,10 @@ jobs:
|
|
131 |
|
132 |
steps:
|
133 |
- name: "Checkout code"
|
134 |
-
uses: actions/checkout@v2
|
135 |
|
136 |
- name: "Install PHP with extensions"
|
137 |
-
uses: shivammathur/setup-php@
|
138 |
with:
|
139 |
coverage: "none"
|
140 |
extensions: "gd, pdo_sqlite"
|
4 |
pull_request:
|
5 |
push:
|
6 |
branches:
|
7 |
+
- '1.x'
|
8 |
|
9 |
env:
|
10 |
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1
|
11 |
|
|
|
|
|
|
|
12 |
jobs:
|
13 |
tests:
|
14 |
name: "PHP ${{ matrix.php-version }}"
|
20 |
strategy:
|
21 |
matrix:
|
22 |
php-version:
|
|
|
23 |
- '7.2.5'
|
24 |
- '7.3'
|
25 |
- '7.4'
|
26 |
- '8.0'
|
27 |
+
composer-options: ['']
|
28 |
experimental: [false]
|
29 |
+
include:
|
30 |
+
- { php-version: '8.1', experimental: true, composer-options: '--ignore-platform-req=php' }
|
31 |
|
32 |
steps:
|
33 |
- name: "Checkout code"
|
34 |
+
uses: actions/checkout@v2.3.3
|
35 |
|
36 |
- name: "Install PHP with extensions"
|
37 |
+
uses: shivammathur/setup-php@2.7.0
|
38 |
with:
|
39 |
coverage: "none"
|
40 |
php-version: ${{ matrix.php-version }}
|
41 |
ini-values: memory_limit=-1
|
42 |
+
tools: composer:v2
|
43 |
|
44 |
- name: "Add PHPUnit matcher"
|
45 |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
46 |
|
47 |
+
- name: "Set composer cache directory"
|
48 |
+
id: composer-cache
|
49 |
+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
+
- name: "Cache composer"
|
52 |
+
uses: actions/cache@v2.1.2
|
53 |
with:
|
54 |
+
path: ${{ steps.composer-cache.outputs.dir }}
|
55 |
+
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
|
56 |
+
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
|
57 |
|
58 |
+
- run: composer install ${{ matrix.composer-options }}
|
|
|
|
|
|
|
59 |
|
60 |
- name: "Install PHPUnit"
|
61 |
run: vendor/bin/simple-phpunit install
|
63 |
- name: "PHPUnit version"
|
64 |
run: vendor/bin/simple-phpunit --version
|
65 |
|
|
|
|
|
|
|
|
|
66 |
- name: "Run tests"
|
67 |
+
run: vendor/bin/simple-phpunit
|
|
|
68 |
|
69 |
integration-tests:
|
70 |
needs:
|
83 |
|
84 |
steps:
|
85 |
- name: "Checkout code"
|
86 |
+
uses: actions/checkout@v2.3.3
|
87 |
|
88 |
- name: "Install PHP with extensions"
|
89 |
+
uses: shivammathur/setup-php@2.7.0
|
90 |
with:
|
91 |
coverage: "none"
|
92 |
extensions: "gd, pdo_sqlite"
|
vendor/twig/twig/.github/workflows/documentation.yml
CHANGED
@@ -4,11 +4,7 @@ on:
|
|
4 |
pull_request:
|
5 |
push:
|
6 |
branches:
|
7 |
-
- '
|
8 |
-
- '3.x'
|
9 |
-
|
10 |
-
permissions:
|
11 |
-
contents: read
|
12 |
|
13 |
jobs:
|
14 |
build:
|
@@ -20,32 +16,32 @@ jobs:
|
|
20 |
- name: "Checkout code"
|
21 |
uses: actions/checkout@v2
|
22 |
|
23 |
-
- name: "Set
|
24 |
-
uses:
|
25 |
with:
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
29 |
|
30 |
-
- name:
|
31 |
-
|
32 |
-
working-directory: doc/_build
|
33 |
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
34 |
|
35 |
-
- name: Cache
|
36 |
uses: actions/cache@v2
|
37 |
with:
|
38 |
-
path:
|
39 |
-
key: ${{ runner.os }}-
|
40 |
-
restore-keys:
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
|
50 |
doctor-rst:
|
51 |
name: "DOCtor-RST"
|
4 |
pull_request:
|
5 |
push:
|
6 |
branches:
|
7 |
+
- '1.x'
|
|
|
|
|
|
|
|
|
8 |
|
9 |
jobs:
|
10 |
build:
|
16 |
- name: "Checkout code"
|
17 |
uses: actions/checkout@v2
|
18 |
|
19 |
+
- name: "Set up Python 3.7"
|
20 |
+
uses: actions/setup-python@v1
|
21 |
with:
|
22 |
+
python-version: '3.7' # Semantic version range syntax or exact version of a Python version
|
23 |
+
|
24 |
+
- name: "Display Python version"
|
25 |
+
run: python -c "import sys; print(sys.version)"
|
26 |
|
27 |
+
- name: "Install Sphinx dependencies"
|
28 |
+
run: sudo apt-get install python-dev build-essential
|
|
|
|
|
29 |
|
30 |
+
- name: "Cache pip"
|
31 |
uses: actions/cache@v2
|
32 |
with:
|
33 |
+
path: ~/.cache/pip
|
34 |
+
key: ${{ runner.os }}-pip-${{ hashFiles('_build/.requirements.txt') }}
|
35 |
+
restore-keys: |
|
36 |
+
${{ runner.os }}-pip-
|
37 |
+
|
38 |
+
- name: "Install Sphinx + requirements via pip"
|
39 |
+
working-directory: "doc"
|
40 |
+
run: pip install -r _build/.requirements.txt
|
41 |
+
|
42 |
+
- name: "Build documentation"
|
43 |
+
working-directory: "doc"
|
44 |
+
run: make -C _build SPHINXOPTS="-nqW -j auto" html
|
45 |
|
46 |
doctor-rst:
|
47 |
name: "DOCtor-RST"
|
vendor/twig/twig/.gitignore
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
/
|
2 |
-
/doc/_build/output
|
3 |
/composer.lock
|
|
|
4 |
/phpunit.xml
|
5 |
/vendor
|
6 |
.phpunit.result.cache
|
1 |
+
/build
|
|
|
2 |
/composer.lock
|
3 |
+
/ext/twig/autom4te.cache/
|
4 |
/phpunit.xml
|
5 |
/vendor
|
6 |
.phpunit.result.cache
|
vendor/twig/twig/CHANGELOG
CHANGED
@@ -1,208 +1,116 @@
|
|
1 |
-
#
|
2 |
|
3 |
* Fix a security issue on filesystem loader (possibility to load a template outside a configured directory)
|
4 |
|
5 |
-
#
|
6 |
|
7 |
-
*
|
8 |
-
* Fix CallExpression::reflectCallable() throwing TypeError
|
9 |
-
* Fix typo in naming (currency_code)
|
10 |
|
11 |
-
#
|
12 |
|
13 |
-
* Fix optimizing non-public named closures
|
14 |
-
|
15 |
-
# 2.15.0 (2022-05-15)
|
16 |
-
|
17 |
-
* Add support for named closures
|
18 |
-
|
19 |
-
# 2.14.13 (2022-04-06)
|
20 |
-
|
21 |
-
* Enable bytecode invalidation when auto_reload is enabled
|
22 |
-
|
23 |
-
# 2.14.12 (2022-03-25)
|
24 |
-
|
25 |
-
* Fix custom escapers when using multiple Twig environments
|
26 |
-
* Do not reuse internally generated variable names during parsing
|
27 |
-
|
28 |
-
# 2.14.11 (2022-02-04)
|
29 |
-
|
30 |
-
* Fix a security issue when in a sandbox: the `sort` filter must require a Closure for the `arrow` parameter
|
31 |
-
* Fix deprecation notice on `round`
|
32 |
-
* Fix call to deprecated `convertToHtml` method
|
33 |
-
|
34 |
-
# 2.14.10 (2022-01-03)
|
35 |
-
|
36 |
-
* Allow more null arguments when Twig expects a string (for better 8.1 support)
|
37 |
-
|
38 |
-
# 2.14.9 (2022-01-03)
|
39 |
-
|
40 |
-
* Allow null when Twig expects a string (for better 8.1 support)
|
41 |
-
* Add support for PHP 7.1 back
|
42 |
-
* Make some performance optimizations
|
43 |
-
* Allow Symfony translation contract v3+
|
44 |
-
|
45 |
-
# 2.14.8 (2021-11-25)
|
46 |
-
|
47 |
-
* Bump minimum supported Symfony component versions
|
48 |
-
* Fix a deprecated message
|
49 |
-
|
50 |
-
# 2.14.7 (2021-09-17)
|
51 |
-
|
52 |
-
* Allow Symfony 6
|
53 |
* Improve compatibility with PHP 8.1
|
54 |
* Explicitly specify the encoding for mb_ord in JS escaper
|
55 |
-
|
56 |
-
#
|
57 |
|
58 |
* Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)"
|
59 |
|
60 |
-
#
|
61 |
|
62 |
* Fix PHP 8.1 compatibility
|
63 |
* Throw a proper exception when a template name is an absolute path (as it has never been supported)
|
64 |
|
65 |
-
#
|
66 |
-
|
67 |
-
* Add the slug filter
|
68 |
-
|
69 |
-
# 2.14.3 (2021-01-05)
|
70 |
-
|
71 |
-
* Fix extra bundle compat with older versions of Symfony
|
72 |
-
|
73 |
-
# 2.14.2 (2021-01-05)
|
74 |
|
75 |
* Fix "odd" not working for negative numbers
|
76 |
|
77 |
-
#
|
78 |
|
79 |
-
* Fix "include(template_from_string())"
|
80 |
|
81 |
-
#
|
82 |
|
|
|
83 |
* Fix sandbox support when using "include(template_from_string())"
|
84 |
* Make round brackets optional for one argument tests like "same as" or "divisible by"
|
85 |
* Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a }
|
|
|
86 |
* Drop PHP 7.1 support
|
87 |
|
88 |
-
#
|
89 |
|
90 |
* Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag
|
91 |
* Fix a regression when not using a space before an operator
|
92 |
* Restrict callables to closures in filters
|
93 |
* Allow trailing commas in argument lists (in calls as well as definitions)
|
94 |
|
95 |
-
#
|
96 |
|
97 |
-
* Fix options not taken into account when using "Michelf\MarkdownExtra"
|
98 |
-
* Fix "Twig\Extra\Intl\IntlExtension::getCountryName()" to accept "null" as a first argument
|
99 |
-
* Drop support for PHP 7.0
|
100 |
* Throw exception in case non-Traversable data is passed to "filter"
|
101 |
* Fix context optimization on PHP 7.4
|
102 |
* Fix PHP 8 compatibility
|
|
|
103 |
* Fix ambiguous syntax parsing
|
|
|
104 |
|
105 |
-
#
|
106 |
|
107 |
-
* Add a check to ensure that iconv() is defined
|
108 |
-
|
109 |
-
# 2.12.4 (2020-02-11)
|
110 |
-
|
111 |
-
* Avoid exceptions when an intl resource is not found
|
112 |
* Fix implementation of case-insensitivity for method names
|
113 |
|
114 |
-
#
|
115 |
-
|
116 |
-
* fixed Symfony 5.0 support for the HTML extra extension
|
117 |
-
* fixed number formatter in Intl extra extension when using a formatter prototype
|
118 |
-
|
119 |
-
# 2.12.2 (2019-11-11)
|
120 |
|
|
|
121 |
* added supported for exponential numbers
|
122 |
|
123 |
-
#
|
124 |
-
|
125 |
-
* added the String extension in the "extra" repositories: "u" filter
|
126 |
-
|
127 |
-
# 2.12.0 (2019-10-05)
|
128 |
-
|
129 |
-
* added the spaceship operator ("<=>"), useful when using an arrow function in the "sort" filter
|
130 |
-
* added support for an "arrow" function on the "sort" filter
|
131 |
-
* added the CssInliner extension in the "extra" repositories: "inline_css"
|
132 |
-
filter
|
133 |
-
* added the Inky extension in the "extra" repositories: "inky_to_html" filter
|
134 |
-
* added Intl extension in the "extra" repositories: "country_name",
|
135 |
-
"currency_name", "currency_symbol", "language_name", "locale_name",
|
136 |
-
"timezone_name", "format_currency", "format_number",
|
137 |
-
"format_*_number", "format_datetime", "format_date", and "format_time"
|
138 |
-
filters, and the "country_timezones" function
|
139 |
-
* added the Markdown extension in the "extra" repositories: "markdown_to_html",
|
140 |
-
and "html_to_markdown" filters
|
141 |
-
* added the HtmlExtension extension in the "extra" repositories: "date_uri"
|
142 |
-
filter, and "html_classes" function
|
143 |
-
* optimized "block('foo') ?? 'bar'"
|
144 |
-
* fixed the empty test on Traversable instances
|
145 |
-
* fixed array_key_exists() on objects
|
146 |
-
* fixed cache when opcache is installed but disabled
|
147 |
-
* fixed using macros in arrow functions
|
148 |
-
* fixed split filter on edge case
|
149 |
-
|
150 |
-
# 2.11.3 (2019-06-18)
|
151 |
|
152 |
-
*
|
153 |
-
* fixed the
|
154 |
-
* fixed
|
|
|
|
|
155 |
|
156 |
-
#
|
157 |
|
158 |
-
*
|
159 |
|
160 |
-
#
|
161 |
|
162 |
* added support for "Twig\Markup" instances in the "in" test (again)
|
163 |
* allowed string operators as variables names in assignments
|
164 |
-
* fixed support for macros defined in parent templates
|
165 |
|
166 |
-
#
|
167 |
|
168 |
-
* added the possibility to register classes/interfaces as being safe for the escaper ("EscaperExtension::addSafeClass()")
|
169 |
-
* deprecated CoreExtension::setEscaper() and CoreExtension::getEscapers() in favor of the same methods on EscaperExtension
|
170 |
-
* macros are now auto-imported in the template they are defined (under the ``_self`` variable)
|
171 |
-
* added support for macros on "is defined" tests
|
172 |
-
* fixed macros "import" when using the same name in the parent and child templates
|
173 |
-
* fixed recursive macros
|
174 |
-
* macros imported "globally" in a template are now available in macros without re-importing them
|
175 |
* fixed the "filter" filter when the argument is \Traversable but does not implement \Iterator (\SimpleXmlElement for instance)
|
176 |
* fixed a PHP fatal error when calling a macro imported in a block in a nested block
|
177 |
* fixed a PHP fatal error when calling a macro imported in the template in another macro
|
178 |
* fixed wrong error message on "import" and "from"
|
179 |
|
180 |
-
#
|
181 |
|
182 |
-
*
|
183 |
* added "filter", "map", and "reduce" filters (and support for arrow functions)
|
184 |
* fixed partial output leak when a PHP fatal error occurs
|
185 |
* optimized context access on PHP 7.4
|
186 |
|
187 |
-
#
|
|
|
|
|
|
|
|
|
188 |
|
189 |
-
* deprecated returning "false" to remove a Node from NodeVisitorInterface::leaveNode()
|
190 |
* allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
|
191 |
-
* deprecated the "filter" tag (use the "apply" tag instead)
|
192 |
* added the "apply" tag as a replacement for the "filter" tag
|
193 |
* allowed Twig\Loader\FilesystemLoader::findTemplate() to return "null" instead of "false" (same meaning)
|
194 |
* added support for "Twig\Markup" instances in the "in" test
|
195 |
-
* fixed "import" when macros are stored in a template string
|
196 |
* fixed Lexer when using custom options containing the # char
|
197 |
-
*
|
198 |
|
199 |
-
#
|
200 |
|
201 |
* fixed EscaperNodeVisitor
|
202 |
-
* deprecated passing a 3rd, 4th, and 5th arguments to the Sandbox exception classes
|
203 |
-
* deprecated Node::setTemplateName() in favor of Node::setSourceContext()
|
204 |
|
205 |
-
#
|
206 |
|
207 |
* added Traversable support for the length filter
|
208 |
* fixed some wrong location in error messages
|
@@ -212,30 +120,28 @@
|
|
212 |
* fixed the "with" behavior to always include the globals (for consistency with the "include" and "embed" tags)
|
213 |
* fixed "include" with "ignore missing" when an error loading occurs in the included template
|
214 |
* added support for a new whitespace trimming option ({%~ ~%}, {{~ ~}}, {#~ ~#})
|
215 |
-
* added the "column" filter
|
216 |
|
217 |
-
#
|
218 |
|
219 |
-
* fixed variadic support
|
220 |
* fixed CheckToStringNode implementation (broken when a function/filter is variadic)
|
221 |
|
222 |
-
#
|
223 |
|
224 |
* fixed the spaceless filter so that it behaves like the spaceless tag
|
225 |
* fixed BC break on Environment::resolveTemplate()
|
226 |
-
*
|
227 |
* allowed Traversable objects to be used in the "with" tag
|
228 |
* allowed Traversable objects to be used in the "with" argument of the "include" and "embed" tags
|
229 |
|
230 |
-
#
|
231 |
|
232 |
* added TemplateWrapper::getTemplateName()
|
233 |
|
234 |
-
#
|
235 |
|
236 |
* fixed class aliases
|
237 |
|
238 |
-
#
|
239 |
|
240 |
* fixed sandbox security issue (under some circumstances, calling the
|
241 |
__toString() method on an object was possible even if not allowed by the
|
@@ -243,41 +149,31 @@
|
|
243 |
* fixed batch filter clobbers array keys when fill parameter is used
|
244 |
* added preserveKeys support for the batch filter
|
245 |
* fixed "embed" support when used from "template_from_string"
|
246 |
-
* deprecated passing a Twig\Template to Twig\Environment::load()/Twig\Environment::resolveTemplate()
|
247 |
* added the possibility to pass a TemplateWrapper to Twig\Environment::load()
|
248 |
-
* marked Twig\Environment::getTemplateClass() as internal (implementation detail)
|
249 |
* improved the performance of the sandbox
|
250 |
-
* deprecated the spaceless tag
|
251 |
* added a spaceless filter
|
252 |
* added max value to the "random" function
|
253 |
-
* deprecated Twig\Extension\InitRuntimeInterface
|
254 |
-
* deprecated Twig\Loader\ExistsLoaderInterface
|
255 |
-
* deprecated PSR-0 classes in favor of namespaced ones
|
256 |
* made namespace classes the default classes (PSR-0 ones are aliases now)
|
257 |
-
* added Twig\Loader\ChainLoader::getLoaders()
|
258 |
* removed duplicated directory separator in FilesystemLoader
|
259 |
-
*
|
260 |
-
* deprecated the Twig\Environment::getBaseTemplateClass() and
|
261 |
-
Twig\Environment::setBaseTemplateClass() methods
|
262 |
* changed internal code to use the namespaced classes as much as possible
|
263 |
-
* deprecated Twig_Parser::isReservedMacroName()
|
264 |
|
265 |
-
#
|
266 |
|
267 |
* fixed regression (key exists check for non ArrayObject objects)
|
|
|
268 |
|
269 |
-
#
|
270 |
|
271 |
* fixed ArrayObject access with a null value
|
272 |
* fixed embedded templates starting with a BOM
|
273 |
* fixed using a Twig_TemplateWrapper instance as an argument to extends
|
274 |
-
* fixed error location when calling an undefined block
|
275 |
-
* deprecated passing a string as a source on Twig_Error
|
276 |
* switched generated code to use the PHP short array notation
|
|
|
277 |
* fixed float representation in compiled templates
|
278 |
* added a second argument to the join filter (last separator configuration)
|
279 |
|
280 |
-
#
|
281 |
|
282 |
* made sure twig_include returns a string
|
283 |
* fixed multi-byte UFT-8 in escape('html_attr')
|
@@ -286,84 +182,74 @@
|
|
286 |
* fixed GlobalsInterface extended class
|
287 |
* fixed filesystem loader throwing an exception instead of returning false
|
288 |
|
289 |
-
#
|
290 |
|
291 |
-
* deprecated using the spaceless tag at the root level of a child template (noop anyway)
|
292 |
-
* deprecated the possibility to define a block in a non-capturing block in a child template
|
293 |
-
* added the Symfony ctype polyfill as a dependency
|
294 |
-
* fixed reporting the proper location for errors compiled in templates
|
295 |
-
* fixed the error handling for the optimized extension-based function calls
|
296 |
* ensured that syntax errors are triggered with the right line
|
|
|
297 |
* "js" filter now produces valid JSON
|
298 |
|
299 |
-
#
|
300 |
-
|
301 |
-
* fixed a regression when using the "default" filter or the "defined" test on non-existing arrays
|
302 |
-
|
303 |
-
# 2.4.7 (2018-03-20)
|
304 |
|
305 |
-
* optimized runtime performance
|
306 |
-
* optimized parser performance by inlining the constant values
|
307 |
* fixed block names unicity
|
308 |
* fixed counting children of SimpleXMLElement objects
|
309 |
* added missing else clause to avoid infinite loops
|
310 |
* fixed .. (range operator) in sandbox policy
|
311 |
|
312 |
-
#
|
313 |
|
314 |
* fixed a regression in the way the profiler is registered in templates
|
315 |
|
316 |
-
#
|
317 |
|
318 |
-
* optimized the performance of calling an extension method at runtime
|
319 |
-
* optimized the performance of the dot operator for array and method calls
|
320 |
* added an exception when using "===" instead of "same as"
|
321 |
* fixed possible array to string conversion concealing actual error
|
322 |
* made variable names deterministic in compiled templates
|
323 |
* fixed length filter when passing an instance of IteratorAggregate
|
324 |
* fixed Environment::resolveTemplate to accept instances of TemplateWrapper
|
325 |
|
326 |
-
#
|
327 |
|
328 |
* added Twig_Profiler_Profile::reset()
|
329 |
* fixed use TokenParser to return an empty Node
|
330 |
* added RuntimeExtensionInterface
|
331 |
* added circular reference detection when loading templates
|
|
|
|
|
|
|
332 |
* added support for runtime loaders in IntegrationTestCase
|
333 |
* fixed deprecation when using Twig_Profiler_Dumper_Html
|
334 |
-
* removed @final from Twig_Profiler_Dumper_Text
|
335 |
|
336 |
-
#
|
337 |
|
338 |
* fixed namespaces introduction
|
339 |
|
340 |
-
#
|
341 |
|
342 |
* fixed namespaces introduction
|
343 |
|
344 |
-
#
|
345 |
|
346 |
* fixed namespaces introduction
|
347 |
|
348 |
-
#
|
349 |
|
350 |
* added support for PHPUnit 6 when testing extensions
|
351 |
* fixed PHP 7.2 compatibility
|
352 |
* fixed template name generation in Twig_Environment::createTemplate()
|
353 |
* removed final tag on Twig_TokenParser_Include
|
354 |
-
* dropped HHVM support
|
355 |
* added namespaced aliases for all (non-deprecated) classes and interfaces
|
356 |
-
*
|
|
|
357 |
|
358 |
-
#
|
359 |
|
360 |
* fixed edge case in the method cache for Twig attributes
|
361 |
|
362 |
-
#
|
363 |
|
364 |
* fixed the empty() test
|
365 |
|
366 |
-
#
|
367 |
|
368 |
* fixed a race condition handling when writing cache files
|
369 |
* "length" filter now returns string length when applied to an object that does
|
@@ -371,35 +257,937 @@
|
|
371 |
* "empty" test will now consider the return value of the __toString() method for
|
372 |
objects implement __toString() but not \Countable
|
373 |
* fixed JS escaping for unicode characters with higher code points
|
374 |
-
* added error message when calling `parent()` in a block that doesn't exist in the parent template
|
375 |
|
376 |
-
#
|
377 |
|
|
|
378 |
* added a PSR-11 compatible runtime loader
|
379 |
* added `side` argument to `trim` to allow left or right trimming only.
|
380 |
|
381 |
-
#
|
382 |
|
383 |
-
* fixed twig_get_attribute()
|
384 |
* added Twig_NodeCaptureInterface for nodes that capture all output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# 1.44.7 (2022-09-28)
|
2 |
|
3 |
* Fix a security issue on filesystem loader (possibility to load a template outside a configured directory)
|
4 |
|
5 |
+
# 1.44.6 (2021-11-25)
|
6 |
|
7 |
+
* Last version for the 1.x series
|
|
|
|
|
8 |
|
9 |
+
# 1.44.5 (2021-09-17)
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
* Improve compatibility with PHP 8.1
|
12 |
* Explicitly specify the encoding for mb_ord in JS escaper
|
13 |
+
|
14 |
+
# 1.44.4 (2021-05-16)
|
15 |
|
16 |
* Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)"
|
17 |
|
18 |
+
# 1.44.3 (2021-05-12)
|
19 |
|
20 |
* Fix PHP 8.1 compatibility
|
21 |
* Throw a proper exception when a template name is an absolute path (as it has never been supported)
|
22 |
|
23 |
+
# 1.44.2 (2021-01-05)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
* Fix "odd" not working for negative numbers
|
26 |
|
27 |
+
# 1.44.1 (2020-10-27)
|
28 |
|
29 |
+
* Fix "include(template_from_string())"
|
30 |
|
31 |
+
# 1.44.0 (2020-10-21)
|
32 |
|
33 |
+
* Remove implicit dependency on ext/iconv in JS escaper
|
34 |
* Fix sandbox support when using "include(template_from_string())"
|
35 |
* Make round brackets optional for one argument tests like "same as" or "divisible by"
|
36 |
* Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a }
|
37 |
+
* Fix filter(), map(), and reduce() to throw a RuntimeError instead of a PHP TypeError
|
38 |
* Drop PHP 7.1 support
|
39 |
|
40 |
+
# 1.43.1 (2020-08-05)
|
41 |
|
42 |
* Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag
|
43 |
* Fix a regression when not using a space before an operator
|
44 |
* Restrict callables to closures in filters
|
45 |
* Allow trailing commas in argument lists (in calls as well as definitions)
|
46 |
|
47 |
+
# 1.43.0 (2020-07-05)
|
48 |
|
|
|
|
|
|
|
49 |
* Throw exception in case non-Traversable data is passed to "filter"
|
50 |
* Fix context optimization on PHP 7.4
|
51 |
* Fix PHP 8 compatibility
|
52 |
+
* Drop PHP 5.5 5.6, and 7.0 support
|
53 |
* Fix ambiguous syntax parsing
|
54 |
+
* In sandbox, the `filter`, `map` and `reduce` filters require Closures in `arrow` parameter
|
55 |
|
56 |
+
# 1.42.5 (2020-02-11)
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
* Fix implementation of case-insensitivity for method names
|
59 |
|
60 |
+
# 1.42.4 (2019-11-11)
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
+
* optimized "block('foo') ?? 'bar"
|
63 |
* added supported for exponential numbers
|
64 |
|
65 |
+
# 1.42.3 (2019-08-24)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
+
* fixed the "split" filter when the delimiter is "0"
|
68 |
+
* fixed the "empty" test on Traversable instances
|
69 |
+
* fixed cache when opcache is installed but disabled
|
70 |
+
* fixed PHP 7.4 compatibility
|
71 |
+
* bumped the minimal PHP version to 5.5
|
72 |
|
73 |
+
# 1.42.2 (2019-06-18)
|
74 |
|
75 |
+
* Display partial output (PHP buffer) when an error occurs in debug mode
|
76 |
|
77 |
+
# 1.42.1 (2019-06-04)
|
78 |
|
79 |
* added support for "Twig\Markup" instances in the "in" test (again)
|
80 |
* allowed string operators as variables names in assignments
|
|
|
81 |
|
82 |
+
# 1.42.0 (2019-05-31)
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
* fixed the "filter" filter when the argument is \Traversable but does not implement \Iterator (\SimpleXmlElement for instance)
|
85 |
* fixed a PHP fatal error when calling a macro imported in a block in a nested block
|
86 |
* fixed a PHP fatal error when calling a macro imported in the template in another macro
|
87 |
* fixed wrong error message on "import" and "from"
|
88 |
|
89 |
+
# 1.41.0 (2019-05-14)
|
90 |
|
91 |
+
* fixed support for PHP 7.4
|
92 |
* added "filter", "map", and "reduce" filters (and support for arrow functions)
|
93 |
* fixed partial output leak when a PHP fatal error occurs
|
94 |
* optimized context access on PHP 7.4
|
95 |
|
96 |
+
# 1.40.1 (2019-04-29)
|
97 |
+
|
98 |
+
# fixed regression in NodeTraverser
|
99 |
+
|
100 |
+
# 1.40.0 (2019-04-28)
|
101 |
|
|
|
102 |
* allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
|
|
|
103 |
* added the "apply" tag as a replacement for the "filter" tag
|
104 |
* allowed Twig\Loader\FilesystemLoader::findTemplate() to return "null" instead of "false" (same meaning)
|
105 |
* added support for "Twig\Markup" instances in the "in" test
|
|
|
106 |
* fixed Lexer when using custom options containing the # char
|
107 |
+
* fixed "import" when macros are stored in a template string
|
108 |
|
109 |
+
# 1.39.1 (2019-04-16)
|
110 |
|
111 |
* fixed EscaperNodeVisitor
|
|
|
|
|
112 |
|
113 |
+
# 1.39.0 (2019-04-16)
|
114 |
|
115 |
* added Traversable support for the length filter
|
116 |
* fixed some wrong location in error messages
|
120 |
* fixed the "with" behavior to always include the globals (for consistency with the "include" and "embed" tags)
|
121 |
* fixed "include" with "ignore missing" when an error loading occurs in the included template
|
122 |
* added support for a new whitespace trimming option ({%~ ~%}, {{~ ~}}, {#~ ~#})
|
|
|
123 |
|
124 |
+
# 1.38.4 (2019-03-23)
|
125 |
|
|
|
126 |
* fixed CheckToStringNode implementation (broken when a function/filter is variadic)
|
127 |
|
128 |
+
# 1.38.3 (2019-03-21)
|
129 |
|
130 |
* fixed the spaceless filter so that it behaves like the spaceless tag
|
131 |
* fixed BC break on Environment::resolveTemplate()
|
132 |
+
* fixed the bundled Autoloader to also load namespaced classes
|
133 |
* allowed Traversable objects to be used in the "with" tag
|
134 |
* allowed Traversable objects to be used in the "with" argument of the "include" and "embed" tags
|
135 |
|
136 |
+
# 1.38.2 (2019-03-12)
|
137 |
|
138 |
* added TemplateWrapper::getTemplateName()
|
139 |
|
140 |
+
# 1.38.1 (2019-03-12)
|
141 |
|
142 |
* fixed class aliases
|
143 |
|
144 |
+
# 1.38.0 (2019-03-12)
|
145 |
|
146 |
* fixed sandbox security issue (under some circumstances, calling the
|
147 |
__toString() method on an object was possible even if not allowed by the
|
149 |
* fixed batch filter clobbers array keys when fill parameter is used
|
150 |
* added preserveKeys support for the batch filter
|
151 |
* fixed "embed" support when used from "template_from_string"
|
|
|
152 |
* added the possibility to pass a TemplateWrapper to Twig\Environment::load()
|
|
|
153 |
* improved the performance of the sandbox
|
|
|
154 |
* added a spaceless filter
|
155 |
* added max value to the "random" function
|
|
|
|
|
|
|
156 |
* made namespace classes the default classes (PSR-0 ones are aliases now)
|
|
|
157 |
* removed duplicated directory separator in FilesystemLoader
|
158 |
+
* added Twig\Loader\ChainLoader::getLoaders()
|
|
|
|
|
159 |
* changed internal code to use the namespaced classes as much as possible
|
|
|
160 |
|
161 |
+
# 1.37.1 (2019-01-14)
|
162 |
|
163 |
* fixed regression (key exists check for non ArrayObject objects)
|
164 |
+
* fixed logic in TemplateWrapper
|
165 |
|
166 |
+
# 1.37.0 (2019-01-14)
|
167 |
|
168 |
* fixed ArrayObject access with a null value
|
169 |
* fixed embedded templates starting with a BOM
|
170 |
* fixed using a Twig_TemplateWrapper instance as an argument to extends
|
|
|
|
|
171 |
* switched generated code to use the PHP short array notation
|
172 |
+
* dropped PHP 5.3 support
|
173 |
* fixed float representation in compiled templates
|
174 |
* added a second argument to the join filter (last separator configuration)
|
175 |
|
176 |
+
# 1.36.0 (2018-12-16)
|
177 |
|
178 |
* made sure twig_include returns a string
|
179 |
* fixed multi-byte UFT-8 in escape('html_attr')
|
182 |
* fixed GlobalsInterface extended class
|
183 |
* fixed filesystem loader throwing an exception instead of returning false
|
184 |
|
185 |
+
# 1.35.4 (2018-07-13)
|
186 |
|
|
|
|
|
|
|
|
|
|
|
187 |
* ensured that syntax errors are triggered with the right line
|
188 |
+
* added the Symfony ctype polyfill as a dependency
|
189 |
* "js" filter now produces valid JSON
|
190 |
|
191 |
+
# 1.35.3 (2018-03-20)
|
|
|
|
|
|
|
|
|
192 |
|
|
|
|
|
193 |
* fixed block names unicity
|
194 |
* fixed counting children of SimpleXMLElement objects
|
195 |
* added missing else clause to avoid infinite loops
|
196 |
* fixed .. (range operator) in sandbox policy
|
197 |
|
198 |
+
# 1.35.2 (2018-03-03)
|
199 |
|
200 |
* fixed a regression in the way the profiler is registered in templates
|
201 |
|
202 |
+
# 1.35.1 (2018-03-02)
|
203 |
|
|
|
|
|
204 |
* added an exception when using "===" instead of "same as"
|
205 |
* fixed possible array to string conversion concealing actual error
|
206 |
* made variable names deterministic in compiled templates
|
207 |
* fixed length filter when passing an instance of IteratorAggregate
|
208 |
* fixed Environment::resolveTemplate to accept instances of TemplateWrapper
|
209 |
|
210 |
+
# 1.35.0 (2017-09-27)
|
211 |
|
212 |
* added Twig_Profiler_Profile::reset()
|
213 |
* fixed use TokenParser to return an empty Node
|
214 |
* added RuntimeExtensionInterface
|
215 |
* added circular reference detection when loading templates
|
216 |
+
|
217 |
+
# 1.34.4 (2017-07-04)
|
218 |
+
|
219 |
* added support for runtime loaders in IntegrationTestCase
|
220 |
* fixed deprecation when using Twig_Profiler_Dumper_Html
|
|
|
221 |
|
222 |
+
# 1.34.3 (2017-06-07)
|
223 |
|
224 |
* fixed namespaces introduction
|
225 |
|
226 |
+
# 1.34.2 (2017-06-05)
|
227 |
|
228 |
* fixed namespaces introduction
|
229 |
|
230 |
+
# 1.34.1 (2017-06-05)
|
231 |
|
232 |
* fixed namespaces introduction
|
233 |
|
234 |
+
# 1.34.0 (2017-06-05)
|
235 |
|
236 |
* added support for PHPUnit 6 when testing extensions
|
237 |
* fixed PHP 7.2 compatibility
|
238 |
* fixed template name generation in Twig_Environment::createTemplate()
|
239 |
* removed final tag on Twig_TokenParser_Include
|
|
|
240 |
* added namespaced aliases for all (non-deprecated) classes and interfaces
|
241 |
+
* dropped HHVM support
|
242 |
+
* dropped PHP 5.2 support
|
243 |
|
244 |
+
# 1.33.2 (2017-04-20)
|
245 |
|
246 |
* fixed edge case in the method cache for Twig attributes
|
247 |
|
248 |
+
# 1.33.1 (2017-04-18)
|
249 |
|
250 |
* fixed the empty() test
|
251 |
|
252 |
+
# 1.33.0 (2017-03-22)
|
253 |
|
254 |
* fixed a race condition handling when writing cache files
|
255 |
* "length" filter now returns string length when applied to an object that does
|
257 |
* "empty" test will now consider the return value of the __toString() method for
|
258 |
objects implement __toString() but not \Countable
|
259 |
* fixed JS escaping for unicode characters with higher code points
|
|
|
260 |
|
261 |
+
# 1.32.0 (2017-02-26)
|
262 |
|
263 |
+
* fixed deprecation notice in Twig_Util_DeprecationCollector
|
264 |
* added a PSR-11 compatible runtime loader
|
265 |
* added `side` argument to `trim` to allow left or right trimming only.
|
266 |
|
267 |
+
# 1.31.0 (2017-01-11)
|
268 |
|
|
|
269 |
* added Twig_NodeCaptureInterface for nodes that capture all output
|
270 |
+
* fixed marking the environment as initialized too early
|
271 |
+
* fixed C89 compat for the C extension
|
272 |
+
* turned fatal error into exception when a previously generated cache is corrupted
|
273 |
+
* fixed offline cache warm-ups for embedded templates
|
274 |
+
|
275 |
+
# 1.30.0 (2016-12-23)
|
276 |
+
|
277 |
+
* added Twig_FactoryRuntimeLoader
|
278 |
+
* deprecated function/test/filter/tag overriding
|
279 |
+
* deprecated the "disable_c_ext" attribute on Twig_Node_Expression_GetAttr
|
280 |
+
|
281 |
+
# 1.29.0 (2016-12-13)
|
282 |
+
|
283 |
+
* fixed sandbox being left enabled if an exception is thrown while rendering
|
284 |
+
* marked some classes as being final (via @final)
|
285 |
+
* made Twig_Error report real source path when possible
|
286 |
+
* added support for {{ _self }} to provide an upgrade path from 1.x to 2.0 (replaces {{ _self.templateName }})
|
287 |
+
* deprecated silent display of undefined blocks
|
288 |
+
* deprecated support for mbstring.func_overload != 0
|
289 |
+
|
290 |
+
# 1.28.2 (2016-11-23)
|
291 |
+
|
292 |
+
* fixed precedence between getFoo() and isFoo() in Twig_Template::getAttribute()
|
293 |
+
* improved a deprecation message
|
294 |
+
|
295 |
+
# 1.28.1 (2016-11-18)
|
296 |
+
|
297 |
+
* fixed block() function when used with a template argument
|
298 |
+
|
299 |
+
# 1.28.0 (2016-11-17)
|
300 |
+
|
301 |
+
* added support for the PHP 7 null coalescing operator for the ?? Twig implementation
|
302 |
+
* exposed a way to access template data and methods in a portable way
|
303 |
+
* changed context access to use the PHP 7 null coalescing operator when available
|
304 |
+
* added the "with" tag
|
305 |
+
* added support for a custom template on the block() function
|
306 |
+
* added "is defined" support for block() and constant()
|
307 |
+
* optimized the way attributes are fetched
|
308 |
+
|
309 |
+
# 1.27.0 (2016-10-25)
|
310 |
+
|
311 |
+
* deprecated Twig_Parser::getEnvironment()
|
312 |
+
* deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor()
|
313 |
+
* deprecated Twig_Compiler::addIndentation()
|
314 |
+
* fixed regression when registering two extensions having the same class name
|
315 |
+
* deprecated Twig_LoaderInterface::getSource() (implement Twig_SourceContextLoaderInterface instead)
|
316 |
+
* fixed the filesystem loader with relative paths
|
317 |
+
* deprecated Twig_Node::getLine() in favor of Twig_Node::getTemplateLine()
|
318 |
+
* deprecated Twig_Template::getSource() in favor of Twig_Template::getSourceContext()
|
319 |
+
* deprecated Twig_Node::getFilename() in favor of Twig_Node::getTemplateName()
|
320 |
+
* deprecated the "filename" escaping strategy (use "name" instead)
|
321 |
+
* added Twig_Source to hold information about the original template
|
322 |
+
* deprecated Twig_Error::getTemplateFile() and Twig_Error::setTemplateFile() in favor of Twig_Error::getTemplateName() and Twig_Error::setTemplateName()
|
323 |
+
* deprecated Parser::getFilename()
|
324 |
+
* fixed template paths when a template name contains a protocol like vfs://
|
325 |
+
* improved debugging with Twig_Sandbox_SecurityError exceptions for disallowed methods and properties
|
326 |
+
|
327 |
+
# 1.26.1 (2016-10-05)
|
328 |
+
|
329 |
+
* removed template source code from generated template classes when debug is disabled
|
330 |
+
* fixed default implementation of Twig_Template::getDebugInfo() for better BC
|
331 |
+
* fixed regression on static calls for functions/filters/tests
|
332 |
+
|
333 |
+
# 1.26.0 (2016-10-02)
|
334 |
+
|
335 |
+
* added template cache invalidation based on more environment options
|
336 |
+
* added a missing deprecation notice
|
337 |
+
* fixed template paths when a template is stored in a PHAR file
|
338 |
+
* allowed filters/functions/tests implementation to use a different class than the extension they belong to
|
339 |
+
* deprecated Twig_ExtensionInterface::getName()
|
340 |
+
|
341 |
+
# 1.25.0 (2016-09-21)
|
342 |
+
|
343 |
+
* changed the way we store template source in template classes
|
344 |
+
* removed usage of realpath in cache keys
|
345 |
+
* fixed Twig cache sharing when used with different versions of PHP
|
346 |
+
* removed embed parent workaround for simple use cases
|
347 |
+
* deprecated the ability to store non Node instances in Node::$nodes
|
348 |
+
* deprecated Twig_Environment::getLexer(), Twig_Environment::getParser(), Twig_Environment::getCompiler()
|
349 |
+
* deprecated Twig_Compiler::getFilename()
|
350 |
+
|
351 |
+
# 1.24.2 (2016-09-01)
|
352 |
+
|
353 |
+
* fixed static callables
|
354 |
+
* fixed a potential PHP warning when loading the cache
|
355 |
+
* fixed a case where the autoescaping does not work as expected
|
356 |
+
|
357 |
+
# 1.24.1 (2016-05-30)
|
358 |
+
|
359 |
+
* fixed reserved keywords (forbids true, false, null and none keywords for variables names)
|
360 |
+
* fixed support for PHP7 (Throwable support)
|
361 |
+
* marked the following methods as being internals on Twig_Environment:
|
362 |
+
getFunctions(), getFilters(), getTests(), getFunction(), getFilter(), getTest(),
|
363 |
+
getTokenParsers(), getTags(), getNodeVisitors(), getUnaryOperators(), getBinaryOperators(),
|
364 |
+
getFunctions(), getFilters(), getGlobals(), initGlobals(), initExtensions(), and initExtension()
|
365 |
+
|
366 |
+
# 1.24.0 (2016-01-25)
|
367 |
+
|
368 |
+
* adding support for the ?? operator
|
369 |
+
* fixed the defined test when used on a constant, a map, or a sequence
|
370 |
+
* undeprecated _self (should only be used to get the template name, not the template instance)
|
371 |
+
* fixed parsing on PHP7
|
372 |
+
|
373 |
+
# 1.23.3 (2016-01-11)
|
374 |
+
|
375 |
+
* fixed typo
|
376 |
+
|
377 |
+
# 1.23.2 (2015-01-11)
|
378 |
+
|
379 |
+
* added versions in deprecated messages
|
380 |
+
* made file cache tolerant for trailing (back)slashes on directory configuration
|
381 |
+
* deprecated unused Twig_Node_Expression_ExtensionReference class
|
382 |
+
|
383 |
+
# 1.23.1 (2015-11-05)
|
384 |
+
|
385 |
+
* fixed some exception messages which triggered PHP warnings
|
386 |
+
* fixed BC on Twig_Test_NodeTestCase
|
387 |
+
|
388 |
+
# 1.23.0 (2015-10-29)
|
389 |
+
|
390 |
+
* deprecated the possibility to override an extension by registering another one with the same name
|
391 |
+
* deprecated Twig_ExtensionInterface::getGlobals() (added Twig_Extension_GlobalsInterface for BC)
|
392 |
+
* deprecated Twig_ExtensionInterface::initRuntime() (added Twig_Extension_InitRuntimeInterface for BC)
|
393 |
+
* deprecated Twig_Environment::computeAlternatives()
|
394 |
+
|
395 |
+
# 1.22.3 (2015-10-13)
|
396 |
+
|
397 |
+
* fixed regression when using null as a cache strategy
|
398 |
+
* improved performance when checking template freshness
|
399 |
+
* fixed warnings when loaded templates do not exist
|
400 |
+
* fixed template class name generation to prevent possible collisions
|
401 |
+
* fixed logic for custom escapers to call them even on integers and null values
|
402 |
+
* changed template cache names to take into account the Twig C extension
|
403 |
+
|
404 |
+
# 1.22.2 (2015-09-22)
|
405 |
+
|
406 |
+
* fixed a race condition in template loading
|
407 |
+
|
408 |
+
# 1.22.1 (2015-09-15)
|
409 |
+
|
410 |
+
* fixed regression in template_from_string
|
411 |
+
|
412 |
+
# 1.22.0 (2015-09-13)
|
413 |
+
|
414 |
+
* made Twig_Test_IntegrationTestCase more flexible
|
415 |
+
* added an option to force PHP bytecode invalidation when writing a compiled template into the cache
|
416 |
+
* fixed the profiler duration for the root node
|
417 |
+
* changed template cache names to take into account enabled extensions
|
418 |
+
* deprecated Twig_Environment::clearCacheFiles(), Twig_Environment::getCacheFilename(),
|
419 |
+
Twig_Environment::writeCacheFile(), and Twig_Environment::getTemplateClassPrefix()
|
420 |
+
* added a way to override the filesystem template cache system
|
421 |
+
* added a way to get the original template source from Twig_Template
|
422 |
+
|
423 |
+
# 1.21.2 (2015-09-09)
|
424 |
+
|
425 |
+
* fixed variable names for the deprecation triggering code
|
426 |
+
* fixed escaping strategy detection based on filename
|
427 |
+
* added Traversable support for replace, merge, and sort
|
428 |
+
* deprecated support for character by character replacement for the "replace" filter
|
429 |
+
|
430 |
+
# 1.21.1 (2015-08-26)
|
431 |
+
|
432 |
+
* fixed regression when using the deprecated Twig_Test_* classes
|
433 |
+
|
434 |
+
# 1.21.0 (2015-08-24)
|
435 |
+
|
436 |
+
* added deprecation notices for deprecated features
|
437 |
+
* added a deprecation "framework" for filters/functions/tests and test fixtures
|
438 |
+
|
439 |
+
# 1.20.0 (2015-08-12)
|
440 |
+
|
441 |
+
* forbid access to the Twig environment from templates and internal parts of Twig_Template
|
442 |
+
* fixed limited RCEs when in sandbox mode
|
443 |
+
* deprecated Twig_Template::getEnvironment()
|
444 |
+
* deprecated the _self variable for usage outside of the from and import tags
|
445 |
+
* added Twig_BaseNodeVisitor to ease the compatibility of node visitors
|
446 |
+
between 1.x and 2.x
|
447 |
+
|
448 |
+
# 1.19.0 (2015-07-31)
|
449 |
+
|
450 |
+
* fixed wrong error message when including an undefined template in a child template
|
451 |
+
* added support for variadic filters, functions, and tests
|
452 |
+
* added support for extra positional arguments in macros
|
453 |
+
* added ignore_missing flag to the source function
|
454 |
+
* fixed batch filter with zero items
|
455 |
+
* deprecated Twig_Environment::clearTemplateCache()
|
456 |
+
* fixed sandbox disabling when using the include function
|
457 |
+
|
458 |
+
# 1.18.2 (2015-06-06)
|
459 |
+
|
460 |
+
* fixed template/line guessing in exceptions for nested templates
|
461 |
+
* optimized the number of inodes and the size of realpath cache when using the cache
|
462 |
+
|
463 |
+
# 1.18.1 (2015-04-19)
|
464 |
+
|
465 |
+
* fixed memory leaks in the C extension
|
466 |
+
* deprecated Twig_Loader_String
|
467 |
+
* fixed the slice filter when used with a SimpleXMLElement object
|
468 |
+
* fixed filesystem loader when trying to load non-files (like directories)
|
469 |
+
|
470 |
+
# 1.18.0 (2015-01-25)
|
471 |
+
|
472 |
+
* fixed some error messages where the line was wrong (unknown variables or argument names)
|
473 |
+
* added a new way to customize the main Module node (via empty nodes)
|
474 |
+
* added Twig_Environment::createTemplate() to create a template from a string
|
475 |
+
* added a profiler
|
476 |
+
* fixed filesystem loader cache when different file paths are used for the same template
|
477 |
+
|
478 |
+
# 1.17.0 (2015-01-14)
|
479 |
+
|
480 |
+
* added a 'filename' autoescaping strategy, which dynamically chooses the
|
481 |
+
autoescaping strategy for a template based on template file extension.
|
482 |
+
|
483 |
+
# 1.16.3 (2014-12-25)
|
484 |
+
|
485 |
+
* fixed regression for dynamic parent templates
|
486 |
+
* fixed cache management with statcache
|
487 |
+
* fixed a regression in the slice filter
|
488 |
+
|
489 |
+
# 1.16.2 (2014-10-17)
|
490 |
+
|
491 |
+
* fixed timezone on dates as strings
|
492 |
+
* fixed 2-words test names when a custom node class is not used
|
493 |
+
* fixed macros when using an argument named like a PHP super global (like GET or POST)
|
494 |
+
* fixed date_modify when working with DateTimeImmutable
|
495 |
+
* optimized for loops
|
496 |
+
* fixed multi-byte characters handling in the split filter
|
497 |
+
* fixed a regression in the in operator
|
498 |
+
* fixed a regression in the slice filter
|
499 |
+
|
500 |
+
# 1.16.1 (2014-10-10)
|
501 |
+
|
502 |
+
* improved error reporting in a sandboxed template
|
503 |
+
* fixed missing error file/line information under certain circumstances
|
504 |
+
* fixed wrong error line number in some error messages
|
505 |
+
* fixed the in operator to use strict comparisons
|
506 |
+
* sped up the slice filter
|
507 |
+
* fixed for mb function overload mb_substr acting different
|
508 |
+
* fixed the attribute() function when passing a variable for the arguments
|
509 |
+
|
510 |
+
# 1.16.0 (2014-07-05)
|
511 |
+
|
512 |
+
* changed url_encode to always encode according to RFC 3986
|
513 |
+
* fixed inheritance in a 'use'-hierarchy
|
514 |
+
* removed the __toString policy check when the sandbox is disabled
|
515 |
+
* fixed recursively calling blocks in templates with inheritance
|
516 |
+
|
517 |
+
# 1.15.1 (2014-02-13)
|
518 |
+
|
519 |
+
* fixed the conversion of the special '0000-00-00 00:00' date
|
520 |
+
* added an error message when trying to import an undefined block from a trait
|
521 |
+
* fixed a C extension crash when accessing defined but uninitialized property.
|
522 |
+
|
523 |
+
# 1.15.0 (2013-12-06)
|
524 |
+
|
525 |
+
* made ignoreStrictCheck in Template::getAttribute() works with __call() methods throwing BadMethodCallException
|
526 |
+
* added min and max functions
|
527 |
+
* added the round filter
|
528 |
+
* fixed a bug that prevented the optimizers to be enabled/disabled selectively
|
529 |
+
* fixed first and last filters for UTF-8 strings
|
530 |
+
* added a source function to include the content of a template without rendering it
|
531 |
+
* fixed the C extension sandbox behavior when get or set is prepend to method name
|
532 |
+
|
533 |
+
# 1.14.2 (2013-10-30)
|
534 |
+
|
535 |
+
* fixed error filename/line when an error occurs in an included file
|
536 |
+
* allowed operators that contain whitespaces to have more than one whitespace
|
537 |
+
* allowed tests to be made of 1 or 2 words (like "same as" or "divisible by")
|
538 |
+
|
539 |
+
# 1.14.1 (2013-10-15)
|
540 |
+
|
541 |
+
* made it possible to use named operators as variables
|
542 |
+
* fixed the possibility to have a variable named 'matches'
|
543 |
+
* added support for PHP 5.5 DateTimeInterface
|
544 |
+
|
545 |
+
# 1.14.0 (2013-10-03)
|
546 |
+
|
547 |
+
* fixed usage of the html_attr escaping strategy to avoid double-escaping with the html strategy
|
548 |
+
* added new operators: ends with, starts with, and matches
|
549 |
+
* fixed some compatibility issues with HHVM
|
550 |
+
* added a way to add custom escaping strategies
|
551 |
+
* fixed the C extension compilation on Windows
|
552 |
+
* fixed the batch filter when using a fill argument with an exact match of elements to batch
|
553 |
+
* fixed the filesystem loader cache when a template name exists in several namespaces
|
554 |
+
* fixed template_from_string when the template includes or extends other ones
|
555 |
+
* fixed a crash of the C extension on an edge case
|
556 |
+
|
557 |
+
# 1.13.2 (2013-08-03)
|
558 |
+
|
559 |
+
* fixed the error line number for an error occurs in and embedded template
|
560 |
+
* fixed crashes of the C extension on some edge cases
|
561 |
+
|
562 |
+
# 1.13.1 (2013-06-06)
|
563 |
+
|
564 |
+
* added the possibility to ignore the filesystem constructor argument in Twig_Loader_Filesystem
|
565 |
+
* fixed Twig_Loader_Chain::exists() for a loader which implements Twig_ExistsLoaderInterface
|
566 |
+
* adjusted backtrace call to reduce memory usage when an error occurs
|
567 |
+
* added support for object instances as the second argument of the constant test
|
568 |
+
* fixed the include function when used in an assignment
|
569 |
+
|
570 |
+
# 1.13.0 (2013-05-10)
|
571 |
+
|
572 |
+
* fixed getting a numeric-like item on a variable ('09' for instance)
|
573 |
+
* fixed getting a boolean or float key on an array, so it is consistent with PHP's array access:
|
574 |
+
`{{ array[false] }}` behaves the same as `echo $array[false];` (equals `$array[0]`)
|
575 |
+
* made the escape filter 20% faster for happy path (escaping string for html with UTF-8)
|
576 |
+
* changed ☃ to § in tests
|
577 |
+
* enforced usage of named arguments after positional ones
|
578 |
+
|
579 |
+
# 1.12.3 (2013-04-08)
|
580 |
+
|
581 |
+
* fixed a security issue in the filesystem loader where it was possible to include a template one
|
582 |
+
level above the configured path
|
583 |
+
* fixed fatal error that should be an exception when adding a filter/function/test too late
|
584 |
+
* added a batch filter
|
585 |
+
* added support for encoding an array as query string in the url_encode filter
|
586 |
+
|
587 |
+
# 1.12.2 (2013-02-09)
|
588 |
+
|
589 |
+
* fixed the timezone used by the date filter and function when the given date contains a timezone (like 2010-01-28T15:00:00+02:00)
|
590 |
+
* fixed globals when getGlobals is called early on
|
591 |
+
* added the first and last filter
|
592 |
+
|
593 |
+
# 1.12.1 (2013-01-15)
|
594 |
+
|
595 |
+
* added support for object instances as the second argument of the constant function
|
596 |
+
* relaxed globals management to avoid a BC break
|
597 |
+
* added support for {{ some_string[:2] }}
|
598 |
+
|
599 |
+
# 1.12.0 (2013-01-08)
|
600 |
+
|
601 |
+
* added verbatim as an alias for the raw tag to avoid confusion with the raw filter
|
602 |
+
* fixed registration of tests and functions as anonymous functions
|
603 |
+
* fixed globals management
|
604 |
+
|
605 |
+
# 1.12.0-RC1 (2012-12-29)
|
606 |
+
|
607 |
+
* added an include function (does the same as the include tag but in a more flexible way)
|
608 |
+
* added the ability to use any PHP callable to define filters, functions, and tests
|
609 |
+
* added a syntax error when using a loop variable that is not defined
|
610 |
+
* added the ability to set default values for macro arguments
|
611 |
+
* added support for named arguments for filters, tests, and functions
|
612 |
+
* moved filters/functions/tests syntax errors to the parser
|
613 |
+
* added support for extended ternary operator syntaxes
|
614 |
+
|
615 |
+
# 1.11.1 (2012-11-11)
|
616 |
+
|
617 |
+
* fixed debug info line numbering (was off by 2)
|
618 |
+
* fixed escaping when calling a macro inside another one (regression introduced in 1.9.1)
|
619 |
+
* optimized variable access on PHP 5.4
|
620 |
+
* fixed a crash of the C extension when an exception was thrown from a macro called without being imported (using _self.XXX)
|
621 |
+
|
622 |
+
# 1.11.0 (2012-11-07)
|
623 |
+
|
624 |
+
* fixed macro compilation when a variable name is a PHP reserved keyword
|
625 |
+
* changed the date filter behavior to always apply the default timezone, except if false is passed as the timezone
|
626 |
+
* fixed bitwise operator precedences
|
627 |
+
* added the template_from_string function
|
628 |
+
* fixed default timezone usage for the date function
|
629 |
+
* optimized the way Twig exceptions are managed (to make them faster)
|
630 |
+
* added Twig_ExistsLoaderInterface (implementing this interface in your loader make the chain loader much faster)
|
631 |
+
|
632 |
+
# 1.10.3 (2012-10-19)
|
633 |
+
|
634 |
+
* fixed wrong template location in some error messages
|
635 |
+
* reverted a BC break introduced in 1.10.2
|
636 |
+
* added a split filter
|
637 |
+
|
638 |
+
# 1.10.2 (2012-10-15)
|
639 |
+
|
640 |
+
* fixed macro calls on PHP 5.4
|
641 |
+
|
642 |
+
# 1.10.1 (2012-10-15)
|
643 |
+
|
644 |
+
* made a speed optimization to macro calls when imported via the "import" tag
|
645 |
+
* fixed C extension compilation on Windows
|
646 |
+
* fixed a segfault in the C extension when using DateTime objects
|
647 |
+
|
648 |
+
# 1.10.0 (2012-09-28)
|
649 |
+
|
650 |
+
* extracted functional tests framework to make it reusable for third-party extensions
|
651 |
+
* added namespaced templates support in Twig_Loader_Filesystem
|
652 |
+
* added Twig_Loader_Filesystem::prependPath()
|
653 |
+
* fixed an error when a token parser pass a closure as a test to the subparse() method
|
654 |
+
|
655 |
+
# 1.9.2 (2012-08-25)
|
656 |
+
|
657 |
+
* fixed the in operator for objects that contain circular references
|
658 |
+
* fixed the C extension when accessing a public property of an object implementing the \ArrayAccess interface
|
659 |
+
|
660 |
+
# 1.9.1 (2012-07-22)
|
661 |
+
|
662 |
+
* optimized macro calls when auto-escaping is on
|
663 |
+
* fixed wrong parent class for Twig_Function_Node
|
664 |
+
* made Twig_Loader_Chain more explicit about problems
|
665 |
+
|
666 |
+
# 1.9.0 (2012-07-13)
|
667 |
+
|
668 |
+
* made the parsing independent of the template loaders
|
669 |
+
* fixed exception trace when an error occurs when rendering a child template
|
670 |
+
* added escaping strategies for CSS, URL, and HTML attributes
|
671 |
+
* fixed nested embed tag calls
|
672 |
+
* added the date_modify filter
|
673 |
+
|
674 |
+
# 1.8.3 (2012-06-17)
|
675 |
+
|
676 |
+
* fixed paths in the filesystem loader when passing a path that ends with a slash or a backslash
|
677 |
+
* fixed escaping when a project defines a function named html or js
|
678 |
+
* fixed chmod mode to apply the umask correctly
|
679 |
+
|
680 |
+
# 1.8.2 (2012-05-30)
|
681 |
+
|
682 |
+
* added the abs filter
|
683 |
+
* fixed a regression when using a number in template attributes
|
684 |
+
* fixed compiler when mbstring.func_overload is set to 2
|
685 |
+
* fixed DateTimeZone support in date filter
|
686 |
+
|
687 |
+
# 1.8.1 (2012-05-17)
|
688 |
+
|
689 |
+
* fixed a regression when dealing with SimpleXMLElement instances in templates
|
690 |
+
* fixed "is_safe" value for the "dump" function when "html_errors" is not defined in php.ini
|
691 |
+
* switched to use mbstring whenever possible instead of iconv (you might need to update your encoding as mbstring and iconv encoding names sometimes differ)
|
692 |
+
|
693 |
+
# 1.8.0 (2012-05-08)
|
694 |
+
|
695 |
+
* enforced interface when adding tests, filters, functions, and node visitors from extensions
|
696 |
+
* fixed a side-effect of the date filter where the timezone might be changed
|
697 |
+
* simplified usage of the autoescape tag; the only (optional) argument is now the escaping strategy or false (with a BC layer)
|
698 |
+
* added a way to dynamically change the auto-escaping strategy according to the template "filename"
|
699 |
+
* changed the autoescape option to also accept a supported escaping strategy (for BC, true is equivalent to html)
|
700 |
+
* added an embed tag
|
701 |
+
|
702 |
+
# 1.7.0 (2012-04-24)
|
703 |
+
|
704 |
+
* fixed a PHP warning when using CIFS
|
705 |
+
* fixed template line number in some exceptions
|
706 |
+
* added an iterable test
|
707 |
+
* added an error when defining two blocks with the same name in a template
|
708 |
+
* added the preserves_safety option for filters
|
709 |
+
* fixed a PHP notice when trying to access a key on a non-object/array variable
|
710 |
+
* enhanced error reporting when the template file is an instance of SplFileInfo
|
711 |
+
* added Twig_Environment::mergeGlobals()
|
712 |
+
* added compilation checks to avoid misuses of the sandbox tag
|
713 |
+
* fixed filesystem loader freshness logic for high traffic websites
|
714 |
+
* fixed random function when charset is null
|
715 |
+
|
716 |
+
# 1.6.5 (2012-04-11)
|
717 |
+
|
718 |
+
* fixed a regression when a template only extends another one without defining any blocks
|
719 |
+
|
720 |
+
# 1.6.4 (2012-04-02)
|
721 |
+
|
722 |
+
* fixed PHP notice in Twig_Error::guessTemplateLine() introduced in 1.6.3
|
723 |
+
* fixed performance when compiling large files
|
724 |
+
* optimized parent template creation when the template does not use dynamic inheritance
|
725 |
+
|
726 |
+
# 1.6.3 (2012-03-22)
|
727 |
+
|
728 |
+
* fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension
|
729 |
+
* fixed compilation of numeric values used in templates when using a locale where the decimal separator is not a dot
|
730 |
+
* made the strategy used to guess the real template file name and line number in exception messages much faster and more accurate
|
731 |
+
|
732 |
+
# 1.6.2 (2012-03-18)
|
733 |
+
|
734 |
+
* fixed sandbox mode when used with inheritance
|
735 |
+
* added preserveKeys support for the slice filter
|
736 |
+
* fixed the date filter when a DateTime instance is passed with a specific timezone
|
737 |
+
* added a trim filter
|
738 |
+
|
739 |
+
# 1.6.1 (2012-02-29)
|
740 |
+
|
741 |
+
* fixed Twig C extension
|
742 |
+
* removed the creation of Twig_Markup instances when not needed
|
743 |
+
* added a way to set the default global timezone for dates
|
744 |
+
* fixed the slice filter on strings when the length is not specified
|
745 |
+
* fixed the creation of the cache directory in case of a race condition
|
746 |
+
|
747 |
+
# 1.6.0 (2012-02-04)
|
748 |
+
|
749 |
+
* fixed raw blocks when used with the whitespace trim option
|
750 |
+
* made a speed optimization to macro calls when imported via the "from" tag
|
751 |
+
* fixed globals, parsers, visitors, filters, tests, and functions management in Twig_Environment when a new one or new extension is added
|
752 |
+
* fixed the attribute function when passing arguments
|
753 |
+
* added slice notation support for the [] operator (syntactic sugar for the slice operator)
|
754 |
+
* added a slice filter
|
755 |
+
* added string support for the reverse filter
|
756 |
+
* fixed the empty test and the length filter for Twig_Markup instances
|
757 |
+
* added a date function to ease date comparison
|
758 |
+
* fixed unary operators precedence
|
759 |
+
* added recursive parsing support in the parser
|
760 |
+
* added string and integer handling for the random function
|
761 |
+
|
762 |
+
# 1.5.1 (2012-01-05)
|
763 |
+
|
764 |
+
* fixed a regression when parsing strings
|
765 |
+
|
766 |
+
# 1.5.0 (2012-01-04)
|
767 |
+
|
768 |
+
* added Traversable objects support for the join filter
|
769 |
+
|
770 |
+
# 1.5.0-RC2 (2011-12-30)
|
771 |
+
|
772 |
+
* added a way to set the default global date interval format
|
773 |
+
* fixed the date filter for DateInterval instances (setTimezone() does not exist for them)
|
774 |
+
* refactored Twig_Template::display() to ease its extension
|
775 |
+
* added a number_format filter
|
776 |
+
|
777 |
+
# 1.5.0-RC1 (2011-12-26)
|
778 |
+
|
779 |
+
* removed the need to quote hash keys
|
780 |
+
* allowed hash keys to be any expression
|
781 |
+
* added a do tag
|
782 |
+
* added a flush tag
|
783 |
+
* added support for dynamically named filters and functions
|
784 |
+
* added a dump function to help debugging templates
|
785 |
+
* added a nl2br filter
|
786 |
+
* added a random function
|
787 |
+
* added a way to change the default format for the date filter
|
788 |
+
* fixed the lexer when an operator ending with a letter ends a line
|
789 |
+
* added string interpolation support
|
790 |
+
* enhanced exceptions for unknown filters, functions, tests, and tags
|
791 |
+
|
792 |
+
# 1.4.0 (2011-12-07)
|
793 |
+
|
794 |
+
* fixed lexer when using big numbers (> PHP_INT_MAX)
|
795 |
+
* added missing preserveKeys argument to the reverse filter
|
796 |
+
* fixed macros containing filter tag calls
|
797 |
+
|
798 |
+
# 1.4.0-RC2 (2011-11-27)
|
799 |
+
|
800 |
+
* removed usage of Reflection in Twig_Template::getAttribute()
|
801 |
+
* added a C extension that can optionally replace Twig_Template::getAttribute()
|
802 |
+
* added negative timestamp support to the date filter
|
803 |
+
|
804 |
+
# 1.4.0-RC1 (2011-11-20)
|
805 |
+
|
806 |
+
* optimized variable access when using PHP 5.4
|
807 |
+
* changed the precedence of the .. operator to be more consistent with languages that implements such a feature like Ruby
|
808 |
+
* added an Exception to Twig_Loader_Array::isFresh() method when the template does not exist to be consistent with other loaders
|
809 |
+
* added Twig_Function_Node to allow more complex functions to have their own Node class
|
810 |
+
* added Twig_Filter_Node to allow more complex filters to have their own Node class
|
811 |
+
* added Twig_Test_Node to allow more complex tests to have their own Node class
|
812 |
+
* added a better error message when a template is empty but contain a BOM
|
813 |
+
* fixed "in" operator for empty strings
|
814 |
+
* fixed the "defined" test and the "default" filter (now works with more than one call (foo.bar.foo) and for both values of the strict_variables option)
|
815 |
+
* changed the way extensions are loaded (addFilter/addFunction/addGlobal/addTest/addNodeVisitor/addTokenParser/addExtension can now be called in any order)
|
816 |
+
* added Twig_Environment::display()
|
817 |
+
* made the escape filter smarter when the encoding is not supported by PHP
|
818 |
+
* added a convert_encoding filter
|
819 |
+
* moved all node manipulations outside the compile() Node method
|
820 |
+
* made several speed optimizations
|
821 |
+
|
822 |
+
# 1.3.0 (2011-10-08)
|
823 |
+
|
824 |
+
no changes
|
825 |
|
826 |
+
# 1.3.0-RC1 (2011-10-04)
|
827 |
+
|
828 |
+
* added an optimization for the parent() function
|
829 |
+
* added cache reloading when auto_reload is true and an extension has been modified
|
830 |
+
* added the possibility to force the escaping of a string already marked as safe (instance of Twig_Markup)
|
831 |
+
* allowed empty templates to be used as traits
|
832 |
+
* added traits support for the "parent" function
|
833 |
+
|
834 |
+
# 1.2.0 (2011-09-13)
|
835 |
+
|
836 |
+
no changes
|
837 |
+
|
838 |
+
# 1.2.0-RC1 (2011-09-10)
|
839 |
+
|
840 |
+
* enhanced the exception when a tag remains unclosed
|
841 |
+
* added support for empty Countable objects for the "empty" test
|
842 |
+
* fixed algorithm that determines if a template using inheritance is valid (no output between block definitions)
|
843 |
+
* added better support for encoding problems when escaping a string (available as of PHP 5.4)
|
844 |
+
* added a way to ignore a missing template when using the "include" tag ({% include "foo" ignore missing %})
|
845 |
+
* added support for an array of templates to the "include" and "extends" tags ({% include ['foo', 'bar'] %})
|
846 |
+
* added support for bitwise operators in expressions
|
847 |
+
* added the "attribute" function to allow getting dynamic attributes on variables
|
848 |
+
* added Twig_Loader_Chain
|
849 |
+
* added Twig_Loader_Array::setTemplate()
|
850 |
+
* added an optimization for the set tag when used to capture a large chunk of static text
|
851 |
+
* changed name regex to match PHP one "[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" (works for blocks, tags, functions, filters, and macros)
|
852 |
+
* removed the possibility to use the "extends" tag from a block
|
853 |
+
* added "if" modifier support to "for" loops
|
854 |
+
|
855 |
+
# 1.1.2 (2011-07-30)
|
856 |
+
|
857 |
+
* fixed json_encode filter on PHP 5.2
|
858 |
+
* fixed regression introduced in 1.1.1 ({{ block(foo|lower) }})
|
859 |
+
* fixed inheritance when using conditional parents
|
860 |
+
* fixed compilation of templates when the body of a child template is not empty
|
861 |
+
* fixed output when a macro throws an exception
|
862 |
+
* fixed a parsing problem when a large chunk of text is enclosed in a comment tag
|
863 |
+
* added PHPDoc for all Token parsers and Core extension functions
|
864 |
+
|
865 |
+
# 1.1.1 (2011-07-17)
|
866 |
+
|
867 |
+
* added a performance optimization in the Optimizer (also helps to lower the number of nested level calls)
|
868 |
+
* made some performance improvement for some edge cases
|
869 |
+
|
870 |
+
# 1.1.0 (2011-06-28)
|
871 |
+
|
872 |
+
* fixed json_encode filter
|
873 |
+
|
874 |
+
# 1.1.0-RC3 (2011-06-24)
|
875 |
+
|
876 |
+
* fixed method case-sensitivity when using the sandbox mode
|
877 |
+
* added timezone support for the date filter
|
878 |
+
* fixed possible security problems with NUL bytes
|
879 |
+
|
880 |
+
# 1.1.0-RC2 (2011-06-16)
|
881 |
+
|
882 |
+
* added an exception when the template passed to "use" is not a string
|
883 |
+
* made 'a.b is defined' not throw an exception if a is not defined (in strict mode)
|
884 |
+
* added {% line \d+ %} directive
|
885 |
+
|
886 |
+
# 1.1.0-RC1 (2011-05-28)
|
887 |
+
|
888 |
+
Flush your cache after upgrading.
|
889 |
+
|
890 |
+
* fixed date filter when using a timestamp
|
891 |
+
* fixed the defined test for some cases
|
892 |
+
* fixed a parsing problem when a large chunk of text is enclosed in a raw tag
|
893 |
+
* added support for horizontal reuse of template blocks (see docs for more information)
|
894 |
+
* added whitespace control modifier to all tags (see docs for more information)
|
895 |
+
* added null as an alias for none (the null test is also an alias for the none test now)
|
896 |
+
* made TRUE, FALSE, NONE equivalent to their lowercase counterparts
|
897 |
+
* wrapped all compilation and runtime exceptions with Twig_Error_Runtime and added logic to guess the template name and line
|
898 |
+
* moved display() method to Twig_Template (generated templates should now use doDisplay() instead)
|
899 |
+
|
900 |
+
# 1.0.0 (2011-03-27)
|
901 |
+
|
902 |
+
* fixed output when using mbstring
|
903 |
+
* fixed duplicate call of methods when using the sandbox
|
904 |
+
* made the charset configurable for the escape filter
|
905 |
+
|
906 |
+
# 1.0.0-RC2 (2011-02-21)
|
907 |
+
|
908 |
+
* changed the way {% set %} works when capturing (the content is now marked as safe)
|
909 |
+
* added support for macro name in the endmacro tag
|
910 |
+
* make Twig_Error compatible with PHP 5.3.0 >
|
911 |
+
* fixed an infinite loop on some Windows configurations
|
912 |
+
* fixed the "length" filter for numbers
|
913 |
+
* fixed Template::getAttribute() as properties in PHP are case sensitive
|
914 |
+
* removed coupling between Twig_Node and Twig_Template
|
915 |
+
* fixed the ternary operator precedence rule
|
916 |
+
|
917 |
+
# 1.0.0-RC1 (2011-01-09)
|
918 |
+
|
919 |
+
Backward incompatibilities:
|
920 |
+
|
921 |
+
* the "items" filter, which has been deprecated for quite a long time now, has been removed
|
922 |
+
* the "range" filter has been converted to a function: 0|range(10) -> range(0, 10)
|
923 |
+
* the "constant" filter has been converted to a function: {{ some_date|date('DATE_W3C'|constant) }} -> {{ some_date|date(constant('DATE_W3C')) }}
|
924 |
+
* the "cycle" filter has been converted to a function: {{ ['odd', 'even']|cycle(i) }} -> {{ cycle(['odd', 'even'], i) }}
|
925 |
+
* the "for" tag does not support "joined by" anymore
|
926 |
+
* the "autoescape" first argument is now "true"/"false" (instead of "on"/"off")
|
927 |
+
* the "parent" tag has been replaced by a "parent" function ({{ parent() }} instead of {% parent %})
|
928 |
+
* the "display" tag has been replaced by a "block" function ({{ block('title') }} instead of {% display title %})
|
929 |
+
* removed the grammar and simple token parser (moved to the Twig Extensions repository)
|
930 |
+
|
931 |
+
Changes:
|
932 |
+
|
933 |
+
* added "needs_context" option for filters and functions (the context is then passed as a first argument)
|
934 |
+
* added global variables support
|
935 |
+
* made macros return their value instead of echoing directly (fixes calling a macro in sandbox mode)
|
936 |
+
* added the "from" tag to import macros as functions
|
937 |
+
* added support for functions (a function is just syntactic sugar for a getAttribute() call)
|
938 |
+
* made macros callable when sandbox mode is enabled
|
939 |
+
* added an exception when a macro uses a reserved name
|
940 |
+
* the "default" filter now uses the "empty" test instead of just checking for null
|
941 |
+
* added the "empty" test
|
942 |
+
|
943 |
+
# 0.9.10 (2010-12-16)
|
944 |
+
|
945 |
+
Backward incompatibilities:
|
946 |
+
|
947 |
+
* The Escaper extension is enabled by default, which means that all displayed
|
948 |
+
variables are now automatically escaped. You can revert to the previous
|
949 |
+
behavior by removing the extension via $env->removeExtension('escaper')
|
950 |
+
or just set the 'autoescape' option to 'false'.
|
951 |
+
* removed the "without loop" attribute for the "for" tag (not needed anymore
|
952 |
+
as the Optimizer take care of that for most cases)
|
953 |
+
* arrays and hashes have now a different syntax
|
954 |
+
* arrays keep the same syntax with square brackets: [1, 2]
|
955 |
+
* hashes now use curly braces (["a": "b"] should now be written as {"a": "b"})
|
956 |
+
* support for "arrays with keys" and "hashes without keys" is not supported anymore ([1, "foo": "bar"] or {"foo": "bar", 1})
|
957 |
+
* the i18n extension is now part of the Twig Extensions repository
|
958 |
+
|
959 |
+
Changes:
|
960 |
+
|
961 |
+
* added the merge filter
|
962 |
+
* removed 'is_escaper' option for filters (a left over from the previous version) -- you must use 'is_safe' now instead
|
963 |
+
* fixed usage of operators as method names (like is, in, and not)
|
964 |
+
* changed the order of execution for node visitors
|
965 |
+
* fixed default() filter behavior when used with strict_variables set to on
|
966 |
+
* fixed filesystem loader compatibility with PHAR files
|
967 |
+
* enhanced error messages when an unexpected token is parsed in an expression
|
968 |
+
* fixed filename not being added to syntax error messages
|
969 |
+
* added the autoescape option to enable/disable autoescaping
|
970 |
+
* removed the newline after a comment (mimics PHP behavior)
|
971 |
+
* added a syntax error exception when parent block is used on a template that does not extend another one
|
972 |
+
* made the Escaper extension enabled by default
|
973 |
+
* fixed sandbox extension when used with auto output escaping
|
974 |
+
* fixed escaper when wrapping a Twig_Node_Print (the original class must be preserved)
|
975 |
+
* added an Optimizer extension (enabled by default; optimizes "for" loops and "raw" filters)
|
976 |
+
* added priority to node visitors
|
977 |
+
|
978 |
+
# 0.9.9 (2010-11-28)
|
979 |
+
|
980 |
+
Backward incompatibilities:
|
981 |
+
* the self special variable has been renamed to _self
|
982 |
+
* the odd and even filters are now tests:
|
983 |
+
{{ foo|odd }} must now be written {{ foo is odd }}
|
984 |
+
* the "safe" filter has been renamed to "raw"
|
985 |
+
* in Node classes,
|
986 |
+
sub-nodes are now accessed via getNode() (instead of property access)
|
987 |
+
attributes via getAttribute() (instead of array access)
|
988 |
+
* the urlencode filter had been renamed to url_encode
|
989 |
+
* the include tag now merges the passed variables with the current context by default
|
990 |
+
(the old behavior is still possible by adding the "only" keyword)
|
991 |
+
* moved Exceptions to Twig_Error_* (Twig_SyntaxError/Twig_RuntimeError are now Twig_Error_Syntax/Twig_Error_Runtime)
|
992 |
+
* removed support for {{ 1 < i < 3 }} (use {{ i > 1 and i < 3 }} instead)
|
993 |
+
* the "in" filter has been removed ({{ a|in(b) }} should now be written {{ a in b }})
|
994 |
+
|
995 |
+
Changes:
|
996 |
+
* added file and line to Twig_Error_Runtime exceptions thrown from Twig_Template
|
997 |
+
* changed trans tag to accept any variable for the plural count
|
998 |
+
* fixed sandbox mode (__toString() method check was not enforced if called implicitly from complex statements)
|
999 |
+
* added the ** (power) operator
|
1000 |
+
* changed the algorithm used for parsing expressions
|
1001 |
+
* added the spaceless tag
|
1002 |
+
* removed trim_blocks option
|
1003 |
+
* added support for is*() methods for attributes (foo.bar now looks for foo->getBar() or foo->isBar())
|
1004 |
+
* changed all exceptions to extend Twig_Error
|
1005 |
+
* fixed unary expressions ({{ not(1 or 0) }})
|
1006 |
+
* fixed child templates (with an extend tag) that uses one or more imports
|
1007 |
+
* added support for {{ 1 not in [2, 3] }} (more readable than the current {{ not (1 in [2, 3]) }})
|
1008 |
+
* escaping has been rewritten
|
1009 |
+
* the implementation of template inheritance has been rewritten
|
1010 |
+
(blocks can now be called individually and still work with inheritance)
|
1011 |
+
* fixed error handling for if tag when a syntax error occurs within a subparse process
|
1012 |
+
* added a way to implement custom logic for resolving token parsers given a tag name
|
1013 |
+
* fixed js escaper to be stricter (now uses a whilelist-based js escaper)
|
1014 |
+
* added the following filers: "constant", "trans", "replace", "json_encode"
|
1015 |
+
* added a "constant" test
|
1016 |
+
* fixed objects with __toString() not being autoescaped
|
1017 |
+
* fixed subscript expressions when calling __call() (methods now keep the case)
|
1018 |
+
* added "test" feature (accessible via the "is" operator)
|
1019 |
+
* removed the debug tag (should be done in an extension)
|
1020 |
+
* fixed trans tag when no vars are used in plural form
|
1021 |
+
* fixed race condition when writing template cache
|
1022 |
+
* added the special _charset variable to reference the current charset
|
1023 |
+
* added the special _context variable to reference the current context
|
1024 |
+
* renamed self to _self (to avoid conflict)
|
1025 |
+
* fixed Twig_Template::getAttribute() for protected properties
|
1026 |
+
|
1027 |
+
# 0.9.8 (2010-06-28)
|
1028 |
+
|
1029 |
+
Backward incompatibilities:
|
1030 |
+
* the trans tag plural count is now attached to the plural tag:
|
1031 |
+
old: `{% trans count %}...{% plural %}...{% endtrans %}`
|
1032 |
+
new: `{% trans %}...{% plural count %}...{% endtrans %}`
|
1033 |
+
|
1034 |
+
* added a way to translate strings coming from a variable ({% trans var %})
|
1035 |
+
* fixed trans tag when used with the Escaper extension
|
1036 |
+
* fixed default cache umask
|
1037 |
+
* removed Twig_Template instances from the debug tag output
|
1038 |
+
* fixed objects with __isset() defined
|
1039 |
+
* fixed set tag when used with a capture
|
1040 |
+
* fixed type hinting for Twig_Environment::addFilter() method
|
1041 |
+
|
1042 |
+
# 0.9.7 (2010-06-12)
|
1043 |
+
|
1044 |
+
Backward incompatibilities:
|
1045 |
+
* changed 'as' to '=' for the set tag ({% set title as "Title" %} must now be {% set title = "Title" %})
|
1046 |
+
* removed the sandboxed attribute of the include tag (use the new sandbox tag instead)
|
1047 |
+
* refactored the Node system (if you have custom nodes, you will have to update them to use the new API)
|
1048 |
+
|
1049 |
+
* added self as a special variable that refers to the current template (useful for importing macros from the current template)
|
1050 |
+
* added Twig_Template instance support to the include tag
|
1051 |
+
* added support for dynamic and conditional inheritance ({% extends some_var %} and {% extends standalone ? "minimum" : "base" %})
|
1052 |
+
* added a grammar sub-framework to ease the creation of custom tags
|
1053 |
+
* fixed the for tag for large arrays (some loop variables are now only available for arrays and objects that implement the Countable interface)
|
1054 |
+
* removed the Twig_Resource::resolveMissingFilter() method
|
1055 |
+
* fixed the filter tag which did not apply filtering to included files
|
1056 |
+
* added a bunch of unit tests
|
1057 |
+
* added a bunch of phpdoc
|
1058 |
+
* added a sandbox tag in the sandbox extension
|
1059 |
+
* changed the date filter to support any date format supported by DateTime
|
1060 |
+
* added strict_variable setting to throw an exception when an invalid variable is used in a template (disabled by default)
|
1061 |
+
* added the lexer, parser, and compiler as arguments to the Twig_Environment constructor
|
1062 |
+
* changed the cache option to only accepts an explicit path to a cache directory or false
|
1063 |
+
* added a way to add token parsers, filters, and visitors without creating an extension
|
1064 |
+
* added three interfaces: Twig_NodeInterface, Twig_TokenParserInterface, and Twig_FilterInterface
|
1065 |
+
* changed the generated code to match the new coding standards
|
1066 |
+
* fixed sandbox mode (__toString() method check was not enforced if called implicitly from a simple statement like {{ article }})
|
1067 |
+
* added an exception when a child template has a non-empty body (as it is always ignored when rendering)
|
1068 |
+
|
1069 |
+
# 0.9.6 (2010-05-12)
|
1070 |
+
|
1071 |
+
* fixed variables defined outside a loop and for which the value changes in a for loop
|
1072 |
+
* fixed the test suite for PHP 5.2 and older versions of PHPUnit
|
1073 |
+
* added support for __call() in expression resolution
|
1074 |
+
* fixed node visiting for macros (macros are now visited by visitors as any other node)
|
1075 |
+
* fixed nested block definitions with a parent call (rarely useful but nonetheless supported now)
|
1076 |
+
* added the cycle filter
|
1077 |
+
* fixed the Lexer when mbstring.func_overload is used with an mbstring.internal_encoding different from ASCII
|
1078 |
+
* added a long-syntax for the set tag ({% set foo %}...{% endset %})
|
1079 |
+
* unit tests are now powered by PHPUnit
|
1080 |
+
* added support for gettext via the `i18n` extension
|
1081 |
+
* fixed twig_capitalize_string_filter() and fixed twig_length_filter() when used with UTF-8 values
|
1082 |
+
* added a more useful exception if an if tag is not closed properly
|
1083 |
+
* added support for escaping strategy in the autoescape tag
|
1084 |
+
* fixed lexer when a template has a big chunk of text between/in a block
|
1085 |
+
|
1086 |
+
# 0.9.5 (2010-01-20)
|
1087 |
+
|
1088 |
+
As for any new release, don't forget to remove all cached templates after
|
1089 |
+
upgrading.
|
1090 |
+
|
1091 |
+
If you have defined custom filters, you MUST upgrade them for this release. To
|
1092 |
+
upgrade, replace "array" with "new Twig_Filter_Function", and replace the
|
1093 |
+
environment constant by the "needs_environment" option:
|
1094 |
+
|
1095 |
+
// before
|
1096 |
+
'even' => array('twig_is_even_filter', false),
|
1097 |
+
'escape' => array('twig_escape_filter', true),
|
1098 |
+
|
1099 |
+
// after
|
1100 |
+
'even' => new Twig_Filter_Function('twig_is_even_filter'),
|
1101 |
+
'escape' => new Twig_Filter_Function('twig_escape_filter', array('needs_environment' => true)),
|
1102 |
+
|
1103 |
+
If you have created NodeTransformer classes, you will need to upgrade them to
|
1104 |
+
the new interface (please note that the interface is not yet considered
|
1105 |
+
stable).
|
1106 |
+
|
1107 |
+
* fixed list nodes that did not extend the Twig_NodeListInterface
|
1108 |
+
* added the "without loop" option to the for tag (it disables the generation of the loop variable)
|
1109 |
+
* refactored node transformers to node visitors
|
1110 |
+
* fixed automatic-escaping for blocks
|
1111 |
+
* added a way to specify variables to pass to an included template
|
1112 |
+
* changed the automatic-escaping rules to be more sensible and more configurable in custom filters (the documentation lists all the rules)
|
1113 |
+
* improved the filter system to allow object methods to be used as filters
|
1114 |
+
* changed the Array and String loaders to actually make use of the cache mechanism
|
1115 |
+
* included the default filter function definitions in the extension class files directly (Core, Escaper)
|
1116 |
+
* added the // operator (like the floor() PHP function)
|
1117 |
+
* added the .. operator (as a syntactic sugar for the range filter when the step is 1)
|
1118 |
+
* added the in operator (as a syntactic sugar for the in filter)
|
1119 |
+
* added the following filters in the Core extension: in, range
|
1120 |
+
* added support for arrays (same behavior as in PHP, a mix between lists and dictionaries, arrays and hashes)
|
1121 |
+
* enhanced some error messages to provide better feedback in case of parsing errors
|
1122 |
+
|
1123 |
+
# 0.9.4 (2009-12-02)
|
1124 |
+
|
1125 |
+
If you have custom loaders, you MUST upgrade them for this release: The
|
1126 |
+
Twig_Loader base class has been removed, and the Twig_LoaderInterface has also
|
1127 |
+
been changed (see the source code for more information or the documentation).
|
1128 |
+
|
1129 |
+
* added support for DateTime instances for the date filter
|
1130 |
+
* fixed loop.last when the array only has one item
|
1131 |
+
* made it possible to insert newlines in tag and variable blocks
|
1132 |
+
* fixed a bug when a literal '\n' were present in a template text
|
1133 |
+
* fixed bug when the filename of a template contains */
|
1134 |
+
* refactored loaders
|
1135 |
+
|
1136 |
+
# 0.9.3 (2009-11-11)
|
1137 |
+
|
1138 |
+
This release is NOT backward compatible with the previous releases.
|
1139 |
+
|
1140 |
+
The loaders do not take the cache and autoReload arguments anymore. Instead,
|
1141 |
+
the Twig_Environment class has two new options: cache and auto_reload.
|
1142 |
+
Upgrading your code means changing this kind of code:
|
1143 |
+
|
1144 |
+
$loader = new Twig_Loader_Filesystem('/path/to/templates', '/path/to/compilation_cache', true);
|
1145 |
+
$twig = new Twig_Environment($loader);
|
1146 |
+
|
1147 |
+
to something like this:
|
1148 |
+
|
1149 |
+
$loader = new Twig_Loader_Filesystem('/path/to/templates');
|
1150 |
+
$twig = new Twig_Environment($loader, array(
|
1151 |
+
'cache' => '/path/to/compilation_cache',
|
1152 |
+
'auto_reload' => true,
|
1153 |
+
));
|
1154 |
+
|
1155 |
+
* deprecated the "items" filter as it is not needed anymore
|
1156 |
+
* made cache and auto_reload options of Twig_Environment instead of arguments of Twig_Loader
|
1157 |
+
* optimized template loading speed
|
1158 |
+
* removed output when an error occurs in a template and render() is used
|
1159 |
+
* made major speed improvements for loops (up to 300% on even the smallest loops)
|
1160 |
+
* added properties as part of the sandbox mode
|
1161 |
+
* added public properties support (obj.item can now be the item property on the obj object)
|
1162 |
+
* extended set tag to support expression as value ({% set foo as 'foo' ~ 'bar' %} )
|
1163 |
+
* fixed bug when \ was used in HTML
|
1164 |
+
|
1165 |
+
# 0.9.2 (2009-10-29)
|
1166 |
+
|
1167 |
+
* made some speed optimizations
|
1168 |
+
* changed the cache extension to .php
|
1169 |
+
* added a js escaping strategy
|
1170 |
+
* added support for short block tag
|
1171 |
+
* changed the filter tag to allow chained filters
|
1172 |
+
* made lexer more flexible as you can now change the default delimiters
|
1173 |
+
* added set tag
|
1174 |
+
* changed default directory permission when cache dir does not exist (more secure)
|
1175 |
+
* added macro support
|
1176 |
+
* changed filters first optional argument to be a Twig_Environment instance instead of a Twig_Template instance
|
1177 |
+
* made Twig_Autoloader::autoload() a static method
|
1178 |
+
* avoid writing template file if an error occurs
|
1179 |
+
* added $ escaping when outputting raw strings
|
1180 |
+
* enhanced some error messages to ease debugging
|
1181 |
+
* fixed empty cache files when the template contains an error
|
1182 |
+
|
1183 |
+
# 0.9.1 (2009-10-14)
|
1184 |
+
|
1185 |
+
* fixed a bug in PHP 5.2.6
|
1186 |
+
* fixed numbers with one than one decimal
|
1187 |
+
* added support for method calls with arguments ({{ foo.bar('a', 43) }})
|
1188 |
+
* made small speed optimizations
|
1189 |
+
* made minor tweaks to allow better extensibility and flexibility
|
1190 |
+
|
1191 |
+
# 0.9.0 (2009-10-12)
|
1192 |
+
|
1193 |
+
* Initial release
|
vendor/twig/twig/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Copyright (c) 2009-
|
2 |
|
3 |
All rights reserved.
|
4 |
|
1 |
+
Copyright (c) 2009-2021 by the Twig Team.
|
2 |
|
3 |
All rights reserved.
|
4 |
|
vendor/twig/twig/README.rst
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
Twig, the flexible, fast, and secure template language for PHP
|
2 |
==============================================================
|
3 |
|
4 |
-
Twig is a template language for PHP
|
|
|
5 |
|
6 |
Twig uses a syntax similar to the Django and Jinja template languages which
|
7 |
inspired the Twig runtime environment.
|
8 |
|
|
|
|
|
|
|
9 |
Sponsors
|
10 |
--------
|
11 |
|
1 |
Twig, the flexible, fast, and secure template language for PHP
|
2 |
==============================================================
|
3 |
|
4 |
+
Twig is a template language for PHP, released under the new BSD license (code
|
5 |
+
and documentation).
|
6 |
|
7 |
Twig uses a syntax similar to the Django and Jinja template languages which
|
8 |
inspired the Twig runtime environment.
|
9 |
|
10 |
+
**Twig version 1 is not maintained anymore.**
|
11 |
+
Please, upgrade at your earliest convenience.
|
12 |
+
|
13 |
Sponsors
|
14 |
--------
|
15 |
|
vendor/twig/twig/composer.json
CHANGED
@@ -24,13 +24,11 @@
|
|
24 |
}
|
25 |
],
|
26 |
"require": {
|
27 |
-
"php": ">=7.
|
28 |
-
"symfony/polyfill-
|
29 |
-
"symfony/polyfill-ctype": "^1.8",
|
30 |
-
"symfony/polyfill-php72": "^1.8"
|
31 |
},
|
32 |
"require-dev": {
|
33 |
-
"symfony/phpunit-bridge": "^4.4.9|^5.0.9
|
34 |
"psr/container": "^1.0"
|
35 |
},
|
36 |
"autoload": {
|
@@ -43,12 +41,12 @@
|
|
43 |
},
|
44 |
"autoload-dev": {
|
45 |
"psr-4" : {
|
46 |
-
"Twig\\Tests\\" : "tests
|
47 |
}
|
48 |
},
|
49 |
"extra": {
|
50 |
"branch-alias": {
|
51 |
-
"dev-master": "
|
52 |
}
|
53 |
}
|
54 |
}
|
24 |
}
|
25 |
],
|
26 |
"require": {
|
27 |
+
"php": ">=7.2.5",
|
28 |
+
"symfony/polyfill-ctype": "^1.8"
|
|
|
|
|
29 |
},
|
30 |
"require-dev": {
|
31 |
+
"symfony/phpunit-bridge": "^4.4.9|^5.0.9",
|
32 |
"psr/container": "^1.0"
|
33 |
},
|
34 |
"autoload": {
|
41 |
},
|
42 |
"autoload-dev": {
|
43 |
"psr-4" : {
|
44 |
+
"Twig\\Tests\\" : "tests"
|
45 |
}
|
46 |
},
|
47 |
"extra": {
|
48 |
"branch-alias": {
|
49 |
+
"dev-master": "1.44-dev"
|
50 |
}
|
51 |
}
|
52 |
}
|
vendor/twig/twig/lib/Twig/Autoloader.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
@trigger_error('The Twig_Autoloader class is deprecated since version 1.21 and will be removed in 2.0. Use Composer instead.', \E_USER_DEPRECATED);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Autoloads Twig classes.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.21 and will be removed in 2.0. Use Composer instead. 2.0.
|
20 |
+
*/
|
21 |
+
class Twig_Autoloader
|
22 |
+
{
|
23 |
+
/**
|
24 |
+
* Registers Twig_Autoloader as an SPL autoloader.
|
25 |
+
*
|
26 |
+
* @param bool $prepend whether to prepend the autoloader or not
|
27 |
+
*/
|
28 |
+
public static function register($prepend = false)
|
29 |
+
{
|
30 |
+
@trigger_error('Using Twig_Autoloader is deprecated since version 1.21. Use Composer instead.', \E_USER_DEPRECATED);
|
31 |
+
|
32 |
+
spl_autoload_register([__CLASS__, 'autoload'], true, $prepend);
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Handles autoloading of classes.
|
37 |
+
*
|
38 |
+
* @param string $class a class name
|
39 |
+
*/
|
40 |
+
public static function autoload($class)
|
41 |
+
{
|
42 |
+
if (0 !== strpos($class, 'Twig')) {
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
if (is_file($file = __DIR__.'/../'.str_replace(['_', "\0"], ['/', ''], $class).'.php')) {
|
47 |
+
require $file;
|
48 |
+
} elseif (is_file($file = __DIR__.'/../../src/'.str_replace(['Twig\\', '\\', "\0"], ['', '/', ''], $class).'.php')) {
|
49 |
+
require $file;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
vendor/twig/twig/lib/Twig/BaseNodeVisitor.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\NodeVisitor\AbstractNodeVisitor;
|
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\AbstractNodeVisitor');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\NodeVisitor\AbstractNodeVisitor" instead */
|
11 |
class Twig_BaseNodeVisitor extends AbstractNodeVisitor
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\AbstractNodeVisitor');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_BaseNodeVisitor extends AbstractNodeVisitor
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Cache/Filesystem.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Cache\FilesystemCache;
|
|
4 |
|
5 |
class_exists('Twig\Cache\FilesystemCache');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Cache\FilesystemCache" instead */
|
11 |
class Twig_Cache_Filesystem extends FilesystemCache
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Cache\FilesystemCache');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Cache_Filesystem extends FilesystemCache
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Cache/Null.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Cache\NullCache;
|
|
4 |
|
5 |
class_exists('Twig\Cache\NullCache');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Cache\NullCache" instead */
|
11 |
class Twig_Cache_Null extends NullCache
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Cache\NullCache');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Cache_Null extends NullCache
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/CacheInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Cache\CacheInterface;
|
|
4 |
|
5 |
class_exists('Twig\Cache\CacheInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Cache\CacheInterface" instead */
|
11 |
class Twig_CacheInterface extends CacheInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Cache\CacheInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_CacheInterface extends CacheInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Compiler.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Compiler;
|
|
4 |
|
5 |
class_exists('Twig\Compiler');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Compiler" instead */
|
11 |
class Twig_Compiler extends Compiler
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Compiler');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Compiler extends Compiler
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/CompilerInterface.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Interface implemented by compiler classes.
|
14 |
+
*
|
15 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
18 |
+
*/
|
19 |
+
interface Twig_CompilerInterface
|
20 |
+
{
|
21 |
+
/**
|
22 |
+
* Compiles a node.
|
23 |
+
*
|
24 |
+
* @return $this
|
25 |
+
*/
|
26 |
+
public function compile(Twig_NodeInterface $node);
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Gets the current PHP code after compilation.
|
30 |
+
*
|
31 |
+
* @return string The PHP code
|
32 |
+
*/
|
33 |
+
public function getSource();
|
34 |
+
}
|
vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\RuntimeLoader\ContainerRuntimeLoader;
|
|
4 |
|
5 |
class_exists('Twig\RuntimeLoader\ContainerRuntimeLoader');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\RuntimeLoader\ContainerRuntimeLoader" instead */
|
11 |
class Twig_ContainerRuntimeLoader extends ContainerRuntimeLoader
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\RuntimeLoader\ContainerRuntimeLoader');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_ContainerRuntimeLoader extends ContainerRuntimeLoader
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Environment.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Environment;
|
|
4 |
|
5 |
class_exists('Twig\Environment');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Environment" instead */
|
11 |
class Twig_Environment extends Environment
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Environment');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Environment extends Environment
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Error.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Error\Error;
|
|
4 |
|
5 |
class_exists('Twig\Error\Error');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Error\Error" instead */
|
11 |
class Twig_Error extends Error
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Error\Error');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Error extends Error
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Error/Loader.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Error\LoaderError;
|
|
4 |
|
5 |
class_exists('Twig\Error\LoaderError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Error\LoaderError" instead */
|
11 |
class Twig_Error_Loader extends LoaderError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Error\LoaderError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Error_Loader extends LoaderError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Error/Runtime.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Error\RuntimeError;
|
|
4 |
|
5 |
class_exists('Twig\Error\RuntimeError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Error\RuntimeError" instead */
|
11 |
class Twig_Error_Runtime extends RuntimeError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Error\RuntimeError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Error_Runtime extends RuntimeError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Error/Syntax.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Error\SyntaxError;
|
|
4 |
|
5 |
class_exists('Twig\Error\SyntaxError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Error\SyntaxError" instead */
|
11 |
class Twig_Error_Syntax extends SyntaxError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Error\SyntaxError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Error_Syntax extends SyntaxError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Loader\ExistsLoaderInterface;
|
|
4 |
|
5 |
class_exists('Twig\Loader\ExistsLoaderInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Loader\ExistsLoaderInterface" instead */
|
11 |
class Twig_ExistsLoaderInterface extends ExistsLoaderInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Loader\ExistsLoaderInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_ExistsLoaderInterface extends ExistsLoaderInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/ExpressionParser.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\ExpressionParser;
|
|
4 |
|
5 |
class_exists('Twig\ExpressionParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\ExpressionParser" instead */
|
11 |
class Twig_ExpressionParser extends ExpressionParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\ExpressionParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_ExpressionParser extends ExpressionParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\AbstractExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\AbstractExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\AbstractExtension" instead */
|
11 |
class Twig_Extension extends AbstractExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\AbstractExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension extends AbstractExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/Core.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\CoreExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\CoreExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\CoreExtension" instead */
|
11 |
class Twig_Extension_Core extends CoreExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\CoreExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_Core extends CoreExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/Debug.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\DebugExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\DebugExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\DebugExtension" instead */
|
11 |
class Twig_Extension_Debug extends DebugExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\DebugExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_Debug extends DebugExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/Escaper.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\EscaperExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\EscaperExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\EscaperExtension" instead */
|
11 |
class Twig_Extension_Escaper extends EscaperExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\EscaperExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_Escaper extends EscaperExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\GlobalsInterface;
|
|
4 |
|
5 |
class_exists('Twig\Extension\GlobalsInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\GlobalsInterface" instead */
|
11 |
class Twig_Extension_GlobalsInterface extends GlobalsInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\GlobalsInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_GlobalsInterface extends GlobalsInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\InitRuntimeInterface;
|
|
4 |
|
5 |
class_exists('Twig\Extension\InitRuntimeInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\InitRuntimeInterface" instead */
|
11 |
class Twig_Extension_InitRuntimeInterface extends InitRuntimeInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\InitRuntimeInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_InitRuntimeInterface extends InitRuntimeInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/Optimizer.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\OptimizerExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\OptimizerExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\OptimizerExtension" instead */
|
11 |
class Twig_Extension_Optimizer extends OptimizerExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\OptimizerExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_Optimizer extends OptimizerExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/Profiler.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\ProfilerExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\ProfilerExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\ProfilerExtension" instead */
|
11 |
class Twig_Extension_Profiler extends ProfilerExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\ProfilerExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_Profiler extends ProfilerExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/Sandbox.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\SandboxExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\SandboxExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\SandboxExtension" instead */
|
11 |
class Twig_Extension_Sandbox extends SandboxExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\SandboxExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_Sandbox extends SandboxExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/Staging.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\StagingExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\StagingExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\StagingExtension" instead */
|
11 |
class Twig_Extension_Staging extends StagingExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\StagingExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_Staging extends StagingExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Extension/StringLoader.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\StringLoaderExtension;
|
|
4 |
|
5 |
class_exists('Twig\Extension\StringLoaderExtension');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\StringLoaderExtension" instead */
|
11 |
class Twig_Extension_StringLoader extends StringLoaderExtension
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\StringLoaderExtension');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Extension_StringLoader extends StringLoaderExtension
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/ExtensionInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Extension\ExtensionInterface;
|
|
4 |
|
5 |
class_exists('Twig\Extension\ExtensionInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Extension\ExtensionInterface" instead */
|
11 |
class Twig_ExtensionInterface extends ExtensionInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Extension\ExtensionInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_ExtensionInterface extends ExtensionInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/ExtensionSet.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use Twig\ExtensionSet;
|
4 |
-
|
5 |
-
class_exists('Twig\ExtensionSet');
|
6 |
-
|
7 |
-
@trigger_error('Using the "Twig_ExtensionSet" class is deprecated since Twig version 2.7, use "Twig\ExtensionSet" instead.', \E_USER_DEPRECATED);
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\ExtensionSet" instead */
|
11 |
-
class Twig_ExtensionSet extends ExtensionSet
|
12 |
-
{
|
13 |
-
}
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\RuntimeLoader\FactoryRuntimeLoader;
|
|
4 |
|
5 |
class_exists('Twig\RuntimeLoader\FactoryRuntimeLoader');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\RuntimeLoader\FactoryRuntimeLoader" instead */
|
11 |
class Twig_FactoryRuntimeLoader extends FactoryRuntimeLoader
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\RuntimeLoader\FactoryRuntimeLoader');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_FactoryRuntimeLoader extends FactoryRuntimeLoader
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\FileExtensionEscapingStrategy;
|
|
4 |
|
5 |
class_exists('Twig\FileExtensionEscapingStrategy');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\FileExtensionEscapingStrategy" instead */
|
11 |
class Twig_FileExtensionEscapingStrategy extends FileExtensionEscapingStrategy
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\FileExtensionEscapingStrategy');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_FileExtensionEscapingStrategy extends FileExtensionEscapingStrategy
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Filter.php
CHANGED
@@ -1,14 +1,86 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
6 |
|
7 |
-
@trigger_error('
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
{
|
|
|
13 |
}
|
14 |
}
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
|
12 |
+
use Twig\Node\Node;
|
13 |
|
14 |
+
@trigger_error('The Twig_Filter class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', \E_USER_DEPRECATED);
|
15 |
|
16 |
+
/**
|
17 |
+
* Represents a template filter.
|
18 |
+
*
|
19 |
+
* Use \Twig\TwigFilter instead.
|
20 |
+
*
|
21 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
+
*
|
23 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
24 |
+
*/
|
25 |
+
abstract class Twig_Filter implements Twig_FilterInterface, Twig_FilterCallableInterface
|
26 |
+
{
|
27 |
+
protected $options;
|
28 |
+
protected $arguments = [];
|
29 |
+
|
30 |
+
public function __construct(array $options = [])
|
31 |
+
{
|
32 |
+
$this->options = array_merge([
|
33 |
+
'needs_environment' => false,
|
34 |
+
'needs_context' => false,
|
35 |
+
'pre_escape' => null,
|
36 |
+
'preserves_safety' => null,
|
37 |
+
'callable' => null,
|
38 |
+
], $options);
|
39 |
+
}
|
40 |
+
|
41 |
+
public function setArguments($arguments)
|
42 |
+
{
|
43 |
+
$this->arguments = $arguments;
|
44 |
+
}
|
45 |
+
|
46 |
+
public function getArguments()
|
47 |
+
{
|
48 |
+
return $this->arguments;
|
49 |
+
}
|
50 |
+
|
51 |
+
public function needsEnvironment()
|
52 |
+
{
|
53 |
+
return $this->options['needs_environment'];
|
54 |
+
}
|
55 |
+
|
56 |
+
public function needsContext()
|
57 |
+
{
|
58 |
+
return $this->options['needs_context'];
|
59 |
+
}
|
60 |
+
|
61 |
+
public function getSafe(Node $filterArgs)
|
62 |
+
{
|
63 |
+
if (isset($this->options['is_safe'])) {
|
64 |
+
return $this->options['is_safe'];
|
65 |
+
}
|
66 |
+
|
67 |
+
if (isset($this->options['is_safe_callback'])) {
|
68 |
+
return \call_user_func($this->options['is_safe_callback'], $filterArgs);
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getPreservesSafety()
|
73 |
+
{
|
74 |
+
return $this->options['preserves_safety'];
|
75 |
+
}
|
76 |
+
|
77 |
+
public function getPreEscape()
|
78 |
+
{
|
79 |
+
return $this->options['pre_escape'];
|
80 |
+
}
|
81 |
+
|
82 |
+
public function getCallable()
|
83 |
{
|
84 |
+
return $this->options['callable'];
|
85 |
}
|
86 |
}
|
vendor/twig/twig/lib/Twig/Filter/Function.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
@trigger_error('The Twig_Filter_Function class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', \E_USER_DEPRECATED);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Represents a function template filter.
|
16 |
+
*
|
17 |
+
* Use \Twig\TwigFilter instead.
|
18 |
+
*
|
19 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
22 |
+
*/
|
23 |
+
class Twig_Filter_Function extends Twig_Filter
|
24 |
+
{
|
25 |
+
protected $function;
|
26 |
+
|
27 |
+
public function __construct($function, array $options = [])
|
28 |
+
{
|
29 |
+
$options['callable'] = $function;
|
30 |
+
|
31 |
+
parent::__construct($options);
|
32 |
+
|
33 |
+
$this->function = $function;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function compile()
|
37 |
+
{
|
38 |
+
return $this->function;
|
39 |
+
}
|
40 |
+
}
|
vendor/twig/twig/lib/Twig/Filter/Method.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Extension\ExtensionInterface;
|
13 |
+
|
14 |
+
@trigger_error('The Twig_Filter_Method class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', \E_USER_DEPRECATED);
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Represents a method template filter.
|
18 |
+
*
|
19 |
+
* Use \Twig\TwigFilter instead.
|
20 |
+
*
|
21 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
+
*
|
23 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
24 |
+
*/
|
25 |
+
class Twig_Filter_Method extends Twig_Filter
|
26 |
+
{
|
27 |
+
protected $extension;
|
28 |
+
protected $method;
|
29 |
+
|
30 |
+
public function __construct(ExtensionInterface $extension, $method, array $options = [])
|
31 |
+
{
|
32 |
+
$options['callable'] = [$extension, $method];
|
33 |
+
|
34 |
+
parent::__construct($options);
|
35 |
+
|
36 |
+
$this->extension = $extension;
|
37 |
+
$this->method = $method;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function compile()
|
41 |
+
{
|
42 |
+
return sprintf('$this->env->getExtension(\'%s\')->%s', \get_class($this->extension), $this->method);
|
43 |
+
}
|
44 |
+
}
|
vendor/twig/twig/lib/Twig/Filter/Node.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
@trigger_error('The Twig_Filter_Node class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', \E_USER_DEPRECATED);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Represents a template filter as a node.
|
16 |
+
*
|
17 |
+
* Use \Twig\TwigFilter instead.
|
18 |
+
*
|
19 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
22 |
+
*/
|
23 |
+
class Twig_Filter_Node extends Twig_Filter
|
24 |
+
{
|
25 |
+
protected $class;
|
26 |
+
|
27 |
+
public function __construct($class, array $options = [])
|
28 |
+
{
|
29 |
+
parent::__construct($options);
|
30 |
+
|
31 |
+
$this->class = $class;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getClass()
|
35 |
+
{
|
36 |
+
return $this->class;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function compile()
|
40 |
+
{
|
41 |
+
}
|
42 |
+
}
|
vendor/twig/twig/lib/Twig/FilterCallableInterface.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Represents a callable template filter.
|
14 |
+
*
|
15 |
+
* Use \Twig\TwigFilter instead.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
20 |
+
*/
|
21 |
+
interface Twig_FilterCallableInterface
|
22 |
+
{
|
23 |
+
public function getCallable();
|
24 |
+
}
|
vendor/twig/twig/lib/Twig/FilterInterface.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Node\Node;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Represents a template filter.
|
16 |
+
*
|
17 |
+
* Use \Twig\TwigFilter instead.
|
18 |
+
*
|
19 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
22 |
+
*/
|
23 |
+
interface Twig_FilterInterface
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Compiles a filter.
|
27 |
+
*
|
28 |
+
* @return string The PHP code for the filter
|
29 |
+
*/
|
30 |
+
public function compile();
|
31 |
+
|
32 |
+
public function needsEnvironment();
|
33 |
+
|
34 |
+
public function needsContext();
|
35 |
+
|
36 |
+
public function getSafe(Node $filterArgs);
|
37 |
+
|
38 |
+
public function getPreservesSafety();
|
39 |
+
|
40 |
+
public function getPreEscape();
|
41 |
+
|
42 |
+
public function setArguments($arguments);
|
43 |
+
|
44 |
+
public function getArguments();
|
45 |
+
}
|
vendor/twig/twig/lib/Twig/Function.php
CHANGED
@@ -1,14 +1,76 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
6 |
|
7 |
-
@trigger_error('
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
{
|
|
|
13 |
}
|
14 |
}
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
|
12 |
+
use Twig\Node\Node;
|
13 |
|
14 |
+
@trigger_error('The Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFunction instead.', \E_USER_DEPRECATED);
|
15 |
|
16 |
+
/**
|
17 |
+
* Represents a template function.
|
18 |
+
*
|
19 |
+
* Use \Twig\TwigFunction instead.
|
20 |
+
*
|
21 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
+
*
|
23 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
24 |
+
*/
|
25 |
+
abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCallableInterface
|
26 |
+
{
|
27 |
+
protected $options;
|
28 |
+
protected $arguments = [];
|
29 |
+
|
30 |
+
public function __construct(array $options = [])
|
31 |
+
{
|
32 |
+
$this->options = array_merge([
|
33 |
+
'needs_environment' => false,
|
34 |
+
'needs_context' => false,
|
35 |
+
'callable' => null,
|
36 |
+
], $options);
|
37 |
+
}
|
38 |
+
|
39 |
+
public function setArguments($arguments)
|
40 |
+
{
|
41 |
+
$this->arguments = $arguments;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getArguments()
|
45 |
+
{
|
46 |
+
return $this->arguments;
|
47 |
+
}
|
48 |
+
|
49 |
+
public function needsEnvironment()
|
50 |
+
{
|
51 |
+
return $this->options['needs_environment'];
|
52 |
+
}
|
53 |
+
|
54 |
+
public function needsContext()
|
55 |
+
{
|
56 |
+
return $this->options['needs_context'];
|
57 |
+
}
|
58 |
+
|
59 |
+
public function getSafe(Node $functionArgs)
|
60 |
+
{
|
61 |
+
if (isset($this->options['is_safe'])) {
|
62 |
+
return $this->options['is_safe'];
|
63 |
+
}
|
64 |
+
|
65 |
+
if (isset($this->options['is_safe_callback'])) {
|
66 |
+
return \call_user_func($this->options['is_safe_callback'], $functionArgs);
|
67 |
+
}
|
68 |
+
|
69 |
+
return [];
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getCallable()
|
73 |
{
|
74 |
+
return $this->options['callable'];
|
75 |
}
|
76 |
}
|
vendor/twig/twig/lib/Twig/Function/Function.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
* (c) Arnaud Le Blanc
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
@trigger_error('The Twig_Function_Function class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFunction instead.', \E_USER_DEPRECATED);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Represents a function template function.
|
17 |
+
*
|
18 |
+
* Use \Twig\TwigFunction instead.
|
19 |
+
*
|
20 |
+
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
|
21 |
+
*
|
22 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
23 |
+
*/
|
24 |
+
class Twig_Function_Function extends Twig_Function
|
25 |
+
{
|
26 |
+
protected $function;
|
27 |
+
|
28 |
+
public function __construct($function, array $options = [])
|
29 |
+
{
|
30 |
+
$options['callable'] = $function;
|
31 |
+
|
32 |
+
parent::__construct($options);
|
33 |
+
|
34 |
+
$this->function = $function;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function compile()
|
38 |
+
{
|
39 |
+
return $this->function;
|
40 |
+
}
|
41 |
+
}
|
vendor/twig/twig/lib/Twig/Function/Method.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
* (c) Arnaud Le Blanc
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
use Twig\Extension\ExtensionInterface;
|
14 |
+
|
15 |
+
@trigger_error('The Twig_Function_Method class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFunction instead.', \E_USER_DEPRECATED);
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Represents a method template function.
|
19 |
+
*
|
20 |
+
* Use \Twig\TwigFunction instead.
|
21 |
+
*
|
22 |
+
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
|
23 |
+
*
|
24 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
25 |
+
*/
|
26 |
+
class Twig_Function_Method extends Twig_Function
|
27 |
+
{
|
28 |
+
protected $extension;
|
29 |
+
protected $method;
|
30 |
+
|
31 |
+
public function __construct(ExtensionInterface $extension, $method, array $options = [])
|
32 |
+
{
|
33 |
+
$options['callable'] = [$extension, $method];
|
34 |
+
|
35 |
+
parent::__construct($options);
|
36 |
+
|
37 |
+
$this->extension = $extension;
|
38 |
+
$this->method = $method;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function compile()
|
42 |
+
{
|
43 |
+
return sprintf('$this->env->getExtension(\'%s\')->%s', \get_class($this->extension), $this->method);
|
44 |
+
}
|
45 |
+
}
|
vendor/twig/twig/lib/Twig/Function/Node.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
@trigger_error('The Twig_Function_Node class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFunction instead.', \E_USER_DEPRECATED);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Represents a template function as a node.
|
16 |
+
*
|
17 |
+
* Use \Twig\TwigFunction instead.
|
18 |
+
*
|
19 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
22 |
+
*/
|
23 |
+
class Twig_Function_Node extends Twig_Function
|
24 |
+
{
|
25 |
+
protected $class;
|
26 |
+
|
27 |
+
public function __construct($class, array $options = [])
|
28 |
+
{
|
29 |
+
parent::__construct($options);
|
30 |
+
|
31 |
+
$this->class = $class;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getClass()
|
35 |
+
{
|
36 |
+
return $this->class;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function compile()
|
40 |
+
{
|
41 |
+
}
|
42 |
+
}
|
vendor/twig/twig/lib/Twig/FunctionCallableInterface.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Represents a callable template function.
|
14 |
+
*
|
15 |
+
* Use \Twig\TwigFunction instead.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
20 |
+
*/
|
21 |
+
interface Twig_FunctionCallableInterface
|
22 |
+
{
|
23 |
+
public function getCallable();
|
24 |
+
}
|
vendor/twig/twig/lib/Twig/FunctionInterface.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
* (c) Arnaud Le Blanc
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
use Twig\Node\Node;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Represents a template function.
|
17 |
+
*
|
18 |
+
* Use \Twig\TwigFunction instead.
|
19 |
+
*
|
20 |
+
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
|
21 |
+
*
|
22 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
23 |
+
*/
|
24 |
+
interface Twig_FunctionInterface
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Compiles a function.
|
28 |
+
*
|
29 |
+
* @return string The PHP code for the function
|
30 |
+
*/
|
31 |
+
public function compile();
|
32 |
+
|
33 |
+
public function needsEnvironment();
|
34 |
+
|
35 |
+
public function needsContext();
|
36 |
+
|
37 |
+
public function getSafe(Node $filterArgs);
|
38 |
+
|
39 |
+
public function setArguments($arguments);
|
40 |
+
|
41 |
+
public function getArguments();
|
42 |
+
}
|
vendor/twig/twig/lib/Twig/Lexer.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Lexer;
|
|
4 |
|
5 |
class_exists('Twig\Lexer');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Lexer" instead */
|
11 |
class Twig_Lexer extends Lexer
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Lexer');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Lexer extends Lexer
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/LexerInterface.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Error\SyntaxError;
|
13 |
+
use Twig\Source;
|
14 |
+
use Twig\TokenStream;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Interface implemented by lexer classes.
|
18 |
+
*
|
19 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
22 |
+
*/
|
23 |
+
interface Twig_LexerInterface
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Tokenizes a source code.
|
27 |
+
*
|
28 |
+
* @param string|Source $code The source code
|
29 |
+
* @param string $name A unique identifier for the source code
|
30 |
+
*
|
31 |
+
* @return TokenStream
|
32 |
+
*
|
33 |
+
* @throws SyntaxError When the code is syntactically wrong
|
34 |
+
*/
|
35 |
+
public function tokenize($code, $name = null);
|
36 |
+
}
|
vendor/twig/twig/lib/Twig/Loader/Array.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Loader\ArrayLoader;
|
|
4 |
|
5 |
class_exists('Twig\Loader\ArrayLoader');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Loader\ArrayLoader" instead */
|
11 |
class Twig_Loader_Array extends ArrayLoader
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Loader\ArrayLoader');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Loader_Array extends ArrayLoader
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Loader/Chain.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Loader\ChainLoader;
|
|
4 |
|
5 |
class_exists('Twig\Loader\ChainLoader');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Loader\ChainLoader" instead */
|
11 |
class Twig_Loader_Chain extends ChainLoader
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Loader\ChainLoader');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Loader_Chain extends ChainLoader
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Loader/Filesystem.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Loader\FilesystemLoader;
|
|
4 |
|
5 |
class_exists('Twig\Loader\FilesystemLoader');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Loader\FilesystemLoader" instead */
|
11 |
class Twig_Loader_Filesystem extends FilesystemLoader
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Loader\FilesystemLoader');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Loader_Filesystem extends FilesystemLoader
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Loader/String.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Loader\ExistsLoaderInterface;
|
13 |
+
use Twig\Loader\LoaderInterface;
|
14 |
+
use Twig\Loader\SourceContextLoaderInterface;
|
15 |
+
use Twig\Source;
|
16 |
+
|
17 |
+
@trigger_error('The Twig_Loader_String class is deprecated since version 1.18.1 and will be removed in 2.0. Use "Twig\Loader\ArrayLoader" instead or "Twig\Environment::createTemplate()".', \E_USER_DEPRECATED);
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Loads a template from a string.
|
21 |
+
*
|
22 |
+
* This loader should NEVER be used. It only exists for Twig internal purposes.
|
23 |
+
*
|
24 |
+
* When using this loader with a cache mechanism, you should know that a new cache
|
25 |
+
* key is generated each time a template content "changes" (the cache key being the
|
26 |
+
* source code of the template). If you don't want to see your cache grows out of
|
27 |
+
* control, you need to take care of clearing the old cache file by yourself.
|
28 |
+
*
|
29 |
+
* @deprecated since 1.18.1 (to be removed in 2.0)
|
30 |
+
*
|
31 |
+
* @internal
|
32 |
+
*
|
33 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
34 |
+
*/
|
35 |
+
class Twig_Loader_String implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
|
36 |
+
{
|
37 |
+
public function getSource($name)
|
38 |
+
{
|
39 |
+
@trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', static::class), \E_USER_DEPRECATED);
|
40 |
+
|
41 |
+
return $name;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getSourceContext($name)
|
45 |
+
{
|
46 |
+
return new Source($name, $name);
|
47 |
+
}
|
48 |
+
|
49 |
+
public function exists($name)
|
50 |
+
{
|
51 |
+
return true;
|
52 |
+
}
|
53 |
+
|
54 |
+
public function getCacheKey($name)
|
55 |
+
{
|
56 |
+
return $name;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function isFresh($name, $time)
|
60 |
+
{
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
}
|
vendor/twig/twig/lib/Twig/LoaderInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Loader\LoaderInterface;
|
|
4 |
|
5 |
class_exists('Twig\Loader\LoaderInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Loader\LoaderInterface" instead */
|
11 |
class Twig_LoaderInterface extends LoaderInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Loader\LoaderInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_LoaderInterface extends LoaderInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Markup.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Markup;
|
|
4 |
|
5 |
class_exists('Twig\Markup');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Markup" instead */
|
11 |
class Twig_Markup extends Markup
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Markup');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Markup extends Markup
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Node;
|
|
4 |
|
5 |
class_exists('Twig\Node\Node');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Node" instead */
|
11 |
class Twig_Node extends Node
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Node');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node extends Node
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/AutoEscape.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\AutoEscapeNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\AutoEscapeNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\AutoEscapeNode" instead */
|
11 |
class Twig_Node_AutoEscape extends AutoEscapeNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\AutoEscapeNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_AutoEscape extends AutoEscapeNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Block.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\BlockNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\BlockNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\BlockNode" instead */
|
11 |
class Twig_Node_Block extends BlockNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\BlockNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Block extends BlockNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/BlockReference.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\BlockReferenceNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\BlockReferenceNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\BlockReferenceNode" instead */
|
11 |
class Twig_Node_BlockReference extends BlockReferenceNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\BlockReferenceNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_BlockReference extends BlockReferenceNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Body.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\BodyNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\BodyNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\BodyNode" instead */
|
11 |
class Twig_Node_Body extends BodyNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\BodyNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Body extends BodyNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/CheckSecurity.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\CheckSecurityNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\CheckSecurityNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\CheckSecurityNode" instead */
|
11 |
class Twig_Node_CheckSecurity extends CheckSecurityNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\CheckSecurityNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_CheckSecurity extends CheckSecurityNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Deprecated.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\DeprecatedNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\DeprecatedNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\DeprecatedNode" instead */
|
11 |
class Twig_Node_Deprecated extends DeprecatedNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\DeprecatedNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Deprecated extends DeprecatedNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Do.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\DoNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\DoNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\DoNode" instead */
|
11 |
class Twig_Node_Do extends DoNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\DoNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Do extends DoNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Embed.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\EmbedNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\EmbedNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\EmbedNode" instead */
|
11 |
class Twig_Node_Embed extends EmbedNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\EmbedNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Embed extends EmbedNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\AbstractExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\AbstractExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\AbstractExpression" instead */
|
11 |
class Twig_Node_Expression extends AbstractExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\AbstractExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression extends AbstractExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Array.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\ArrayExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ArrayExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\ArrayExpression" instead */
|
11 |
class Twig_Node_Expression_Array extends ArrayExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ArrayExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Array extends ArrayExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\AssignNameExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\AssignNameExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\AssignNameExpression" instead */
|
11 |
class Twig_Node_Expression_AssignName extends AssignNameExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\AssignNameExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_AssignName extends AssignNameExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\AbstractBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\AbstractBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\AbstractBinary" instead */
|
11 |
class Twig_Node_Expression_Binary extends AbstractBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\AbstractBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary extends AbstractBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\AddBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\AddBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\AddBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Add extends AddBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\AddBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Add extends AddBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\AndBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\AndBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\AndBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_And extends AndBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\AndBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_And extends AndBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\BitwiseAndBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\BitwiseAndBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\BitwiseAndBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_BitwiseAnd extends BitwiseAndBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\BitwiseAndBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_BitwiseAnd extends BitwiseAndBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\BitwiseOrBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\BitwiseOrBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\BitwiseOrBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_BitwiseOr extends BitwiseOrBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\BitwiseOrBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_BitwiseOr extends BitwiseOrBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\BitwiseXorBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\BitwiseXorBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\BitwiseXorBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_BitwiseXor extends BitwiseXorBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\BitwiseXorBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_BitwiseXor extends BitwiseXorBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\ConcatBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\ConcatBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\ConcatBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Concat extends ConcatBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\ConcatBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Concat extends ConcatBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\DivBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\DivBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\DivBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Div extends DivBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\DivBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Div extends DivBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\EndsWithBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\EndsWithBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\EndsWithBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_EndsWith extends EndsWithBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\EndsWithBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_EndsWith extends EndsWithBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\EqualBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\EqualBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\EqualBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Equal extends EqualBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\EqualBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Equal extends EqualBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\FloorDivBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\FloorDivBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\FloorDivBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_FloorDiv extends FloorDivBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\FloorDivBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_FloorDiv extends FloorDivBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\GreaterBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\GreaterBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\GreaterBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Greater extends GreaterBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\GreaterBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Greater extends GreaterBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\GreaterEqualBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\GreaterEqualBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\GreaterEqualBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_GreaterEqual extends GreaterEqualBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\GreaterEqualBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_GreaterEqual extends GreaterEqualBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\InBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\InBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\InBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_In extends InBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\InBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_In extends InBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\LessBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\LessBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\LessBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Less extends LessBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\LessBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Less extends LessBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\LessEqualBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\LessEqualBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\LessEqualBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_LessEqual extends LessEqualBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\LessEqualBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_LessEqual extends LessEqualBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\MatchesBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\MatchesBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\MatchesBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Matches extends MatchesBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\MatchesBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Matches extends MatchesBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\ModBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\ModBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\ModBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Mod extends ModBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\ModBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Mod extends ModBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\MulBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\MulBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\MulBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Mul extends MulBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\MulBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Mul extends MulBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\NotEqualBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\NotEqualBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\NotEqualBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_NotEqual extends NotEqualBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\NotEqualBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_NotEqual extends NotEqualBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\NotInBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\NotInBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\NotInBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_NotIn extends NotInBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\NotInBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_NotIn extends NotInBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\OrBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\OrBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\OrBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Or extends OrBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\OrBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Or extends OrBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\PowerBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\PowerBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\PowerBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Power extends PowerBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\PowerBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Power extends PowerBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\RangeBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\RangeBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\RangeBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Range extends RangeBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\RangeBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Range extends RangeBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\StartsWithBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\StartsWithBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\StartsWithBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_StartsWith extends StartsWithBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\StartsWithBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_StartsWith extends StartsWithBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Binary\SubBinary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\SubBinary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Binary\SubBinary" instead */
|
11 |
class Twig_Node_Expression_Binary_Sub extends SubBinary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Binary\SubBinary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Binary_Sub extends SubBinary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\BlockReferenceExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\BlockReferenceExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\BlockReferenceExpression" instead */
|
11 |
class Twig_Node_Expression_BlockReference extends BlockReferenceExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\BlockReferenceExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_BlockReference extends BlockReferenceExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Call.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\CallExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\CallExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\CallExpression" instead */
|
11 |
class Twig_Node_Expression_Call extends CallExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\CallExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Call extends CallExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\ConditionalExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ConditionalExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\ConditionalExpression" instead */
|
11 |
class Twig_Node_Expression_Conditional extends ConditionalExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ConditionalExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Conditional extends ConditionalExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Constant.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\ConstantExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ConstantExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\ConstantExpression" instead */
|
11 |
class Twig_Node_Expression_Constant extends ConstantExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ConstantExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Constant extends ConstantExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Compiler;
|
13 |
+
use Twig\Node\Expression\AbstractExpression;
|
14 |
+
|
15 |
+
@trigger_error('The Twig_Node_Expression_ExtensionReference class is deprecated since version 1.23 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Represents an extension call node.
|
19 |
+
*
|
20 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
+
*
|
22 |
+
* @deprecated since 1.23 and will be removed in 2.0.
|
23 |
+
*/
|
24 |
+
class Twig_Node_Expression_ExtensionReference extends AbstractExpression
|
25 |
+
{
|
26 |
+
public function __construct($name, $lineno, $tag = null)
|
27 |
+
{
|
28 |
+
parent::__construct([], ['name' => $name], $lineno, $tag);
|
29 |
+
}
|
30 |
+
|
31 |
+
public function compile(Compiler $compiler)
|
32 |
+
{
|
33 |
+
$compiler->raw(sprintf("\$this->env->getExtension('%s')", $this->getAttribute('name')));
|
34 |
+
}
|
35 |
+
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Filter.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\FilterExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\FilterExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\FilterExpression" instead */
|
11 |
class Twig_Node_Expression_Filter extends FilterExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\FilterExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Filter extends FilterExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Filter\DefaultFilter;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Filter\DefaultFilter');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Filter\DefaultFilter" instead */
|
11 |
class Twig_Node_Expression_Filter_Default extends DefaultFilter
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Filter\DefaultFilter');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Filter_Default extends DefaultFilter
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Function.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\FunctionExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\FunctionExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\FunctionExpression" instead */
|
11 |
class Twig_Node_Expression_Function extends FunctionExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\FunctionExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Function extends FunctionExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\GetAttrExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\GetAttrExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\GetAttrExpression" instead */
|
11 |
class Twig_Node_Expression_GetAttr extends GetAttrExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\GetAttrExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_GetAttr extends GetAttrExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\MethodCallExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\MethodCallExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\MethodCallExpression" instead */
|
11 |
class Twig_Node_Expression_MethodCall extends MethodCallExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\MethodCallExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_MethodCall extends MethodCallExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Name.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\NameExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\NameExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\NameExpression" instead */
|
11 |
class Twig_Node_Expression_Name extends NameExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\NameExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Name extends NameExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\NullCoalesceExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\NullCoalesceExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\NullCoalesceExpression" instead */
|
11 |
class Twig_Node_Expression_NullCoalesce extends NullCoalesceExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\NullCoalesceExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_NullCoalesce extends NullCoalesceExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Parent.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\ParentExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ParentExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\ParentExpression" instead */
|
11 |
class Twig_Node_Expression_Parent extends ParentExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\ParentExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Parent extends ParentExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/TempName.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\TempNameExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\TempNameExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\TempNameExpression" instead */
|
11 |
class Twig_Node_Expression_TempName extends TempNameExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\TempNameExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_TempName extends TempNameExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\TestExpression;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\TestExpression');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\TestExpression" instead */
|
11 |
class Twig_Node_Expression_Test extends TestExpression
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\TestExpression');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test extends TestExpression
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Test\ConstantTest;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\ConstantTest');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Test\ConstantTest" instead */
|
11 |
class Twig_Node_Expression_Test_Constant extends ConstantTest
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\ConstantTest');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test_Constant extends ConstantTest
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Test\DefinedTest;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\DefinedTest');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Test\DefinedTest" instead */
|
11 |
class Twig_Node_Expression_Test_Defined extends DefinedTest
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\DefinedTest');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test_Defined extends DefinedTest
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Test\DivisiblebyTest;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\DivisiblebyTest');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Test\DivisiblebyTest" instead */
|
11 |
class Twig_Node_Expression_Test_Divisibleby extends DivisiblebyTest
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\DivisiblebyTest');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test_Divisibleby extends DivisiblebyTest
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Test\EvenTest;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\EvenTest');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Test\EvenTest" instead */
|
11 |
class Twig_Node_Expression_Test_Even extends EvenTest
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\EvenTest');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test_Even extends EvenTest
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Test\NullTest;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\NullTest');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Test\NullTest" instead */
|
11 |
class Twig_Node_Expression_Test_Null extends NullTest
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\NullTest');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test_Null extends NullTest
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Test\OddTest;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\OddTest');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Test\OddTest" instead */
|
11 |
class Twig_Node_Expression_Test_Odd extends OddTest
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\OddTest');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test_Odd extends OddTest
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Test\SameasTest;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\SameasTest');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Test\SameasTest" instead */
|
11 |
class Twig_Node_Expression_Test_Sameas extends SameasTest
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Test\SameasTest');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Test_Sameas extends SameasTest
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Unary.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Unary\AbstractUnary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\AbstractUnary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Unary\AbstractUnary" instead */
|
11 |
class Twig_Node_Expression_Unary extends AbstractUnary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\AbstractUnary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Unary extends AbstractUnary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Unary\NegUnary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\NegUnary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Unary\NegUnary" instead */
|
11 |
class Twig_Node_Expression_Unary_Neg extends NegUnary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\NegUnary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Unary_Neg extends NegUnary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Unary\NotUnary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\NotUnary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Unary\NotUnary" instead */
|
11 |
class Twig_Node_Expression_Unary_Not extends NotUnary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\NotUnary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Unary_Not extends NotUnary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\Expression\Unary\PosUnary;
|
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\PosUnary');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\Expression\Unary\PosUnary" instead */
|
11 |
class Twig_Node_Expression_Unary_Pos extends PosUnary
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\Expression\Unary\PosUnary');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Expression_Unary_Pos extends PosUnary
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Flush.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\FlushNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\FlushNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\FlushNode" instead */
|
11 |
class Twig_Node_Flush extends FlushNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\FlushNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Flush extends FlushNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/For.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\ForNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\ForNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\ForNode" instead */
|
11 |
class Twig_Node_For extends ForNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\ForNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_For extends ForNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/ForLoop.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\ForLoopNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\ForLoopNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\ForLoopNode" instead */
|
11 |
class Twig_Node_ForLoop extends ForLoopNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\ForLoopNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_ForLoop extends ForLoopNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/If.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\IfNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\IfNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\IfNode" instead */
|
11 |
class Twig_Node_If extends IfNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\IfNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_If extends IfNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Import.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\ImportNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\ImportNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\ImportNode" instead */
|
11 |
class Twig_Node_Import extends ImportNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\ImportNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Import extends ImportNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Include.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\IncludeNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\IncludeNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\IncludeNode" instead */
|
11 |
class Twig_Node_Include extends IncludeNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\IncludeNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Include extends IncludeNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Macro.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\MacroNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\MacroNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\MacroNode" instead */
|
11 |
class Twig_Node_Macro extends MacroNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\MacroNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Macro extends MacroNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Module.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\ModuleNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\ModuleNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\ModuleNode" instead */
|
11 |
class Twig_Node_Module extends ModuleNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\ModuleNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Module extends ModuleNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Print.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\PrintNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\PrintNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\PrintNode" instead */
|
11 |
class Twig_Node_Print extends PrintNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\PrintNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Print extends PrintNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Sandbox.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\SandboxNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\SandboxNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\SandboxNode" instead */
|
11 |
class Twig_Node_Sandbox extends SandboxNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\SandboxNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Sandbox extends SandboxNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\SandboxedPrintNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\SandboxedPrintNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\SandboxedPrintNode" instead */
|
11 |
class Twig_Node_SandboxedPrint extends SandboxedPrintNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\SandboxedPrintNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_SandboxedPrint extends SandboxedPrintNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Set.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\SetNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\SetNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\SetNode" instead */
|
11 |
class Twig_Node_Set extends SetNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\SetNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Set extends SetNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/SetTemp.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Twig\Node\SetTempNode;
|
4 |
+
|
5 |
+
class_exists('Twig\Node\SetTempNode');
|
6 |
+
|
7 |
+
if (\false) {
|
8 |
+
class Twig_Node_SetTemp extends SetTempNode
|
9 |
+
{
|
10 |
+
}
|
11 |
+
}
|
vendor/twig/twig/lib/Twig/Node/Spaceless.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\SpacelessNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\SpacelessNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\SpacelessNode" instead */
|
11 |
class Twig_Node_Spaceless extends SpacelessNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\SpacelessNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Spaceless extends SpacelessNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/Text.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\TextNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\TextNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\TextNode" instead */
|
11 |
class Twig_Node_Text extends TextNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\TextNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_Text extends TextNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Node/With.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\WithNode;
|
|
4 |
|
5 |
class_exists('Twig\Node\WithNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\WithNode" instead */
|
11 |
class Twig_Node_With extends WithNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\WithNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Node_With extends WithNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeCaptureInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\NodeCaptureInterface;
|
|
4 |
|
5 |
class_exists('Twig\Node\NodeCaptureInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\NodeCaptureInterface" instead */
|
11 |
class Twig_NodeCaptureInterface extends NodeCaptureInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\NodeCaptureInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeCaptureInterface extends NodeCaptureInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeInterface.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Compiler;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Represents a node in the AST.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
20 |
+
*/
|
21 |
+
interface Twig_NodeInterface extends \Countable, \IteratorAggregate
|
22 |
+
{
|
23 |
+
/**
|
24 |
+
* Compiles the node to PHP.
|
25 |
+
*/
|
26 |
+
public function compile(Compiler $compiler);
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
30 |
+
*/
|
31 |
+
public function getLine();
|
32 |
+
|
33 |
+
public function getNodeTag();
|
34 |
+
}
|
vendor/twig/twig/lib/Twig/NodeOutputInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Node\NodeOutputInterface;
|
|
4 |
|
5 |
class_exists('Twig\Node\NodeOutputInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Node\NodeOutputInterface" instead */
|
11 |
class Twig_NodeOutputInterface extends NodeOutputInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Node\NodeOutputInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeOutputInterface extends NodeOutputInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeTraverser.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\NodeTraverser;
|
|
4 |
|
5 |
class_exists('Twig\NodeTraverser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\NodeTraverser" instead */
|
11 |
class Twig_NodeTraverser extends NodeTraverser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\NodeTraverser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeTraverser extends NodeTraverser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\NodeVisitor\EscaperNodeVisitor;
|
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\EscaperNodeVisitor');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\NodeVisitor\EscaperNodeVisitor" instead */
|
11 |
class Twig_NodeVisitor_Escaper extends EscaperNodeVisitor
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\EscaperNodeVisitor');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeVisitor_Escaper extends EscaperNodeVisitor
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\NodeVisitor\OptimizerNodeVisitor;
|
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\OptimizerNodeVisitor');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\NodeVisitor\OptimizerNodeVisitor" instead */
|
11 |
class Twig_NodeVisitor_Optimizer extends OptimizerNodeVisitor
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\OptimizerNodeVisitor');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeVisitor_Optimizer extends OptimizerNodeVisitor
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\NodeVisitor\SafeAnalysisNodeVisitor;
|
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\SafeAnalysisNodeVisitor');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\NodeVisitor\SafeAnalysisNodeVisitor" instead */
|
11 |
class Twig_NodeVisitor_SafeAnalysis extends SafeAnalysisNodeVisitor
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\SafeAnalysisNodeVisitor');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeVisitor_SafeAnalysis extends SafeAnalysisNodeVisitor
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\NodeVisitor\SandboxNodeVisitor;
|
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\SandboxNodeVisitor');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\NodeVisitor\SandboxNodeVisitor" instead */
|
11 |
class Twig_NodeVisitor_Sandbox extends SandboxNodeVisitor
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\SandboxNodeVisitor');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeVisitor_Sandbox extends SandboxNodeVisitor
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\NodeVisitor\NodeVisitorInterface;
|
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\NodeVisitorInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\NodeVisitor\NodeVisitorInterface" instead */
|
11 |
class Twig_NodeVisitorInterface extends NodeVisitorInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\NodeVisitor\NodeVisitorInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_NodeVisitorInterface extends NodeVisitorInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Parser.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Parser;
|
|
4 |
|
5 |
class_exists('Twig\Parser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Parser" instead */
|
11 |
class Twig_Parser extends Parser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Parser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Parser extends Parser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/ParserInterface.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Error\SyntaxError;
|
13 |
+
use Twig\Node\ModuleNode;
|
14 |
+
use Twig\TokenStream;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Interface implemented by parser classes.
|
18 |
+
*
|
19 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
22 |
+
*/
|
23 |
+
interface Twig_ParserInterface
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Converts a token stream to a node tree.
|
27 |
+
*
|
28 |
+
* @return ModuleNode
|
29 |
+
*
|
30 |
+
* @throws SyntaxError When the token stream is syntactically or semantically wrong
|
31 |
+
*/
|
32 |
+
public function parse(TokenStream $stream);
|
33 |
+
}
|
vendor/twig/twig/lib/Twig/Profiler/Dumper/Base.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\Dumper\BaseDumper;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\BaseDumper');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\Dumper\BaseDumper" instead */
|
11 |
class Twig_Profiler_Dumper_Base extends BaseDumper
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\BaseDumper');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_Dumper_Base extends BaseDumper
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\Dumper\BlackfireDumper;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\BlackfireDumper');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\Dumper\BlackfireDumper" instead */
|
11 |
class Twig_Profiler_Dumper_Blackfire extends BlackfireDumper
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\BlackfireDumper');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_Dumper_Blackfire extends BlackfireDumper
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\Dumper\HtmlDumper;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\HtmlDumper');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\Dumper\HtmlDumper" instead */
|
11 |
class Twig_Profiler_Dumper_Html extends HtmlDumper
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\HtmlDumper');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_Dumper_Html extends HtmlDumper
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\Dumper\TextDumper;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\TextDumper');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\Dumper\TextDumper" instead */
|
11 |
class Twig_Profiler_Dumper_Text extends TextDumper
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\Dumper\TextDumper');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_Dumper_Text extends TextDumper
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\Node\EnterProfileNode;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\Node\EnterProfileNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\Node\EnterProfileNode" instead */
|
11 |
class Twig_Profiler_Node_EnterProfile extends EnterProfileNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\Node\EnterProfileNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_Node_EnterProfile extends EnterProfileNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\Node\LeaveProfileNode;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\Node\LeaveProfileNode');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\Node\LeaveProfileNode" instead */
|
11 |
class Twig_Profiler_Node_LeaveProfile extends LeaveProfileNode
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\Node\LeaveProfileNode');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_Node_LeaveProfile extends LeaveProfileNode
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\NodeVisitor\ProfilerNodeVisitor;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\NodeVisitor\ProfilerNodeVisitor');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\NodeVisitor\ProfilerNodeVisitor" instead */
|
11 |
class Twig_Profiler_NodeVisitor_Profiler extends ProfilerNodeVisitor
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\NodeVisitor\ProfilerNodeVisitor');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_NodeVisitor_Profiler extends ProfilerNodeVisitor
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Profiler/Profile.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Profiler\Profile;
|
|
4 |
|
5 |
class_exists('Twig\Profiler\Profile');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Profiler\Profile" instead */
|
11 |
class Twig_Profiler_Profile extends Profile
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Profiler\Profile');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Profiler_Profile extends Profile
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/RuntimeLoaderInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\RuntimeLoader\RuntimeLoaderInterface;
|
|
4 |
|
5 |
class_exists('Twig\RuntimeLoader\RuntimeLoaderInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\RuntimeLoader\RuntimeLoaderInterface" instead */
|
11 |
class Twig_RuntimeLoaderInterface extends RuntimeLoaderInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\RuntimeLoader\RuntimeLoaderInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_RuntimeLoaderInterface extends RuntimeLoaderInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityError;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityError" instead */
|
11 |
class Twig_Sandbox_SecurityError extends SecurityError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityError extends SecurityError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityNotAllowedFilterError;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedFilterError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityNotAllowedFilterError" instead */
|
11 |
class Twig_Sandbox_SecurityNotAllowedFilterError extends SecurityNotAllowedFilterError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedFilterError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityNotAllowedFilterError extends SecurityNotAllowedFilterError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedFunctionError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityNotAllowedFunctionError" instead */
|
11 |
class Twig_Sandbox_SecurityNotAllowedFunctionError extends SecurityNotAllowedFunctionError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedFunctionError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityNotAllowedFunctionError extends SecurityNotAllowedFunctionError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityNotAllowedMethodError;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedMethodError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityNotAllowedMethodError" instead */
|
11 |
class Twig_Sandbox_SecurityNotAllowedMethodError extends SecurityNotAllowedMethodError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedMethodError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityNotAllowedMethodError extends SecurityNotAllowedMethodError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityNotAllowedPropertyError;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedPropertyError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityNotAllowedPropertyError" instead */
|
11 |
class Twig_Sandbox_SecurityNotAllowedPropertyError extends SecurityNotAllowedPropertyError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedPropertyError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityNotAllowedPropertyError extends SecurityNotAllowedPropertyError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityNotAllowedTagError;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedTagError');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityNotAllowedTagError" instead */
|
11 |
class Twig_Sandbox_SecurityNotAllowedTagError extends SecurityNotAllowedTagError
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityNotAllowedTagError');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityNotAllowedTagError extends SecurityNotAllowedTagError
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityPolicy;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityPolicy');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityPolicy" instead */
|
11 |
class Twig_Sandbox_SecurityPolicy extends SecurityPolicy
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityPolicy');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityPolicy extends SecurityPolicy
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Sandbox\SecurityPolicyInterface;
|
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityPolicyInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Sandbox\SecurityPolicyInterface" instead */
|
11 |
class Twig_Sandbox_SecurityPolicyInterface extends SecurityPolicyInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Sandbox\SecurityPolicyInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Sandbox_SecurityPolicyInterface extends SecurityPolicyInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/SimpleFilter.php
CHANGED
@@ -1,26 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
use Twig\TwigFilter;
|
13 |
|
14 |
-
|
15 |
-
* For Twig 1.x compatibility.
|
16 |
-
*/
|
17 |
-
class_exists(TwigFilter::class);
|
18 |
-
|
19 |
-
@trigger_error('Using the "Twig_SimpleFilter" class is deprecated since Twig version 2.7, use "Twig\TwigFilter" instead.', \E_USER_DEPRECATED);
|
20 |
|
21 |
-
if (false) {
|
22 |
-
|
23 |
-
final class Twig_SimpleFilter extends TwigFilter
|
24 |
{
|
25 |
}
|
26 |
}
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
use Twig\TwigFilter;
|
4 |
|
5 |
+
class_exists('Twig\TwigFilter');
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
if (\false) {
|
8 |
+
class Twig_SimpleFilter extends TwigFilter
|
|
|
9 |
{
|
10 |
}
|
11 |
}
|
vendor/twig/twig/lib/Twig/SimpleFunction.php
CHANGED
@@ -1,26 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
use Twig\TwigFunction;
|
13 |
|
14 |
-
|
15 |
-
* For Twig 1.x compatibility.
|
16 |
-
*/
|
17 |
-
class_exists(TwigFunction::class);
|
18 |
-
|
19 |
-
@trigger_error('Using the "Twig_SimpleFunction" class is deprecated since Twig version 2.7, use "Twig\TwigFunction" instead.', \E_USER_DEPRECATED);
|
20 |
|
21 |
-
if (false) {
|
22 |
-
|
23 |
-
final class Twig_SimpleFunction extends TwigFunction
|
24 |
{
|
25 |
}
|
26 |
}
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
use Twig\TwigFunction;
|
4 |
|
5 |
+
class_exists('Twig\TwigFunction');
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
if (\false) {
|
8 |
+
class Twig_SimpleFunction extends TwigFunction
|
|
|
9 |
{
|
10 |
}
|
11 |
}
|
vendor/twig/twig/lib/Twig/SimpleTest.php
CHANGED
@@ -1,26 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
use Twig\TwigTest;
|
13 |
|
14 |
-
|
15 |
-
* For Twig 1.x compatibility.
|
16 |
-
*/
|
17 |
-
class_exists(TwigTest::class);
|
18 |
-
|
19 |
-
@trigger_error('Using the "Twig_SimpleTest" class is deprecated since Twig version 2.7, use "Twig\TwigTest" instead.', \E_USER_DEPRECATED);
|
20 |
|
21 |
-
if (false) {
|
22 |
-
|
23 |
-
final class Twig_SimpleTest extends TwigTest
|
24 |
{
|
25 |
}
|
26 |
}
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
use Twig\TwigTest;
|
4 |
|
5 |
+
class_exists('Twig\TwigTest');
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
if (\false) {
|
8 |
+
class Twig_SimpleTest extends TwigTest
|
|
|
9 |
{
|
10 |
}
|
11 |
}
|
vendor/twig/twig/lib/Twig/Source.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Source;
|
|
4 |
|
5 |
class_exists('Twig\Source');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Source" instead */
|
11 |
class Twig_Source extends Source
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Source');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Source extends Source
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/SourceContextLoaderInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Loader\SourceContextLoaderInterface;
|
|
4 |
|
5 |
class_exists('Twig\Loader\SourceContextLoaderInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Loader\SourceContextLoaderInterface" instead */
|
11 |
class Twig_SourceContextLoaderInterface extends SourceContextLoaderInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Loader\SourceContextLoaderInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_SourceContextLoaderInterface extends SourceContextLoaderInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Template.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Template;
|
|
4 |
|
5 |
class_exists('Twig\Template');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Template" instead */
|
11 |
class Twig_Template extends Template
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Template');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Template extends Template
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TemplateInterface.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Environment;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Interface implemented by all compiled templates.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
20 |
+
*/
|
21 |
+
interface Twig_TemplateInterface
|
22 |
+
{
|
23 |
+
public const ANY_CALL = 'any';
|
24 |
+
public const ARRAY_CALL = 'array';
|
25 |
+
public const METHOD_CALL = 'method';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Renders the template with the given context and returns it as string.
|
29 |
+
*
|
30 |
+
* @param array $context An array of parameters to pass to the template
|
31 |
+
*
|
32 |
+
* @return string The rendered template
|
33 |
+
*/
|
34 |
+
public function render(array $context);
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Displays the template with the given context.
|
38 |
+
*
|
39 |
+
* @param array $context An array of parameters to pass to the template
|
40 |
+
* @param array $blocks An array of blocks to pass to the template
|
41 |
+
*/
|
42 |
+
public function display(array $context, array $blocks = []);
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Returns the bound environment for this template.
|
46 |
+
*
|
47 |
+
* @return Environment
|
48 |
+
*/
|
49 |
+
public function getEnvironment();
|
50 |
+
}
|
vendor/twig/twig/lib/Twig/TemplateWrapper.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TemplateWrapper;
|
|
4 |
|
5 |
class_exists('Twig\TemplateWrapper');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TemplateWrapper" instead */
|
11 |
class Twig_TemplateWrapper extends TemplateWrapper
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TemplateWrapper');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TemplateWrapper extends TemplateWrapper
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Test.php
CHANGED
@@ -1,14 +1,37 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TwigTest" instead */
|
11 |
-
class Twig_Test extends TwigTest
|
12 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
}
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
|
12 |
+
@trigger_error('The Twig_Test class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigTest instead.', \E_USER_DEPRECATED);
|
13 |
|
14 |
+
/**
|
15 |
+
* Represents a template test.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
20 |
+
*/
|
21 |
+
abstract class Twig_Test implements Twig_TestInterface, Twig_TestCallableInterface
|
22 |
+
{
|
23 |
+
protected $options;
|
24 |
+
protected $arguments = [];
|
25 |
|
26 |
+
public function __construct(array $options = [])
|
|
|
|
|
27 |
{
|
28 |
+
$this->options = array_merge([
|
29 |
+
'callable' => null,
|
30 |
+
], $options);
|
31 |
+
}
|
32 |
+
|
33 |
+
public function getCallable()
|
34 |
+
{
|
35 |
+
return $this->options['callable'];
|
36 |
}
|
37 |
}
|
vendor/twig/twig/lib/Twig/Test/Function.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
@trigger_error('The Twig_Test_Function class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigTest instead.', \E_USER_DEPRECATED);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Represents a function template test.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
20 |
+
*/
|
21 |
+
class Twig_Test_Function extends Twig_Test
|
22 |
+
{
|
23 |
+
protected $function;
|
24 |
+
|
25 |
+
public function __construct($function, array $options = [])
|
26 |
+
{
|
27 |
+
$options['callable'] = $function;
|
28 |
+
|
29 |
+
parent::__construct($options);
|
30 |
+
|
31 |
+
$this->function = $function;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function compile()
|
35 |
+
{
|
36 |
+
return $this->function;
|
37 |
+
}
|
38 |
+
}
|
vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Test\IntegrationTestCase;
|
|
4 |
|
5 |
class_exists('Twig\Test\IntegrationTestCase');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Test\IntegrationTestCase" instead */
|
11 |
class Twig_Test_IntegrationTestCase extends IntegrationTestCase
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Test\IntegrationTestCase');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Test_IntegrationTestCase extends IntegrationTestCase
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Test/Method.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use Twig\Extension\ExtensionInterface;
|
13 |
+
|
14 |
+
@trigger_error('The Twig_Test_Method class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigTest instead.', \E_USER_DEPRECATED);
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Represents a method template test.
|
18 |
+
*
|
19 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
22 |
+
*/
|
23 |
+
class Twig_Test_Method extends Twig_Test
|
24 |
+
{
|
25 |
+
protected $extension;
|
26 |
+
protected $method;
|
27 |
+
|
28 |
+
public function __construct(ExtensionInterface $extension, $method, array $options = [])
|
29 |
+
{
|
30 |
+
$options['callable'] = [$extension, $method];
|
31 |
+
|
32 |
+
parent::__construct($options);
|
33 |
+
|
34 |
+
$this->extension = $extension;
|
35 |
+
$this->method = $method;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function compile()
|
39 |
+
{
|
40 |
+
return sprintf('$this->env->getExtension(\'%s\')->%s', \get_class($this->extension), $this->method);
|
41 |
+
}
|
42 |
+
|
43 |
+
public function hasOneMandatoryArgument(): bool
|
44 |
+
{
|
45 |
+
return (bool) ($this->options['one_mandatory_argument'] ?? false);
|
46 |
+
}
|
47 |
+
}
|
vendor/twig/twig/lib/Twig/Test/Node.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
@trigger_error('The Twig_Test_Node class is deprecated since version 1.12 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Represents a template test as a Node.
|
16 |
+
*
|
17 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
20 |
+
*/
|
21 |
+
class Twig_Test_Node extends Twig_Test
|
22 |
+
{
|
23 |
+
protected $class;
|
24 |
+
|
25 |
+
public function __construct($class, array $options = [])
|
26 |
+
{
|
27 |
+
parent::__construct($options);
|
28 |
+
|
29 |
+
$this->class = $class;
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getClass()
|
33 |
+
{
|
34 |
+
return $this->class;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function compile()
|
38 |
+
{
|
39 |
+
}
|
40 |
+
}
|
vendor/twig/twig/lib/Twig/Test/NodeTestCase.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Test\NodeTestCase;
|
|
4 |
|
5 |
class_exists('Twig\Test\NodeTestCase');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Test\NodeTestCase" instead */
|
11 |
class Twig_Test_NodeTestCase extends NodeTestCase
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Test\NodeTestCase');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Test_NodeTestCase extends NodeTestCase
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TestCallableInterface.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Represents a callable template test.
|
14 |
+
*
|
15 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
18 |
+
*/
|
19 |
+
interface Twig_TestCallableInterface
|
20 |
+
{
|
21 |
+
public function getCallable();
|
22 |
+
}
|
vendor/twig/twig/lib/Twig/TestInterface.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Represents a template test.
|
14 |
+
*
|
15 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
18 |
+
*/
|
19 |
+
interface Twig_TestInterface
|
20 |
+
{
|
21 |
+
/**
|
22 |
+
* Compiles a test.
|
23 |
+
*
|
24 |
+
* @return string The PHP code for the test
|
25 |
+
*/
|
26 |
+
public function compile();
|
27 |
+
}
|
vendor/twig/twig/lib/Twig/Token.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Token;
|
|
4 |
|
5 |
class_exists('Twig\Token');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Token" instead */
|
11 |
class Twig_Token extends Token
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Token');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Token extends Token
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\AbstractTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\AbstractTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\AbstractTokenParser" instead */
|
11 |
class Twig_TokenParser extends AbstractTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\AbstractTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser extends AbstractTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\AutoEscapeTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\AutoEscapeTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\AutoEscapeTokenParser" instead */
|
11 |
class Twig_TokenParser_AutoEscape extends AutoEscapeTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\AutoEscapeTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_AutoEscape extends AutoEscapeTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Block.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\BlockTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\BlockTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\BlockTokenParser" instead */
|
11 |
class Twig_TokenParser_Block extends BlockTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\BlockTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Block extends BlockTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\DeprecatedTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\DeprecatedTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\DeprecatedTokenParser" instead */
|
11 |
class Twig_TokenParser_Deprecated extends DeprecatedTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\DeprecatedTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Deprecated extends DeprecatedTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Do.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\DoTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\DoTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\DoTokenParser" instead */
|
11 |
class Twig_TokenParser_Do extends DoTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\DoTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Do extends DoTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Embed.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\EmbedTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\EmbedTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\EmbedTokenParser" instead */
|
11 |
class Twig_TokenParser_Embed extends EmbedTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\EmbedTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Embed extends EmbedTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Extends.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\ExtendsTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\ExtendsTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\ExtendsTokenParser" instead */
|
11 |
class Twig_TokenParser_Extends extends ExtendsTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\ExtendsTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Extends extends ExtendsTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Filter.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\FilterTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\FilterTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\FilterTokenParser" instead */
|
11 |
class Twig_TokenParser_Filter extends FilterTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\FilterTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Filter extends FilterTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Flush.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\FlushTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\FlushTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\FlushTokenParser" instead */
|
11 |
class Twig_TokenParser_Flush extends FlushTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\FlushTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Flush extends FlushTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/For.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\ForTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\ForTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\ForTokenParser" instead */
|
11 |
class Twig_TokenParser_For extends ForTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\ForTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_For extends ForTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/From.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\FromTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\FromTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\FromTokenParser" instead */
|
11 |
class Twig_TokenParser_From extends FromTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\FromTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_From extends FromTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/If.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\IfTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\IfTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\IfTokenParser" instead */
|
11 |
class Twig_TokenParser_If extends IfTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\IfTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_If extends IfTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Import.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\ImportTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\ImportTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\ImportTokenParser" instead */
|
11 |
class Twig_TokenParser_Import extends ImportTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\ImportTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Import extends ImportTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Include.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\IncludeTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\IncludeTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\IncludeTokenParser" instead */
|
11 |
class Twig_TokenParser_Include extends IncludeTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\IncludeTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Include extends IncludeTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Macro.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\MacroTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\MacroTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\MacroTokenParser" instead */
|
11 |
class Twig_TokenParser_Macro extends MacroTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\MacroTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Macro extends MacroTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\SandboxTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\SandboxTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\SandboxTokenParser" instead */
|
11 |
class Twig_TokenParser_Sandbox extends SandboxTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\SandboxTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Sandbox extends SandboxTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Set.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\SetTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\SetTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\SetTokenParser" instead */
|
11 |
class Twig_TokenParser_Set extends SetTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\SetTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Set extends SetTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\SpacelessTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\SpacelessTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\SpacelessTokenParser" instead */
|
11 |
class Twig_TokenParser_Spaceless extends SpacelessTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\SpacelessTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Spaceless extends SpacelessTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/Use.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\UseTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\UseTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\UseTokenParser" instead */
|
11 |
class Twig_TokenParser_Use extends UseTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\UseTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_Use extends UseTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParser/With.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\WithTokenParser;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\WithTokenParser');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\WithTokenParser" instead */
|
11 |
class Twig_TokenParser_With extends WithTokenParser
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\WithTokenParser');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParser_With extends WithTokenParser
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenParserBroker.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
* (c) Arnaud Le Blanc
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
use Twig\TokenParser\TokenParserInterface;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Default implementation of a token parser broker.
|
17 |
+
*
|
18 |
+
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
|
19 |
+
*
|
20 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
21 |
+
*/
|
22 |
+
class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface
|
23 |
+
{
|
24 |
+
protected $parser;
|
25 |
+
protected $parsers = [];
|
26 |
+
protected $brokers = [];
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @param array|\Traversable $parsers A \Traversable of Twig_TokenParserInterface instances
|
30 |
+
* @param array|\Traversable $brokers A \Traversable of Twig_TokenParserBrokerInterface instances
|
31 |
+
* @param bool $triggerDeprecationError
|
32 |
+
*/
|
33 |
+
public function __construct($parsers = [], $brokers = [], $triggerDeprecationError = true)
|
34 |
+
{
|
35 |
+
if ($triggerDeprecationError) {
|
36 |
+
@trigger_error('The '.__CLASS__.' class is deprecated since version 1.12 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
37 |
+
}
|
38 |
+
|
39 |
+
foreach ($parsers as $parser) {
|
40 |
+
if (!$parser instanceof TokenParserInterface) {
|
41 |
+
throw new \LogicException('$parsers must a an array of Twig_TokenParserInterface.');
|
42 |
+
}
|
43 |
+
$this->parsers[$parser->getTag()] = $parser;
|
44 |
+
}
|
45 |
+
foreach ($brokers as $broker) {
|
46 |
+
if (!$broker instanceof Twig_TokenParserBrokerInterface) {
|
47 |
+
throw new \LogicException('$brokers must a an array of Twig_TokenParserBrokerInterface.');
|
48 |
+
}
|
49 |
+
$this->brokers[] = $broker;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
public function addTokenParser(TokenParserInterface $parser)
|
54 |
+
{
|
55 |
+
$this->parsers[$parser->getTag()] = $parser;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function removeTokenParser(TokenParserInterface $parser)
|
59 |
+
{
|
60 |
+
$name = $parser->getTag();
|
61 |
+
if (isset($this->parsers[$name]) && $parser === $this->parsers[$name]) {
|
62 |
+
unset($this->parsers[$name]);
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
public function addTokenParserBroker(self $broker)
|
67 |
+
{
|
68 |
+
$this->brokers[] = $broker;
|
69 |
+
}
|
70 |
+
|
71 |
+
public function removeTokenParserBroker(self $broker)
|
72 |
+
{
|
73 |
+
if (false !== $pos = array_search($broker, $this->brokers)) {
|
74 |
+
unset($this->brokers[$pos]);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Gets a suitable TokenParser for a tag.
|
80 |
+
*
|
81 |
+
* First looks in parsers, then in brokers.
|
82 |
+
*
|
83 |
+
* @param string $tag A tag name
|
84 |
+
*
|
85 |
+
* @return TokenParserInterface|null A Twig_TokenParserInterface or null if no suitable TokenParser was found
|
86 |
+
*/
|
87 |
+
public function getTokenParser($tag)
|
88 |
+
{
|
89 |
+
if (isset($this->parsers[$tag])) {
|
90 |
+
return $this->parsers[$tag];
|
91 |
+
}
|
92 |
+
$broker = end($this->brokers);
|
93 |
+
while (false !== $broker) {
|
94 |
+
$parser = $broker->getTokenParser($tag);
|
95 |
+
if (null !== $parser) {
|
96 |
+
return $parser;
|
97 |
+
}
|
98 |
+
$broker = prev($this->brokers);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
public function getParsers()
|
103 |
+
{
|
104 |
+
return $this->parsers;
|
105 |
+
}
|
106 |
+
|
107 |
+
public function getParser()
|
108 |
+
{
|
109 |
+
return $this->parser;
|
110 |
+
}
|
111 |
+
|
112 |
+
public function setParser(Twig_ParserInterface $parser)
|
113 |
+
{
|
114 |
+
$this->parser = $parser;
|
115 |
+
foreach ($this->parsers as $tokenParser) {
|
116 |
+
$tokenParser->setParser($parser);
|
117 |
+
}
|
118 |
+
foreach ($this->brokers as $broker) {
|
119 |
+
$broker->setParser($parser);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
* (c) Arnaud Le Blanc
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
use Twig\TokenParser\TokenParserInterface;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Interface implemented by token parser brokers.
|
17 |
+
*
|
18 |
+
* Token parser brokers allows to implement custom logic in the process of resolving a token parser for a given tag name.
|
19 |
+
*
|
20 |
+
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
|
21 |
+
*
|
22 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
23 |
+
*/
|
24 |
+
interface Twig_TokenParserBrokerInterface
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Gets a TokenParser suitable for a tag.
|
28 |
+
*
|
29 |
+
* @param string $tag A tag name
|
30 |
+
*
|
31 |
+
* @return TokenParserInterface|null A Twig_TokenParserInterface or null if no suitable TokenParser was found
|
32 |
+
*/
|
33 |
+
public function getTokenParser($tag);
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Calls Twig\TokenParser\TokenParserInterface::setParser on all parsers the implementation knows of.
|
37 |
+
*/
|
38 |
+
public function setParser(Twig_ParserInterface $parser);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Gets the Twig_ParserInterface.
|
42 |
+
*
|
43 |
+
* @return Twig_ParserInterface|null A Twig_ParserInterface instance or null
|
44 |
+
*/
|
45 |
+
public function getParser();
|
46 |
+
}
|
vendor/twig/twig/lib/Twig/TokenParserInterface.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenParser\TokenParserInterface;
|
|
4 |
|
5 |
class_exists('Twig\TokenParser\TokenParserInterface');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenParser\TokenParserInterface" instead */
|
11 |
class Twig_TokenParserInterface extends TokenParserInterface
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenParser\TokenParserInterface');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenParserInterface extends TokenParserInterface
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/TokenStream.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\TokenStream;
|
|
4 |
|
5 |
class_exists('Twig\TokenStream');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\TokenStream" instead */
|
11 |
class Twig_TokenStream extends TokenStream
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\TokenStream');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_TokenStream extends TokenStream
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Util\DeprecationCollector;
|
|
4 |
|
5 |
class_exists('Twig\Util\DeprecationCollector');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Util\DeprecationCollector" instead */
|
11 |
class Twig_Util_DeprecationCollector extends DeprecationCollector
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Util\DeprecationCollector');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Util_DeprecationCollector extends DeprecationCollector
|
9 |
{
|
10 |
}
|
vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php
CHANGED
@@ -4,10 +4,7 @@ use Twig\Util\TemplateDirIterator;
|
|
4 |
|
5 |
class_exists('Twig\Util\TemplateDirIterator');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if (false) {
|
10 |
-
/** @deprecated since Twig 2.7, use "Twig\Util\TemplateDirIterator" instead */
|
11 |
class Twig_Util_TemplateDirIterator extends TemplateDirIterator
|
12 |
{
|
13 |
}
|
4 |
|
5 |
class_exists('Twig\Util\TemplateDirIterator');
|
6 |
|
7 |
+
if (\false) {
|
|
|
|
|
|
|
8 |
class Twig_Util_TemplateDirIterator extends TemplateDirIterator
|
9 |
{
|
10 |
}
|
vendor/twig/twig/src/Cache/FilesystemCache.php
CHANGED
@@ -35,7 +35,7 @@ class FilesystemCache implements CacheInterface
|
|
35 |
|
36 |
public function generateKey($name, $className)
|
37 |
{
|
38 |
-
$hash = hash(
|
39 |
|
40 |
return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
|
41 |
}
|
35 |
|
36 |
public function generateKey($name, $className)
|
37 |
{
|
38 |
+
$hash = hash('sha256', $className);
|
39 |
|
40 |
return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
|
41 |
}
|
vendor/twig/twig/src/Cache/NullCache.php
CHANGED
@@ -14,9 +14,11 @@ namespace Twig\Cache;
|
|
14 |
/**
|
15 |
* Implements a no-cache strategy.
|
16 |
*
|
|
|
|
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
*/
|
19 |
-
|
20 |
{
|
21 |
public function generateKey($name, $className)
|
22 |
{
|
14 |
/**
|
15 |
* Implements a no-cache strategy.
|
16 |
*
|
17 |
+
* @final
|
18 |
+
*
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
*/
|
21 |
+
class NullCache implements CacheInterface
|
22 |
{
|
23 |
public function generateKey($name, $className)
|
24 |
{
|
vendor/twig/twig/src/Compiler.php
CHANGED
@@ -12,22 +12,23 @@
|
|
12 |
|
13 |
namespace Twig;
|
14 |
|
15 |
-
use Twig\Node\
|
16 |
|
17 |
/**
|
18 |
* Compiles a node to PHP code.
|
19 |
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
-
class Compiler
|
23 |
{
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
31 |
private $varNameSalt = 0;
|
32 |
|
33 |
public function __construct(Environment $env)
|
@@ -35,6 +36,16 @@ class Compiler
|
|
35 |
$this->env = $env;
|
36 |
}
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
/**
|
39 |
* Returns the environment instance related to this compiler.
|
40 |
*
|
@@ -62,7 +73,7 @@ class Compiler
|
|
62 |
*
|
63 |
* @return $this
|
64 |
*/
|
65 |
-
public function compile(
|
66 |
{
|
67 |
$this->lastLine = null;
|
68 |
$this->source = '';
|
@@ -73,12 +84,17 @@ class Compiler
|
|
73 |
$this->indentation = $indentation;
|
74 |
$this->varNameSalt = 0;
|
75 |
|
|
|
|
|
|
|
|
|
|
|
76 |
$node->compile($this);
|
77 |
|
78 |
return $this;
|
79 |
}
|
80 |
|
81 |
-
public function subcompile(
|
82 |
{
|
83 |
if (false === $raw) {
|
84 |
$this->source .= str_repeat(' ', $this->indentation * 4);
|
@@ -108,8 +124,9 @@ class Compiler
|
|
108 |
*
|
109 |
* @return $this
|
110 |
*/
|
111 |
-
public function write(
|
112 |
{
|
|
|
113 |
foreach ($strings as $string) {
|
114 |
$this->source .= str_repeat(' ', $this->indentation * 4).$string;
|
115 |
}
|
@@ -117,6 +134,22 @@ class Compiler
|
|
117 |
return $this;
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* Adds a quoted string to the compiled code.
|
122 |
*
|
@@ -155,7 +188,7 @@ class Compiler
|
|
155 |
} elseif (\is_bool($value)) {
|
156 |
$this->raw($value ? 'true' : 'false');
|
157 |
} elseif (\is_array($value)) {
|
158 |
-
$this->raw('
|
159 |
$first = true;
|
160 |
foreach ($value as $key => $v) {
|
161 |
if (!$first) {
|
@@ -166,7 +199,7 @@ class Compiler
|
|
166 |
$this->raw(' => ');
|
167 |
$this->repr($v);
|
168 |
}
|
169 |
-
$this->raw('
|
170 |
} else {
|
171 |
$this->string($value);
|
172 |
}
|
@@ -179,12 +212,22 @@ class Compiler
|
|
179 |
*
|
180 |
* @return $this
|
181 |
*/
|
182 |
-
public function addDebugInfo(
|
183 |
{
|
184 |
if ($node->getTemplateLine() != $this->lastLine) {
|
185 |
$this->write(sprintf("// line %d\n", $node->getTemplateLine()));
|
186 |
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
$this->sourceOffset = \strlen($this->source);
|
189 |
$this->debugInfo[$this->sourceLine] = $node->getTemplateLine();
|
190 |
|
@@ -238,7 +281,7 @@ class Compiler
|
|
238 |
|
239 |
public function getVarName()
|
240 |
{
|
241 |
-
return sprintf('
|
242 |
}
|
243 |
}
|
244 |
|
12 |
|
13 |
namespace Twig;
|
14 |
|
15 |
+
use Twig\Node\ModuleNode;
|
16 |
|
17 |
/**
|
18 |
* Compiles a node to PHP code.
|
19 |
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
+
class Compiler implements \Twig_CompilerInterface
|
23 |
{
|
24 |
+
protected $lastLine;
|
25 |
+
protected $source;
|
26 |
+
protected $indentation;
|
27 |
+
protected $env;
|
28 |
+
protected $debugInfo = [];
|
29 |
+
protected $sourceOffset;
|
30 |
+
protected $sourceLine;
|
31 |
+
protected $filename;
|
32 |
private $varNameSalt = 0;
|
33 |
|
34 |
public function __construct(Environment $env)
|
36 |
$this->env = $env;
|
37 |
}
|
38 |
|
39 |
+
/**
|
40 |
+
* @deprecated since 1.25 (to be removed in 2.0)
|
41 |
+
*/
|
42 |
+
public function getFilename()
|
43 |
+
{
|
44 |
+
@trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED);
|
45 |
+
|
46 |
+
return $this->filename;
|
47 |
+
}
|
48 |
+
|
49 |
/**
|
50 |
* Returns the environment instance related to this compiler.
|
51 |
*
|
73 |
*
|
74 |
* @return $this
|
75 |
*/
|
76 |
+
public function compile(\Twig_NodeInterface $node, $indentation = 0)
|
77 |
{
|
78 |
$this->lastLine = null;
|
79 |
$this->source = '';
|
84 |
$this->indentation = $indentation;
|
85 |
$this->varNameSalt = 0;
|
86 |
|
87 |
+
if ($node instanceof ModuleNode) {
|
88 |
+
// to be removed in 2.0
|
89 |
+
$this->filename = $node->getTemplateName();
|
90 |
+
}
|
91 |
+
|
92 |
$node->compile($this);
|
93 |
|
94 |
return $this;
|
95 |
}
|
96 |
|
97 |
+
public function subcompile(\Twig_NodeInterface $node, $raw = true)
|
98 |
{
|
99 |
if (false === $raw) {
|
100 |
$this->source .= str_repeat(' ', $this->indentation * 4);
|
124 |
*
|
125 |
* @return $this
|
126 |
*/
|
127 |
+
public function write()
|
128 |
{
|
129 |
+
$strings = \func_get_args();
|
130 |
foreach ($strings as $string) {
|
131 |
$this->source .= str_repeat(' ', $this->indentation * 4).$string;
|
132 |
}
|
134 |
return $this;
|
135 |
}
|
136 |
|
137 |
+
/**
|
138 |
+
* Appends an indentation to the current PHP code after compilation.
|
139 |
+
*
|
140 |
+
* @return $this
|
141 |
+
*
|
142 |
+
* @deprecated since 1.27 (to be removed in 2.0).
|
143 |
+
*/
|
144 |
+
public function addIndentation()
|
145 |
+
{
|
146 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use write(\'\') instead.', \E_USER_DEPRECATED);
|
147 |
+
|
148 |
+
$this->source .= str_repeat(' ', $this->indentation * 4);
|
149 |
+
|
150 |
+
return $this;
|
151 |
+
}
|
152 |
+
|
153 |
/**
|
154 |
* Adds a quoted string to the compiled code.
|
155 |
*
|
188 |
} elseif (\is_bool($value)) {
|
189 |
$this->raw($value ? 'true' : 'false');
|
190 |
} elseif (\is_array($value)) {
|
191 |
+
$this->raw('[');
|
192 |
$first = true;
|
193 |
foreach ($value as $key => $v) {
|
194 |
if (!$first) {
|
199 |
$this->raw(' => ');
|
200 |
$this->repr($v);
|
201 |
}
|
202 |
+
$this->raw(']');
|
203 |
} else {
|
204 |
$this->string($value);
|
205 |
}
|
212 |
*
|
213 |
* @return $this
|
214 |
*/
|
215 |
+
public function addDebugInfo(\Twig_NodeInterface $node)
|
216 |
{
|
217 |
if ($node->getTemplateLine() != $this->lastLine) {
|
218 |
$this->write(sprintf("// line %d\n", $node->getTemplateLine()));
|
219 |
|
220 |
+
// when mbstring.func_overload is set to 2
|
221 |
+
// mb_substr_count() replaces substr_count()
|
222 |
+
// but they have different signatures!
|
223 |
+
if (((int) ini_get('mbstring.func_overload')) & 2) {
|
224 |
+
@trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
225 |
+
|
226 |
+
// this is much slower than the "right" version
|
227 |
+
$this->sourceLine += mb_substr_count(mb_substr($this->source, $this->sourceOffset), "\n");
|
228 |
+
} else {
|
229 |
+
$this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset);
|
230 |
+
}
|
231 |
$this->sourceOffset = \strlen($this->source);
|
232 |
$this->debugInfo[$this->sourceLine] = $node->getTemplateLine();
|
233 |
|
281 |
|
282 |
public function getVarName()
|
283 |
{
|
284 |
+
return sprintf('__internal_%s', hash('sha256', __METHOD__.$this->varNameSalt++));
|
285 |
}
|
286 |
}
|
287 |
|
vendor/twig/twig/src/Environment.php
CHANGED
@@ -21,12 +21,15 @@ use Twig\Error\SyntaxError;
|
|
21 |
use Twig\Extension\CoreExtension;
|
22 |
use Twig\Extension\EscaperExtension;
|
23 |
use Twig\Extension\ExtensionInterface;
|
|
|
|
|
24 |
use Twig\Extension\OptimizerExtension;
|
|
|
25 |
use Twig\Loader\ArrayLoader;
|
26 |
use Twig\Loader\ChainLoader;
|
27 |
use Twig\Loader\LoaderInterface;
|
|
|
28 |
use Twig\Node\ModuleNode;
|
29 |
-
use Twig\Node\Node;
|
30 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
31 |
use Twig\RuntimeLoader\RuntimeLoaderInterface;
|
32 |
use Twig\TokenParser\TokenParserInterface;
|
@@ -38,29 +41,45 @@ use Twig\TokenParser\TokenParserInterface;
|
|
38 |
*/
|
39 |
class Environment
|
40 |
{
|
41 |
-
public const VERSION = '
|
42 |
-
public const VERSION_ID =
|
43 |
-
public const MAJOR_VERSION =
|
44 |
-
public const MINOR_VERSION =
|
45 |
-
public const RELEASE_VERSION =
|
46 |
public const EXTRA_VERSION = '';
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
private $originalCache;
|
63 |
-
private $
|
|
|
|
|
|
|
64 |
private $runtimeLoaders = [];
|
65 |
private $runtimes = [];
|
66 |
private $optionsHash;
|
@@ -91,6 +110,7 @@ class Environment
|
|
91 |
*
|
92 |
* * autoescape: Whether to enable auto-escaping (default to html):
|
93 |
* * false: disable auto-escaping
|
|
|
94 |
* * html, js: set the autoescaping to one of the supported strategies
|
95 |
* * name: set the autoescaping strategy based on the template name extension
|
96 |
* * PHP callback: a PHP callback that returns an escaping strategy based on the template "name"
|
@@ -99,14 +119,18 @@ class Environment
|
|
99 |
* (default to -1 which means that all optimizations are enabled;
|
100 |
* set it to 0 to disable).
|
101 |
*/
|
102 |
-
public function __construct(LoaderInterface $loader, $options = [])
|
103 |
{
|
104 |
-
|
|
|
|
|
|
|
|
|
105 |
|
106 |
$options = array_merge([
|
107 |
'debug' => false,
|
108 |
'charset' => 'UTF-8',
|
109 |
-
'base_template_class' => Template
|
110 |
'strict_variables' => false,
|
111 |
'autoescape' => 'html',
|
112 |
'cache' => false,
|
@@ -115,19 +139,33 @@ class Environment
|
|
115 |
], $options);
|
116 |
|
117 |
$this->debug = (bool) $options['debug'];
|
118 |
-
$this->
|
119 |
-
$this->baseTemplateClass =
|
120 |
-
if ('\\'.Template::class !== $this->baseTemplateClass && '\Twig_Template' !== $this->baseTemplateClass) {
|
121 |
-
@trigger_error('The "base_template_class" option on '.__CLASS__.' is deprecated since Twig 2.7.0.', \E_USER_DEPRECATED);
|
122 |
-
}
|
123 |
$this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload'];
|
124 |
$this->strictVariables = (bool) $options['strict_variables'];
|
125 |
$this->setCache($options['cache']);
|
126 |
-
$this->extensionSet = new ExtensionSet();
|
127 |
|
128 |
$this->addExtension(new CoreExtension());
|
129 |
$this->addExtension(new EscaperExtension($options['autoescape']));
|
130 |
$this->addExtension(new OptimizerExtension($options['optimizations']));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
/**
|
@@ -137,10 +175,6 @@ class Environment
|
|
137 |
*/
|
138 |
public function getBaseTemplateClass()
|
139 |
{
|
140 |
-
if (1 > \func_num_args() || \func_get_arg(0)) {
|
141 |
-
@trigger_error('The '.__METHOD__.' is deprecated since Twig 2.7.0.', \E_USER_DEPRECATED);
|
142 |
-
}
|
143 |
-
|
144 |
return $this->baseTemplateClass;
|
145 |
}
|
146 |
|
@@ -151,8 +185,6 @@ class Environment
|
|
151 |
*/
|
152 |
public function setBaseTemplateClass($class)
|
153 |
{
|
154 |
-
@trigger_error('The '.__METHOD__.' is deprecated since Twig 2.7.0.', \E_USER_DEPRECATED);
|
155 |
-
|
156 |
$this->baseTemplateClass = $class;
|
157 |
$this->updateOptionsHash();
|
158 |
}
|
@@ -264,10 +296,14 @@ class Environment
|
|
264 |
{
|
265 |
if (\is_string($cache)) {
|
266 |
$this->originalCache = $cache;
|
267 |
-
$this->cache = new FilesystemCache($cache
|
268 |
} elseif (false === $cache) {
|
269 |
$this->originalCache = $cache;
|
270 |
$this->cache = new NullCache();
|
|
|
|
|
|
|
|
|
271 |
} elseif ($cache instanceof CacheInterface) {
|
272 |
$this->originalCache = $this->cache = $cache;
|
273 |
} else {
|
@@ -275,6 +311,24 @@ class Environment
|
|
275 |
}
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
/**
|
279 |
* Gets the template class associated with the given string.
|
280 |
*
|
@@ -291,14 +345,26 @@ class Environment
|
|
291 |
* @param int|null $index The index if it is an embedded template
|
292 |
*
|
293 |
* @return string The template class name
|
294 |
-
*
|
295 |
-
* @internal
|
296 |
*/
|
297 |
public function getTemplateClass($name, $index = null)
|
298 |
{
|
299 |
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
|
300 |
|
301 |
-
return $this->templateClassPrefix.hash(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
}
|
303 |
|
304 |
/**
|
@@ -336,7 +402,7 @@ class Environment
|
|
336 |
/**
|
337 |
* Loads a template.
|
338 |
*
|
339 |
-
* @param string|TemplateWrapper $name The template name
|
340 |
*
|
341 |
* @throws LoaderError When the template cannot be found
|
342 |
* @throws RuntimeError When a previously generated cache is corrupted
|
@@ -351,8 +417,6 @@ class Environment
|
|
351 |
}
|
352 |
|
353 |
if ($name instanceof Template) {
|
354 |
-
@trigger_error('Passing a \Twig\Template instance to '.__METHOD__.' is deprecated since Twig 2.7.0, use \Twig\TemplateWrapper instead.', \E_USER_DEPRECATED);
|
355 |
-
|
356 |
return new TemplateWrapper($this, $name);
|
357 |
}
|
358 |
|
@@ -368,7 +432,7 @@ class Environment
|
|
368 |
* @param string $name The template name
|
369 |
* @param int $index The index if it is an embedded template
|
370 |
*
|
371 |
-
* @return
|
372 |
*
|
373 |
* @throws LoaderError When the template cannot be found
|
374 |
* @throws RuntimeError When a previously generated cache is corrupted
|
@@ -396,7 +460,11 @@ class Environment
|
|
396 |
}
|
397 |
|
398 |
if (!class_exists($cls, false)) {
|
399 |
-
|
|
|
|
|
|
|
|
|
400 |
|
401 |
if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
|
402 |
$this->cache->load($key);
|
@@ -404,10 +472,21 @@ class Environment
|
|
404 |
|
405 |
$source = null;
|
406 |
if (!class_exists($cls, false)) {
|
407 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
$content = $this->compileSource($source);
|
409 |
-
|
410 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
411 |
|
412 |
if (!class_exists($mainCls, false)) {
|
413 |
/* Last line of defense if either $this->bcWriteCacheFile was used,
|
@@ -417,15 +496,16 @@ class Environment
|
|
417 |
*/
|
418 |
eval('?>'.$content);
|
419 |
}
|
|
|
420 |
|
421 |
-
|
422 |
-
|
423 |
-
}
|
424 |
}
|
425 |
}
|
426 |
|
427 |
-
|
428 |
-
|
|
|
429 |
|
430 |
return $this->loadedTemplates[$cls] = new $cls($this);
|
431 |
}
|
@@ -443,9 +523,9 @@ class Environment
|
|
443 |
* @throws LoaderError When the template cannot be found
|
444 |
* @throws SyntaxError When an error occurred during compilation
|
445 |
*/
|
446 |
-
public function createTemplate($template,
|
447 |
{
|
448 |
-
$hash = hash(
|
449 |
if (null !== $name) {
|
450 |
$name = sprintf('%s (string template %s)', $name, $hash);
|
451 |
} else {
|
@@ -459,10 +539,19 @@ class Environment
|
|
459 |
|
460 |
$this->setLoader($loader);
|
461 |
try {
|
462 |
-
|
463 |
-
}
|
464 |
$this->setLoader($current);
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
}
|
|
|
|
|
|
|
466 |
}
|
467 |
|
468 |
/**
|
@@ -479,7 +568,16 @@ class Environment
|
|
479 |
*/
|
480 |
public function isTemplateFresh($name, $time)
|
481 |
{
|
482 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
}
|
484 |
|
485 |
/**
|
@@ -488,7 +586,7 @@ class Environment
|
|
488 |
* Similar to load() but it also accepts instances of \Twig\Template and
|
489 |
* \Twig\TemplateWrapper, and an array of templates where each is tried to be loaded.
|
490 |
*
|
491 |
-
* @param string|TemplateWrapper|array $names A template or an array of templates to try consecutively
|
492 |
*
|
493 |
* @return TemplateWrapper|Template
|
494 |
*
|
@@ -501,7 +599,6 @@ class Environment
|
|
501 |
$names = [$names];
|
502 |
}
|
503 |
|
504 |
-
$count = \count($names);
|
505 |
foreach ($names as $name) {
|
506 |
if ($name instanceof Template) {
|
507 |
return $name;
|
@@ -510,17 +607,67 @@ class Environment
|
|
510 |
return $name;
|
511 |
}
|
512 |
|
513 |
-
|
514 |
-
|
|
|
|
|
|
|
|
|
515 |
}
|
516 |
-
|
517 |
-
return $this->loadTemplate($name);
|
518 |
}
|
519 |
|
520 |
throw new LoaderError(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names)));
|
521 |
}
|
522 |
|
523 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
524 |
{
|
525 |
$this->lexer = $lexer;
|
526 |
}
|
@@ -528,12 +675,20 @@ class Environment
|
|
528 |
/**
|
529 |
* Tokenizes a source code.
|
530 |
*
|
|
|
|
|
|
|
531 |
* @return TokenStream
|
532 |
*
|
533 |
* @throws SyntaxError When the code is syntactically wrong
|
534 |
*/
|
535 |
-
public function tokenize(
|
536 |
{
|
|
|
|
|
|
|
|
|
|
|
537 |
if (null === $this->lexer) {
|
538 |
$this->lexer = new Lexer($this);
|
539 |
}
|
@@ -541,7 +696,25 @@ class Environment
|
|
541 |
return $this->lexer->tokenize($source);
|
542 |
}
|
543 |
|
544 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
{
|
546 |
$this->parser = $parser;
|
547 |
}
|
@@ -562,7 +735,25 @@ class Environment
|
|
562 |
return $this->parser->parse($stream);
|
563 |
}
|
564 |
|
565 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
{
|
567 |
$this->compiler = $compiler;
|
568 |
}
|
@@ -572,7 +763,7 @@ class Environment
|
|
572 |
*
|
573 |
* @return string The compiled PHP source code
|
574 |
*/
|
575 |
-
public function compile(
|
576 |
{
|
577 |
if (null === $this->compiler) {
|
578 |
$this->compiler = new Compiler($this);
|
@@ -584,12 +775,20 @@ class Environment
|
|
584 |
/**
|
585 |
* Compiles a template source code.
|
586 |
*
|
|
|
|
|
|
|
587 |
* @return string The compiled PHP source code
|
588 |
*
|
589 |
* @throws SyntaxError When there was an error during tokenizing, parsing or compiling
|
590 |
*/
|
591 |
-
public function compileSource(
|
592 |
{
|
|
|
|
|
|
|
|
|
|
|
593 |
try {
|
594 |
return $this->compile($this->parse($this->tokenize($source)));
|
595 |
} catch (Error $e) {
|
@@ -602,6 +801,10 @@ class Environment
|
|
602 |
|
603 |
public function setLoader(LoaderInterface $loader)
|
604 |
{
|
|
|
|
|
|
|
|
|
605 |
$this->loader = $loader;
|
606 |
}
|
607 |
|
@@ -612,6 +815,10 @@ class Environment
|
|
612 |
*/
|
613 |
public function getLoader()
|
614 |
{
|
|
|
|
|
|
|
|
|
615 |
return $this->loader;
|
616 |
}
|
617 |
|
@@ -622,12 +829,7 @@ class Environment
|
|
622 |
*/
|
623 |
public function setCharset($charset)
|
624 |
{
|
625 |
-
|
626 |
-
// iconv on Windows requires "UTF-8" instead of "UTF8"
|
627 |
-
$charset = 'UTF-8';
|
628 |
-
}
|
629 |
-
|
630 |
-
$this->charset = $charset;
|
631 |
}
|
632 |
|
633 |
/**
|
@@ -640,6 +842,29 @@ class Environment
|
|
640 |
return $this->charset;
|
641 |
}
|
642 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
/**
|
644 |
* Returns true if the given extension is registered.
|
645 |
*
|
@@ -649,7 +874,22 @@ class Environment
|
|
649 |
*/
|
650 |
public function hasExtension($class)
|
651 |
{
|
652 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
}
|
654 |
|
655 |
/**
|
@@ -669,7 +909,26 @@ class Environment
|
|
669 |
*/
|
670 |
public function getExtension($class)
|
671 |
{
|
672 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
673 |
}
|
674 |
|
675 |
/**
|
@@ -698,7 +957,57 @@ class Environment
|
|
698 |
|
699 |
public function addExtension(ExtensionInterface $extension)
|
700 |
{
|
701 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
$this->updateOptionsHash();
|
703 |
}
|
704 |
|
@@ -709,8 +1018,9 @@ class Environment
|
|
709 |
*/
|
710 |
public function setExtensions(array $extensions)
|
711 |
{
|
712 |
-
|
713 |
-
|
|
|
714 |
}
|
715 |
|
716 |
/**
|
@@ -720,29 +1030,39 @@ class Environment
|
|
720 |
*/
|
721 |
public function getExtensions()
|
722 |
{
|
723 |
-
return $this->
|
724 |
}
|
725 |
|
726 |
public function addTokenParser(TokenParserInterface $parser)
|
727 |
{
|
728 |
-
$this->
|
|
|
|
|
|
|
|
|
729 |
}
|
730 |
|
731 |
/**
|
732 |
* Gets the registered Token Parsers.
|
733 |
*
|
734 |
-
* @return
|
735 |
*
|
736 |
* @internal
|
737 |
*/
|
738 |
public function getTokenParsers()
|
739 |
{
|
740 |
-
|
|
|
|
|
|
|
|
|
741 |
}
|
742 |
|
743 |
/**
|
744 |
* Gets registered tags.
|
745 |
*
|
|
|
|
|
746 |
* @return TokenParserInterface[]
|
747 |
*
|
748 |
* @internal
|
@@ -750,8 +1070,10 @@ class Environment
|
|
750 |
public function getTags()
|
751 |
{
|
752 |
$tags = [];
|
753 |
-
foreach ($this->getTokenParsers() as $parser) {
|
754 |
-
$
|
|
|
|
|
755 |
}
|
756 |
|
757 |
return $tags;
|
@@ -759,7 +1081,11 @@ class Environment
|
|
759 |
|
760 |
public function addNodeVisitor(NodeVisitorInterface $visitor)
|
761 |
{
|
762 |
-
$this->
|
|
|
|
|
|
|
|
|
763 |
}
|
764 |
|
765 |
/**
|
@@ -771,12 +1097,37 @@ class Environment
|
|
771 |
*/
|
772 |
public function getNodeVisitors()
|
773 |
{
|
774 |
-
|
|
|
|
|
|
|
|
|
775 |
}
|
776 |
|
777 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
{
|
779 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
}
|
781 |
|
782 |
/**
|
@@ -787,18 +1138,45 @@ class Environment
|
|
787 |
*
|
788 |
* @param string $name The filter name
|
789 |
*
|
790 |
-
* @return
|
791 |
*
|
792 |
* @internal
|
793 |
*/
|
794 |
public function getFilter($name)
|
795 |
{
|
796 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
}
|
798 |
|
799 |
-
public function registerUndefinedFilterCallback(
|
800 |
{
|
801 |
-
$this->
|
802 |
}
|
803 |
|
804 |
/**
|
@@ -806,7 +1184,7 @@ class Environment
|
|
806 |
*
|
807 |
* Be warned that this method cannot return filters defined with registerUndefinedFilterCallback.
|
808 |
*
|
809 |
-
* @return
|
810 |
*
|
811 |
* @see registerUndefinedFilterCallback
|
812 |
*
|
@@ -814,24 +1192,53 @@ class Environment
|
|
814 |
*/
|
815 |
public function getFilters()
|
816 |
{
|
817 |
-
|
|
|
|
|
|
|
|
|
818 |
}
|
819 |
|
820 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
{
|
822 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
}
|
824 |
|
825 |
/**
|
826 |
* Gets the registered Tests.
|
827 |
*
|
828 |
-
* @return
|
829 |
*
|
830 |
* @internal
|
831 |
*/
|
832 |
public function getTests()
|
833 |
{
|
834 |
-
|
|
|
|
|
|
|
|
|
835 |
}
|
836 |
|
837 |
/**
|
@@ -839,18 +1246,60 @@ class Environment
|
|
839 |
*
|
840 |
* @param string $name The test name
|
841 |
*
|
842 |
-
* @return
|
843 |
*
|
844 |
* @internal
|
845 |
*/
|
846 |
public function getTest($name)
|
847 |
{
|
848 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
849 |
}
|
850 |
|
851 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
852 |
{
|
853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
854 |
}
|
855 |
|
856 |
/**
|
@@ -861,18 +1310,45 @@ class Environment
|
|
861 |
*
|
862 |
* @param string $name function name
|
863 |
*
|
864 |
-
* @return
|
865 |
*
|
866 |
* @internal
|
867 |
*/
|
868 |
public function getFunction($name)
|
869 |
{
|
870 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
871 |
}
|
872 |
|
873 |
-
public function registerUndefinedFunctionCallback(
|
874 |
{
|
875 |
-
$this->
|
876 |
}
|
877 |
|
878 |
/**
|
@@ -880,7 +1356,7 @@ class Environment
|
|
880 |
*
|
881 |
* Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback.
|
882 |
*
|
883 |
-
* @return
|
884 |
*
|
885 |
* @see registerUndefinedFunctionCallback
|
886 |
*
|
@@ -888,7 +1364,11 @@ class Environment
|
|
888 |
*/
|
889 |
public function getFunctions()
|
890 |
{
|
891 |
-
|
|
|
|
|
|
|
|
|
892 |
}
|
893 |
|
894 |
/**
|
@@ -902,14 +1382,23 @@ class Environment
|
|
902 |
*/
|
903 |
public function addGlobal($name, $value)
|
904 |
{
|
905 |
-
if ($this->
|
906 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
}
|
908 |
|
909 |
-
if (
|
910 |
-
|
911 |
-
} else {
|
912 |
$this->globals[$name] = $value;
|
|
|
|
|
913 |
}
|
914 |
}
|
915 |
|
@@ -922,15 +1411,15 @@ class Environment
|
|
922 |
*/
|
923 |
public function getGlobals()
|
924 |
{
|
925 |
-
if (
|
926 |
-
|
927 |
-
|
928 |
-
}
|
929 |
|
930 |
-
|
|
|
931 |
}
|
932 |
|
933 |
-
return
|
934 |
}
|
935 |
|
936 |
/**
|
@@ -962,7 +1451,11 @@ class Environment
|
|
962 |
*/
|
963 |
public function getUnaryOperators()
|
964 |
{
|
965 |
-
|
|
|
|
|
|
|
|
|
966 |
}
|
967 |
|
968 |
/**
|
@@ -974,20 +1467,171 @@ class Environment
|
|
974 |
*/
|
975 |
public function getBinaryOperators()
|
976 |
{
|
977 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
978 |
}
|
979 |
|
980 |
private function updateOptionsHash()
|
981 |
{
|
982 |
-
$
|
983 |
-
$this->
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
|
|
|
|
|
|
|
|
991 |
}
|
992 |
}
|
993 |
|
21 |
use Twig\Extension\CoreExtension;
|
22 |
use Twig\Extension\EscaperExtension;
|
23 |
use Twig\Extension\ExtensionInterface;
|
24 |
+
use Twig\Extension\GlobalsInterface;
|
25 |
+
use Twig\Extension\InitRuntimeInterface;
|
26 |
use Twig\Extension\OptimizerExtension;
|
27 |
+
use Twig\Extension\StagingExtension;
|
28 |
use Twig\Loader\ArrayLoader;
|
29 |
use Twig\Loader\ChainLoader;
|
30 |
use Twig\Loader\LoaderInterface;
|
31 |
+
use Twig\Loader\SourceContextLoaderInterface;
|
32 |
use Twig\Node\ModuleNode;
|
|
|
33 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
34 |
use Twig\RuntimeLoader\RuntimeLoaderInterface;
|
35 |
use Twig\TokenParser\TokenParserInterface;
|
41 |
*/
|
42 |
class Environment
|
43 |
{
|
44 |
+
public const VERSION = '1.44.7';
|
45 |
+
public const VERSION_ID = 14407;
|
46 |
+
public const MAJOR_VERSION = 1;
|
47 |
+
public const MINOR_VERSION = 44;
|
48 |
+
public const RELEASE_VERSION = 7;
|
49 |
public const EXTRA_VERSION = '';
|
50 |
|
51 |
+
protected $charset;
|
52 |
+
protected $loader;
|
53 |
+
protected $debug;
|
54 |
+
protected $autoReload;
|
55 |
+
protected $cache;
|
56 |
+
protected $lexer;
|
57 |
+
protected $parser;
|
58 |
+
protected $compiler;
|
59 |
+
protected $baseTemplateClass;
|
60 |
+
protected $extensions;
|
61 |
+
protected $parsers;
|
62 |
+
protected $visitors;
|
63 |
+
protected $filters;
|
64 |
+
protected $tests;
|
65 |
+
protected $functions;
|
66 |
+
protected $globals;
|
67 |
+
protected $runtimeInitialized = false;
|
68 |
+
protected $extensionInitialized = false;
|
69 |
+
protected $loadedTemplates;
|
70 |
+
protected $strictVariables;
|
71 |
+
protected $unaryOperators;
|
72 |
+
protected $binaryOperators;
|
73 |
+
protected $templateClassPrefix = '__TwigTemplate_';
|
74 |
+
protected $functionCallbacks = [];
|
75 |
+
protected $filterCallbacks = [];
|
76 |
+
protected $staging;
|
77 |
+
|
78 |
private $originalCache;
|
79 |
+
private $bcWriteCacheFile = false;
|
80 |
+
private $bcGetCacheFilename = false;
|
81 |
+
private $lastModifiedExtension = 0;
|
82 |
+
private $extensionsByClass = [];
|
83 |
private $runtimeLoaders = [];
|
84 |
private $runtimes = [];
|
85 |
private $optionsHash;
|
110 |
*
|
111 |
* * autoescape: Whether to enable auto-escaping (default to html):
|
112 |
* * false: disable auto-escaping
|
113 |
+
* * true: equivalent to html
|
114 |
* * html, js: set the autoescaping to one of the supported strategies
|
115 |
* * name: set the autoescaping strategy based on the template name extension
|
116 |
* * PHP callback: a PHP callback that returns an escaping strategy based on the template "name"
|
119 |
* (default to -1 which means that all optimizations are enabled;
|
120 |
* set it to 0 to disable).
|
121 |
*/
|
122 |
+
public function __construct(LoaderInterface $loader = null, $options = [])
|
123 |
{
|
124 |
+
if (null !== $loader) {
|
125 |
+
$this->setLoader($loader);
|
126 |
+
} else {
|
127 |
+
@trigger_error('Not passing a "Twig\Lodaer\LoaderInterface" as the first constructor argument of "Twig\Environment" is deprecated since version 1.21.', \E_USER_DEPRECATED);
|
128 |
+
}
|
129 |
|
130 |
$options = array_merge([
|
131 |
'debug' => false,
|
132 |
'charset' => 'UTF-8',
|
133 |
+
'base_template_class' => '\Twig\Template',
|
134 |
'strict_variables' => false,
|
135 |
'autoescape' => 'html',
|
136 |
'cache' => false,
|
139 |
], $options);
|
140 |
|
141 |
$this->debug = (bool) $options['debug'];
|
142 |
+
$this->charset = null === $options['charset'] ? null : strtoupper($options['charset']);
|
143 |
+
$this->baseTemplateClass = $options['base_template_class'];
|
|
|
|
|
|
|
144 |
$this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload'];
|
145 |
$this->strictVariables = (bool) $options['strict_variables'];
|
146 |
$this->setCache($options['cache']);
|
|
|
147 |
|
148 |
$this->addExtension(new CoreExtension());
|
149 |
$this->addExtension(new EscaperExtension($options['autoescape']));
|
150 |
$this->addExtension(new OptimizerExtension($options['optimizations']));
|
151 |
+
$this->staging = new StagingExtension();
|
152 |
+
|
153 |
+
// For BC
|
154 |
+
if (\is_string($this->originalCache)) {
|
155 |
+
$r = new \ReflectionMethod($this, 'writeCacheFile');
|
156 |
+
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
157 |
+
@trigger_error('The Twig\Environment::writeCacheFile method is deprecated since version 1.22 and will be removed in Twig 2.0.', \E_USER_DEPRECATED);
|
158 |
+
|
159 |
+
$this->bcWriteCacheFile = true;
|
160 |
+
}
|
161 |
+
|
162 |
+
$r = new \ReflectionMethod($this, 'getCacheFilename');
|
163 |
+
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
164 |
+
@trigger_error('The Twig\Environment::getCacheFilename method is deprecated since version 1.22 and will be removed in Twig 2.0.', \E_USER_DEPRECATED);
|
165 |
+
|
166 |
+
$this->bcGetCacheFilename = true;
|
167 |
+
}
|
168 |
+
}
|
169 |
}
|
170 |
|
171 |
/**
|
175 |
*/
|
176 |
public function getBaseTemplateClass()
|
177 |
{
|
|
|
|
|
|
|
|
|
178 |
return $this->baseTemplateClass;
|
179 |
}
|
180 |
|
185 |
*/
|
186 |
public function setBaseTemplateClass($class)
|
187 |
{
|
|
|
|
|
188 |
$this->baseTemplateClass = $class;
|
189 |
$this->updateOptionsHash();
|
190 |
}
|
296 |
{
|
297 |
if (\is_string($cache)) {
|
298 |
$this->originalCache = $cache;
|
299 |
+
$this->cache = new FilesystemCache($cache);
|
300 |
} elseif (false === $cache) {
|
301 |
$this->originalCache = $cache;
|
302 |
$this->cache = new NullCache();
|
303 |
+
} elseif (null === $cache) {
|
304 |
+
@trigger_error('Using "null" as the cache strategy is deprecated since version 1.23 and will be removed in Twig 2.0.', \E_USER_DEPRECATED);
|
305 |
+
$this->originalCache = false;
|
306 |
+
$this->cache = new NullCache();
|
307 |
} elseif ($cache instanceof CacheInterface) {
|
308 |
$this->originalCache = $this->cache = $cache;
|
309 |
} else {
|
311 |
}
|
312 |
}
|
313 |
|
314 |
+
/**
|
315 |
+
* Gets the cache filename for a given template.
|
316 |
+
*
|
317 |
+
* @param string $name The template name
|
318 |
+
*
|
319 |
+
* @return string|false The cache file name or false when caching is disabled
|
320 |
+
*
|
321 |
+
* @deprecated since 1.22 (to be removed in 2.0)
|
322 |
+
*/
|
323 |
+
public function getCacheFilename($name)
|
324 |
+
{
|
325 |
+
@trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
326 |
+
|
327 |
+
$key = $this->cache->generateKey($name, $this->getTemplateClass($name));
|
328 |
+
|
329 |
+
return !$key ? false : $key;
|
330 |
+
}
|
331 |
+
|
332 |
/**
|
333 |
* Gets the template class associated with the given string.
|
334 |
*
|
345 |
* @param int|null $index The index if it is an embedded template
|
346 |
*
|
347 |
* @return string The template class name
|
|
|
|
|
348 |
*/
|
349 |
public function getTemplateClass($name, $index = null)
|
350 |
{
|
351 |
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
|
352 |
|
353 |
+
return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '___'.$index);
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Gets the template class prefix.
|
358 |
+
*
|
359 |
+
* @return string The template class prefix
|
360 |
+
*
|
361 |
+
* @deprecated since 1.22 (to be removed in 2.0)
|
362 |
+
*/
|
363 |
+
public function getTemplateClassPrefix()
|
364 |
+
{
|
365 |
+
@trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
366 |
+
|
367 |
+
return $this->templateClassPrefix;
|
368 |
}
|
369 |
|
370 |
/**
|
402 |
/**
|
403 |
* Loads a template.
|
404 |
*
|
405 |
+
* @param string|TemplateWrapper|\Twig\Template $name The template name
|
406 |
*
|
407 |
* @throws LoaderError When the template cannot be found
|
408 |
* @throws RuntimeError When a previously generated cache is corrupted
|
417 |
}
|
418 |
|
419 |
if ($name instanceof Template) {
|
|
|
|
|
420 |
return new TemplateWrapper($this, $name);
|
421 |
}
|
422 |
|
432 |
* @param string $name The template name
|
433 |
* @param int $index The index if it is an embedded template
|
434 |
*
|
435 |
+
* @return \Twig_TemplateInterface A template instance representing the given template name
|
436 |
*
|
437 |
* @throws LoaderError When the template cannot be found
|
438 |
* @throws RuntimeError When a previously generated cache is corrupted
|
460 |
}
|
461 |
|
462 |
if (!class_exists($cls, false)) {
|
463 |
+
if ($this->bcGetCacheFilename) {
|
464 |
+
$key = $this->getCacheFilename($name);
|
465 |
+
} else {
|
466 |
+
$key = $this->cache->generateKey($name, $mainCls);
|
467 |
+
}
|
468 |
|
469 |
if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
|
470 |
$this->cache->load($key);
|
472 |
|
473 |
$source = null;
|
474 |
if (!class_exists($cls, false)) {
|
475 |
+
$loader = $this->getLoader();
|
476 |
+
if (!$loader instanceof SourceContextLoaderInterface) {
|
477 |
+
$source = new Source($loader->getSource($name), $name);
|
478 |
+
} else {
|
479 |
+
$source = $loader->getSourceContext($name);
|
480 |
+
}
|
481 |
+
|
482 |
$content = $this->compileSource($source);
|
483 |
+
|
484 |
+
if ($this->bcWriteCacheFile) {
|
485 |
+
$this->writeCacheFile($key, $content);
|
486 |
+
} else {
|
487 |
+
$this->cache->write($key, $content);
|
488 |
+
$this->cache->load($key);
|
489 |
+
}
|
490 |
|
491 |
if (!class_exists($mainCls, false)) {
|
492 |
/* Last line of defense if either $this->bcWriteCacheFile was used,
|
496 |
*/
|
497 |
eval('?>'.$content);
|
498 |
}
|
499 |
+
}
|
500 |
|
501 |
+
if (!class_exists($cls, false)) {
|
502 |
+
throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
|
|
|
503 |
}
|
504 |
}
|
505 |
|
506 |
+
if (!$this->runtimeInitialized) {
|
507 |
+
$this->initRuntime();
|
508 |
+
}
|
509 |
|
510 |
return $this->loadedTemplates[$cls] = new $cls($this);
|
511 |
}
|
523 |
* @throws LoaderError When the template cannot be found
|
524 |
* @throws SyntaxError When an error occurred during compilation
|
525 |
*/
|
526 |
+
public function createTemplate($template, $name = null)
|
527 |
{
|
528 |
+
$hash = hash('sha256', $template, false);
|
529 |
if (null !== $name) {
|
530 |
$name = sprintf('%s (string template %s)', $name, $hash);
|
531 |
} else {
|
539 |
|
540 |
$this->setLoader($loader);
|
541 |
try {
|
542 |
+
$template = new TemplateWrapper($this, $this->loadTemplate($name));
|
543 |
+
} catch (\Exception $e) {
|
544 |
$this->setLoader($current);
|
545 |
+
|
546 |
+
throw $e;
|
547 |
+
} catch (\Throwable $e) {
|
548 |
+
$this->setLoader($current);
|
549 |
+
|
550 |
+
throw $e;
|
551 |
}
|
552 |
+
$this->setLoader($current);
|
553 |
+
|
554 |
+
return $template;
|
555 |
}
|
556 |
|
557 |
/**
|
568 |
*/
|
569 |
public function isTemplateFresh($name, $time)
|
570 |
{
|
571 |
+
if (0 === $this->lastModifiedExtension) {
|
572 |
+
foreach ($this->extensions as $extension) {
|
573 |
+
$r = new \ReflectionObject($extension);
|
574 |
+
if (file_exists($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModifiedExtension) {
|
575 |
+
$this->lastModifiedExtension = $extensionTime;
|
576 |
+
}
|
577 |
+
}
|
578 |
+
}
|
579 |
+
|
580 |
+
return $this->lastModifiedExtension <= $time && $this->getLoader()->isFresh($name, $time);
|
581 |
}
|
582 |
|
583 |
/**
|
586 |
* Similar to load() but it also accepts instances of \Twig\Template and
|
587 |
* \Twig\TemplateWrapper, and an array of templates where each is tried to be loaded.
|
588 |
*
|
589 |
+
* @param string|Template|\Twig\TemplateWrapper|array $names A template or an array of templates to try consecutively
|
590 |
*
|
591 |
* @return TemplateWrapper|Template
|
592 |
*
|
599 |
$names = [$names];
|
600 |
}
|
601 |
|
|
|
602 |
foreach ($names as $name) {
|
603 |
if ($name instanceof Template) {
|
604 |
return $name;
|
607 |
return $name;
|
608 |
}
|
609 |
|
610 |
+
try {
|
611 |
+
return $this->loadTemplate($name);
|
612 |
+
} catch (LoaderError $e) {
|
613 |
+
if (1 === \count($names)) {
|
614 |
+
throw $e;
|
615 |
+
}
|
616 |
}
|
|
|
|
|
617 |
}
|
618 |
|
619 |
throw new LoaderError(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names)));
|
620 |
}
|
621 |
|
622 |
+
/**
|
623 |
+
* Clears the internal template cache.
|
624 |
+
*
|
625 |
+
* @deprecated since 1.18.3 (to be removed in 2.0)
|
626 |
+
*/
|
627 |
+
public function clearTemplateCache()
|
628 |
+
{
|
629 |
+
@trigger_error(sprintf('The %s method is deprecated since version 1.18.3 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
630 |
+
|
631 |
+
$this->loadedTemplates = [];
|
632 |
+
}
|
633 |
+
|
634 |
+
/**
|
635 |
+
* Clears the template cache files on the filesystem.
|
636 |
+
*
|
637 |
+
* @deprecated since 1.22 (to be removed in 2.0)
|
638 |
+
*/
|
639 |
+
public function clearCacheFiles()
|
640 |
+
{
|
641 |
+
@trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
642 |
+
|
643 |
+
if (\is_string($this->originalCache)) {
|
644 |
+
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->originalCache), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
|
645 |
+
if ($file->isFile()) {
|
646 |
+
@unlink($file->getPathname());
|
647 |
+
}
|
648 |
+
}
|
649 |
+
}
|
650 |
+
}
|
651 |
+
|
652 |
+
/**
|
653 |
+
* Gets the Lexer instance.
|
654 |
+
*
|
655 |
+
* @return \Twig_LexerInterface
|
656 |
+
*
|
657 |
+
* @deprecated since 1.25 (to be removed in 2.0)
|
658 |
+
*/
|
659 |
+
public function getLexer()
|
660 |
+
{
|
661 |
+
@trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED);
|
662 |
+
|
663 |
+
if (null === $this->lexer) {
|
664 |
+
$this->lexer = new Lexer($this);
|
665 |
+
}
|
666 |
+
|
667 |
+
return $this->lexer;
|
668 |
+
}
|
669 |
+
|
670 |
+
public function setLexer(\Twig_LexerInterface $lexer)
|
671 |
{
|
672 |
$this->lexer = $lexer;
|
673 |
}
|
675 |
/**
|
676 |
* Tokenizes a source code.
|
677 |
*
|
678 |
+
* @param string|Source $source The template source code
|
679 |
+
* @param string $name The template name (deprecated)
|
680 |
+
*
|
681 |
* @return TokenStream
|
682 |
*
|
683 |
* @throws SyntaxError When the code is syntactically wrong
|
684 |
*/
|
685 |
+
public function tokenize($source, $name = null)
|
686 |
{
|
687 |
+
if (!$source instanceof Source) {
|
688 |
+
@trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED);
|
689 |
+
$source = new Source($source, $name);
|
690 |
+
}
|
691 |
+
|
692 |
if (null === $this->lexer) {
|
693 |
$this->lexer = new Lexer($this);
|
694 |
}
|
696 |
return $this->lexer->tokenize($source);
|
697 |
}
|
698 |
|
699 |
+
/**
|
700 |
+
* Gets the Parser instance.
|
701 |
+
*
|
702 |
+
* @return \Twig_ParserInterface
|
703 |
+
*
|
704 |
+
* @deprecated since 1.25 (to be removed in 2.0)
|
705 |
+
*/
|
706 |
+
public function getParser()
|
707 |
+
{
|
708 |
+
@trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED);
|
709 |
+
|
710 |
+
if (null === $this->parser) {
|
711 |
+
$this->parser = new Parser($this);
|
712 |
+
}
|
713 |
+
|
714 |
+
return $this->parser;
|
715 |
+
}
|
716 |
+
|
717 |
+
public function setParser(\Twig_ParserInterface $parser)
|
718 |
{
|
719 |
$this->parser = $parser;
|
720 |
}
|
735 |
return $this->parser->parse($stream);
|
736 |
}
|
737 |
|
738 |
+
/**
|
739 |
+
* Gets the Compiler instance.
|
740 |
+
*
|
741 |
+
* @return \Twig_CompilerInterface
|
742 |
+
*
|
743 |
+
* @deprecated since 1.25 (to be removed in 2.0)
|
744 |
+
*/
|
745 |
+
public function getCompiler()
|
746 |
+
{
|
747 |
+
@trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED);
|
748 |
+
|
749 |
+
if (null === $this->compiler) {
|
750 |
+
$this->compiler = new Compiler($this);
|
751 |
+
}
|
752 |
+
|
753 |
+
return $this->compiler;
|
754 |
+
}
|
755 |
+
|
756 |
+
public function setCompiler(\Twig_CompilerInterface $compiler)
|
757 |
{
|
758 |
$this->compiler = $compiler;
|
759 |
}
|
763 |
*
|
764 |
* @return string The compiled PHP source code
|
765 |
*/
|
766 |
+
public function compile(\Twig_NodeInterface $node)
|
767 |
{
|
768 |
if (null === $this->compiler) {
|
769 |
$this->compiler = new Compiler($this);
|
775 |
/**
|
776 |
* Compiles a template source code.
|
777 |
*
|
778 |
+
* @param string|Source $source The template source code
|
779 |
+
* @param string $name The template name (deprecated)
|
780 |
+
*
|
781 |
* @return string The compiled PHP source code
|
782 |
*
|
783 |
* @throws SyntaxError When there was an error during tokenizing, parsing or compiling
|
784 |
*/
|
785 |
+
public function compileSource($source, $name = null)
|
786 |
{
|
787 |
+
if (!$source instanceof Source) {
|
788 |
+
@trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED);
|
789 |
+
$source = new Source($source, $name);
|
790 |
+
}
|
791 |
+
|
792 |
try {
|
793 |
return $this->compile($this->parse($this->tokenize($source)));
|
794 |
} catch (Error $e) {
|
801 |
|
802 |
public function setLoader(LoaderInterface $loader)
|
803 |
{
|
804 |
+
if (!$loader instanceof SourceContextLoaderInterface && 0 !== strpos(\get_class($loader), 'Mock_')) {
|
805 |
+
@trigger_error(sprintf('Twig loader "%s" should implement Twig\Loader\SourceContextLoaderInterface since version 1.27.', \get_class($loader)), \E_USER_DEPRECATED);
|
806 |
+
}
|
807 |
+
|
808 |
$this->loader = $loader;
|
809 |
}
|
810 |
|
815 |
*/
|
816 |
public function getLoader()
|
817 |
{
|
818 |
+
if (null === $this->loader) {
|
819 |
+
throw new \LogicException('You must set a loader first.');
|
820 |
+
}
|
821 |
+
|
822 |
return $this->loader;
|
823 |
}
|
824 |
|
829 |
*/
|
830 |
public function setCharset($charset)
|
831 |
{
|
832 |
+
$this->charset = strtoupper($charset);
|
|
|
|
|
|
|
|
|
|
|
833 |
}
|
834 |
|
835 |
/**
|
842 |
return $this->charset;
|
843 |
}
|
844 |
|
845 |
+
/**
|
846 |
+
* Initializes the runtime environment.
|
847 |
+
*
|
848 |
+
* @deprecated since 1.23 (to be removed in 2.0)
|
849 |
+
*/
|
850 |
+
public function initRuntime()
|
851 |
+
{
|
852 |
+
$this->runtimeInitialized = true;
|
853 |
+
|
854 |
+
foreach ($this->getExtensions() as $name => $extension) {
|
855 |
+
if (!$extension instanceof InitRuntimeInterface) {
|
856 |
+
$m = new \ReflectionMethod($extension, 'initRuntime');
|
857 |
+
|
858 |
+
$parentClass = $m->getDeclaringClass()->getName();
|
859 |
+
if ('Twig_Extension' !== $parentClass && 'Twig\Extension\AbstractExtension' !== $parentClass) {
|
860 |
+
@trigger_error(sprintf('Defining the initRuntime() method in the "%s" extension is deprecated since version 1.23. Use the `needs_environment` option to get the \Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig\Extension\InitRuntimeInterface if needed (not recommended).', $name), \E_USER_DEPRECATED);
|
861 |
+
}
|
862 |
+
}
|
863 |
+
|
864 |
+
$extension->initRuntime($this);
|
865 |
+
}
|
866 |
+
}
|
867 |
+
|
868 |
/**
|
869 |
* Returns true if the given extension is registered.
|
870 |
*
|
874 |
*/
|
875 |
public function hasExtension($class)
|
876 |
{
|
877 |
+
$class = ltrim($class, '\\');
|
878 |
+
if (!isset($this->extensionsByClass[$class]) && class_exists($class, false)) {
|
879 |
+
// For BC/FC with namespaced aliases
|
880 |
+
$class = new \ReflectionClass($class);
|
881 |
+
$class = $class->name;
|
882 |
+
}
|
883 |
+
|
884 |
+
if (isset($this->extensions[$class])) {
|
885 |
+
if ($class !== \get_class($this->extensions[$class])) {
|
886 |
+
@trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), \E_USER_DEPRECATED);
|
887 |
+
}
|
888 |
+
|
889 |
+
return true;
|
890 |
+
}
|
891 |
+
|
892 |
+
return isset($this->extensionsByClass[$class]);
|
893 |
}
|
894 |
|
895 |
/**
|
909 |
*/
|
910 |
public function getExtension($class)
|
911 |
{
|
912 |
+
$class = ltrim($class, '\\');
|
913 |
+
if (!isset($this->extensionsByClass[$class]) && class_exists($class, false)) {
|
914 |
+
// For BC/FC with namespaced aliases
|
915 |
+
$class = new \ReflectionClass($class);
|
916 |
+
$class = $class->name;
|
917 |
+
}
|
918 |
+
|
919 |
+
if (isset($this->extensions[$class])) {
|
920 |
+
if ($class !== \get_class($this->extensions[$class])) {
|
921 |
+
@trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), \E_USER_DEPRECATED);
|
922 |
+
}
|
923 |
+
|
924 |
+
return $this->extensions[$class];
|
925 |
+
}
|
926 |
+
|
927 |
+
if (!isset($this->extensionsByClass[$class])) {
|
928 |
+
throw new RuntimeError(sprintf('The "%s" extension is not enabled.', $class));
|
929 |
+
}
|
930 |
+
|
931 |
+
return $this->extensionsByClass[$class];
|
932 |
}
|
933 |
|
934 |
/**
|
957 |
|
958 |
public function addExtension(ExtensionInterface $extension)
|
959 |
{
|
960 |
+
if ($this->extensionInitialized) {
|
961 |
+
throw new \LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $extension->getName()));
|
962 |
+
}
|
963 |
+
|
964 |
+
$class = \get_class($extension);
|
965 |
+
if ($class !== $extension->getName()) {
|
966 |
+
if (isset($this->extensions[$extension->getName()])) {
|
967 |
+
unset($this->extensions[$extension->getName()], $this->extensionsByClass[$class]);
|
968 |
+
@trigger_error(sprintf('The possibility to register the same extension twice ("%s") is deprecated since version 1.23 and will be removed in Twig 2.0. Use proper PHP inheritance instead.', $extension->getName()), \E_USER_DEPRECATED);
|
969 |
+
}
|
970 |
+
}
|
971 |
+
|
972 |
+
$this->lastModifiedExtension = 0;
|
973 |
+
$this->extensionsByClass[$class] = $extension;
|
974 |
+
$this->extensions[$extension->getName()] = $extension;
|
975 |
+
$this->updateOptionsHash();
|
976 |
+
}
|
977 |
+
|
978 |
+
/**
|
979 |
+
* Removes an extension by name.
|
980 |
+
*
|
981 |
+
* This method is deprecated and you should not use it.
|
982 |
+
*
|
983 |
+
* @param string $name The extension name
|
984 |
+
*
|
985 |
+
* @deprecated since 1.12 (to be removed in 2.0)
|
986 |
+
*/
|
987 |
+
public function removeExtension($name)
|
988 |
+
{
|
989 |
+
@trigger_error(sprintf('The %s method is deprecated since version 1.12 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
990 |
+
|
991 |
+
if ($this->extensionInitialized) {
|
992 |
+
throw new \LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name));
|
993 |
+
}
|
994 |
+
|
995 |
+
$class = ltrim($name, '\\');
|
996 |
+
if (!isset($this->extensionsByClass[$class]) && class_exists($class, false)) {
|
997 |
+
// For BC/FC with namespaced aliases
|
998 |
+
$class = new \ReflectionClass($class);
|
999 |
+
$class = $class->name;
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
if (isset($this->extensions[$class])) {
|
1003 |
+
if ($class !== \get_class($this->extensions[$class])) {
|
1004 |
+
@trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), \E_USER_DEPRECATED);
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
unset($this->extensions[$class]);
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
unset($this->extensions[$class]);
|
1011 |
$this->updateOptionsHash();
|
1012 |
}
|
1013 |
|
1018 |
*/
|
1019 |
public function setExtensions(array $extensions)
|
1020 |
{
|
1021 |
+
foreach ($extensions as $extension) {
|
1022 |
+
$this->addExtension($extension);
|
1023 |
+
}
|
1024 |
}
|
1025 |
|
1026 |
/**
|
1030 |
*/
|
1031 |
public function getExtensions()
|
1032 |
{
|
1033 |
+
return $this->extensions;
|
1034 |
}
|
1035 |
|
1036 |
public function addTokenParser(TokenParserInterface $parser)
|
1037 |
{
|
1038 |
+
if ($this->extensionInitialized) {
|
1039 |
+
throw new \LogicException('Unable to add a token parser as extensions have already been initialized.');
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
$this->staging->addTokenParser($parser);
|
1043 |
}
|
1044 |
|
1045 |
/**
|
1046 |
* Gets the registered Token Parsers.
|
1047 |
*
|
1048 |
+
* @return \Twig_TokenParserBrokerInterface
|
1049 |
*
|
1050 |
* @internal
|
1051 |
*/
|
1052 |
public function getTokenParsers()
|
1053 |
{
|
1054 |
+
if (!$this->extensionInitialized) {
|
1055 |
+
$this->initExtensions();
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
return $this->parsers;
|
1059 |
}
|
1060 |
|
1061 |
/**
|
1062 |
* Gets registered tags.
|
1063 |
*
|
1064 |
+
* Be warned that this method cannot return tags defined by \Twig_TokenParserBrokerInterface classes.
|
1065 |
+
*
|
1066 |
* @return TokenParserInterface[]
|
1067 |
*
|
1068 |
* @internal
|
1070 |
public function getTags()
|
1071 |
{
|
1072 |
$tags = [];
|
1073 |
+
foreach ($this->getTokenParsers()->getParsers() as $parser) {
|
1074 |
+
if ($parser instanceof TokenParserInterface) {
|
1075 |
+
$tags[$parser->getTag()] = $parser;
|
1076 |
+
}
|
1077 |
}
|
1078 |
|
1079 |
return $tags;
|
1081 |
|
1082 |
public function addNodeVisitor(NodeVisitorInterface $visitor)
|
1083 |
{
|
1084 |
+
if ($this->extensionInitialized) {
|
1085 |
+
throw new \LogicException('Unable to add a node visitor as extensions have already been initialized.');
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
$this->staging->addNodeVisitor($visitor);
|
1089 |
}
|
1090 |
|
1091 |
/**
|
1097 |
*/
|
1098 |
public function getNodeVisitors()
|
1099 |
{
|
1100 |
+
if (!$this->extensionInitialized) {
|
1101 |
+
$this->initExtensions();
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
return $this->visitors;
|
1105 |
}
|
1106 |
|
1107 |
+
/**
|
1108 |
+
* Registers a Filter.
|
1109 |
+
*
|
1110 |
+
* @param string|TwigFilter $name The filter name or a \Twig_SimpleFilter instance
|
1111 |
+
* @param \Twig_FilterInterface|TwigFilter $filter
|
1112 |
+
*/
|
1113 |
+
public function addFilter($name, $filter = null)
|
1114 |
{
|
1115 |
+
if (!$name instanceof TwigFilter && !($filter instanceof TwigFilter || $filter instanceof \Twig_FilterInterface)) {
|
1116 |
+
throw new \LogicException('A filter must be an instance of \Twig_FilterInterface or \Twig_SimpleFilter.');
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
if ($name instanceof TwigFilter) {
|
1120 |
+
$filter = $name;
|
1121 |
+
$name = $filter->getName();
|
1122 |
+
} else {
|
1123 |
+
@trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), \E_USER_DEPRECATED);
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
if ($this->extensionInitialized) {
|
1127 |
+
throw new \LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $name));
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
$this->staging->addFilter($name, $filter);
|
1131 |
}
|
1132 |
|
1133 |
/**
|
1138 |
*
|
1139 |
* @param string $name The filter name
|
1140 |
*
|
1141 |
+
* @return \Twig_Filter|false
|
1142 |
*
|
1143 |
* @internal
|
1144 |
*/
|
1145 |
public function getFilter($name)
|
1146 |
{
|
1147 |
+
if (!$this->extensionInitialized) {
|
1148 |
+
$this->initExtensions();
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
if (isset($this->filters[$name])) {
|
1152 |
+
return $this->filters[$name];
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
foreach ($this->filters as $pattern => $filter) {
|
1156 |
+
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
|
1157 |
+
|
1158 |
+
if ($count) {
|
1159 |
+
if (preg_match('#^'.$pattern.'$#', $name, $matches)) {
|
1160 |
+
array_shift($matches);
|
1161 |
+
$filter->setArguments($matches);
|
1162 |
+
|
1163 |
+
return $filter;
|
1164 |
+
}
|
1165 |
+
}
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
foreach ($this->filterCallbacks as $callback) {
|
1169 |
+
if (false !== $filter = \call_user_func($callback, $name)) {
|
1170 |
+
return $filter;
|
1171 |
+
}
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
return false;
|
1175 |
}
|
1176 |
|
1177 |
+
public function registerUndefinedFilterCallback($callable)
|
1178 |
{
|
1179 |
+
$this->filterCallbacks[] = $callable;
|
1180 |
}
|
1181 |
|
1182 |
/**
|
1184 |
*
|
1185 |
* Be warned that this method cannot return filters defined with registerUndefinedFilterCallback.
|
1186 |
*
|
1187 |
+
* @return \Twig_FilterInterface[]
|
1188 |
*
|
1189 |
* @see registerUndefinedFilterCallback
|
1190 |
*
|
1192 |
*/
|
1193 |
public function getFilters()
|
1194 |
{
|
1195 |
+
if (!$this->extensionInitialized) {
|
1196 |
+
$this->initExtensions();
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
return $this->filters;
|
1200 |
}
|
1201 |
|
1202 |
+
/**
|
1203 |
+
* Registers a Test.
|
1204 |
+
*
|
1205 |
+
* @param string|TwigTest $name The test name or a \Twig_SimpleTest instance
|
1206 |
+
* @param \Twig_TestInterface|TwigTest $test A \Twig_TestInterface instance or a \Twig_SimpleTest instance
|
1207 |
+
*/
|
1208 |
+
public function addTest($name, $test = null)
|
1209 |
{
|
1210 |
+
if (!$name instanceof TwigTest && !($test instanceof TwigTest || $test instanceof \Twig_TestInterface)) {
|
1211 |
+
throw new \LogicException('A test must be an instance of \Twig_TestInterface or \Twig_SimpleTest.');
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
if ($name instanceof TwigTest) {
|
1215 |
+
$test = $name;
|
1216 |
+
$name = $test->getName();
|
1217 |
+
} else {
|
1218 |
+
@trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), \E_USER_DEPRECATED);
|
1219 |
+
}
|
1220 |
+
|
1221 |
+
if ($this->extensionInitialized) {
|
1222 |
+
throw new \LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $name));
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
$this->staging->addTest($name, $test);
|
1226 |
}
|
1227 |
|
1228 |
/**
|
1229 |
* Gets the registered Tests.
|
1230 |
*
|
1231 |
+
* @return \Twig_TestInterface[]
|
1232 |
*
|
1233 |
* @internal
|
1234 |
*/
|
1235 |
public function getTests()
|
1236 |
{
|
1237 |
+
if (!$this->extensionInitialized) {
|
1238 |
+
$this->initExtensions();
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
return $this->tests;
|
1242 |
}
|
1243 |
|
1244 |
/**
|
1246 |
*
|
1247 |
* @param string $name The test name
|
1248 |
*
|
1249 |
+
* @return \Twig_Test|false
|
1250 |
*
|
1251 |
* @internal
|
1252 |
*/
|
1253 |
public function getTest($name)
|
1254 |
{
|
1255 |
+
if (!$this->extensionInitialized) {
|
1256 |
+
$this->initExtensions();
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
if (isset($this->tests[$name])) {
|
1260 |
+
return $this->tests[$name];
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
foreach ($this->tests as $pattern => $test) {
|
1264 |
+
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
|
1265 |
+
|
1266 |
+
if ($count) {
|
1267 |
+
if (preg_match('#^'.$pattern.'$#', $name, $matches)) {
|
1268 |
+
array_shift($matches);
|
1269 |
+
$test->setArguments($matches);
|
1270 |
+
|
1271 |
+
return $test;
|
1272 |
+
}
|
1273 |
+
}
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
return false;
|
1277 |
}
|
1278 |
|
1279 |
+
/**
|
1280 |
+
* Registers a Function.
|
1281 |
+
*
|
1282 |
+
* @param string|TwigFunction $name The function name or a \Twig_SimpleFunction instance
|
1283 |
+
* @param \Twig_FunctionInterface|TwigFunction $function
|
1284 |
+
*/
|
1285 |
+
public function addFunction($name, $function = null)
|
1286 |
{
|
1287 |
+
if (!$name instanceof TwigFunction && !($function instanceof TwigFunction || $function instanceof \Twig_FunctionInterface)) {
|
1288 |
+
throw new \LogicException('A function must be an instance of \Twig_FunctionInterface or \Twig_SimpleFunction.');
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
if ($name instanceof TwigFunction) {
|
1292 |
+
$function = $name;
|
1293 |
+
$name = $function->getName();
|
1294 |
+
} else {
|
1295 |
+
@trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), \E_USER_DEPRECATED);
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
if ($this->extensionInitialized) {
|
1299 |
+
throw new \LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $name));
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
$this->staging->addFunction($name, $function);
|
1303 |
}
|
1304 |
|
1305 |
/**
|
1310 |
*
|
1311 |
* @param string $name function name
|
1312 |
*
|
1313 |
+
* @return \Twig_Function|false
|
1314 |
*
|
1315 |
* @internal
|
1316 |
*/
|
1317 |
public function getFunction($name)
|
1318 |
{
|
1319 |
+
if (!$this->extensionInitialized) {
|
1320 |
+
$this->initExtensions();
|
1321 |
+
}
|
1322 |
+
|
1323 |
+
if (isset($this->functions[$name])) {
|
1324 |
+
return $this->functions[$name];
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
foreach ($this->functions as $pattern => $function) {
|
1328 |
+
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
|
1329 |
+
|
1330 |
+
if ($count) {
|
1331 |
+
if (preg_match('#^'.$pattern.'$#', $name, $matches)) {
|
1332 |
+
array_shift($matches);
|
1333 |
+
$function->setArguments($matches);
|
1334 |
+
|
1335 |
+
return $function;
|
1336 |
+
}
|
1337 |
+
}
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
foreach ($this->functionCallbacks as $callback) {
|
1341 |
+
if (false !== $function = \call_user_func($callback, $name)) {
|
1342 |
+
return $function;
|
1343 |
+
}
|
1344 |
+
}
|
1345 |
+
|
1346 |
+
return false;
|
1347 |
}
|
1348 |
|
1349 |
+
public function registerUndefinedFunctionCallback($callable)
|
1350 |
{
|
1351 |
+
$this->functionCallbacks[] = $callable;
|
1352 |
}
|
1353 |
|
1354 |
/**
|
1356 |
*
|
1357 |
* Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback.
|
1358 |
*
|
1359 |
+
* @return \Twig_FunctionInterface[]
|
1360 |
*
|
1361 |
* @see registerUndefinedFunctionCallback
|
1362 |
*
|
1364 |
*/
|
1365 |
public function getFunctions()
|
1366 |
{
|
1367 |
+
if (!$this->extensionInitialized) {
|
1368 |
+
$this->initExtensions();
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
return $this->functions;
|
1372 |
}
|
1373 |
|
1374 |
/**
|
1382 |
*/
|
1383 |
public function addGlobal($name, $value)
|
1384 |
{
|
1385 |
+
if ($this->extensionInitialized || $this->runtimeInitialized) {
|
1386 |
+
if (null === $this->globals) {
|
1387 |
+
$this->globals = $this->initGlobals();
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
if (!\array_key_exists($name, $this->globals)) {
|
1391 |
+
// The deprecation notice must be turned into the following exception in Twig 2.0
|
1392 |
+
@trigger_error(sprintf('Registering global variable "%s" at runtime or when the extensions have already been initialized is deprecated since version 1.21.', $name), \E_USER_DEPRECATED);
|
1393 |
+
//throw new \LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name));
|
1394 |
+
}
|
1395 |
}
|
1396 |
|
1397 |
+
if ($this->extensionInitialized || $this->runtimeInitialized) {
|
1398 |
+
// update the value
|
|
|
1399 |
$this->globals[$name] = $value;
|
1400 |
+
} else {
|
1401 |
+
$this->staging->addGlobal($name, $value);
|
1402 |
}
|
1403 |
}
|
1404 |
|
1411 |
*/
|
1412 |
public function getGlobals()
|
1413 |
{
|
1414 |
+
if (!$this->runtimeInitialized && !$this->extensionInitialized) {
|
1415 |
+
return $this->initGlobals();
|
1416 |
+
}
|
|
|
1417 |
|
1418 |
+
if (null === $this->globals) {
|
1419 |
+
$this->globals = $this->initGlobals();
|
1420 |
}
|
1421 |
|
1422 |
+
return $this->globals;
|
1423 |
}
|
1424 |
|
1425 |
/**
|
1451 |
*/
|
1452 |
public function getUnaryOperators()
|
1453 |
{
|
1454 |
+
if (!$this->extensionInitialized) {
|
1455 |
+
$this->initExtensions();
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
return $this->unaryOperators;
|
1459 |
}
|
1460 |
|
1461 |
/**
|
1467 |
*/
|
1468 |
public function getBinaryOperators()
|
1469 |
{
|
1470 |
+
if (!$this->extensionInitialized) {
|
1471 |
+
$this->initExtensions();
|
1472 |
+
}
|
1473 |
+
|
1474 |
+
return $this->binaryOperators;
|
1475 |
+
}
|
1476 |
+
|
1477 |
+
/**
|
1478 |
+
* @deprecated since 1.23 (to be removed in 2.0)
|
1479 |
+
*/
|
1480 |
+
public function computeAlternatives($name, $items)
|
1481 |
+
{
|
1482 |
+
@trigger_error(sprintf('The %s method is deprecated since version 1.23 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
1483 |
+
|
1484 |
+
return SyntaxError::computeAlternatives($name, $items);
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
/**
|
1488 |
+
* @internal
|
1489 |
+
*/
|
1490 |
+
protected function initGlobals()
|
1491 |
+
{
|
1492 |
+
$globals = [];
|
1493 |
+
foreach ($this->extensions as $name => $extension) {
|
1494 |
+
if (!$extension instanceof GlobalsInterface) {
|
1495 |
+
$m = new \ReflectionMethod($extension, 'getGlobals');
|
1496 |
+
|
1497 |
+
$parentClass = $m->getDeclaringClass()->getName();
|
1498 |
+
if ('Twig_Extension' !== $parentClass && 'Twig\Extension\AbstractExtension' !== $parentClass) {
|
1499 |
+
@trigger_error(sprintf('Defining the getGlobals() method in the "%s" extension without explicitly implementing Twig\Extension\GlobalsInterface is deprecated since version 1.23.', $name), \E_USER_DEPRECATED);
|
1500 |
+
}
|
1501 |
+
}
|
1502 |
+
|
1503 |
+
$extGlob = $extension->getGlobals();
|
1504 |
+
if (!\is_array($extGlob)) {
|
1505 |
+
throw new \UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', \get_class($extension)));
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
$globals[] = $extGlob;
|
1509 |
+
}
|
1510 |
+
|
1511 |
+
$globals[] = $this->staging->getGlobals();
|
1512 |
+
|
1513 |
+
return \call_user_func_array('array_merge', $globals);
|
1514 |
+
}
|
1515 |
+
|
1516 |
+
/**
|
1517 |
+
* @internal
|
1518 |
+
*/
|
1519 |
+
protected function initExtensions()
|
1520 |
+
{
|
1521 |
+
if ($this->extensionInitialized) {
|
1522 |
+
return;
|
1523 |
+
}
|
1524 |
+
|
1525 |
+
$this->parsers = new \Twig_TokenParserBroker([], [], false);
|
1526 |
+
$this->filters = [];
|
1527 |
+
$this->functions = [];
|
1528 |
+
$this->tests = [];
|
1529 |
+
$this->visitors = [];
|
1530 |
+
$this->unaryOperators = [];
|
1531 |
+
$this->binaryOperators = [];
|
1532 |
+
|
1533 |
+
foreach ($this->extensions as $extension) {
|
1534 |
+
$this->initExtension($extension);
|
1535 |
+
}
|
1536 |
+
$this->initExtension($this->staging);
|
1537 |
+
// Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception
|
1538 |
+
$this->extensionInitialized = true;
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
/**
|
1542 |
+
* @internal
|
1543 |
+
*/
|
1544 |
+
protected function initExtension(ExtensionInterface $extension)
|
1545 |
+
{
|
1546 |
+
// filters
|
1547 |
+
foreach ($extension->getFilters() as $name => $filter) {
|
1548 |
+
if ($filter instanceof TwigFilter) {
|
1549 |
+
$name = $filter->getName();
|
1550 |
+
} else {
|
1551 |
+
@trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated since version 1.21. Use \Twig_SimpleFilter instead.', \get_class($filter), $name), \E_USER_DEPRECATED);
|
1552 |
+
}
|
1553 |
+
|
1554 |
+
$this->filters[$name] = $filter;
|
1555 |
+
}
|
1556 |
+
|
1557 |
+
// functions
|
1558 |
+
foreach ($extension->getFunctions() as $name => $function) {
|
1559 |
+
if ($function instanceof TwigFunction) {
|
1560 |
+
$name = $function->getName();
|
1561 |
+
} else {
|
1562 |
+
@trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated since version 1.21. Use \Twig_SimpleFunction instead.', \get_class($function), $name), \E_USER_DEPRECATED);
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
$this->functions[$name] = $function;
|
1566 |
+
}
|
1567 |
+
|
1568 |
+
// tests
|
1569 |
+
foreach ($extension->getTests() as $name => $test) {
|
1570 |
+
if ($test instanceof TwigTest) {
|
1571 |
+
$name = $test->getName();
|
1572 |
+
} else {
|
1573 |
+
@trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated since version 1.21. Use \Twig_SimpleTest instead.', \get_class($test), $name), \E_USER_DEPRECATED);
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
$this->tests[$name] = $test;
|
1577 |
+
}
|
1578 |
+
|
1579 |
+
// token parsers
|
1580 |
+
foreach ($extension->getTokenParsers() as $parser) {
|
1581 |
+
if ($parser instanceof TokenParserInterface) {
|
1582 |
+
$this->parsers->addTokenParser($parser);
|
1583 |
+
} elseif ($parser instanceof \Twig_TokenParserBrokerInterface) {
|
1584 |
+
@trigger_error('Registering a \Twig_TokenParserBrokerInterface instance is deprecated since version 1.21.', \E_USER_DEPRECATED);
|
1585 |
+
|
1586 |
+
$this->parsers->addTokenParserBroker($parser);
|
1587 |
+
} else {
|
1588 |
+
throw new \LogicException('getTokenParsers() must return an array of \Twig_TokenParserInterface or \Twig_TokenParserBrokerInterface instances.');
|
1589 |
+
}
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
// node visitors
|
1593 |
+
foreach ($extension->getNodeVisitors() as $visitor) {
|
1594 |
+
$this->visitors[] = $visitor;
|
1595 |
+
}
|
1596 |
+
|
1597 |
+
// operators
|
1598 |
+
if ($operators = $extension->getOperators()) {
|
1599 |
+
if (!\is_array($operators)) {
|
1600 |
+
throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', \get_class($extension), \is_object($operators) ? \get_class($operators) : \gettype($operators).(\is_resource($operators) ? '' : '#'.$operators)));
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
if (2 !== \count($operators)) {
|
1604 |
+
throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array of 2 elements, got %d.', \get_class($extension), \count($operators)));
|
1605 |
+
}
|
1606 |
+
|
1607 |
+
$this->unaryOperators = array_merge($this->unaryOperators, $operators[0]);
|
1608 |
+
$this->binaryOperators = array_merge($this->binaryOperators, $operators[1]);
|
1609 |
+
}
|
1610 |
+
}
|
1611 |
+
|
1612 |
+
/**
|
1613 |
+
* @deprecated since 1.22 (to be removed in 2.0)
|
1614 |
+
*/
|
1615 |
+
protected function writeCacheFile($file, $content)
|
1616 |
+
{
|
1617 |
+
$this->cache->write($file, $content);
|
1618 |
}
|
1619 |
|
1620 |
private function updateOptionsHash()
|
1621 |
{
|
1622 |
+
$hashParts = array_merge(
|
1623 |
+
array_keys($this->extensions),
|
1624 |
+
[
|
1625 |
+
(int) \function_exists('twig_template_get_attributes'),
|
1626 |
+
\PHP_MAJOR_VERSION,
|
1627 |
+
\PHP_MINOR_VERSION,
|
1628 |
+
self::VERSION,
|
1629 |
+
(int) $this->debug,
|
1630 |
+
$this->baseTemplateClass,
|
1631 |
+
(int) $this->strictVariables,
|
1632 |
+
]
|
1633 |
+
);
|
1634 |
+
$this->optionsHash = implode(':', $hashParts);
|
1635 |
}
|
1636 |
}
|
1637 |
|
vendor/twig/twig/src/Error/Error.php
CHANGED
@@ -38,9 +38,11 @@ use Twig\Template;
|
|
38 |
*/
|
39 |
class Error extends \Exception
|
40 |
{
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
44 |
private $sourcePath;
|
45 |
private $sourceCode;
|
46 |
|
@@ -55,23 +57,22 @@ class Error extends \Exception
|
|
55 |
* @param Source|string|null $source The source context where the error occurred
|
56 |
* @param \Exception $previous The previous exception
|
57 |
*/
|
58 |
-
public function __construct(
|
59 |
{
|
60 |
-
parent::__construct('', 0, $previous);
|
61 |
-
|
62 |
if (null === $source) {
|
63 |
$name = null;
|
64 |
-
} elseif (!$source instanceof Source
|
65 |
-
|
66 |
$name = $source;
|
67 |
} else {
|
68 |
$name = $source->getName();
|
69 |
$this->sourceCode = $source->getCode();
|
70 |
$this->sourcePath = $source->getPath();
|
71 |
}
|
|
|
72 |
|
73 |
$this->lineno = $lineno;
|
74 |
-
$this->
|
75 |
$this->rawMessage = $message;
|
76 |
$this->updateRepr();
|
77 |
}
|
@@ -86,6 +87,67 @@ class Error extends \Exception
|
|
86 |
return $this->rawMessage;
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
/**
|
90 |
* Gets the template line where the error occurred.
|
91 |
*
|
@@ -115,7 +177,7 @@ class Error extends \Exception
|
|
115 |
*/
|
116 |
public function getSourceContext()
|
117 |
{
|
118 |
-
return $this->
|
119 |
}
|
120 |
|
121 |
/**
|
@@ -124,10 +186,10 @@ class Error extends \Exception
|
|
124 |
public function setSourceContext(Source $source = null)
|
125 |
{
|
126 |
if (null === $source) {
|
127 |
-
$this->sourceCode = $this->
|
128 |
} else {
|
129 |
$this->sourceCode = $source->getCode();
|
130 |
-
$this->
|
131 |
$this->sourcePath = $source->getPath();
|
132 |
}
|
133 |
|
@@ -146,7 +208,10 @@ class Error extends \Exception
|
|
146 |
$this->updateRepr();
|
147 |
}
|
148 |
|
149 |
-
|
|
|
|
|
|
|
150 |
{
|
151 |
$this->message = $this->rawMessage;
|
152 |
|
@@ -169,11 +234,11 @@ class Error extends \Exception
|
|
169 |
$questionMark = true;
|
170 |
}
|
171 |
|
172 |
-
if ($this->
|
173 |
-
if (\is_string($this->
|
174 |
-
$name = sprintf('"%s"', $this->
|
175 |
} else {
|
176 |
-
$name = json_encode($this->
|
177 |
}
|
178 |
$this->message .= sprintf(' in %s', $name);
|
179 |
}
|
@@ -191,17 +256,20 @@ class Error extends \Exception
|
|
191 |
}
|
192 |
}
|
193 |
|
194 |
-
|
|
|
|
|
|
|
195 |
{
|
196 |
$template = null;
|
197 |
$templateClass = null;
|
198 |
|
199 |
$backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT);
|
200 |
foreach ($backtrace as $trace) {
|
201 |
-
if (isset($trace['object']) && $trace['object'] instanceof Template && '
|
202 |
$currentClass = \get_class($trace['object']);
|
203 |
$isEmbedContainer = null === $templateClass ? false : 0 === strpos($templateClass, $currentClass);
|
204 |
-
if (null === $this->
|
205 |
$template = $trace['object'];
|
206 |
$templateClass = \get_class($trace['object']);
|
207 |
}
|
@@ -209,8 +277,8 @@ class Error extends \Exception
|
|
209 |
}
|
210 |
|
211 |
// update template name
|
212 |
-
if (null !== $template && null === $this->
|
213 |
-
$this->
|
214 |
}
|
215 |
|
216 |
// update template path if any
|
@@ -228,7 +296,7 @@ class Error extends \Exception
|
|
228 |
$file = $r->getFileName();
|
229 |
|
230 |
$exceptions = [$e = $this];
|
231 |
-
while ($e = $e->getPrevious()) {
|
232 |
$exceptions[] = $e;
|
233 |
}
|
234 |
|
38 |
*/
|
39 |
class Error extends \Exception
|
40 |
{
|
41 |
+
protected $lineno;
|
42 |
+
// to be renamed to name in 2.0
|
43 |
+
protected $filename;
|
44 |
+
protected $rawMessage;
|
45 |
+
|
46 |
private $sourcePath;
|
47 |
private $sourceCode;
|
48 |
|
57 |
* @param Source|string|null $source The source context where the error occurred
|
58 |
* @param \Exception $previous The previous exception
|
59 |
*/
|
60 |
+
public function __construct($message, $lineno = -1, $source = null, \Exception $previous = null)
|
61 |
{
|
|
|
|
|
62 |
if (null === $source) {
|
63 |
$name = null;
|
64 |
+
} elseif (!$source instanceof Source) {
|
65 |
+
// for compat with the Twig C ext., passing the template name as string is accepted
|
66 |
$name = $source;
|
67 |
} else {
|
68 |
$name = $source->getName();
|
69 |
$this->sourceCode = $source->getCode();
|
70 |
$this->sourcePath = $source->getPath();
|
71 |
}
|
72 |
+
parent::__construct('', 0, $previous);
|
73 |
|
74 |
$this->lineno = $lineno;
|
75 |
+
$this->filename = $name;
|
76 |
$this->rawMessage = $message;
|
77 |
$this->updateRepr();
|
78 |
}
|
87 |
return $this->rawMessage;
|
88 |
}
|
89 |
|
90 |
+
/**
|
91 |
+
* Gets the logical name where the error occurred.
|
92 |
+
*
|
93 |
+
* @return string The name
|
94 |
+
*
|
95 |
+
* @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead.
|
96 |
+
*/
|
97 |
+
public function getTemplateFile()
|
98 |
+
{
|
99 |
+
@trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED);
|
100 |
+
|
101 |
+
return $this->filename;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Sets the logical name where the error occurred.
|
106 |
+
*
|
107 |
+
* @param string $name The name
|
108 |
+
*
|
109 |
+
* @deprecated since 1.27 (to be removed in 2.0). Use setSourceContext() instead.
|
110 |
+
*/
|
111 |
+
public function setTemplateFile($name)
|
112 |
+
{
|
113 |
+
@trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use setSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED);
|
114 |
+
|
115 |
+
$this->filename = $name;
|
116 |
+
|
117 |
+
$this->updateRepr();
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Gets the logical name where the error occurred.
|
122 |
+
*
|
123 |
+
* @return string The name
|
124 |
+
*
|
125 |
+
* @deprecated since 1.29 (to be removed in 2.0). Use getSourceContext() instead.
|
126 |
+
*/
|
127 |
+
public function getTemplateName()
|
128 |
+
{
|
129 |
+
@trigger_error(sprintf('The "%s" method is deprecated since version 1.29 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED);
|
130 |
+
|
131 |
+
return $this->filename;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Sets the logical name where the error occurred.
|
136 |
+
*
|
137 |
+
* @param string $name The name
|
138 |
+
*
|
139 |
+
* @deprecated since 1.29 (to be removed in 2.0). Use setSourceContext() instead.
|
140 |
+
*/
|
141 |
+
public function setTemplateName($name)
|
142 |
+
{
|
143 |
+
@trigger_error(sprintf('The "%s" method is deprecated since version 1.29 and will be removed in 2.0. Use setSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED);
|
144 |
+
|
145 |
+
$this->filename = $name;
|
146 |
+
$this->sourceCode = $this->sourcePath = null;
|
147 |
+
|
148 |
+
$this->updateRepr();
|
149 |
+
}
|
150 |
+
|
151 |
/**
|
152 |
* Gets the template line where the error occurred.
|
153 |
*
|
177 |
*/
|
178 |
public function getSourceContext()
|
179 |
{
|
180 |
+
return $this->filename ? new Source($this->sourceCode, $this->filename, $this->sourcePath) : null;
|
181 |
}
|
182 |
|
183 |
/**
|
186 |
public function setSourceContext(Source $source = null)
|
187 |
{
|
188 |
if (null === $source) {
|
189 |
+
$this->sourceCode = $this->filename = $this->sourcePath = null;
|
190 |
} else {
|
191 |
$this->sourceCode = $source->getCode();
|
192 |
+
$this->filename = $source->getName();
|
193 |
$this->sourcePath = $source->getPath();
|
194 |
}
|
195 |
|
208 |
$this->updateRepr();
|
209 |
}
|
210 |
|
211 |
+
/**
|
212 |
+
* @internal
|
213 |
+
*/
|
214 |
+
protected function updateRepr()
|
215 |
{
|
216 |
$this->message = $this->rawMessage;
|
217 |
|
234 |
$questionMark = true;
|
235 |
}
|
236 |
|
237 |
+
if ($this->filename) {
|
238 |
+
if (\is_string($this->filename) || (\is_object($this->filename) && method_exists($this->filename, '__toString'))) {
|
239 |
+
$name = sprintf('"%s"', $this->filename);
|
240 |
} else {
|
241 |
+
$name = json_encode($this->filename);
|
242 |
}
|
243 |
$this->message .= sprintf(' in %s', $name);
|
244 |
}
|
256 |
}
|
257 |
}
|
258 |
|
259 |
+
/**
|
260 |
+
* @internal
|
261 |
+
*/
|
262 |
+
protected function guessTemplateInfo()
|
263 |
{
|
264 |
$template = null;
|
265 |
$templateClass = null;
|
266 |
|
267 |
$backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT);
|
268 |
foreach ($backtrace as $trace) {
|
269 |
+
if (isset($trace['object']) && $trace['object'] instanceof Template && 'Twig_Template' !== \get_class($trace['object'])) {
|
270 |
$currentClass = \get_class($trace['object']);
|
271 |
$isEmbedContainer = null === $templateClass ? false : 0 === strpos($templateClass, $currentClass);
|
272 |
+
if (null === $this->filename || ($this->filename == $trace['object']->getTemplateName() && !$isEmbedContainer)) {
|
273 |
$template = $trace['object'];
|
274 |
$templateClass = \get_class($trace['object']);
|
275 |
}
|
277 |
}
|
278 |
|
279 |
// update template name
|
280 |
+
if (null !== $template && null === $this->filename) {
|
281 |
+
$this->filename = $template->getTemplateName();
|
282 |
}
|
283 |
|
284 |
// update template path if any
|
296 |
$file = $r->getFileName();
|
297 |
|
298 |
$exceptions = [$e = $this];
|
299 |
+
while ($e instanceof self && $e = $e->getPrevious()) {
|
300 |
$exceptions[] = $e;
|
301 |
}
|
302 |
|
vendor/twig/twig/src/Error/SyntaxError.php
CHANGED
@@ -26,6 +26,20 @@ class SyntaxError extends Error
|
|
26 |
* @param array $items An array of possible items
|
27 |
*/
|
28 |
public function addSuggestions($name, array $items)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
{
|
30 |
$alternatives = [];
|
31 |
foreach ($items as $item) {
|
@@ -34,14 +48,9 @@ class SyntaxError extends Error
|
|
34 |
$alternatives[$item] = $lev;
|
35 |
}
|
36 |
}
|
37 |
-
|
38 |
-
if (!$alternatives) {
|
39 |
-
return;
|
40 |
-
}
|
41 |
-
|
42 |
asort($alternatives);
|
43 |
|
44 |
-
|
45 |
}
|
46 |
}
|
47 |
|
26 |
* @param array $items An array of possible items
|
27 |
*/
|
28 |
public function addSuggestions($name, array $items)
|
29 |
+
{
|
30 |
+
if (!$alternatives = self::computeAlternatives($name, $items)) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
$this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', $alternatives)));
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @internal
|
39 |
+
*
|
40 |
+
* To be merged with the addSuggestions() method in 2.0.
|
41 |
+
*/
|
42 |
+
public static function computeAlternatives($name, $items)
|
43 |
{
|
44 |
$alternatives = [];
|
45 |
foreach ($items as $item) {
|
48 |
$alternatives[$item] = $lev;
|
49 |
}
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
51 |
asort($alternatives);
|
52 |
|
53 |
+
return array_keys($alternatives);
|
54 |
}
|
55 |
}
|
56 |
|
vendor/twig/twig/src/ExpressionParser.php
CHANGED
@@ -13,7 +13,6 @@
|
|
13 |
namespace Twig;
|
14 |
|
15 |
use Twig\Error\SyntaxError;
|
16 |
-
use Twig\Node\Expression\AbstractExpression;
|
17 |
use Twig\Node\Expression\ArrayExpression;
|
18 |
use Twig\Node\Expression\ArrowFunctionExpression;
|
19 |
use Twig\Node\Expression\AssignNameExpression;
|
@@ -25,7 +24,6 @@ use Twig\Node\Expression\GetAttrExpression;
|
|
25 |
use Twig\Node\Expression\MethodCallExpression;
|
26 |
use Twig\Node\Expression\NameExpression;
|
27 |
use Twig\Node\Expression\ParentExpression;
|
28 |
-
use Twig\Node\Expression\TestExpression;
|
29 |
use Twig\Node\Expression\Unary\NegUnary;
|
30 |
use Twig\Node\Expression\Unary\NotUnary;
|
31 |
use Twig\Node\Expression\Unary\PosUnary;
|
@@ -48,17 +46,27 @@ class ExpressionParser
|
|
48 |
public const OPERATOR_LEFT = 1;
|
49 |
public const OPERATOR_RIGHT = 2;
|
50 |
|
51 |
-
|
|
|
|
|
|
|
52 |
private $env;
|
53 |
-
private $unaryOperators;
|
54 |
-
private $binaryOperators;
|
55 |
|
56 |
-
public function __construct(Parser $parser,
|
57 |
{
|
58 |
$this->parser = $parser;
|
59 |
-
|
60 |
-
$
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
public function parseExpression($precedence = 0, $allowArrow = false)
|
@@ -78,7 +86,7 @@ class ExpressionParser
|
|
78 |
} elseif ('is' === $token->getValue()) {
|
79 |
$expr = $this->parseTestExpression($expr);
|
80 |
} elseif (isset($op['callable'])) {
|
81 |
-
$expr = $op['callable']
|
82 |
} else {
|
83 |
$expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']);
|
84 |
$class = $op['class'];
|
@@ -103,57 +111,57 @@ class ExpressionParser
|
|
103 |
$stream = $this->parser->getStream();
|
104 |
|
105 |
// short array syntax (one argument, no parentheses)?
|
106 |
-
if ($stream->look(1)->test(
|
107 |
$line = $stream->getCurrent()->getLine();
|
108 |
-
$token = $stream->expect(
|
109 |
$names = [new AssignNameExpression($token->getValue(), $token->getLine())];
|
110 |
-
$stream->expect(
|
111 |
|
112 |
return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
|
113 |
}
|
114 |
|
115 |
// first, determine if we are parsing an arrow function by finding => (long form)
|
116 |
$i = 0;
|
117 |
-
if (!$stream->look($i)->test(
|
118 |
return null;
|
119 |
}
|
120 |
++$i;
|
121 |
while (true) {
|
122 |
// variable name
|
123 |
++$i;
|
124 |
-
if (!$stream->look($i)->test(
|
125 |
break;
|
126 |
}
|
127 |
++$i;
|
128 |
}
|
129 |
-
if (!$stream->look($i)->test(
|
130 |
return null;
|
131 |
}
|
132 |
++$i;
|
133 |
-
if (!$stream->look($i)->test(
|
134 |
return null;
|
135 |
}
|
136 |
|
137 |
// yes, let's parse it properly
|
138 |
-
$token = $stream->expect(
|
139 |
$line = $token->getLine();
|
140 |
|
141 |
$names = [];
|
142 |
while (true) {
|
143 |
-
$token = $stream->expect(
|
144 |
$names[] = new AssignNameExpression($token->getValue(), $token->getLine());
|
145 |
|
146 |
-
if (!$stream->nextIf(
|
147 |
break;
|
148 |
}
|
149 |
}
|
150 |
-
$stream->expect(
|
151 |
-
$stream->expect(
|
152 |
|
153 |
return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
|
154 |
}
|
155 |
|
156 |
-
|
157 |
{
|
158 |
$token = $this->parser->getCurrentToken();
|
159 |
|
@@ -164,10 +172,10 @@ class ExpressionParser
|
|
164 |
$class = $operator['class'];
|
165 |
|
166 |
return $this->parsePostfixExpression(new $class($expr, $token->getLine()));
|
167 |
-
} elseif ($token->test(
|
168 |
$this->parser->getStream()->next();
|
169 |
$expr = $this->parseExpression();
|
170 |
-
$this->parser->getStream()->expect(
|
171 |
|
172 |
return $this->parsePostfixExpression($expr);
|
173 |
}
|
@@ -175,12 +183,12 @@ class ExpressionParser
|
|
175 |
return $this->parsePrimaryExpression();
|
176 |
}
|
177 |
|
178 |
-
|
179 |
{
|
180 |
-
while ($this->parser->getStream()->nextIf(
|
181 |
-
if (!$this->parser->getStream()->nextIf(
|
182 |
$expr2 = $this->parseExpression();
|
183 |
-
if ($this->parser->getStream()->nextIf(
|
184 |
$expr3 = $this->parseExpression();
|
185 |
} else {
|
186 |
$expr3 = new ConstantExpression('', $this->parser->getCurrentToken()->getLine());
|
@@ -196,21 +204,21 @@ class ExpressionParser
|
|
196 |
return $expr;
|
197 |
}
|
198 |
|
199 |
-
|
200 |
{
|
201 |
-
return $token->test(
|
202 |
}
|
203 |
|
204 |
-
|
205 |
{
|
206 |
-
return $token->test(
|
207 |
}
|
208 |
|
209 |
public function parsePrimaryExpression()
|
210 |
{
|
211 |
$token = $this->parser->getCurrentToken();
|
212 |
switch ($token->getType()) {
|
213 |
-
case
|
214 |
$this->parser->getStream()->next();
|
215 |
switch ($token->getValue()) {
|
216 |
case 'true':
|
@@ -239,17 +247,17 @@ class ExpressionParser
|
|
239 |
}
|
240 |
break;
|
241 |
|
242 |
-
case
|
243 |
$this->parser->getStream()->next();
|
244 |
$node = new ConstantExpression($token->getValue(), $token->getLine());
|
245 |
break;
|
246 |
|
247 |
-
case
|
248 |
-
case
|
249 |
$node = $this->parseStringExpression();
|
250 |
break;
|
251 |
|
252 |
-
case
|
253 |
if (preg_match(Lexer::REGEX_NAME, $token->getValue(), $matches) && $matches[0] == $token->getValue()) {
|
254 |
// in this context, string operators are variable names
|
255 |
$this->parser->getStream()->next();
|
@@ -259,8 +267,10 @@ class ExpressionParser
|
|
259 |
$class = $this->unaryOperators[$token->getValue()]['class'];
|
260 |
|
261 |
$ref = new \ReflectionClass($class);
|
262 |
-
|
263 |
-
|
|
|
|
|
264 |
|| $ref->isSubclassOf('Twig_Node_Expression_Unary_Neg') || $ref->isSubclassOf('Twig_Node_Expression_Unary_Pos'))
|
265 |
) {
|
266 |
throw new SyntaxError(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
|
@@ -275,11 +285,11 @@ class ExpressionParser
|
|
275 |
|
276 |
// no break
|
277 |
default:
|
278 |
-
if ($token->test(
|
279 |
$node = $this->parseArrayExpression();
|
280 |
-
} elseif ($token->test(
|
281 |
$node = $this->parseHashExpression();
|
282 |
-
} elseif ($token->test(
|
283 |
throw new SyntaxError(sprintf('Unexpected operator of value "%s". Did you try to use "===" or "!==" for strict comparison? Use "is same as(value)" instead.', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
|
284 |
} else {
|
285 |
throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
|
@@ -297,12 +307,12 @@ class ExpressionParser
|
|
297 |
// a string cannot be followed by another string in a single expression
|
298 |
$nextCanBeString = true;
|
299 |
while (true) {
|
300 |
-
if ($nextCanBeString && $token = $stream->nextIf(
|
301 |
$nodes[] = new ConstantExpression($token->getValue(), $token->getLine());
|
302 |
$nextCanBeString = false;
|
303 |
-
} elseif ($stream->nextIf(
|
304 |
$nodes[] = $this->parseExpression();
|
305 |
-
$stream->expect(
|
306 |
$nextCanBeString = true;
|
307 |
} else {
|
308 |
break;
|
@@ -320,16 +330,16 @@ class ExpressionParser
|
|
320 |
public function parseArrayExpression()
|
321 |
{
|
322 |
$stream = $this->parser->getStream();
|
323 |
-
$stream->expect(
|
324 |
|
325 |
$node = new ArrayExpression([], $stream->getCurrent()->getLine());
|
326 |
$first = true;
|
327 |
-
while (!$stream->test(
|
328 |
if (!$first) {
|
329 |
-
$stream->expect(
|
330 |
|
331 |
// trailing ,?
|
332 |
-
if ($stream->test(
|
333 |
break;
|
334 |
}
|
335 |
}
|
@@ -337,7 +347,7 @@ class ExpressionParser
|
|
337 |
|
338 |
$node->addElement($this->parseExpression());
|
339 |
}
|
340 |
-
$stream->expect(
|
341 |
|
342 |
return $node;
|
343 |
}
|
@@ -345,16 +355,16 @@ class ExpressionParser
|
|
345 |
public function parseHashExpression()
|
346 |
{
|
347 |
$stream = $this->parser->getStream();
|
348 |
-
$stream->expect(
|
349 |
|
350 |
$node = new ArrayExpression([], $stream->getCurrent()->getLine());
|
351 |
$first = true;
|
352 |
-
while (!$stream->test(
|
353 |
if (!$first) {
|
354 |
-
$stream->expect(
|
355 |
|
356 |
// trailing ,?
|
357 |
-
if ($stream->test(
|
358 |
break;
|
359 |
}
|
360 |
}
|
@@ -366,7 +376,7 @@ class ExpressionParser
|
|
366 |
// * a string -- 'a'
|
367 |
// * a name, which is equivalent to a string -- a
|
368 |
// * an expression, which must be enclosed in parentheses -- (1 + 2)
|
369 |
-
if ($token = $stream->nextIf(
|
370 |
$key = new ConstantExpression($token->getValue(), $token->getLine());
|
371 |
|
372 |
// {a} is a shortcut for {a:a}
|
@@ -375,9 +385,9 @@ class ExpressionParser
|
|
375 |
$node->addElement($value, $key);
|
376 |
continue;
|
377 |
}
|
378 |
-
} elseif (($token = $stream->nextIf(
|
379 |
$key = new ConstantExpression($token->getValue(), $token->getLine());
|
380 |
-
} elseif ($stream->test(
|
381 |
$key = $this->parseExpression();
|
382 |
} else {
|
383 |
$current = $stream->getCurrent();
|
@@ -385,12 +395,12 @@ class ExpressionParser
|
|
385 |
throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $stream->getSourceContext());
|
386 |
}
|
387 |
|
388 |
-
$stream->expect(
|
389 |
$value = $this->parseExpression();
|
390 |
|
391 |
$node->addElement($value, $key);
|
392 |
}
|
393 |
-
$stream->expect(
|
394 |
|
395 |
return $node;
|
396 |
}
|
@@ -399,7 +409,7 @@ class ExpressionParser
|
|
399 |
{
|
400 |
while (true) {
|
401 |
$token = $this->parser->getCurrentToken();
|
402 |
-
if (
|
403 |
if ('.' == $token->getValue() || '[' == $token->getValue()) {
|
404 |
$node = $this->parseSubscriptExpression($node);
|
405 |
} elseif ('|' == $token->getValue()) {
|
@@ -473,22 +483,22 @@ class ExpressionParser
|
|
473 |
if ('.' == $token->getValue()) {
|
474 |
$token = $stream->next();
|
475 |
if (
|
476 |
-
|
477 |
||
|
478 |
-
|
479 |
||
|
480 |
-
(
|
481 |
) {
|
482 |
$arg = new ConstantExpression($token->getValue(), $lineno);
|
483 |
|
484 |
-
if ($stream->test(
|
485 |
$type = Template::METHOD_CALL;
|
486 |
foreach ($this->parseArguments() as $n) {
|
487 |
$arguments->addElement($n);
|
488 |
}
|
489 |
}
|
490 |
} else {
|
491 |
-
throw new SyntaxError(
|
492 |
}
|
493 |
|
494 |
if ($node instanceof NameExpression && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) {
|
@@ -498,7 +508,11 @@ class ExpressionParser
|
|
498 |
|
499 |
$name = $arg->getAttribute('value');
|
500 |
|
501 |
-
|
|
|
|
|
|
|
|
|
502 |
$node->setAttribute('safe', true);
|
503 |
|
504 |
return $node;
|
@@ -508,19 +522,19 @@ class ExpressionParser
|
|
508 |
|
509 |
// slice?
|
510 |
$slice = false;
|
511 |
-
if ($stream->test(
|
512 |
$slice = true;
|
513 |
$arg = new ConstantExpression(0, $token->getLine());
|
514 |
} else {
|
515 |
$arg = $this->parseExpression();
|
516 |
}
|
517 |
|
518 |
-
if ($stream->nextIf(
|
519 |
$slice = true;
|
520 |
}
|
521 |
|
522 |
if ($slice) {
|
523 |
-
if ($stream->test(
|
524 |
$length = new ConstantExpression(null, $token->getLine());
|
525 |
} else {
|
526 |
$length = $this->parseExpression();
|
@@ -530,12 +544,12 @@ class ExpressionParser
|
|
530 |
$arguments = new Node([$arg, $length]);
|
531 |
$filter = new $class($node, new ConstantExpression('slice', $token->getLine()), $arguments, $token->getLine());
|
532 |
|
533 |
-
$stream->expect(
|
534 |
|
535 |
return $filter;
|
536 |
}
|
537 |
|
538 |
-
$stream->expect(
|
539 |
}
|
540 |
|
541 |
return new GetAttrExpression($node, $arg, $arguments, $type, $lineno);
|
@@ -551,10 +565,10 @@ class ExpressionParser
|
|
551 |
public function parseFilterExpressionRaw($node, $tag = null)
|
552 |
{
|
553 |
while (true) {
|
554 |
-
$token = $this->parser->getStream()->expect(
|
555 |
|
556 |
$name = new ConstantExpression($token->getValue(), $token->getLine());
|
557 |
-
if (!$this->parser->getStream()->test(
|
558 |
$arguments = new Node();
|
559 |
} else {
|
560 |
$arguments = $this->parseArguments(true, false, true);
|
@@ -564,7 +578,7 @@ class ExpressionParser
|
|
564 |
|
565 |
$node = new $class($node, $name, $arguments, $token->getLine(), $tag);
|
566 |
|
567 |
-
if (!$this->parser->getStream()->test(
|
568 |
break;
|
569 |
}
|
570 |
|
@@ -589,26 +603,26 @@ class ExpressionParser
|
|
589 |
$args = [];
|
590 |
$stream = $this->parser->getStream();
|
591 |
|
592 |
-
$stream->expect(
|
593 |
-
while (!$stream->test(
|
594 |
if (!empty($args)) {
|
595 |
-
$stream->expect(
|
596 |
|
597 |
// if the comma above was a trailing comma, early exit the argument parse loop
|
598 |
-
if ($stream->test(
|
599 |
break;
|
600 |
}
|
601 |
}
|
602 |
|
603 |
if ($definition) {
|
604 |
-
$token = $stream->expect(
|
605 |
$value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine());
|
606 |
} else {
|
607 |
$value = $this->parseExpression(0, $allowArrow);
|
608 |
}
|
609 |
|
610 |
$name = null;
|
611 |
-
if ($namedArguments && $token = $stream->nextIf(
|
612 |
if (!$value instanceof NameExpression) {
|
613 |
throw new SyntaxError(sprintf('A parameter name must be a string, "%s" given.', \get_class($value)), $token->getLine(), $stream->getSourceContext());
|
614 |
}
|
@@ -639,7 +653,7 @@ class ExpressionParser
|
|
639 |
}
|
640 |
}
|
641 |
}
|
642 |
-
$stream->expect(
|
643 |
|
644 |
return new Node($args);
|
645 |
}
|
@@ -650,11 +664,11 @@ class ExpressionParser
|
|
650 |
$targets = [];
|
651 |
while (true) {
|
652 |
$token = $this->parser->getCurrentToken();
|
653 |
-
if ($stream->test(
|
654 |
// in this context, string operators are variable names
|
655 |
$this->parser->getStream()->next();
|
656 |
} else {
|
657 |
-
$stream->expect(
|
658 |
}
|
659 |
$value = $token->getValue();
|
660 |
if (\in_array(strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), ['true', 'false', 'none', 'null'])) {
|
@@ -662,7 +676,7 @@ class ExpressionParser
|
|
662 |
}
|
663 |
$targets[] = new AssignNameExpression($value, $token->getLine());
|
664 |
|
665 |
-
if (!$stream->nextIf(
|
666 |
break;
|
667 |
}
|
668 |
}
|
@@ -675,7 +689,7 @@ class ExpressionParser
|
|
675 |
$targets = [];
|
676 |
while (true) {
|
677 |
$targets[] = $this->parseExpression();
|
678 |
-
if (!$this->parser->getStream()->nextIf(
|
679 |
break;
|
680 |
}
|
681 |
}
|
@@ -683,42 +697,37 @@ class ExpressionParser
|
|
683 |
return new Node($targets);
|
684 |
}
|
685 |
|
686 |
-
private function parseNotTestExpression(
|
687 |
{
|
688 |
return new NotUnary($this->parseTestExpression($node), $this->parser->getCurrentToken()->getLine());
|
689 |
}
|
690 |
|
691 |
-
private function parseTestExpression(
|
692 |
{
|
693 |
$stream = $this->parser->getStream();
|
694 |
list($name, $test) = $this->getTest($node->getTemplateLine());
|
695 |
|
696 |
$class = $this->getTestNodeClass($test);
|
697 |
$arguments = null;
|
698 |
-
if ($stream->test(
|
699 |
$arguments = $this->parseArguments(true);
|
700 |
} elseif ($test->hasOneMandatoryArgument()) {
|
701 |
$arguments = new Node([0 => $this->parsePrimaryExpression()]);
|
702 |
}
|
703 |
|
704 |
-
if ('defined' === $name && $node instanceof NameExpression && null !== $alias = $this->parser->getImportedSymbol('function', $node->getAttribute('name'))) {
|
705 |
-
$node = new MethodCallExpression($alias['node'], $alias['name'], new ArrayExpression([], $node->getTemplateLine()), $node->getTemplateLine());
|
706 |
-
$node->setAttribute('safe', true);
|
707 |
-
}
|
708 |
-
|
709 |
return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine());
|
710 |
}
|
711 |
|
712 |
-
private function getTest(
|
713 |
{
|
714 |
$stream = $this->parser->getStream();
|
715 |
-
$name = $stream->expect(
|
716 |
|
717 |
if ($test = $this->env->getTest($name)) {
|
718 |
return [$name, $test];
|
719 |
}
|
720 |
|
721 |
-
if ($stream->test(
|
722 |
// try 2-words tests
|
723 |
$name = $name.' '.$this->parser->getCurrentToken()->getValue();
|
724 |
|
@@ -735,12 +744,11 @@ class ExpressionParser
|
|
735 |
throw $e;
|
736 |
}
|
737 |
|
738 |
-
private function getTestNodeClass(
|
739 |
{
|
740 |
-
if ($test->isDeprecated()) {
|
741 |
$stream = $this->parser->getStream();
|
742 |
$message = sprintf('Twig Test "%s" is deprecated', $test->getName());
|
743 |
-
|
744 |
if (!\is_bool($test->getDeprecatedVersion())) {
|
745 |
$message .= sprintf(' since version %s', $test->getDeprecatedVersion());
|
746 |
}
|
@@ -753,10 +761,14 @@ class ExpressionParser
|
|
753 |
@trigger_error($message, \E_USER_DEPRECATED);
|
754 |
}
|
755 |
|
756 |
-
|
|
|
|
|
|
|
|
|
757 |
}
|
758 |
|
759 |
-
|
760 |
{
|
761 |
if (false === $function = $this->env->getFunction($name)) {
|
762 |
$e = new SyntaxError(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext());
|
@@ -765,7 +777,7 @@ class ExpressionParser
|
|
765 |
throw $e;
|
766 |
}
|
767 |
|
768 |
-
if ($function->isDeprecated()) {
|
769 |
$message = sprintf('Twig Function "%s" is deprecated', $function->getName());
|
770 |
if (!\is_bool($function->getDeprecatedVersion())) {
|
771 |
$message .= sprintf(' since version %s', $function->getDeprecatedVersion());
|
@@ -779,10 +791,14 @@ class ExpressionParser
|
|
779 |
@trigger_error($message, \E_USER_DEPRECATED);
|
780 |
}
|
781 |
|
782 |
-
|
|
|
|
|
|
|
|
|
783 |
}
|
784 |
|
785 |
-
|
786 |
{
|
787 |
if (false === $filter = $this->env->getFilter($name)) {
|
788 |
$e = new SyntaxError(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext());
|
@@ -791,7 +807,7 @@ class ExpressionParser
|
|
791 |
throw $e;
|
792 |
}
|
793 |
|
794 |
-
if ($filter->isDeprecated()) {
|
795 |
$message = sprintf('Twig Filter "%s" is deprecated', $filter->getName());
|
796 |
if (!\is_bool($filter->getDeprecatedVersion())) {
|
797 |
$message .= sprintf(' since version %s', $filter->getDeprecatedVersion());
|
@@ -805,11 +821,15 @@ class ExpressionParser
|
|
805 |
@trigger_error($message, \E_USER_DEPRECATED);
|
806 |
}
|
807 |
|
808 |
-
|
|
|
|
|
|
|
|
|
809 |
}
|
810 |
|
811 |
// checks that the node only contains "constant" elements
|
812 |
-
|
813 |
{
|
814 |
if (!($node instanceof ConstantExpression || $node instanceof ArrayExpression
|
815 |
|| $node instanceof NegUnary || $node instanceof PosUnary
|
13 |
namespace Twig;
|
14 |
|
15 |
use Twig\Error\SyntaxError;
|
|
|
16 |
use Twig\Node\Expression\ArrayExpression;
|
17 |
use Twig\Node\Expression\ArrowFunctionExpression;
|
18 |
use Twig\Node\Expression\AssignNameExpression;
|
24 |
use Twig\Node\Expression\MethodCallExpression;
|
25 |
use Twig\Node\Expression\NameExpression;
|
26 |
use Twig\Node\Expression\ParentExpression;
|
|
|
27 |
use Twig\Node\Expression\Unary\NegUnary;
|
28 |
use Twig\Node\Expression\Unary\NotUnary;
|
29 |
use Twig\Node\Expression\Unary\PosUnary;
|
46 |
public const OPERATOR_LEFT = 1;
|
47 |
public const OPERATOR_RIGHT = 2;
|
48 |
|
49 |
+
protected $parser;
|
50 |
+
protected $unaryOperators;
|
51 |
+
protected $binaryOperators;
|
52 |
+
|
53 |
private $env;
|
|
|
|
|
54 |
|
55 |
+
public function __construct(Parser $parser, $env = null)
|
56 |
{
|
57 |
$this->parser = $parser;
|
58 |
+
|
59 |
+
if ($env instanceof Environment) {
|
60 |
+
$this->env = $env;
|
61 |
+
$this->unaryOperators = $env->getUnaryOperators();
|
62 |
+
$this->binaryOperators = $env->getBinaryOperators();
|
63 |
+
} else {
|
64 |
+
@trigger_error('Passing the operators as constructor arguments to '.__METHOD__.' is deprecated since version 1.27. Pass the environment instead.', \E_USER_DEPRECATED);
|
65 |
+
|
66 |
+
$this->env = $parser->getEnvironment();
|
67 |
+
$this->unaryOperators = func_get_arg(1);
|
68 |
+
$this->binaryOperators = func_get_arg(2);
|
69 |
+
}
|
70 |
}
|
71 |
|
72 |
public function parseExpression($precedence = 0, $allowArrow = false)
|
86 |
} elseif ('is' === $token->getValue()) {
|
87 |
$expr = $this->parseTestExpression($expr);
|
88 |
} elseif (isset($op['callable'])) {
|
89 |
+
$expr = \call_user_func($op['callable'], $this->parser, $expr);
|
90 |
} else {
|
91 |
$expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']);
|
92 |
$class = $op['class'];
|
111 |
$stream = $this->parser->getStream();
|
112 |
|
113 |
// short array syntax (one argument, no parentheses)?
|
114 |
+
if ($stream->look(1)->test(Token::ARROW_TYPE)) {
|
115 |
$line = $stream->getCurrent()->getLine();
|
116 |
+
$token = $stream->expect(Token::NAME_TYPE);
|
117 |
$names = [new AssignNameExpression($token->getValue(), $token->getLine())];
|
118 |
+
$stream->expect(Token::ARROW_TYPE);
|
119 |
|
120 |
return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
|
121 |
}
|
122 |
|
123 |
// first, determine if we are parsing an arrow function by finding => (long form)
|
124 |
$i = 0;
|
125 |
+
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, '(')) {
|
126 |
return null;
|
127 |
}
|
128 |
++$i;
|
129 |
while (true) {
|
130 |
// variable name
|
131 |
++$i;
|
132 |
+
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, ',')) {
|
133 |
break;
|
134 |
}
|
135 |
++$i;
|
136 |
}
|
137 |
+
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, ')')) {
|
138 |
return null;
|
139 |
}
|
140 |
++$i;
|
141 |
+
if (!$stream->look($i)->test(Token::ARROW_TYPE)) {
|
142 |
return null;
|
143 |
}
|
144 |
|
145 |
// yes, let's parse it properly
|
146 |
+
$token = $stream->expect(Token::PUNCTUATION_TYPE, '(');
|
147 |
$line = $token->getLine();
|
148 |
|
149 |
$names = [];
|
150 |
while (true) {
|
151 |
+
$token = $stream->expect(Token::NAME_TYPE);
|
152 |
$names[] = new AssignNameExpression($token->getValue(), $token->getLine());
|
153 |
|
154 |
+
if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) {
|
155 |
break;
|
156 |
}
|
157 |
}
|
158 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ')');
|
159 |
+
$stream->expect(Token::ARROW_TYPE);
|
160 |
|
161 |
return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line);
|
162 |
}
|
163 |
|
164 |
+
protected function getPrimary()
|
165 |
{
|
166 |
$token = $this->parser->getCurrentToken();
|
167 |
|
172 |
$class = $operator['class'];
|
173 |
|
174 |
return $this->parsePostfixExpression(new $class($expr, $token->getLine()));
|
175 |
+
} elseif ($token->test(Token::PUNCTUATION_TYPE, '(')) {
|
176 |
$this->parser->getStream()->next();
|
177 |
$expr = $this->parseExpression();
|
178 |
+
$this->parser->getStream()->expect(Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed');
|
179 |
|
180 |
return $this->parsePostfixExpression($expr);
|
181 |
}
|
183 |
return $this->parsePrimaryExpression();
|
184 |
}
|
185 |
|
186 |
+
protected function parseConditionalExpression($expr)
|
187 |
{
|
188 |
+
while ($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, '?')) {
|
189 |
+
if (!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, ':')) {
|
190 |
$expr2 = $this->parseExpression();
|
191 |
+
if ($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, ':')) {
|
192 |
$expr3 = $this->parseExpression();
|
193 |
} else {
|
194 |
$expr3 = new ConstantExpression('', $this->parser->getCurrentToken()->getLine());
|
204 |
return $expr;
|
205 |
}
|
206 |
|
207 |
+
protected function isUnary(Token $token)
|
208 |
{
|
209 |
+
return $token->test(Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->getValue()]);
|
210 |
}
|
211 |
|
212 |
+
protected function isBinary(Token $token)
|
213 |
{
|
214 |
+
return $token->test(Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->getValue()]);
|
215 |
}
|
216 |
|
217 |
public function parsePrimaryExpression()
|
218 |
{
|
219 |
$token = $this->parser->getCurrentToken();
|
220 |
switch ($token->getType()) {
|
221 |
+
case Token::NAME_TYPE:
|
222 |
$this->parser->getStream()->next();
|
223 |
switch ($token->getValue()) {
|
224 |
case 'true':
|
247 |
}
|
248 |
break;
|
249 |
|
250 |
+
case Token::NUMBER_TYPE:
|
251 |
$this->parser->getStream()->next();
|
252 |
$node = new ConstantExpression($token->getValue(), $token->getLine());
|
253 |
break;
|
254 |
|
255 |
+
case Token::STRING_TYPE:
|
256 |
+
case Token::INTERPOLATION_START_TYPE:
|
257 |
$node = $this->parseStringExpression();
|
258 |
break;
|
259 |
|
260 |
+
case Token::OPERATOR_TYPE:
|
261 |
if (preg_match(Lexer::REGEX_NAME, $token->getValue(), $matches) && $matches[0] == $token->getValue()) {
|
262 |
// in this context, string operators are variable names
|
263 |
$this->parser->getStream()->next();
|
267 |
$class = $this->unaryOperators[$token->getValue()]['class'];
|
268 |
|
269 |
$ref = new \ReflectionClass($class);
|
270 |
+
$negClass = 'Twig\Node\Expression\Unary\NegUnary';
|
271 |
+
$posClass = 'Twig\Node\Expression\Unary\PosUnary';
|
272 |
+
if (!(\in_array($ref->getName(), [$negClass, $posClass, 'Twig_Node_Expression_Unary_Neg', 'Twig_Node_Expression_Unary_Pos'])
|
273 |
+
|| $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass)
|
274 |
|| $ref->isSubclassOf('Twig_Node_Expression_Unary_Neg') || $ref->isSubclassOf('Twig_Node_Expression_Unary_Pos'))
|
275 |
) {
|
276 |
throw new SyntaxError(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
|
285 |
|
286 |
// no break
|
287 |
default:
|
288 |
+
if ($token->test(Token::PUNCTUATION_TYPE, '[')) {
|
289 |
$node = $this->parseArrayExpression();
|
290 |
+
} elseif ($token->test(Token::PUNCTUATION_TYPE, '{')) {
|
291 |
$node = $this->parseHashExpression();
|
292 |
+
} elseif ($token->test(Token::OPERATOR_TYPE, '=') && ('==' === $this->parser->getStream()->look(-1)->getValue() || '!=' === $this->parser->getStream()->look(-1)->getValue())) {
|
293 |
throw new SyntaxError(sprintf('Unexpected operator of value "%s". Did you try to use "===" or "!==" for strict comparison? Use "is same as(value)" instead.', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
|
294 |
} else {
|
295 |
throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());
|
307 |
// a string cannot be followed by another string in a single expression
|
308 |
$nextCanBeString = true;
|
309 |
while (true) {
|
310 |
+
if ($nextCanBeString && $token = $stream->nextIf(Token::STRING_TYPE)) {
|
311 |
$nodes[] = new ConstantExpression($token->getValue(), $token->getLine());
|
312 |
$nextCanBeString = false;
|
313 |
+
} elseif ($stream->nextIf(Token::INTERPOLATION_START_TYPE)) {
|
314 |
$nodes[] = $this->parseExpression();
|
315 |
+
$stream->expect(Token::INTERPOLATION_END_TYPE);
|
316 |
$nextCanBeString = true;
|
317 |
} else {
|
318 |
break;
|
330 |
public function parseArrayExpression()
|
331 |
{
|
332 |
$stream = $this->parser->getStream();
|
333 |
+
$stream->expect(Token::PUNCTUATION_TYPE, '[', 'An array element was expected');
|
334 |
|
335 |
$node = new ArrayExpression([], $stream->getCurrent()->getLine());
|
336 |
$first = true;
|
337 |
+
while (!$stream->test(Token::PUNCTUATION_TYPE, ']')) {
|
338 |
if (!$first) {
|
339 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma');
|
340 |
|
341 |
// trailing ,?
|
342 |
+
if ($stream->test(Token::PUNCTUATION_TYPE, ']')) {
|
343 |
break;
|
344 |
}
|
345 |
}
|
347 |
|
348 |
$node->addElement($this->parseExpression());
|
349 |
}
|
350 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ']', 'An opened array is not properly closed');
|
351 |
|
352 |
return $node;
|
353 |
}
|
355 |
public function parseHashExpression()
|
356 |
{
|
357 |
$stream = $this->parser->getStream();
|
358 |
+
$stream->expect(Token::PUNCTUATION_TYPE, '{', 'A hash element was expected');
|
359 |
|
360 |
$node = new ArrayExpression([], $stream->getCurrent()->getLine());
|
361 |
$first = true;
|
362 |
+
while (!$stream->test(Token::PUNCTUATION_TYPE, '}')) {
|
363 |
if (!$first) {
|
364 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma');
|
365 |
|
366 |
// trailing ,?
|
367 |
+
if ($stream->test(Token::PUNCTUATION_TYPE, '}')) {
|
368 |
break;
|
369 |
}
|
370 |
}
|
376 |
// * a string -- 'a'
|
377 |
// * a name, which is equivalent to a string -- a
|
378 |
// * an expression, which must be enclosed in parentheses -- (1 + 2)
|
379 |
+
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
|
380 |
$key = new ConstantExpression($token->getValue(), $token->getLine());
|
381 |
|
382 |
// {a} is a shortcut for {a:a}
|
385 |
$node->addElement($value, $key);
|
386 |
continue;
|
387 |
}
|
388 |
+
} elseif (($token = $stream->nextIf(Token::STRING_TYPE)) || $token = $stream->nextIf(Token::NUMBER_TYPE)) {
|
389 |
$key = new ConstantExpression($token->getValue(), $token->getLine());
|
390 |
+
} elseif ($stream->test(Token::PUNCTUATION_TYPE, '(')) {
|
391 |
$key = $this->parseExpression();
|
392 |
} else {
|
393 |
$current = $stream->getCurrent();
|
395 |
throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $stream->getSourceContext());
|
396 |
}
|
397 |
|
398 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)');
|
399 |
$value = $this->parseExpression();
|
400 |
|
401 |
$node->addElement($value, $key);
|
402 |
}
|
403 |
+
$stream->expect(Token::PUNCTUATION_TYPE, '}', 'An opened hash is not properly closed');
|
404 |
|
405 |
return $node;
|
406 |
}
|
409 |
{
|
410 |
while (true) {
|
411 |
$token = $this->parser->getCurrentToken();
|
412 |
+
if (Token::PUNCTUATION_TYPE == $token->getType()) {
|
413 |
if ('.' == $token->getValue() || '[' == $token->getValue()) {
|
414 |
$node = $this->parseSubscriptExpression($node);
|
415 |
} elseif ('|' == $token->getValue()) {
|
483 |
if ('.' == $token->getValue()) {
|
484 |
$token = $stream->next();
|
485 |
if (
|
486 |
+
Token::NAME_TYPE == $token->getType()
|
487 |
||
|
488 |
+
Token::NUMBER_TYPE == $token->getType()
|
489 |
||
|
490 |
+
(Token::OPERATOR_TYPE == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue()))
|
491 |
) {
|
492 |
$arg = new ConstantExpression($token->getValue(), $lineno);
|
493 |
|
494 |
+
if ($stream->test(Token::PUNCTUATION_TYPE, '(')) {
|
495 |
$type = Template::METHOD_CALL;
|
496 |
foreach ($this->parseArguments() as $n) {
|
497 |
$arguments->addElement($n);
|
498 |
}
|
499 |
}
|
500 |
} else {
|
501 |
+
throw new SyntaxError('Expected name or number.', $lineno, $stream->getSourceContext());
|
502 |
}
|
503 |
|
504 |
if ($node instanceof NameExpression && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) {
|
508 |
|
509 |
$name = $arg->getAttribute('value');
|
510 |
|
511 |
+
if ($this->parser->isReservedMacroName($name)) {
|
512 |
+
throw new SyntaxError(sprintf('"%s" cannot be called as macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getSourceContext());
|
513 |
+
}
|
514 |
+
|
515 |
+
$node = new MethodCallExpression($node, 'get'.$name, $arguments, $lineno);
|
516 |
$node->setAttribute('safe', true);
|
517 |
|
518 |
return $node;
|
522 |
|
523 |
// slice?
|
524 |
$slice = false;
|
525 |
+
if ($stream->test(Token::PUNCTUATION_TYPE, ':')) {
|
526 |
$slice = true;
|
527 |
$arg = new ConstantExpression(0, $token->getLine());
|
528 |
} else {
|
529 |
$arg = $this->parseExpression();
|
530 |
}
|
531 |
|
532 |
+
if ($stream->nextIf(Token::PUNCTUATION_TYPE, ':')) {
|
533 |
$slice = true;
|
534 |
}
|
535 |
|
536 |
if ($slice) {
|
537 |
+
if ($stream->test(Token::PUNCTUATION_TYPE, ']')) {
|
538 |
$length = new ConstantExpression(null, $token->getLine());
|
539 |
} else {
|
540 |
$length = $this->parseExpression();
|
544 |
$arguments = new Node([$arg, $length]);
|
545 |
$filter = new $class($node, new ConstantExpression('slice', $token->getLine()), $arguments, $token->getLine());
|
546 |
|
547 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ']');
|
548 |
|
549 |
return $filter;
|
550 |
}
|
551 |
|
552 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ']');
|
553 |
}
|
554 |
|
555 |
return new GetAttrExpression($node, $arg, $arguments, $type, $lineno);
|
565 |
public function parseFilterExpressionRaw($node, $tag = null)
|
566 |
{
|
567 |
while (true) {
|
568 |
+
$token = $this->parser->getStream()->expect(Token::NAME_TYPE);
|
569 |
|
570 |
$name = new ConstantExpression($token->getValue(), $token->getLine());
|
571 |
+
if (!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE, '(')) {
|
572 |
$arguments = new Node();
|
573 |
} else {
|
574 |
$arguments = $this->parseArguments(true, false, true);
|
578 |
|
579 |
$node = new $class($node, $name, $arguments, $token->getLine(), $tag);
|
580 |
|
581 |
+
if (!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE, '|')) {
|
582 |
break;
|
583 |
}
|
584 |
|
603 |
$args = [];
|
604 |
$stream = $this->parser->getStream();
|
605 |
|
606 |
+
$stream->expect(Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis');
|
607 |
+
while (!$stream->test(Token::PUNCTUATION_TYPE, ')')) {
|
608 |
if (!empty($args)) {
|
609 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma');
|
610 |
|
611 |
// if the comma above was a trailing comma, early exit the argument parse loop
|
612 |
+
if ($stream->test(Token::PUNCTUATION_TYPE, ')')) {
|
613 |
break;
|
614 |
}
|
615 |
}
|
616 |
|
617 |
if ($definition) {
|
618 |
+
$token = $stream->expect(Token::NAME_TYPE, null, 'An argument must be a name');
|
619 |
$value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine());
|
620 |
} else {
|
621 |
$value = $this->parseExpression(0, $allowArrow);
|
622 |
}
|
623 |
|
624 |
$name = null;
|
625 |
+
if ($namedArguments && $token = $stream->nextIf(Token::OPERATOR_TYPE, '=')) {
|
626 |
if (!$value instanceof NameExpression) {
|
627 |
throw new SyntaxError(sprintf('A parameter name must be a string, "%s" given.', \get_class($value)), $token->getLine(), $stream->getSourceContext());
|
628 |
}
|
653 |
}
|
654 |
}
|
655 |
}
|
656 |
+
$stream->expect(Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis');
|
657 |
|
658 |
return new Node($args);
|
659 |
}
|
664 |
$targets = [];
|
665 |
while (true) {
|
666 |
$token = $this->parser->getCurrentToken();
|
667 |
+
if ($stream->test(Token::OPERATOR_TYPE) && preg_match(Lexer::REGEX_NAME, $token->getValue())) {
|
668 |
// in this context, string operators are variable names
|
669 |
$this->parser->getStream()->next();
|
670 |
} else {
|
671 |
+
$stream->expect(Token::NAME_TYPE, null, 'Only variables can be assigned to');
|
672 |
}
|
673 |
$value = $token->getValue();
|
674 |
if (\in_array(strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), ['true', 'false', 'none', 'null'])) {
|
676 |
}
|
677 |
$targets[] = new AssignNameExpression($value, $token->getLine());
|
678 |
|
679 |
+
if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) {
|
680 |
break;
|
681 |
}
|
682 |
}
|
689 |
$targets = [];
|
690 |
while (true) {
|
691 |
$targets[] = $this->parseExpression();
|
692 |
+
if (!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, ',')) {
|
693 |
break;
|
694 |
}
|
695 |
}
|
697 |
return new Node($targets);
|
698 |
}
|
699 |
|
700 |
+
private function parseNotTestExpression(\Twig_NodeInterface $node)
|
701 |
{
|
702 |
return new NotUnary($this->parseTestExpression($node), $this->parser->getCurrentToken()->getLine());
|
703 |
}
|
704 |
|
705 |
+
private function parseTestExpression(\Twig_NodeInterface $node)
|
706 |
{
|
707 |
$stream = $this->parser->getStream();
|
708 |
list($name, $test) = $this->getTest($node->getTemplateLine());
|
709 |
|
710 |
$class = $this->getTestNodeClass($test);
|
711 |
$arguments = null;
|
712 |
+
if ($stream->test(Token::PUNCTUATION_TYPE, '(')) {
|
713 |
$arguments = $this->parseArguments(true);
|
714 |
} elseif ($test->hasOneMandatoryArgument()) {
|
715 |
$arguments = new Node([0 => $this->parsePrimaryExpression()]);
|
716 |
}
|
717 |
|
|
|
|
|
|
|
|
|
|
|
718 |
return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine());
|
719 |
}
|
720 |
|
721 |
+
private function getTest($line)
|
722 |
{
|
723 |
$stream = $this->parser->getStream();
|
724 |
+
$name = $stream->expect(Token::NAME_TYPE)->getValue();
|
725 |
|
726 |
if ($test = $this->env->getTest($name)) {
|
727 |
return [$name, $test];
|
728 |
}
|
729 |
|
730 |
+
if ($stream->test(Token::NAME_TYPE)) {
|
731 |
// try 2-words tests
|
732 |
$name = $name.' '.$this->parser->getCurrentToken()->getValue();
|
733 |
|
744 |
throw $e;
|
745 |
}
|
746 |
|
747 |
+
private function getTestNodeClass($test)
|
748 |
{
|
749 |
+
if ($test instanceof TwigTest && $test->isDeprecated()) {
|
750 |
$stream = $this->parser->getStream();
|
751 |
$message = sprintf('Twig Test "%s" is deprecated', $test->getName());
|
|
|
752 |
if (!\is_bool($test->getDeprecatedVersion())) {
|
753 |
$message .= sprintf(' since version %s', $test->getDeprecatedVersion());
|
754 |
}
|
761 |
@trigger_error($message, \E_USER_DEPRECATED);
|
762 |
}
|
763 |
|
764 |
+
if ($test instanceof TwigTest) {
|
765 |
+
return $test->getNodeClass();
|
766 |
+
}
|
767 |
+
|
768 |
+
return $test instanceof \Twig_Test_Node ? $test->getClass() : 'Twig\Node\Expression\TestExpression';
|
769 |
}
|
770 |
|
771 |
+
protected function getFunctionNodeClass($name, $line)
|
772 |
{
|
773 |
if (false === $function = $this->env->getFunction($name)) {
|
774 |
$e = new SyntaxError(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext());
|
777 |
throw $e;
|
778 |
}
|
779 |
|
780 |
+
if ($function instanceof TwigFunction && $function->isDeprecated()) {
|
781 |
$message = sprintf('Twig Function "%s" is deprecated', $function->getName());
|
782 |
if (!\is_bool($function->getDeprecatedVersion())) {
|
783 |
$message .= sprintf(' since version %s', $function->getDeprecatedVersion());
|
791 |
@trigger_error($message, \E_USER_DEPRECATED);
|
792 |
}
|
793 |
|
794 |
+
if ($function instanceof TwigFunction) {
|
795 |
+
return $function->getNodeClass();
|
796 |
+
}
|
797 |
+
|
798 |
+
return $function instanceof \Twig_Function_Node ? $function->getClass() : 'Twig\Node\Expression\FunctionExpression';
|
799 |
}
|
800 |
|
801 |
+
protected function getFilterNodeClass($name, $line)
|
802 |
{
|
803 |
if (false === $filter = $this->env->getFilter($name)) {
|
804 |
$e = new SyntaxError(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext());
|
807 |
throw $e;
|
808 |
}
|
809 |
|
810 |
+
if ($filter instanceof TwigFilter && $filter->isDeprecated()) {
|
811 |
$message = sprintf('Twig Filter "%s" is deprecated', $filter->getName());
|
812 |
if (!\is_bool($filter->getDeprecatedVersion())) {
|
813 |
$message .= sprintf(' since version %s', $filter->getDeprecatedVersion());
|
821 |
@trigger_error($message, \E_USER_DEPRECATED);
|
822 |
}
|
823 |
|
824 |
+
if ($filter instanceof TwigFilter) {
|
825 |
+
return $filter->getNodeClass();
|
826 |
+
}
|
827 |
+
|
828 |
+
return $filter instanceof \Twig_Filter_Node ? $filter->getClass() : 'Twig\Node\Expression\FilterExpression';
|
829 |
}
|
830 |
|
831 |
// checks that the node only contains "constant" elements
|
832 |
+
protected function checkConstantExpression(\Twig_NodeInterface $node)
|
833 |
{
|
834 |
if (!($node instanceof ConstantExpression || $node instanceof ArrayExpression
|
835 |
|| $node instanceof NegUnary || $node instanceof PosUnary
|
vendor/twig/twig/src/Extension/AbstractExtension.php
CHANGED
@@ -11,8 +11,17 @@
|
|
11 |
|
12 |
namespace Twig\Extension;
|
13 |
|
|
|
|
|
14 |
abstract class AbstractExtension implements ExtensionInterface
|
15 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
public function getTokenParsers()
|
17 |
{
|
18 |
return [];
|
@@ -42,6 +51,22 @@ abstract class AbstractExtension implements ExtensionInterface
|
|
42 |
{
|
43 |
return [];
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
class_alias('Twig\Extension\AbstractExtension', 'Twig_Extension');
|
11 |
|
12 |
namespace Twig\Extension;
|
13 |
|
14 |
+
use Twig\Environment;
|
15 |
+
|
16 |
abstract class AbstractExtension implements ExtensionInterface
|
17 |
{
|
18 |
+
/**
|
19 |
+
* @deprecated since 1.23 (to be removed in 2.0), implement \Twig_Extension_InitRuntimeInterface instead
|
20 |
+
*/
|
21 |
+
public function initRuntime(Environment $environment)
|
22 |
+
{
|
23 |
+
}
|
24 |
+
|
25 |
public function getTokenParsers()
|
26 |
{
|
27 |
return [];
|
51 |
{
|
52 |
return [];
|
53 |
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @deprecated since 1.23 (to be removed in 2.0), implement \Twig_Extension_GlobalsInterface instead
|
57 |
+
*/
|
58 |
+
public function getGlobals()
|
59 |
+
{
|
60 |
+
return [];
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @deprecated since 1.26 (to be removed in 2.0), not used anymore internally
|
65 |
+
*/
|
66 |
+
public function getName()
|
67 |
+
{
|
68 |
+
return static::class;
|
69 |
+
}
|
70 |
}
|
71 |
|
72 |
class_alias('Twig\Extension\AbstractExtension', 'Twig_Extension');
|
vendor/twig/twig/src/Extension/CoreExtension.php
CHANGED
@@ -11,45 +11,6 @@
|
|
11 |
|
12 |
namespace Twig\Extension {
|
13 |
use Twig\ExpressionParser;
|
14 |
-
use Twig\Node\Expression\Binary\AddBinary;
|
15 |
-
use Twig\Node\Expression\Binary\AndBinary;
|
16 |
-
use Twig\Node\Expression\Binary\BitwiseAndBinary;
|
17 |
-
use Twig\Node\Expression\Binary\BitwiseOrBinary;
|
18 |
-
use Twig\Node\Expression\Binary\BitwiseXorBinary;
|
19 |
-
use Twig\Node\Expression\Binary\ConcatBinary;
|
20 |
-
use Twig\Node\Expression\Binary\DivBinary;
|
21 |
-
use Twig\Node\Expression\Binary\EndsWithBinary;
|
22 |
-
use Twig\Node\Expression\Binary\EqualBinary;
|
23 |
-
use Twig\Node\Expression\Binary\FloorDivBinary;
|
24 |
-
use Twig\Node\Expression\Binary\GreaterBinary;
|
25 |
-
use Twig\Node\Expression\Binary\GreaterEqualBinary;
|
26 |
-
use Twig\Node\Expression\Binary\InBinary;
|
27 |
-
use Twig\Node\Expression\Binary\LessBinary;
|
28 |
-
use Twig\Node\Expression\Binary\LessEqualBinary;
|
29 |
-
use Twig\Node\Expression\Binary\MatchesBinary;
|
30 |
-
use Twig\Node\Expression\Binary\ModBinary;
|
31 |
-
use Twig\Node\Expression\Binary\MulBinary;
|
32 |
-
use Twig\Node\Expression\Binary\NotEqualBinary;
|
33 |
-
use Twig\Node\Expression\Binary\NotInBinary;
|
34 |
-
use Twig\Node\Expression\Binary\OrBinary;
|
35 |
-
use Twig\Node\Expression\Binary\PowerBinary;
|
36 |
-
use Twig\Node\Expression\Binary\RangeBinary;
|
37 |
-
use Twig\Node\Expression\Binary\SpaceshipBinary;
|
38 |
-
use Twig\Node\Expression\Binary\StartsWithBinary;
|
39 |
-
use Twig\Node\Expression\Binary\SubBinary;
|
40 |
-
use Twig\Node\Expression\Filter\DefaultFilter;
|
41 |
-
use Twig\Node\Expression\NullCoalesceExpression;
|
42 |
-
use Twig\Node\Expression\Test\ConstantTest;
|
43 |
-
use Twig\Node\Expression\Test\DefinedTest;
|
44 |
-
use Twig\Node\Expression\Test\DivisiblebyTest;
|
45 |
-
use Twig\Node\Expression\Test\EvenTest;
|
46 |
-
use Twig\Node\Expression\Test\NullTest;
|
47 |
-
use Twig\Node\Expression\Test\OddTest;
|
48 |
-
use Twig\Node\Expression\Test\SameasTest;
|
49 |
-
use Twig\Node\Expression\Unary\NegUnary;
|
50 |
-
use Twig\Node\Expression\Unary\NotUnary;
|
51 |
-
use Twig\Node\Expression\Unary\PosUnary;
|
52 |
-
use Twig\NodeVisitor\MacroAutoImportNodeVisitor;
|
53 |
use Twig\TokenParser\ApplyTokenParser;
|
54 |
use Twig\TokenParser\BlockTokenParser;
|
55 |
use Twig\TokenParser\DeprecatedTokenParser;
|
@@ -72,41 +33,34 @@ use Twig\TwigFilter;
|
|
72 |
use Twig\TwigFunction;
|
73 |
use Twig\TwigTest;
|
74 |
|
75 |
-
|
|
|
|
|
|
|
76 |
{
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
/**
|
83 |
* Defines a new escaper to be used via the escape filter.
|
84 |
*
|
85 |
* @param string $strategy The strategy name that should be used as a strategy in the escape call
|
86 |
* @param callable $callable A valid PHP callable
|
87 |
-
*
|
88 |
-
* @deprecated since Twig 2.11, to be removed in 3.0; use the same method on EscaperExtension instead
|
89 |
*/
|
90 |
-
public function setEscaper($strategy,
|
91 |
{
|
92 |
-
@trigger_error(sprintf('The "%s" method is deprecated since Twig 2.11; use "%s::setEscaper" instead.', __METHOD__, EscaperExtension::class), \E_USER_DEPRECATED);
|
93 |
-
|
94 |
$this->escapers[$strategy] = $callable;
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
* Gets all defined escapers.
|
99 |
*
|
100 |
-
* @return
|
101 |
-
*
|
102 |
-
* @deprecated since Twig 2.11, to be removed in 3.0; use the same method on EscaperExtension instead
|
103 |
*/
|
104 |
-
public function getEscapers(
|
105 |
{
|
106 |
-
if (0 === \func_num_args() || \func_get_arg(0)) {
|
107 |
-
@trigger_error(sprintf('The "%s" method is deprecated since Twig 2.11; use "%s::getEscapers" instead.', __METHOD__, EscaperExtension::class), \E_USER_DEPRECATED);
|
108 |
-
}
|
109 |
-
|
110 |
return $this->escapers;
|
111 |
}
|
112 |
|
@@ -209,11 +163,11 @@ final class CoreExtension extends AbstractExtension
|
|
209 |
|
210 |
public function getFilters()
|
211 |
{
|
212 |
-
|
213 |
// formatting filters
|
214 |
new TwigFilter('date', 'twig_date_format_filter', ['needs_environment' => true]),
|
215 |
new TwigFilter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]),
|
216 |
-
new TwigFilter('format', '
|
217 |
new TwigFilter('replace', 'twig_replace_filter'),
|
218 |
new TwigFilter('number_format', 'twig_number_format_filter', ['needs_environment' => true]),
|
219 |
new TwigFilter('abs', 'abs'),
|
@@ -221,26 +175,25 @@ final class CoreExtension extends AbstractExtension
|
|
221 |
|
222 |
// encoding
|
223 |
new TwigFilter('url_encode', 'twig_urlencode_filter'),
|
224 |
-
new TwigFilter('json_encode', '
|
225 |
new TwigFilter('convert_encoding', 'twig_convert_encoding'),
|
226 |
|
227 |
// string filters
|
228 |
new TwigFilter('title', 'twig_title_string_filter', ['needs_environment' => true]),
|
229 |
new TwigFilter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]),
|
230 |
-
new TwigFilter('upper', '
|
231 |
-
new TwigFilter('lower', '
|
232 |
-
new TwigFilter('striptags', '
|
233 |
new TwigFilter('trim', 'twig_trim_filter'),
|
234 |
-
new TwigFilter('nl2br', '
|
235 |
new TwigFilter('spaceless', 'twig_spaceless', ['is_safe' => ['html']]),
|
236 |
|
237 |
// array helpers
|
238 |
new TwigFilter('join', 'twig_join_filter'),
|
239 |
new TwigFilter('split', 'twig_split_filter', ['needs_environment' => true]),
|
240 |
-
new TwigFilter('sort', 'twig_sort_filter'
|
241 |
new TwigFilter('merge', 'twig_array_merge'),
|
242 |
new TwigFilter('batch', 'twig_array_batch'),
|
243 |
-
new TwigFilter('column', 'twig_array_column'),
|
244 |
new TwigFilter('filter', 'twig_array_filter', ['needs_environment' => true]),
|
245 |
new TwigFilter('map', 'twig_array_map', ['needs_environment' => true]),
|
246 |
new TwigFilter('reduce', 'twig_array_reduce', ['needs_environment' => true]),
|
@@ -253,9 +206,20 @@ final class CoreExtension extends AbstractExtension
|
|
253 |
new TwigFilter('last', 'twig_last', ['needs_environment' => true]),
|
254 |
|
255 |
// iteration and runtime
|
256 |
-
new TwigFilter('default', '_twig_default_filter', ['node_class' => DefaultFilter
|
257 |
new TwigFilter('keys', 'twig_get_array_keys_filter'),
|
|
|
|
|
|
|
|
|
258 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
}
|
260 |
|
261 |
public function getFunctions()
|
@@ -276,80 +240,81 @@ final class CoreExtension extends AbstractExtension
|
|
276 |
public function getTests()
|
277 |
{
|
278 |
return [
|
279 |
-
new TwigTest('even', null, ['node_class' => EvenTest
|
280 |
-
new TwigTest('odd', null, ['node_class' => OddTest
|
281 |
-
new TwigTest('defined', null, ['node_class' => DefinedTest
|
282 |
-
new TwigTest('
|
283 |
-
new TwigTest('
|
284 |
-
new TwigTest('
|
285 |
-
new TwigTest('
|
286 |
-
new TwigTest('
|
|
|
|
|
287 |
new TwigTest('empty', 'twig_test_empty'),
|
288 |
new TwigTest('iterable', 'twig_test_iterable'),
|
289 |
];
|
290 |
}
|
291 |
|
292 |
-
public function getNodeVisitors()
|
293 |
-
{
|
294 |
-
return [new MacroAutoImportNodeVisitor()];
|
295 |
-
}
|
296 |
-
|
297 |
public function getOperators()
|
298 |
{
|
299 |
return [
|
300 |
[
|
301 |
-
'not' => ['precedence' => 50, 'class' => NotUnary
|
302 |
-
'-' => ['precedence' => 500, 'class' => NegUnary
|
303 |
-
'+' => ['precedence' => 500, 'class' => PosUnary
|
304 |
],
|
305 |
[
|
306 |
-
'or' => ['precedence' => 10, 'class' => OrBinary
|
307 |
-
'and' => ['precedence' => 15, 'class' => AndBinary
|
308 |
-
'b-or' => ['precedence' => 16, 'class' => BitwiseOrBinary
|
309 |
-
'b-xor' => ['precedence' => 17, 'class' => BitwiseXorBinary
|
310 |
-
'b-and' => ['precedence' => 18, 'class' => BitwiseAndBinary
|
311 |
-
'==' => ['precedence' => 20, 'class' => EqualBinary
|
312 |
-
'!=' => ['precedence' => 20, 'class' => NotEqualBinary
|
313 |
-
'
|
314 |
-
'
|
315 |
-
'
|
316 |
-
'
|
317 |
-
'
|
318 |
-
'
|
319 |
-
'
|
320 |
-
'
|
321 |
-
'
|
322 |
-
'
|
323 |
-
'
|
324 |
-
'
|
325 |
-
'
|
326 |
-
'
|
327 |
-
'
|
328 |
-
'
|
329 |
-
'
|
330 |
-
'%' => ['precedence' => 60, 'class' => ModBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
331 |
'is' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
332 |
'is not' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
333 |
-
'**' => ['precedence' => 200, 'class' => PowerBinary
|
334 |
-
'??' => ['precedence' => 300, 'class' => NullCoalesceExpression
|
335 |
],
|
336 |
];
|
337 |
}
|
|
|
|
|
|
|
|
|
|
|
338 |
}
|
339 |
|
340 |
class_alias('Twig\Extension\CoreExtension', 'Twig_Extension_Core');
|
341 |
}
|
342 |
|
343 |
namespace {
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
|
354 |
/**
|
355 |
* Cycles over a value.
|
@@ -408,21 +373,22 @@ function twig_random(Environment $env, $values = null, $max = null)
|
|
408 |
if ('' === $values) {
|
409 |
return '';
|
410 |
}
|
|
|
|
|
|
|
|
|
411 |
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
$values = twig_convert_encoding($values, 'UTF-8', $charset);
|
416 |
-
}
|
417 |
-
|
418 |
-
// unicode version of str_split()
|
419 |
-
// split at all positions, but not after the start and not before the end
|
420 |
-
$values = preg_split('/(?<!^)(?!$)/u', $values);
|
421 |
|
422 |
-
|
423 |
-
|
424 |
-
|
|
|
425 |
}
|
|
|
|
|
426 |
}
|
427 |
}
|
428 |
|
@@ -444,16 +410,16 @@ function twig_random(Environment $env, $values = null, $max = null)
|
|
444 |
*
|
445 |
* {{ post.published_at|date("m/d/Y") }}
|
446 |
*
|
447 |
-
* @param \DateTimeInterface|\DateInterval|string $date A date
|
448 |
-
* @param string|null
|
449 |
-
* @param \DateTimeZone|string|false|null
|
450 |
*
|
451 |
* @return string The formatted date
|
452 |
*/
|
453 |
function twig_date_format_filter(Environment $env, $date, $format = null, $timezone = null)
|
454 |
{
|
455 |
if (null === $format) {
|
456 |
-
$formats = $env->getExtension(CoreExtension
|
457 |
$format = $date instanceof \DateInterval ? $formats[1] : $formats[0];
|
458 |
}
|
459 |
|
@@ -469,29 +435,20 @@ function twig_date_format_filter(Environment $env, $date, $format = null, $timez
|
|
469 |
*
|
470 |
* {{ post.published_at|date_modify("-1day")|date("m/d/Y") }}
|
471 |
*
|
472 |
-
* @param \
|
473 |
-
* @param string
|
474 |
*
|
475 |
-
* @return \
|
476 |
*/
|
477 |
function twig_date_modify_filter(Environment $env, $date, $modifier)
|
478 |
{
|
479 |
$date = twig_date_converter($env, $date, false);
|
|
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
* Returns a formatted string.
|
486 |
-
*
|
487 |
-
* @param string|null $format
|
488 |
-
* @param ...$values
|
489 |
-
*
|
490 |
-
* @return string
|
491 |
-
*/
|
492 |
-
function twig_sprintf($format, ...$values)
|
493 |
-
{
|
494 |
-
return sprintf($format ?? '', ...$values);
|
495 |
}
|
496 |
|
497 |
/**
|
@@ -501,8 +458,8 @@ function twig_sprintf($format, ...$values)
|
|
501 |
* {# do something #}
|
502 |
* {% endif %}
|
503 |
*
|
504 |
-
* @param \DateTimeInterface|string|null
|
505 |
-
* @param \DateTimeZone|string|false|null
|
506 |
*
|
507 |
* @return \DateTimeInterface
|
508 |
*/
|
@@ -511,7 +468,7 @@ function twig_date_converter(Environment $env, $date = null, $timezone = null)
|
|
511 |
// determine the timezone
|
512 |
if (false !== $timezone) {
|
513 |
if (null === $timezone) {
|
514 |
-
$timezone = $env->getExtension(CoreExtension
|
515 |
} elseif (!$timezone instanceof \DateTimeZone) {
|
516 |
$timezone = new \DateTimeZone($timezone);
|
517 |
}
|
@@ -522,7 +479,7 @@ function twig_date_converter(Environment $env, $date = null, $timezone = null)
|
|
522 |
return false !== $timezone ? $date->setTimezone($timezone) : $date;
|
523 |
}
|
524 |
|
525 |
-
if ($date instanceof \DateTimeInterface) {
|
526 |
$date = clone $date;
|
527 |
if (false !== $timezone) {
|
528 |
$date->setTimezone($timezone);
|
@@ -536,14 +493,14 @@ function twig_date_converter(Environment $env, $date = null, $timezone = null)
|
|
536 |
$date = 'now';
|
537 |
}
|
538 |
|
539 |
-
return new \DateTime($date, false !== $timezone ? $timezone : $env->getExtension(CoreExtension
|
540 |
}
|
541 |
|
542 |
$asString = (string) $date;
|
543 |
if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) {
|
544 |
$date = new \DateTime('@'.$date);
|
545 |
} else {
|
546 |
-
$date = new \DateTime($date, $env->getExtension(CoreExtension
|
547 |
}
|
548 |
|
549 |
if (false !== $timezone) {
|
@@ -556,33 +513,38 @@ function twig_date_converter(Environment $env, $date = null, $timezone = null)
|
|
556 |
/**
|
557 |
* Replaces strings within a string.
|
558 |
*
|
559 |
-
* @param string
|
560 |
* @param array|\Traversable $from Replace values
|
|
|
561 |
*
|
562 |
* @return string
|
563 |
*/
|
564 |
-
function twig_replace_filter($str, $from)
|
565 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
if (!twig_test_iterable($from)) {
|
567 |
throw new RuntimeError(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".', \is_object($from) ? \get_class($from) : \gettype($from)));
|
568 |
}
|
569 |
|
570 |
-
return strtr($str
|
571 |
}
|
572 |
|
573 |
/**
|
574 |
* Rounds a number.
|
575 |
*
|
576 |
-
* @param int|float
|
577 |
-
* @param int|float
|
578 |
-
* @param string
|
579 |
*
|
580 |
* @return int|float The rounded number
|
581 |
*/
|
582 |
function twig_round($value, $precision = 0, $method = 'common')
|
583 |
{
|
584 |
-
$value = (float) $value;
|
585 |
-
|
586 |
if ('common' === $method) {
|
587 |
return round($value, $precision);
|
588 |
}
|
@@ -598,7 +560,7 @@ function twig_round($value, $precision = 0, $method = 'common')
|
|
598 |
* Number format filter.
|
599 |
*
|
600 |
* All of the formatting options can be left null, in that case the defaults will
|
601 |
-
* be used.
|
602 |
* environment object.
|
603 |
*
|
604 |
* @param mixed $number A float/int/string of the number to format
|
@@ -610,7 +572,7 @@ function twig_round($value, $precision = 0, $method = 'common')
|
|
610 |
*/
|
611 |
function twig_number_format_filter(Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null)
|
612 |
{
|
613 |
-
$defaults = $env->getExtension(CoreExtension
|
614 |
if (null === $decimal) {
|
615 |
$decimal = $defaults[0];
|
616 |
}
|
@@ -629,17 +591,47 @@ function twig_number_format_filter(Environment $env, $number, $decimal = null, $
|
|
629 |
/**
|
630 |
* URL encodes (RFC 3986) a string as a path segment or an array as a query string.
|
631 |
*
|
632 |
-
* @param string|array
|
633 |
*
|
634 |
* @return string The URL encoded value
|
635 |
*/
|
636 |
function twig_urlencode_filter($url)
|
637 |
{
|
638 |
if (\is_array($url)) {
|
639 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
}
|
641 |
|
642 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
}
|
644 |
|
645 |
/**
|
@@ -701,7 +693,13 @@ function twig_slice(Environment $env, $item, $start, $length = null, $preserveKe
|
|
701 |
return \array_slice($item, $start, $length, $preserveKeys);
|
702 |
}
|
703 |
|
704 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
705 |
}
|
706 |
|
707 |
/**
|
@@ -790,32 +788,34 @@ function twig_join_filter($value, $glue = '', $and = null)
|
|
790 |
* {{ "aabbcc"|split('', 2) }}
|
791 |
* {# returns [aa, bb, cc] #}
|
792 |
*
|
793 |
-
* @param string
|
794 |
-
* @param string
|
795 |
-
* @param int
|
796 |
*
|
797 |
* @return array The split string as an array
|
798 |
*/
|
799 |
function twig_split_filter(Environment $env, $value, $delimiter, $limit = null)
|
800 |
{
|
801 |
-
$value = $value ?? '';
|
802 |
-
|
803 |
if (\strlen($delimiter) > 0) {
|
804 |
return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit);
|
805 |
}
|
806 |
|
|
|
|
|
|
|
|
|
807 |
if ($limit <= 1) {
|
808 |
return preg_split('/(?<!^)(?!$)/u', $value);
|
809 |
}
|
810 |
|
811 |
-
$length = mb_strlen($value, $
|
812 |
if ($length < $limit) {
|
813 |
return [$value];
|
814 |
}
|
815 |
|
816 |
$r = [];
|
817 |
for ($i = 0; $i < $length; $i += $limit) {
|
818 |
-
$r[] = mb_substr($value, $i, $limit, $
|
819 |
}
|
820 |
|
821 |
return $r;
|
@@ -885,8 +885,8 @@ function twig_get_array_keys_filter($array)
|
|
885 |
/**
|
886 |
* Reverses a variable.
|
887 |
*
|
888 |
-
* @param array|\Traversable|string
|
889 |
-
* @param bool
|
890 |
*
|
891 |
* @return mixed The reversed input
|
892 |
*/
|
@@ -900,23 +900,25 @@ function twig_reverse_filter(Environment $env, $item, $preserveKeys = false)
|
|
900 |
return array_reverse($item, $preserveKeys);
|
901 |
}
|
902 |
|
903 |
-
$
|
|
|
904 |
|
905 |
-
|
|
|
|
|
906 |
|
907 |
-
|
908 |
-
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
909 |
-
}
|
910 |
|
911 |
-
|
912 |
|
913 |
-
|
|
|
|
|
914 |
|
915 |
-
|
916 |
-
$string = twig_convert_encoding($string, $charset, 'UTF-8');
|
917 |
}
|
918 |
|
919 |
-
return $
|
920 |
}
|
921 |
|
922 |
/**
|
@@ -926,7 +928,7 @@ function twig_reverse_filter(Environment $env, $item, $preserveKeys = false)
|
|
926 |
*
|
927 |
* @return array
|
928 |
*/
|
929 |
-
function twig_sort_filter(
|
930 |
{
|
931 |
if ($array instanceof \Traversable) {
|
932 |
$array = iterator_to_array($array);
|
@@ -934,13 +936,7 @@ function twig_sort_filter(Environment $env, $array, $arrow = null)
|
|
934 |
throw new RuntimeError(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', \gettype($array)));
|
935 |
}
|
936 |
|
937 |
-
|
938 |
-
twig_check_arrow_in_sandbox($env, $arrow, 'sort', 'filter');
|
939 |
-
|
940 |
-
uasort($array, $arrow);
|
941 |
-
} else {
|
942 |
-
asort($array);
|
943 |
-
}
|
944 |
|
945 |
return $array;
|
946 |
}
|
@@ -985,10 +981,6 @@ function twig_in_filter($value, $compare)
|
|
985 |
/**
|
986 |
* Returns a trimmed string.
|
987 |
*
|
988 |
-
* @param string|null $string
|
989 |
-
* @param string|null $characterMask
|
990 |
-
* @param string $side
|
991 |
-
*
|
992 |
* @return string
|
993 |
*
|
994 |
* @throws RuntimeError When an invalid trimming side is used (not a string or not 'left', 'right', or 'both')
|
@@ -1001,172 +993,481 @@ function twig_trim_filter($string, $characterMask = null, $side = 'both')
|
|
1001 |
|
1002 |
switch ($side) {
|
1003 |
case 'both':
|
1004 |
-
return trim($string
|
1005 |
case 'left':
|
1006 |
-
return ltrim($string
|
1007 |
case 'right':
|
1008 |
-
return rtrim($string
|
1009 |
default:
|
1010 |
throw new RuntimeError('Trimming side must be "left", "right" or "both".');
|
1011 |
}
|
1012 |
}
|
1013 |
|
1014 |
/**
|
1015 |
-
*
|
1016 |
-
*
|
1017 |
-
* @param string|null $string
|
1018 |
*
|
1019 |
* @return string
|
1020 |
*/
|
1021 |
-
function
|
1022 |
{
|
1023 |
-
return
|
1024 |
}
|
1025 |
|
1026 |
/**
|
1027 |
-
*
|
1028 |
*
|
1029 |
-
* @param string
|
|
|
|
|
|
|
1030 |
*
|
1031 |
* @return string
|
1032 |
*/
|
1033 |
-
function
|
1034 |
{
|
1035 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1036 |
}
|
1037 |
|
1038 |
/**
|
1039 |
-
* @
|
1040 |
-
* @param string $to
|
1041 |
-
* @param string $from
|
1042 |
-
*
|
1043 |
-
* @return string
|
1044 |
*/
|
1045 |
-
function
|
1046 |
{
|
1047 |
-
|
1048 |
-
|
|
|
|
|
|
|
|
|
1049 |
}
|
1050 |
|
1051 |
-
return
|
1052 |
}
|
1053 |
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
|
|
|
|
|
|
1065 |
}
|
|
|
1066 |
|
1067 |
-
|
1068 |
-
|
|
|
|
|
1069 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1070 |
|
1071 |
-
|
1072 |
-
return \count($thing);
|
1073 |
}
|
|
|
1074 |
|
1075 |
-
|
1076 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1077 |
}
|
1078 |
|
1079 |
-
|
1080 |
-
|
|
|
1081 |
}
|
1082 |
|
1083 |
-
|
1084 |
-
|
|
|
|
|
|
|
1085 |
|
1086 |
-
|
1087 |
-
* Converts a string to uppercase.
|
1088 |
-
*
|
1089 |
-
* @param string|null $string A string
|
1090 |
-
*
|
1091 |
-
* @return string The uppercased string
|
1092 |
-
*/
|
1093 |
-
function twig_upper_filter(Environment $env, $string)
|
1094 |
-
{
|
1095 |
-
return mb_strtoupper($string ?? '', $env->getCharset());
|
1096 |
}
|
1097 |
|
1098 |
-
|
1099 |
-
* Converts a string to lowercase.
|
1100 |
-
*
|
1101 |
-
* @param string|null $string A string
|
1102 |
-
*
|
1103 |
-
* @return string The lowercased string
|
1104 |
-
*/
|
1105 |
-
function twig_lower_filter(Environment $env, $string)
|
1106 |
{
|
1107 |
-
|
1108 |
-
}
|
1109 |
|
1110 |
-
|
1111 |
-
* Strips HTML and PHP tags from a string.
|
1112 |
-
*
|
1113 |
-
* @param string|null $string
|
1114 |
-
* @param string[]|string|null $string
|
1115 |
-
*
|
1116 |
-
* @return string
|
1117 |
-
*/
|
1118 |
-
function twig_striptags($string, $allowable_tags = null)
|
1119 |
-
{
|
1120 |
-
return strip_tags($string ?? '', $allowable_tags);
|
1121 |
}
|
1122 |
|
1123 |
/**
|
1124 |
-
*
|
1125 |
*
|
1126 |
-
* @
|
1127 |
-
*
|
1128 |
-
* @return string The titlecased string
|
1129 |
*/
|
1130 |
-
function
|
1131 |
{
|
1132 |
-
|
1133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1134 |
}
|
1135 |
|
1136 |
-
|
|
|
|
|
|
|
|
|
1137 |
}
|
1138 |
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1149 |
|
1150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1151 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1152 |
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
{
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1164 |
}
|
1165 |
|
1166 |
-
|
1167 |
}
|
1168 |
|
1169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1170 |
}
|
1171 |
|
1172 |
/**
|
@@ -1263,8 +1564,8 @@ function twig_include(Environment $env, $context, $template, $variables = [], $w
|
|
1263 |
$variables = array_merge($context, $variables);
|
1264 |
}
|
1265 |
|
1266 |
-
if ($isSandboxed = $sandboxed && $env->hasExtension(SandboxExtension
|
1267 |
-
$sandbox = $env->getExtension(SandboxExtension
|
1268 |
if (!$alreadySandboxed = $sandbox->isSandboxed()) {
|
1269 |
$sandbox->enableSandbox();
|
1270 |
}
|
@@ -1277,22 +1578,46 @@ function twig_include(Environment $env, $context, $template, $variables = [], $w
|
|
1277 |
}
|
1278 |
}
|
1279 |
|
|
|
1280 |
try {
|
1281 |
-
$loaded =
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
throw $e;
|
1287 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1288 |
}
|
1289 |
|
1290 |
-
|
1291 |
-
}
|
1292 |
if ($isSandboxed && !$alreadySandboxed) {
|
1293 |
$sandbox->disableSandbox();
|
1294 |
}
|
|
|
|
|
1295 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1296 |
}
|
1297 |
|
1298 |
/**
|
@@ -1307,7 +1632,11 @@ function twig_source(Environment $env, $name, $ignoreMissing = false)
|
|
1307 |
{
|
1308 |
$loader = $env->getLoader();
|
1309 |
try {
|
1310 |
-
|
|
|
|
|
|
|
|
|
1311 |
} catch (LoaderError $e) {
|
1312 |
if (!$ignoreMissing) {
|
1313 |
throw $e;
|
@@ -1380,238 +1709,22 @@ function twig_array_batch($items, $size, $fill = null, $preserveKeys = true)
|
|
1380 |
return $result;
|
1381 |
}
|
1382 |
|
1383 |
-
/**
|
1384 |
-
* Returns the attribute value for a given array/object.
|
1385 |
-
*
|
1386 |
-
* @param mixed $object The object or array from where to get the item
|
1387 |
-
* @param mixed $item The item to get from the array or object
|
1388 |
-
* @param array $arguments An array of arguments to pass if the item is an object method
|
1389 |
-
* @param string $type The type of attribute (@see \Twig\Template constants)
|
1390 |
-
* @param bool $isDefinedTest Whether this is only a defined check
|
1391 |
-
* @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not
|
1392 |
-
* @param int $lineno The template line where the attribute was called
|
1393 |
-
*
|
1394 |
-
* @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
|
1395 |
-
*
|
1396 |
-
* @throws RuntimeError if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false
|
1397 |
-
*
|
1398 |
-
* @internal
|
1399 |
-
*/
|
1400 |
-
function twig_get_attribute(Environment $env, Source $source, $object, $item, array $arguments = [], $type = /* Template::ANY_CALL */ 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false, int $lineno = -1)
|
1401 |
-
{
|
1402 |
-
// array
|
1403 |
-
if (/* Template::METHOD_CALL */ 'method' !== $type) {
|
1404 |
-
$arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item;
|
1405 |
-
|
1406 |
-
if (((\is_array($object) || $object instanceof \ArrayObject) && (isset($object[$arrayItem]) || \array_key_exists($arrayItem, (array) $object)))
|
1407 |
-
|| ($object instanceof ArrayAccess && isset($object[$arrayItem]))
|
1408 |
-
) {
|
1409 |
-
if ($isDefinedTest) {
|
1410 |
-
return true;
|
1411 |
-
}
|
1412 |
-
|
1413 |
-
return $object[$arrayItem];
|
1414 |
-
}
|
1415 |
-
|
1416 |
-
if (/* Template::ARRAY_CALL */ 'array' === $type || !\is_object($object)) {
|
1417 |
-
if ($isDefinedTest) {
|
1418 |
-
return false;
|
1419 |
-
}
|
1420 |
-
|
1421 |
-
if ($ignoreStrictCheck || !$env->isStrictVariables()) {
|
1422 |
-
return;
|
1423 |
-
}
|
1424 |
-
|
1425 |
-
if ($object instanceof ArrayAccess) {
|
1426 |
-
$message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, \get_class($object));
|
1427 |
-
} elseif (\is_object($object)) {
|
1428 |
-
$message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object));
|
1429 |
-
} elseif (\is_array($object)) {
|
1430 |
-
if (empty($object)) {
|
1431 |
-
$message = sprintf('Key "%s" does not exist as the array is empty.', $arrayItem);
|
1432 |
-
} else {
|
1433 |
-
$message = sprintf('Key "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object)));
|
1434 |
-
}
|
1435 |
-
} elseif (/* Template::ARRAY_CALL */ 'array' === $type) {
|
1436 |
-
if (null === $object) {
|
1437 |
-
$message = sprintf('Impossible to access a key ("%s") on a null variable.', $item);
|
1438 |
-
} else {
|
1439 |
-
$message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
|
1440 |
-
}
|
1441 |
-
} elseif (null === $object) {
|
1442 |
-
$message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item);
|
1443 |
-
} else {
|
1444 |
-
$message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
|
1445 |
-
}
|
1446 |
-
|
1447 |
-
throw new RuntimeError($message, $lineno, $source);
|
1448 |
-
}
|
1449 |
-
}
|
1450 |
-
|
1451 |
-
if (!\is_object($object)) {
|
1452 |
-
if ($isDefinedTest) {
|
1453 |
-
return false;
|
1454 |
-
}
|
1455 |
-
|
1456 |
-
if ($ignoreStrictCheck || !$env->isStrictVariables()) {
|
1457 |
-
return;
|
1458 |
-
}
|
1459 |
-
|
1460 |
-
if (null === $object) {
|
1461 |
-
$message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item);
|
1462 |
-
} elseif (\is_array($object)) {
|
1463 |
-
$message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
|
1464 |
-
} else {
|
1465 |
-
$message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
|
1466 |
-
}
|
1467 |
-
|
1468 |
-
throw new RuntimeError($message, $lineno, $source);
|
1469 |
-
}
|
1470 |
-
|
1471 |
-
if ($object instanceof Template) {
|
1472 |
-
throw new RuntimeError('Accessing \Twig\Template attributes is forbidden.', $lineno, $source);
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
// object property
|
1476 |
-
if (/* Template::METHOD_CALL */ 'method' !== $type) {
|
1477 |
-
if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) {
|
1478 |
-
if ($isDefinedTest) {
|
1479 |
-
return true;
|
1480 |
-
}
|
1481 |
-
|
1482 |
-
if ($sandboxed) {
|
1483 |
-
$env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $item, $lineno, $source);
|
1484 |
-
}
|
1485 |
-
|
1486 |
-
return $object->$item;
|
1487 |
-
}
|
1488 |
-
}
|
1489 |
-
|
1490 |
-
static $cache = [];
|
1491 |
-
|
1492 |
-
$class = \get_class($object);
|
1493 |
-
|
1494 |
-
// object method
|
1495 |
-
// precedence: getXxx() > isXxx() > hasXxx()
|
1496 |
-
if (!isset($cache[$class])) {
|
1497 |
-
$methods = get_class_methods($object);
|
1498 |
-
sort($methods);
|
1499 |
-
$lcMethods = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, $methods);
|
1500 |
-
$classCache = [];
|
1501 |
-
foreach ($methods as $i => $method) {
|
1502 |
-
$classCache[$method] = $method;
|
1503 |
-
$classCache[$lcName = $lcMethods[$i]] = $method;
|
1504 |
-
|
1505 |
-
if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) {
|
1506 |
-
$name = substr($method, 3);
|
1507 |
-
$lcName = substr($lcName, 3);
|
1508 |
-
} elseif ('i' === $lcName[0] && 0 === strpos($lcName, 'is')) {
|
1509 |
-
$name = substr($method, 2);
|
1510 |
-
$lcName = substr($lcName, 2);
|
1511 |
-
} elseif ('h' === $lcName[0] && 0 === strpos($lcName, 'has')) {
|
1512 |
-
$name = substr($method, 3);
|
1513 |
-
$lcName = substr($lcName, 3);
|
1514 |
-
if (\in_array('is'.$lcName, $lcMethods)) {
|
1515 |
-
continue;
|
1516 |
-
}
|
1517 |
-
} else {
|
1518 |
-
continue;
|
1519 |
-
}
|
1520 |
-
|
1521 |
-
// skip get() and is() methods (in which case, $name is empty)
|
1522 |
-
if ($name) {
|
1523 |
-
if (!isset($classCache[$name])) {
|
1524 |
-
$classCache[$name] = $method;
|
1525 |
-
}
|
1526 |
-
|
1527 |
-
if (!isset($classCache[$lcName])) {
|
1528 |
-
$classCache[$lcName] = $method;
|
1529 |
-
}
|
1530 |
-
}
|
1531 |
-
}
|
1532 |
-
$cache[$class] = $classCache;
|
1533 |
-
}
|
1534 |
-
|
1535 |
-
$call = false;
|
1536 |
-
if (isset($cache[$class][$item])) {
|
1537 |
-
$method = $cache[$class][$item];
|
1538 |
-
} elseif (isset($cache[$class][$lcItem = strtr($item, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')])) {
|
1539 |
-
$method = $cache[$class][$lcItem];
|
1540 |
-
} elseif (isset($cache[$class]['__call'])) {
|
1541 |
-
$method = $item;
|
1542 |
-
$call = true;
|
1543 |
-
} else {
|
1544 |
-
if ($isDefinedTest) {
|
1545 |
-
return false;
|
1546 |
-
}
|
1547 |
-
|
1548 |
-
if ($ignoreStrictCheck || !$env->isStrictVariables()) {
|
1549 |
-
return;
|
1550 |
-
}
|
1551 |
-
|
1552 |
-
throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()"/"has%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), $lineno, $source);
|
1553 |
-
}
|
1554 |
-
|
1555 |
-
if ($isDefinedTest) {
|
1556 |
-
return true;
|
1557 |
-
}
|
1558 |
-
|
1559 |
-
if ($sandboxed) {
|
1560 |
-
$env->getExtension(SandboxExtension::class)->checkMethodAllowed($object, $method, $lineno, $source);
|
1561 |
-
}
|
1562 |
-
|
1563 |
-
// Some objects throw exceptions when they have __call, and the method we try
|
1564 |
-
// to call is not supported. If ignoreStrictCheck is true, we should return null.
|
1565 |
-
try {
|
1566 |
-
$ret = $object->$method(...$arguments);
|
1567 |
-
} catch (\BadMethodCallException $e) {
|
1568 |
-
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
|
1569 |
-
return;
|
1570 |
-
}
|
1571 |
-
throw $e;
|
1572 |
-
}
|
1573 |
-
|
1574 |
-
return $ret;
|
1575 |
-
}
|
1576 |
-
|
1577 |
-
/**
|
1578 |
-
* Returns the values from a single column in the input array.
|
1579 |
-
*
|
1580 |
-
* <pre>
|
1581 |
-
* {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
|
1582 |
-
*
|
1583 |
-
* {% set fruits = items|column('fruit') %}
|
1584 |
-
*
|
1585 |
-
* {# fruits now contains ['apple', 'orange'] #}
|
1586 |
-
* </pre>
|
1587 |
-
*
|
1588 |
-
* @param array|Traversable $array An array
|
1589 |
-
* @param mixed $name The column name
|
1590 |
-
* @param mixed $index The column to use as the index/keys for the returned array
|
1591 |
-
*
|
1592 |
-
* @return array The array of values
|
1593 |
-
*/
|
1594 |
-
function twig_array_column($array, $name, $index = null): array
|
1595 |
-
{
|
1596 |
-
if ($array instanceof Traversable) {
|
1597 |
-
$array = iterator_to_array($array);
|
1598 |
-
} elseif (!\is_array($array)) {
|
1599 |
-
throw new RuntimeError(sprintf('The column filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array)));
|
1600 |
-
}
|
1601 |
-
|
1602 |
-
return array_column($array, $name, $index);
|
1603 |
-
}
|
1604 |
-
|
1605 |
function twig_array_filter(Environment $env, $array, $arrow)
|
1606 |
{
|
1607 |
if (!twig_test_iterable($array)) {
|
1608 |
throw new RuntimeError(sprintf('The "filter" filter expects an array or "Traversable", got "%s".', \is_object($array) ? \get_class($array) : \gettype($array)));
|
1609 |
}
|
1610 |
|
1611 |
-
|
|
|
|
|
1612 |
|
1613 |
if (\is_array($array)) {
|
1614 |
-
|
|
|
|
|
|
|
|
|
1615 |
}
|
1616 |
|
1617 |
// the IteratorIterator wrapping is needed as some internal PHP classes are \Traversable but do not implement \Iterator
|
@@ -1620,7 +1733,9 @@ function twig_array_filter(Environment $env, $array, $arrow)
|
|
1620 |
|
1621 |
function twig_array_map(Environment $env, $array, $arrow)
|
1622 |
{
|
1623 |
-
|
|
|
|
|
1624 |
|
1625 |
$r = [];
|
1626 |
foreach ($array as $k => $v) {
|
@@ -1632,7 +1747,9 @@ function twig_array_map(Environment $env, $array, $arrow)
|
|
1632 |
|
1633 |
function twig_array_reduce(Environment $env, $array, $arrow, $initial = null)
|
1634 |
{
|
1635 |
-
|
|
|
|
|
1636 |
|
1637 |
if (!\is_array($array)) {
|
1638 |
if (!$array instanceof \Traversable) {
|
@@ -1644,11 +1761,4 @@ function twig_array_reduce(Environment $env, $array, $arrow, $initial = null)
|
|
1644 |
|
1645 |
return array_reduce($array, $arrow, $initial);
|
1646 |
}
|
1647 |
-
|
1648 |
-
function twig_check_arrow_in_sandbox(Environment $env, $arrow, $thing, $type)
|
1649 |
-
{
|
1650 |
-
if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) {
|
1651 |
-
throw new RuntimeError(sprintf('The callable passed to the "%s" %s must be a Closure in sandbox mode.', $thing, $type));
|
1652 |
-
}
|
1653 |
-
}
|
1654 |
}
|
11 |
|
12 |
namespace Twig\Extension {
|
13 |
use Twig\ExpressionParser;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
use Twig\TokenParser\ApplyTokenParser;
|
15 |
use Twig\TokenParser\BlockTokenParser;
|
16 |
use Twig\TokenParser\DeprecatedTokenParser;
|
33 |
use Twig\TwigFunction;
|
34 |
use Twig\TwigTest;
|
35 |
|
36 |
+
/**
|
37 |
+
* @final
|
38 |
+
*/
|
39 |
+
class CoreExtension extends AbstractExtension
|
40 |
{
|
41 |
+
protected $dateFormats = ['F j, Y H:i', '%d days'];
|
42 |
+
protected $numberFormat = [0, '.', ','];
|
43 |
+
protected $timezone = null;
|
44 |
+
protected $escapers = [];
|
45 |
|
46 |
/**
|
47 |
* Defines a new escaper to be used via the escape filter.
|
48 |
*
|
49 |
* @param string $strategy The strategy name that should be used as a strategy in the escape call
|
50 |
* @param callable $callable A valid PHP callable
|
|
|
|
|
51 |
*/
|
52 |
+
public function setEscaper($strategy, $callable)
|
53 |
{
|
|
|
|
|
54 |
$this->escapers[$strategy] = $callable;
|
55 |
}
|
56 |
|
57 |
/**
|
58 |
* Gets all defined escapers.
|
59 |
*
|
60 |
+
* @return array An array of escapers
|
|
|
|
|
61 |
*/
|
62 |
+
public function getEscapers()
|
63 |
{
|
|
|
|
|
|
|
|
|
64 |
return $this->escapers;
|
65 |
}
|
66 |
|
163 |
|
164 |
public function getFilters()
|
165 |
{
|
166 |
+
$filters = [
|
167 |
// formatting filters
|
168 |
new TwigFilter('date', 'twig_date_format_filter', ['needs_environment' => true]),
|
169 |
new TwigFilter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]),
|
170 |
+
new TwigFilter('format', 'sprintf'),
|
171 |
new TwigFilter('replace', 'twig_replace_filter'),
|
172 |
new TwigFilter('number_format', 'twig_number_format_filter', ['needs_environment' => true]),
|
173 |
new TwigFilter('abs', 'abs'),
|
175 |
|
176 |
// encoding
|
177 |
new TwigFilter('url_encode', 'twig_urlencode_filter'),
|
178 |
+
new TwigFilter('json_encode', 'twig_jsonencode_filter'),
|
179 |
new TwigFilter('convert_encoding', 'twig_convert_encoding'),
|
180 |
|
181 |
// string filters
|
182 |
new TwigFilter('title', 'twig_title_string_filter', ['needs_environment' => true]),
|
183 |
new TwigFilter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]),
|
184 |
+
new TwigFilter('upper', 'strtoupper'),
|
185 |
+
new TwigFilter('lower', 'strtolower'),
|
186 |
+
new TwigFilter('striptags', 'strip_tags'),
|
187 |
new TwigFilter('trim', 'twig_trim_filter'),
|
188 |
+
new TwigFilter('nl2br', 'nl2br', ['pre_escape' => 'html', 'is_safe' => ['html']]),
|
189 |
new TwigFilter('spaceless', 'twig_spaceless', ['is_safe' => ['html']]),
|
190 |
|
191 |
// array helpers
|
192 |
new TwigFilter('join', 'twig_join_filter'),
|
193 |
new TwigFilter('split', 'twig_split_filter', ['needs_environment' => true]),
|
194 |
+
new TwigFilter('sort', 'twig_sort_filter'),
|
195 |
new TwigFilter('merge', 'twig_array_merge'),
|
196 |
new TwigFilter('batch', 'twig_array_batch'),
|
|
|
197 |
new TwigFilter('filter', 'twig_array_filter', ['needs_environment' => true]),
|
198 |
new TwigFilter('map', 'twig_array_map', ['needs_environment' => true]),
|
199 |
new TwigFilter('reduce', 'twig_array_reduce', ['needs_environment' => true]),
|
206 |
new TwigFilter('last', 'twig_last', ['needs_environment' => true]),
|
207 |
|
208 |
// iteration and runtime
|
209 |
+
new TwigFilter('default', '_twig_default_filter', ['node_class' => '\Twig\Node\Expression\Filter\DefaultFilter']),
|
210 |
new TwigFilter('keys', 'twig_get_array_keys_filter'),
|
211 |
+
|
212 |
+
// escaping
|
213 |
+
new TwigFilter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']),
|
214 |
+
new TwigFilter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']),
|
215 |
];
|
216 |
+
|
217 |
+
if (\function_exists('mb_get_info')) {
|
218 |
+
$filters[] = new TwigFilter('upper', 'twig_upper_filter', ['needs_environment' => true]);
|
219 |
+
$filters[] = new TwigFilter('lower', 'twig_lower_filter', ['needs_environment' => true]);
|
220 |
+
}
|
221 |
+
|
222 |
+
return $filters;
|
223 |
}
|
224 |
|
225 |
public function getFunctions()
|
240 |
public function getTests()
|
241 |
{
|
242 |
return [
|
243 |
+
new TwigTest('even', null, ['node_class' => '\Twig\Node\Expression\Test\EvenTest']),
|
244 |
+
new TwigTest('odd', null, ['node_class' => '\Twig\Node\Expression\Test\OddTest']),
|
245 |
+
new TwigTest('defined', null, ['node_class' => '\Twig\Node\Expression\Test\DefinedTest']),
|
246 |
+
new TwigTest('sameas', null, ['node_class' => '\Twig\Node\Expression\Test\SameasTest', 'deprecated' => '1.21', 'alternative' => 'same as']),
|
247 |
+
new TwigTest('same as', null, ['node_class' => '\Twig\Node\Expression\Test\SameasTest', 'one_mandatory_argument' => true]),
|
248 |
+
new TwigTest('none', null, ['node_class' => '\Twig\Node\Expression\Test\NullTest']),
|
249 |
+
new TwigTest('null', null, ['node_class' => '\Twig\Node\Expression\Test\NullTest']),
|
250 |
+
new TwigTest('divisibleby', null, ['node_class' => '\Twig\Node\Expression\Test\DivisiblebyTest', 'deprecated' => '1.21', 'alternative' => 'divisible by']),
|
251 |
+
new TwigTest('divisible by', null, ['node_class' => '\Twig\Node\Expression\Test\DivisiblebyTest', 'one_mandatory_argument' => true]),
|
252 |
+
new TwigTest('constant', null, ['node_class' => '\Twig\Node\Expression\Test\ConstantTest']),
|
253 |
new TwigTest('empty', 'twig_test_empty'),
|
254 |
new TwigTest('iterable', 'twig_test_iterable'),
|
255 |
];
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
|
|
258 |
public function getOperators()
|
259 |
{
|
260 |
return [
|
261 |
[
|
262 |
+
'not' => ['precedence' => 50, 'class' => '\Twig\Node\Expression\Unary\NotUnary'],
|
263 |
+
'-' => ['precedence' => 500, 'class' => '\Twig\Node\Expression\Unary\NegUnary'],
|
264 |
+
'+' => ['precedence' => 500, 'class' => '\Twig\Node\Expression\Unary\PosUnary'],
|
265 |
],
|
266 |
[
|
267 |
+
'or' => ['precedence' => 10, 'class' => '\Twig\Node\Expression\Binary\OrBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
268 |
+
'and' => ['precedence' => 15, 'class' => '\Twig\Node\Expression\Binary\AndBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
269 |
+
'b-or' => ['precedence' => 16, 'class' => '\Twig\Node\Expression\Binary\BitwiseOrBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
270 |
+
'b-xor' => ['precedence' => 17, 'class' => '\Twig\Node\Expression\Binary\BitwiseXorBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
271 |
+
'b-and' => ['precedence' => 18, 'class' => '\Twig\Node\Expression\Binary\BitwiseAndBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
272 |
+
'==' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\EqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
273 |
+
'!=' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\NotEqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
274 |
+
'<' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\LessBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
275 |
+
'>' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\GreaterBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
276 |
+
'>=' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\GreaterEqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
277 |
+
'<=' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\LessEqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
278 |
+
'not in' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\NotInBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
279 |
+
'in' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\InBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
280 |
+
'matches' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\MatchesBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
281 |
+
'starts with' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\StartsWithBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
282 |
+
'ends with' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\EndsWithBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
283 |
+
'..' => ['precedence' => 25, 'class' => '\Twig\Node\Expression\Binary\RangeBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
284 |
+
'+' => ['precedence' => 30, 'class' => '\Twig\Node\Expression\Binary\AddBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
285 |
+
'-' => ['precedence' => 30, 'class' => '\Twig\Node\Expression\Binary\SubBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
286 |
+
'~' => ['precedence' => 40, 'class' => '\Twig\Node\Expression\Binary\ConcatBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
287 |
+
'*' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\MulBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
288 |
+
'/' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\DivBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
289 |
+
'//' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\FloorDivBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
290 |
+
'%' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\ModBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
|
|
291 |
'is' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
292 |
'is not' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT],
|
293 |
+
'**' => ['precedence' => 200, 'class' => '\Twig\Node\Expression\Binary\PowerBinary', 'associativity' => ExpressionParser::OPERATOR_RIGHT],
|
294 |
+
'??' => ['precedence' => 300, 'class' => '\Twig\Node\Expression\NullCoalesceExpression', 'associativity' => ExpressionParser::OPERATOR_RIGHT],
|
295 |
],
|
296 |
];
|
297 |
}
|
298 |
+
|
299 |
+
public function getName()
|
300 |
+
{
|
301 |
+
return 'core';
|
302 |
+
}
|
303 |
}
|
304 |
|
305 |
class_alias('Twig\Extension\CoreExtension', 'Twig_Extension_Core');
|
306 |
}
|
307 |
|
308 |
namespace {
|
309 |
+
use Twig\Environment;
|
310 |
+
use Twig\Error\LoaderError;
|
311 |
+
use Twig\Error\RuntimeError;
|
312 |
+
use Twig\Loader\SourceContextLoaderInterface;
|
313 |
+
use Twig\Markup;
|
314 |
+
use Twig\Node\Expression\ConstantExpression;
|
315 |
+
use Twig\Node\Node;
|
316 |
+
use Twig\Template;
|
317 |
+
use Twig\TemplateWrapper;
|
318 |
|
319 |
/**
|
320 |
* Cycles over a value.
|
373 |
if ('' === $values) {
|
374 |
return '';
|
375 |
}
|
376 |
+
if (null !== $charset = $env->getCharset()) {
|
377 |
+
if ('UTF-8' !== $charset) {
|
378 |
+
$values = twig_convert_encoding($values, 'UTF-8', $charset);
|
379 |
+
}
|
380 |
|
381 |
+
// unicode version of str_split()
|
382 |
+
// split at all positions, but not after the start and not before the end
|
383 |
+
$values = preg_split('/(?<!^)(?!$)/u', $values);
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
|
385 |
+
if ('UTF-8' !== $charset) {
|
386 |
+
foreach ($values as $i => $value) {
|
387 |
+
$values[$i] = twig_convert_encoding($value, $charset, 'UTF-8');
|
388 |
+
}
|
389 |
}
|
390 |
+
} else {
|
391 |
+
return $values[mt_rand(0, \strlen($values) - 1)];
|
392 |
}
|
393 |
}
|
394 |
|
410 |
*
|
411 |
* {{ post.published_at|date("m/d/Y") }}
|
412 |
*
|
413 |
+
* @param \DateTime|\DateTimeInterface|\DateInterval|string $date A date
|
414 |
+
* @param string|null $format The target format, null to use the default
|
415 |
+
* @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged
|
416 |
*
|
417 |
* @return string The formatted date
|
418 |
*/
|
419 |
function twig_date_format_filter(Environment $env, $date, $format = null, $timezone = null)
|
420 |
{
|
421 |
if (null === $format) {
|
422 |
+
$formats = $env->getExtension('\Twig\Extension\CoreExtension')->getDateFormat();
|
423 |
$format = $date instanceof \DateInterval ? $formats[1] : $formats[0];
|
424 |
}
|
425 |
|
435 |
*
|
436 |
* {{ post.published_at|date_modify("-1day")|date("m/d/Y") }}
|
437 |
*
|
438 |
+
* @param \DateTime|string $date A date
|
439 |
+
* @param string $modifier A modifier string
|
440 |
*
|
441 |
+
* @return \DateTime
|
442 |
*/
|
443 |
function twig_date_modify_filter(Environment $env, $date, $modifier)
|
444 |
{
|
445 |
$date = twig_date_converter($env, $date, false);
|
446 |
+
$resultDate = $date->modify($modifier);
|
447 |
|
448 |
+
// This is a hack to ensure PHP 5.2 support and support for \DateTimeImmutable
|
449 |
+
// \DateTime::modify does not return the modified \DateTime object < 5.3.0
|
450 |
+
// and \DateTimeImmutable does not modify $date.
|
451 |
+
return null === $resultDate ? $date : $resultDate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
}
|
453 |
|
454 |
/**
|
458 |
* {# do something #}
|
459 |
* {% endif %}
|
460 |
*
|
461 |
+
* @param \DateTime|\DateTimeInterface|string|null $date A date
|
462 |
+
* @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged
|
463 |
*
|
464 |
* @return \DateTimeInterface
|
465 |
*/
|
468 |
// determine the timezone
|
469 |
if (false !== $timezone) {
|
470 |
if (null === $timezone) {
|
471 |
+
$timezone = $env->getExtension('\Twig\Extension\CoreExtension')->getTimezone();
|
472 |
} elseif (!$timezone instanceof \DateTimeZone) {
|
473 |
$timezone = new \DateTimeZone($timezone);
|
474 |
}
|
479 |
return false !== $timezone ? $date->setTimezone($timezone) : $date;
|
480 |
}
|
481 |
|
482 |
+
if ($date instanceof \DateTime || $date instanceof \DateTimeInterface) {
|
483 |
$date = clone $date;
|
484 |
if (false !== $timezone) {
|
485 |
$date->setTimezone($timezone);
|
493 |
$date = 'now';
|
494 |
}
|
495 |
|
496 |
+
return new \DateTime($date, false !== $timezone ? $timezone : $env->getExtension('\Twig\Extension\CoreExtension')->getTimezone());
|
497 |
}
|
498 |
|
499 |
$asString = (string) $date;
|
500 |
if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) {
|
501 |
$date = new \DateTime('@'.$date);
|
502 |
} else {
|
503 |
+
$date = new \DateTime($date, $env->getExtension('\Twig\Extension\CoreExtension')->getTimezone());
|
504 |
}
|
505 |
|
506 |
if (false !== $timezone) {
|
513 |
/**
|
514 |
* Replaces strings within a string.
|
515 |
*
|
516 |
+
* @param string $str String to replace in
|
517 |
* @param array|\Traversable $from Replace values
|
518 |
+
* @param string|null $to Replace to, deprecated (@see https://www.php.net/manual/en/function.strtr.php)
|
519 |
*
|
520 |
* @return string
|
521 |
*/
|
522 |
+
function twig_replace_filter($str, $from, $to = null)
|
523 |
{
|
524 |
+
if (\is_string($from) && \is_string($to)) {
|
525 |
+
@trigger_error('Using "replace" with character by character replacement is deprecated since version 1.22 and will be removed in Twig 2.0', \E_USER_DEPRECATED);
|
526 |
+
|
527 |
+
return strtr($str, $from, $to);
|
528 |
+
}
|
529 |
+
|
530 |
if (!twig_test_iterable($from)) {
|
531 |
throw new RuntimeError(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".', \is_object($from) ? \get_class($from) : \gettype($from)));
|
532 |
}
|
533 |
|
534 |
+
return strtr($str, twig_to_array($from));
|
535 |
}
|
536 |
|
537 |
/**
|
538 |
* Rounds a number.
|
539 |
*
|
540 |
+
* @param int|float $value The value to round
|
541 |
+
* @param int|float $precision The rounding precision
|
542 |
+
* @param string $method The method to use for rounding
|
543 |
*
|
544 |
* @return int|float The rounded number
|
545 |
*/
|
546 |
function twig_round($value, $precision = 0, $method = 'common')
|
547 |
{
|
|
|
|
|
548 |
if ('common' === $method) {
|
549 |
return round($value, $precision);
|
550 |
}
|
560 |
* Number format filter.
|
561 |
*
|
562 |
* All of the formatting options can be left null, in that case the defaults will
|
563 |
+
* be used. Supplying any of the parameters will override the defaults set in the
|
564 |
* environment object.
|
565 |
*
|
566 |
* @param mixed $number A float/int/string of the number to format
|
572 |
*/
|
573 |
function twig_number_format_filter(Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null)
|
574 |
{
|
575 |
+
$defaults = $env->getExtension('\Twig\Extension\CoreExtension')->getNumberFormat();
|
576 |
if (null === $decimal) {
|
577 |
$decimal = $defaults[0];
|
578 |
}
|
591 |
/**
|
592 |
* URL encodes (RFC 3986) a string as a path segment or an array as a query string.
|
593 |
*
|
594 |
+
* @param string|array $url A URL or an array of query parameters
|
595 |
*
|
596 |
* @return string The URL encoded value
|
597 |
*/
|
598 |
function twig_urlencode_filter($url)
|
599 |
{
|
600 |
if (\is_array($url)) {
|
601 |
+
if (\defined('PHP_QUERY_RFC3986')) {
|
602 |
+
return http_build_query($url, '', '&', \PHP_QUERY_RFC3986);
|
603 |
+
}
|
604 |
+
|
605 |
+
return http_build_query($url, '', '&');
|
606 |
+
}
|
607 |
+
|
608 |
+
return rawurlencode($url);
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* JSON encodes a variable.
|
613 |
+
*
|
614 |
+
* @param mixed $value the value to encode
|
615 |
+
* @param int $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT
|
616 |
+
*
|
617 |
+
* @return mixed The JSON encoded value
|
618 |
+
*/
|
619 |
+
function twig_jsonencode_filter($value, $options = 0)
|
620 |
+
{
|
621 |
+
if ($value instanceof Markup) {
|
622 |
+
$value = (string) $value;
|
623 |
+
} elseif (\is_array($value)) {
|
624 |
+
array_walk_recursive($value, '_twig_markup2string');
|
625 |
}
|
626 |
|
627 |
+
return json_encode($value, $options);
|
628 |
+
}
|
629 |
+
|
630 |
+
function _twig_markup2string(&$value)
|
631 |
+
{
|
632 |
+
if ($value instanceof Markup) {
|
633 |
+
$value = (string) $value;
|
634 |
+
}
|
635 |
}
|
636 |
|
637 |
/**
|
693 |
return \array_slice($item, $start, $length, $preserveKeys);
|
694 |
}
|
695 |
|
696 |
+
$item = (string) $item;
|
697 |
+
|
698 |
+
if (\function_exists('mb_get_info') && null !== $charset = $env->getCharset()) {
|
699 |
+
return (string) mb_substr($item, $start, null === $length ? mb_strlen($item, $charset) - $start : $length, $charset);
|
700 |
+
}
|
701 |
+
|
702 |
+
return (string) (null === $length ? substr($item, $start) : substr($item, $start, $length));
|
703 |
}
|
704 |
|
705 |
/**
|
788 |
* {{ "aabbcc"|split('', 2) }}
|
789 |
* {# returns [aa, bb, cc] #}
|
790 |
*
|
791 |
+
* @param string $value A string
|
792 |
+
* @param string $delimiter The delimiter
|
793 |
+
* @param int $limit The limit
|
794 |
*
|
795 |
* @return array The split string as an array
|
796 |
*/
|
797 |
function twig_split_filter(Environment $env, $value, $delimiter, $limit = null)
|
798 |
{
|
|
|
|
|
799 |
if (\strlen($delimiter) > 0) {
|
800 |
return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit);
|
801 |
}
|
802 |
|
803 |
+
if (!\function_exists('mb_get_info') || null === $charset = $env->getCharset()) {
|
804 |
+
return str_split($value, null === $limit ? 1 : $limit);
|
805 |
+
}
|
806 |
+
|
807 |
if ($limit <= 1) {
|
808 |
return preg_split('/(?<!^)(?!$)/u', $value);
|
809 |
}
|
810 |
|
811 |
+
$length = mb_strlen($value, $charset);
|
812 |
if ($length < $limit) {
|
813 |
return [$value];
|
814 |
}
|
815 |
|
816 |
$r = [];
|
817 |
for ($i = 0; $i < $length; $i += $limit) {
|
818 |
+
$r[] = mb_substr($value, $i, $limit, $charset);
|
819 |
}
|
820 |
|
821 |
return $r;
|
885 |
/**
|
886 |
* Reverses a variable.
|
887 |
*
|
888 |
+
* @param array|\Traversable|string $item An array, a \Traversable instance, or a string
|
889 |
+
* @param bool $preserveKeys Whether to preserve key or not
|
890 |
*
|
891 |
* @return mixed The reversed input
|
892 |
*/
|
900 |
return array_reverse($item, $preserveKeys);
|
901 |
}
|
902 |
|
903 |
+
if (null !== $charset = $env->getCharset()) {
|
904 |
+
$string = (string) $item;
|
905 |
|
906 |
+
if ('UTF-8' !== $charset) {
|
907 |
+
$item = twig_convert_encoding($string, 'UTF-8', $charset);
|
908 |
+
}
|
909 |
|
910 |
+
preg_match_all('/./us', $item, $matches);
|
|
|
|
|
911 |
|
912 |
+
$string = implode('', array_reverse($matches[0]));
|
913 |
|
914 |
+
if ('UTF-8' !== $charset) {
|
915 |
+
$string = twig_convert_encoding($string, $charset, 'UTF-8');
|
916 |
+
}
|
917 |
|
918 |
+
return $string;
|
|
|
919 |
}
|
920 |
|
921 |
+
return strrev((string) $item);
|
922 |
}
|
923 |
|
924 |
/**
|
928 |
*
|
929 |
* @return array
|
930 |
*/
|
931 |
+
function twig_sort_filter($array)
|
932 |
{
|
933 |
if ($array instanceof \Traversable) {
|
934 |
$array = iterator_to_array($array);
|
936 |
throw new RuntimeError(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', \gettype($array)));
|
937 |
}
|
938 |
|
939 |
+
asort($array);
|
|
|
|
|
|
|
|
|
|
|
|
|
940 |
|
941 |
return $array;
|
942 |
}
|
981 |
/**
|
982 |
* Returns a trimmed string.
|
983 |
*
|
|
|
|
|
|
|
|
|
984 |
* @return string
|
985 |
*
|
986 |
* @throws RuntimeError When an invalid trimming side is used (not a string or not 'left', 'right', or 'both')
|
993 |
|
994 |
switch ($side) {
|
995 |
case 'both':
|
996 |
+
return trim($string, $characterMask);
|
997 |
case 'left':
|
998 |
+
return ltrim($string, $characterMask);
|
999 |
case 'right':
|
1000 |
+
return rtrim($string, $characterMask);
|
1001 |
default:
|
1002 |
throw new RuntimeError('Trimming side must be "left", "right" or "both".');
|
1003 |
}
|
1004 |
}
|
1005 |
|
1006 |
/**
|
1007 |
+
* Removes whitespaces between HTML tags.
|
|
|
|
|
1008 |
*
|
1009 |
* @return string
|
1010 |
*/
|
1011 |
+
function twig_spaceless($content)
|
1012 |
{
|
1013 |
+
return trim(preg_replace('/>\s+</', '><', $content));
|
1014 |
}
|
1015 |
|
1016 |
/**
|
1017 |
+
* Escapes a string.
|
1018 |
*
|
1019 |
+
* @param mixed $string The value to be escaped
|
1020 |
+
* @param string $strategy The escaping strategy
|
1021 |
+
* @param string $charset The charset
|
1022 |
+
* @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
|
1023 |
*
|
1024 |
* @return string
|
1025 |
*/
|
1026 |
+
function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
|
1027 |
{
|
1028 |
+
if ($autoescape && $string instanceof Markup) {
|
1029 |
+
return $string;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
if (!\is_string($string)) {
|
1033 |
+
if (\is_object($string) && method_exists($string, '__toString')) {
|
1034 |
+
$string = (string) $string;
|
1035 |
+
} elseif (\in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) {
|
1036 |
+
return $string;
|
1037 |
+
}
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
if ('' === $string) {
|
1041 |
+
return '';
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
if (null === $charset) {
|
1045 |
+
$charset = $env->getCharset();
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
switch ($strategy) {
|
1049 |
+
case 'html':
|
1050 |
+
// see https://www.php.net/htmlspecialchars
|
1051 |
+
|
1052 |
+
// Using a static variable to avoid initializing the array
|
1053 |
+
// each time the function is called. Moving the declaration on the
|
1054 |
+
// top of the function slow downs other escaping strategies.
|
1055 |
+
static $htmlspecialcharsCharsets = [
|
1056 |
+
'ISO-8859-1' => true, 'ISO8859-1' => true,
|
1057 |
+
'ISO-8859-15' => true, 'ISO8859-15' => true,
|
1058 |
+
'utf-8' => true, 'UTF-8' => true,
|
1059 |
+
'CP866' => true, 'IBM866' => true, '866' => true,
|
1060 |
+
'CP1251' => true, 'WINDOWS-1251' => true, 'WIN-1251' => true,
|
1061 |
+
'1251' => true,
|
1062 |
+
'CP1252' => true, 'WINDOWS-1252' => true, '1252' => true,
|
1063 |
+
'KOI8-R' => true, 'KOI8-RU' => true, 'KOI8R' => true,
|
1064 |
+
'BIG5' => true, '950' => true,
|
1065 |
+
'GB2312' => true, '936' => true,
|
1066 |
+
'BIG5-HKSCS' => true,
|
1067 |
+
'SHIFT_JIS' => true, 'SJIS' => true, '932' => true,
|
1068 |
+
'EUC-JP' => true, 'EUCJP' => true,
|
1069 |
+
'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true,
|
1070 |
+
];
|
1071 |
+
|
1072 |
+
if (isset($htmlspecialcharsCharsets[$charset])) {
|
1073 |
+
return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset);
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) {
|
1077 |
+
// cache the lowercase variant for future iterations
|
1078 |
+
$htmlspecialcharsCharsets[$charset] = true;
|
1079 |
+
|
1080 |
+
return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset);
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
1084 |
+
$string = htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8');
|
1085 |
+
|
1086 |
+
return twig_convert_encoding($string, $charset, 'UTF-8');
|
1087 |
+
|
1088 |
+
case 'js':
|
1089 |
+
// escape all non-alphanumeric characters
|
1090 |
+
// into their \x or \uHHHH representations
|
1091 |
+
if ('UTF-8' !== $charset) {
|
1092 |
+
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
if (!preg_match('//u', $string)) {
|
1096 |
+
throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
$string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', '_twig_escape_js_callback', $string);
|
1100 |
+
|
1101 |
+
if ('UTF-8' !== $charset) {
|
1102 |
+
$string = twig_convert_encoding($string, $charset, 'UTF-8');
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
return $string;
|
1106 |
+
|
1107 |
+
case 'css':
|
1108 |
+
if ('UTF-8' !== $charset) {
|
1109 |
+
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
if (!preg_match('//u', $string)) {
|
1113 |
+
throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
$string = preg_replace_callback('#[^a-zA-Z0-9]#Su', '_twig_escape_css_callback', $string);
|
1117 |
+
|
1118 |
+
if ('UTF-8' !== $charset) {
|
1119 |
+
$string = twig_convert_encoding($string, $charset, 'UTF-8');
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
return $string;
|
1123 |
+
|
1124 |
+
case 'html_attr':
|
1125 |
+
if ('UTF-8' !== $charset) {
|
1126 |
+
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
if (!preg_match('//u', $string)) {
|
1130 |
+
throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
$string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', '_twig_escape_html_attr_callback', $string);
|
1134 |
+
|
1135 |
+
if ('UTF-8' !== $charset) {
|
1136 |
+
$string = twig_convert_encoding($string, $charset, 'UTF-8');
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
return $string;
|
1140 |
+
|
1141 |
+
case 'url':
|
1142 |
+
return rawurlencode($string);
|
1143 |
+
|
1144 |
+
default:
|
1145 |
+
static $escapers;
|
1146 |
+
|
1147 |
+
if (null === $escapers) {
|
1148 |
+
$escapers = $env->getExtension('\Twig\Extension\CoreExtension')->getEscapers();
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
if (isset($escapers[$strategy])) {
|
1152 |
+
return \call_user_func($escapers[$strategy], $env, $string, $charset);
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
$validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers)));
|
1156 |
+
|
1157 |
+
throw new RuntimeError(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies));
|
1158 |
+
}
|
1159 |
}
|
1160 |
|
1161 |
/**
|
1162 |
+
* @internal
|
|
|
|
|
|
|
|
|
1163 |
*/
|
1164 |
+
function twig_escape_filter_is_safe(Node $filterArgs)
|
1165 |
{
|
1166 |
+
foreach ($filterArgs as $arg) {
|
1167 |
+
if ($arg instanceof ConstantExpression) {
|
1168 |
+
return [$arg->getAttribute('value')];
|
1169 |
+
}
|
1170 |
+
|
1171 |
+
return [];
|
1172 |
}
|
1173 |
|
1174 |
+
return ['html'];
|
1175 |
}
|
1176 |
|
1177 |
+
if (\function_exists('mb_convert_encoding')) {
|
1178 |
+
function twig_convert_encoding($string, $to, $from)
|
1179 |
+
{
|
1180 |
+
return mb_convert_encoding($string, $to, $from);
|
1181 |
+
}
|
1182 |
+
} elseif (\function_exists('iconv')) {
|
1183 |
+
function twig_convert_encoding($string, $to, $from)
|
1184 |
+
{
|
1185 |
+
return iconv($from, $to, $string);
|
1186 |
+
}
|
1187 |
+
} else {
|
1188 |
+
function twig_convert_encoding($string, $to, $from)
|
1189 |
+
{
|
1190 |
+
throw new RuntimeError('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).');
|
1191 |
}
|
1192 |
+
}
|
1193 |
|
1194 |
+
if (\function_exists('mb_ord')) {
|
1195 |
+
function twig_ord($string)
|
1196 |
+
{
|
1197 |
+
return mb_ord($string, 'UTF-8');
|
1198 |
}
|
1199 |
+
} else {
|
1200 |
+
function twig_ord($string)
|
1201 |
+
{
|
1202 |
+
$code = ($string = unpack('C*', substr($string, 0, 4))) ? $string[1] : 0;
|
1203 |
+
if (0xF0 <= $code) {
|
1204 |
+
return (($code - 0xF0) << 18) + (($string[2] - 0x80) << 12) + (($string[3] - 0x80) << 6) + $string[4] - 0x80;
|
1205 |
+
}
|
1206 |
+
if (0xE0 <= $code) {
|
1207 |
+
return (($code - 0xE0) << 12) + (($string[2] - 0x80) << 6) + $string[3] - 0x80;
|
1208 |
+
}
|
1209 |
+
if (0xC0 <= $code) {
|
1210 |
+
return (($code - 0xC0) << 6) + $string[2] - 0x80;
|
1211 |
+
}
|
1212 |
|
1213 |
+
return $code;
|
|
|
1214 |
}
|
1215 |
+
}
|
1216 |
|
1217 |
+
function _twig_escape_js_callback($matches)
|
1218 |
+
{
|
1219 |
+
$char = $matches[0];
|
1220 |
+
|
1221 |
+
/*
|
1222 |
+
* A few characters have short escape sequences in JSON and JavaScript.
|
1223 |
+
* Escape sequences supported only by JavaScript, not JSON, are omitted.
|
1224 |
+
* \" is also supported but omitted, because the resulting string is not HTML safe.
|
1225 |
+
*/
|
1226 |
+
static $shortMap = [
|
1227 |
+
'\\' => '\\\\',
|
1228 |
+
'/' => '\\/',
|
1229 |
+
"\x08" => '\b',
|
1230 |
+
"\x0C" => '\f',
|
1231 |
+
"\x0A" => '\n',
|
1232 |
+
"\x0D" => '\r',
|
1233 |
+
"\x09" => '\t',
|
1234 |
+
];
|
1235 |
+
|
1236 |
+
if (isset($shortMap[$char])) {
|
1237 |
+
return $shortMap[$char];
|
1238 |
}
|
1239 |
|
1240 |
+
$codepoint = mb_ord($char, 'UTF-8');
|
1241 |
+
if (0x10000 > $codepoint) {
|
1242 |
+
return sprintf('\u%04X', $codepoint);
|
1243 |
}
|
1244 |
|
1245 |
+
// Split characters outside the BMP into surrogate pairs
|
1246 |
+
// https://tools.ietf.org/html/rfc2781.html#section-2.1
|
1247 |
+
$u = $codepoint - 0x10000;
|
1248 |
+
$high = 0xD800 | ($u >> 10);
|
1249 |
+
$low = 0xDC00 | ($u & 0x3FF);
|
1250 |
|
1251 |
+
return sprintf('\u%04X\u%04X', $high, $low);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1252 |
}
|
1253 |
|
1254 |
+
function _twig_escape_css_callback($matches)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1255 |
{
|
1256 |
+
$char = $matches[0];
|
|
|
1257 |
|
1258 |
+
return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : twig_ord($char));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1259 |
}
|
1260 |
|
1261 |
/**
|
1262 |
+
* This function is adapted from code coming from Zend Framework.
|
1263 |
*
|
1264 |
+
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)
|
1265 |
+
* @license https://framework.zend.com/license/new-bsd New BSD License
|
|
|
1266 |
*/
|
1267 |
+
function _twig_escape_html_attr_callback($matches)
|
1268 |
{
|
1269 |
+
$chr = $matches[0];
|
1270 |
+
$ord = \ord($chr);
|
1271 |
+
|
1272 |
+
/*
|
1273 |
+
* The following replaces characters undefined in HTML with the
|
1274 |
+
* hex entity for the Unicode replacement character.
|
1275 |
+
*/
|
1276 |
+
if (($ord <= 0x1f && "\t" != $chr && "\n" != $chr && "\r" != $chr) || ($ord >= 0x7f && $ord <= 0x9f)) {
|
1277 |
+
return '�';
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
/*
|
1281 |
+
* Check if the current character to escape has a name entity we should
|
1282 |
+
* replace it with while grabbing the hex value of the character.
|
1283 |
+
*/
|
1284 |
+
if (1 == \strlen($chr)) {
|
1285 |
+
/*
|
1286 |
+
* While HTML supports far more named entities, the lowest common denominator
|
1287 |
+
* has become HTML5's XML Serialisation which is restricted to the those named
|
1288 |
+
* entities that XML supports. Using HTML entities would result in this error:
|
1289 |
+
* XML Parsing Error: undefined entity
|
1290 |
+
*/
|
1291 |
+
static $entityMap = [
|
1292 |
+
34 => '"', /* quotation mark */
|
1293 |
+
38 => '&', /* ampersand */
|
1294 |
+
60 => '<', /* less-than sign */
|
1295 |
+
62 => '>', /* greater-than sign */
|
1296 |
+
];
|
1297 |
+
|
1298 |
+
if (isset($entityMap[$ord])) {
|
1299 |
+
return $entityMap[$ord];
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
return sprintf('&#x%02X;', $ord);
|
1303 |
}
|
1304 |
|
1305 |
+
/*
|
1306 |
+
* Per OWASP recommendations, we'll use hex entities for any other
|
1307 |
+
* characters where a named entity does not exist.
|
1308 |
+
*/
|
1309 |
+
return sprintf('&#x%04X;', twig_ord($chr));
|
1310 |
}
|
1311 |
|
1312 |
+
// add multibyte extensions if possible
|
1313 |
+
if (\function_exists('mb_get_info')) {
|
1314 |
+
/**
|
1315 |
+
* Returns the length of a variable.
|
1316 |
+
*
|
1317 |
+
* @param mixed $thing A variable
|
1318 |
+
*
|
1319 |
+
* @return int The length of the value
|
1320 |
+
*/
|
1321 |
+
function twig_length_filter(Environment $env, $thing)
|
1322 |
+
{
|
1323 |
+
if (null === $thing) {
|
1324 |
+
return 0;
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
if (is_scalar($thing)) {
|
1328 |
+
return mb_strlen($thing, $env->getCharset());
|
1329 |
+
}
|
1330 |
+
|
1331 |
+
if ($thing instanceof \Countable || \is_array($thing) || $thing instanceof \SimpleXMLElement) {
|
1332 |
+
return \count($thing);
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
if ($thing instanceof \Traversable) {
|
1336 |
+
return iterator_count($thing);
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
if (\is_object($thing) && method_exists($thing, '__toString')) {
|
1340 |
+
return mb_strlen((string) $thing, $env->getCharset());
|
1341 |
+
}
|
1342 |
+
|
1343 |
+
return 1;
|
1344 |
+
}
|
1345 |
+
|
1346 |
+
/**
|
1347 |
+
* Converts a string to uppercase.
|
1348 |
+
*
|
1349 |
+
* @param string $string A string
|
1350 |
+
*
|
1351 |
+
* @return string The uppercased string
|
1352 |
+
*/
|
1353 |
+
function twig_upper_filter(Environment $env, $string)
|
1354 |
+
{
|
1355 |
+
if (null !== $charset = $env->getCharset()) {
|
1356 |
+
return mb_strtoupper($string, $charset);
|
1357 |
+
}
|
1358 |
+
|
1359 |
+
return strtoupper($string);
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
/**
|
1363 |
+
* Converts a string to lowercase.
|
1364 |
+
*
|
1365 |
+
* @param string $string A string
|
1366 |
+
*
|
1367 |
+
* @return string The lowercased string
|
1368 |
+
*/
|
1369 |
+
function twig_lower_filter(Environment $env, $string)
|
1370 |
+
{
|
1371 |
+
if (null !== $charset = $env->getCharset()) {
|
1372 |
+
return mb_strtolower($string, $charset);
|
1373 |
+
}
|
1374 |
|
1375 |
+
return strtolower($string);
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
/**
|
1379 |
+
* Returns a titlecased string.
|
1380 |
+
*
|
1381 |
+
* @param string $string A string
|
1382 |
+
*
|
1383 |
+
* @return string The titlecased string
|
1384 |
+
*/
|
1385 |
+
function twig_title_string_filter(Environment $env, $string)
|
1386 |
+
{
|
1387 |
+
if (null !== $charset = $env->getCharset()) {
|
1388 |
+
return mb_convert_case($string, \MB_CASE_TITLE, $charset);
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
return ucwords(strtolower($string));
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
/**
|
1395 |
+
* Returns a capitalized string.
|
1396 |
+
*
|
1397 |
+
* @param string $string A string
|
1398 |
+
*
|
1399 |
+
* @return string The capitalized string
|
1400 |
+
*/
|
1401 |
+
function twig_capitalize_string_filter(Environment $env, $string)
|
1402 |
+
{
|
1403 |
+
if (null !== $charset = $env->getCharset()) {
|
1404 |
+
return mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset).mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset), $charset), $charset);
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
return ucfirst(strtolower($string));
|
1408 |
+
}
|
1409 |
}
|
1410 |
+
// and byte fallback
|
1411 |
+
else {
|
1412 |
+
/**
|
1413 |
+
* Returns the length of a variable.
|
1414 |
+
*
|
1415 |
+
* @param mixed $thing A variable
|
1416 |
+
*
|
1417 |
+
* @return int The length of the value
|
1418 |
+
*/
|
1419 |
+
function twig_length_filter(Environment $env, $thing)
|
1420 |
+
{
|
1421 |
+
if (null === $thing) {
|
1422 |
+
return 0;
|
1423 |
+
}
|
1424 |
|
1425 |
+
if (is_scalar($thing)) {
|
1426 |
+
return \strlen($thing);
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
if ($thing instanceof \SimpleXMLElement) {
|
1430 |
+
return \count($thing);
|
1431 |
+
}
|
1432 |
+
|
1433 |
+
if (\is_object($thing) && method_exists($thing, '__toString') && !$thing instanceof \Countable) {
|
1434 |
+
return \strlen((string) $thing);
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
if ($thing instanceof \Countable || \is_array($thing)) {
|
1438 |
+
return \count($thing);
|
1439 |
+
}
|
1440 |
+
|
1441 |
+
if ($thing instanceof \IteratorAggregate) {
|
1442 |
+
return iterator_count($thing);
|
1443 |
}
|
1444 |
|
1445 |
+
return 1;
|
1446 |
}
|
1447 |
|
1448 |
+
/**
|
1449 |
+
* Returns a titlecased string.
|
1450 |
+
*
|
1451 |
+
* @param string $string A string
|
1452 |
+
*
|
1453 |
+
* @return string The titlecased string
|
1454 |
+
*/
|
1455 |
+
function twig_title_string_filter(Environment $env, $string)
|
1456 |
+
{
|
1457 |
+
return ucwords(strtolower($string));
|
1458 |
+
}
|
1459 |
+
|
1460 |
+
/**
|
1461 |
+
* Returns a capitalized string.
|
1462 |
+
*
|
1463 |
+
* @param string $string A string
|
1464 |
+
*
|
1465 |
+
* @return string The capitalized string
|
1466 |
+
*/
|
1467 |
+
function twig_capitalize_string_filter(Environment $env, $string)
|
1468 |
+
{
|
1469 |
+
return ucfirst(strtolower($string));
|
1470 |
+
}
|
1471 |
}
|
1472 |
|
1473 |
/**
|
1564 |
$variables = array_merge($context, $variables);
|
1565 |
}
|
1566 |
|
1567 |
+
if ($isSandboxed = $sandboxed && $env->hasExtension('\Twig\Extension\SandboxExtension')) {
|
1568 |
+
$sandbox = $env->getExtension('\Twig\Extension\SandboxExtension');
|
1569 |
if (!$alreadySandboxed = $sandbox->isSandboxed()) {
|
1570 |
$sandbox->enableSandbox();
|
1571 |
}
|
1578 |
}
|
1579 |
}
|
1580 |
|
1581 |
+
$loaded = null;
|
1582 |
try {
|
1583 |
+
$loaded = $env->resolveTemplate($template);
|
1584 |
+
} catch (LoaderError $e) {
|
1585 |
+
if (!$ignoreMissing) {
|
1586 |
+
if ($isSandboxed && !$alreadySandboxed) {
|
1587 |
+
$sandbox->disableSandbox();
|
|
|
1588 |
}
|
1589 |
+
|
1590 |
+
throw $e;
|
1591 |
+
}
|
1592 |
+
} catch (\Throwable $e) {
|
1593 |
+
if ($isSandboxed && !$alreadySandboxed) {
|
1594 |
+
$sandbox->disableSandbox();
|
1595 |
}
|
1596 |
|
1597 |
+
throw $e;
|
1598 |
+
} catch (\Exception $e) {
|
1599 |
if ($isSandboxed && !$alreadySandboxed) {
|
1600 |
$sandbox->disableSandbox();
|
1601 |
}
|
1602 |
+
|
1603 |
+
throw $e;
|
1604 |
}
|
1605 |
+
|
1606 |
+
try {
|
1607 |
+
$ret = $loaded ? $loaded->render($variables) : '';
|
1608 |
+
} catch (\Exception $e) {
|
1609 |
+
if ($isSandboxed && !$alreadySandboxed) {
|
1610 |
+
$sandbox->disableSandbox();
|
1611 |
+
}
|
1612 |
+
|
1613 |
+
throw $e;
|
1614 |
+
}
|
1615 |
+
|
1616 |
+
if ($isSandboxed && !$alreadySandboxed) {
|
1617 |
+
$sandbox->disableSandbox();
|
1618 |
+
}
|
1619 |
+
|
1620 |
+
return $ret;
|
1621 |
}
|
1622 |
|
1623 |
/**
|
1632 |
{
|
1633 |
$loader = $env->getLoader();
|
1634 |
try {
|
1635 |
+
if (!$loader instanceof SourceContextLoaderInterface) {
|
1636 |
+
return $loader->getSource($name);
|
1637 |
+
} else {
|
1638 |
+
return $loader->getSourceContext($name)->getCode();
|
1639 |
+
}
|
1640 |
} catch (LoaderError $e) {
|
1641 |
if (!$ignoreMissing) {
|
1642 |
throw $e;
|
1709 |
return $result;
|
1710 |
}
|
1711 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1712 |
function twig_array_filter(Environment $env, $array, $arrow)
|
1713 |
{
|
1714 |
if (!twig_test_iterable($array)) {
|
1715 |
throw new RuntimeError(sprintf('The "filter" filter expects an array or "Traversable", got "%s".', \is_object($array) ? \get_class($array) : \gettype($array)));
|
1716 |
}
|
1717 |
|
1718 |
+
if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) {
|
1719 |
+
throw new RuntimeError('The callable passed to "filter" filter must be a Closure in sandbox mode.');
|
1720 |
+
}
|
1721 |
|
1722 |
if (\is_array($array)) {
|
1723 |
+
if (\PHP_VERSION_ID >= 50600) {
|
1724 |
+
return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH);
|
1725 |
+
}
|
1726 |
+
|
1727 |
+
return array_filter($array, $arrow);
|
1728 |
}
|
1729 |
|
1730 |
// the IteratorIterator wrapping is needed as some internal PHP classes are \Traversable but do not implement \Iterator
|
1733 |
|
1734 |
function twig_array_map(Environment $env, $array, $arrow)
|
1735 |
{
|
1736 |
+
if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) {
|
1737 |
+
throw new RuntimeError('The callable passed to the "map" filter must be a Closure in sandbox mode.');
|
1738 |
+
}
|
1739 |
|
1740 |
$r = [];
|
1741 |
foreach ($array as $k => $v) {
|
1747 |
|
1748 |
function twig_array_reduce(Environment $env, $array, $arrow, $initial = null)
|
1749 |
{
|
1750 |
+
if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) {
|
1751 |
+
throw new RuntimeError('The callable passed to the "reduce" filter must be a Closure in sandbox mode.');
|
1752 |
+
}
|
1753 |
|
1754 |
if (!\is_array($array)) {
|
1755 |
if (!$array instanceof \Traversable) {
|
1761 |
|
1762 |
return array_reduce($array, $arrow, $initial);
|
1763 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1764 |
}
|
vendor/twig/twig/src/Extension/DebugExtension.php
CHANGED
@@ -12,7 +12,10 @@
|
|
12 |
namespace Twig\Extension {
|
13 |
use Twig\TwigFunction;
|
14 |
|
15 |
-
|
|
|
|
|
|
|
16 |
{
|
17 |
public function getFunctions()
|
18 |
{
|
@@ -30,6 +33,11 @@ final class DebugExtension extends AbstractExtension
|
|
30 |
new TwigFunction('dump', 'twig_var_dump', ['is_safe' => $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true, 'is_variadic' => true]),
|
31 |
];
|
32 |
}
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
class_alias('Twig\Extension\DebugExtension', 'Twig_Extension_Debug');
|
@@ -40,7 +48,7 @@ use Twig\Environment;
|
|
40 |
use Twig\Template;
|
41 |
use Twig\TemplateWrapper;
|
42 |
|
43 |
-
function twig_var_dump(Environment $env, $context,
|
44 |
{
|
45 |
if (!$env->isDebug()) {
|
46 |
return;
|
@@ -58,7 +66,9 @@ function twig_var_dump(Environment $env, $context, ...$vars)
|
|
58 |
|
59 |
var_dump($vars);
|
60 |
} else {
|
61 |
-
|
|
|
|
|
62 |
}
|
63 |
|
64 |
return ob_get_clean();
|
12 |
namespace Twig\Extension {
|
13 |
use Twig\TwigFunction;
|
14 |
|
15 |
+
/**
|
16 |
+
* @final
|
17 |
+
*/
|
18 |
+
class DebugExtension extends AbstractExtension
|
19 |
{
|
20 |
public function getFunctions()
|
21 |
{
|
33 |
new TwigFunction('dump', 'twig_var_dump', ['is_safe' => $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true, 'is_variadic' => true]),
|
34 |
];
|
35 |
}
|
36 |
+
|
37 |
+
public function getName()
|
38 |
+
{
|
39 |
+
return 'debug';
|
40 |
+
}
|
41 |
}
|
42 |
|
43 |
class_alias('Twig\Extension\DebugExtension', 'Twig_Extension_Debug');
|
48 |
use Twig\Template;
|
49 |
use Twig\TemplateWrapper;
|
50 |
|
51 |
+
function twig_var_dump(Environment $env, $context, array $vars = [])
|
52 |
{
|
53 |
if (!$env->isDebug()) {
|
54 |
return;
|
66 |
|
67 |
var_dump($vars);
|
68 |
} else {
|
69 |
+
foreach ($vars as $var) {
|
70 |
+
var_dump($var);
|
71 |
+
}
|
72 |
}
|
73 |
|
74 |
return ob_get_clean();
|
vendor/twig/twig/src/Extension/EscaperExtension.php
CHANGED
@@ -10,21 +10,16 @@
|
|
10 |
*/
|
11 |
|
12 |
namespace Twig\Extension {
|
13 |
-
use Twig\FileExtensionEscapingStrategy;
|
14 |
use Twig\NodeVisitor\EscaperNodeVisitor;
|
15 |
use Twig\TokenParser\AutoEscapeTokenParser;
|
16 |
use Twig\TwigFilter;
|
17 |
|
18 |
-
|
|
|
|
|
|
|
19 |
{
|
20 |
-
|
21 |
-
private $escapers = [];
|
22 |
-
|
23 |
-
/** @internal */
|
24 |
-
public $safeClasses = [];
|
25 |
-
|
26 |
-
/** @internal */
|
27 |
-
public $safeLookup = [];
|
28 |
|
29 |
/**
|
30 |
* @param string|false|callable $defaultStrategy An escaping strategy
|
@@ -49,8 +44,6 @@ final class EscaperExtension extends AbstractExtension
|
|
49 |
public function getFilters()
|
50 |
{
|
51 |
return [
|
52 |
-
new TwigFilter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']),
|
53 |
-
new TwigFilter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']),
|
54 |
new TwigFilter('raw', 'twig_raw_filter', ['is_safe' => ['all']]),
|
55 |
];
|
56 |
}
|
@@ -65,8 +58,21 @@ final class EscaperExtension extends AbstractExtension
|
|
65 |
*/
|
66 |
public function setDefaultStrategy($defaultStrategy)
|
67 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
if ('name' === $defaultStrategy) {
|
69 |
-
$defaultStrategy = [FileExtensionEscapingStrategy
|
70 |
}
|
71 |
|
72 |
$this->defaultStrategy = $defaultStrategy;
|
@@ -90,47 +96,9 @@ final class EscaperExtension extends AbstractExtension
|
|
90 |
return $this->defaultStrategy;
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
* Defines a new escaper to be used via the escape filter.
|
95 |
-
*
|
96 |
-
* @param string $strategy The strategy name that should be used as a strategy in the escape call
|
97 |
-
* @param callable $callable A valid PHP callable
|
98 |
-
*/
|
99 |
-
public function setEscaper($strategy, callable $callable)
|
100 |
-
{
|
101 |
-
$this->escapers[$strategy] = $callable;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Gets all defined escapers.
|
106 |
-
*
|
107 |
-
* @return callable[] An array of escapers
|
108 |
-
*/
|
109 |
-
public function getEscapers()
|
110 |
-
{
|
111 |
-
return $this->escapers;
|
112 |
-
}
|
113 |
-
|
114 |
-
public function setSafeClasses(array $safeClasses = [])
|
115 |
-
{
|
116 |
-
$this->safeClasses = [];
|
117 |
-
$this->safeLookup = [];
|
118 |
-
foreach ($safeClasses as $class => $strategies) {
|
119 |
-
$this->addSafeClass($class, $strategies);
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
public function addSafeClass(string $class, array $strategies)
|
124 |
{
|
125 |
-
|
126 |
-
if (!isset($this->safeClasses[$class])) {
|
127 |
-
$this->safeClasses[$class] = [];
|
128 |
-
}
|
129 |
-
$this->safeClasses[$class] = array_merge($this->safeClasses[$class], $strategies);
|
130 |
-
|
131 |
-
foreach ($strategies as $strategy) {
|
132 |
-
$this->safeLookup[$strategy][$class] = true;
|
133 |
-
}
|
134 |
}
|
135 |
}
|
136 |
|
@@ -138,14 +106,6 @@ class_alias('Twig\Extension\EscaperExtension', 'Twig_Extension_Escaper');
|
|
138 |
}
|
139 |
|
140 |
namespace {
|
141 |
-
use Twig\Environment;
|
142 |
-
use Twig\Error\RuntimeError;
|
143 |
-
use Twig\Extension\CoreExtension;
|
144 |
-
use Twig\Extension\EscaperExtension;
|
145 |
-
use Twig\Markup;
|
146 |
-
use Twig\Node\Expression\ConstantExpression;
|
147 |
-
use Twig\Node\Node;
|
148 |
-
|
149 |
/**
|
150 |
* Marks a variable as being safe.
|
151 |
*
|
@@ -157,272 +117,4 @@ function twig_raw_filter($string)
|
|
157 |
{
|
158 |
return $string;
|
159 |
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Escapes a string.
|
163 |
-
*
|
164 |
-
* @param mixed $string The value to be escaped
|
165 |
-
* @param string $strategy The escaping strategy
|
166 |
-
* @param string $charset The charset
|
167 |
-
* @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
|
168 |
-
*
|
169 |
-
* @return string
|
170 |
-
*/
|
171 |
-
function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
|
172 |
-
{
|
173 |
-
if ($autoescape && $string instanceof Markup) {
|
174 |
-
return $string;
|
175 |
-
}
|
176 |
-
|
177 |
-
if (!\is_string($string)) {
|
178 |
-
if (\is_object($string) && method_exists($string, '__toString')) {
|
179 |
-
if ($autoescape) {
|
180 |
-
$c = \get_class($string);
|
181 |
-
$ext = $env->getExtension(EscaperExtension::class);
|
182 |
-
if (!isset($ext->safeClasses[$c])) {
|
183 |
-
$ext->safeClasses[$c] = [];
|
184 |
-
foreach (class_parents($string) + class_implements($string) as $class) {
|
185 |
-
if (isset($ext->safeClasses[$class])) {
|
186 |
-
$ext->safeClasses[$c] = array_unique(array_merge($ext->safeClasses[$c], $ext->safeClasses[$class]));
|
187 |
-
foreach ($ext->safeClasses[$class] as $s) {
|
188 |
-
$ext->safeLookup[$s][$c] = true;
|
189 |
-
}
|
190 |
-
}
|
191 |
-
}
|
192 |
-
}
|
193 |
-
if (isset($ext->safeLookup[$strategy][$c]) || isset($ext->safeLookup['all'][$c])) {
|
194 |
-
return (string) $string;
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
$string = (string) $string;
|
199 |
-
} elseif (\in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) {
|
200 |
-
return $string;
|
201 |
-
}
|
202 |
-
}
|
203 |
-
|
204 |
-
if ('' === $string) {
|
205 |
-
return '';
|
206 |
-
}
|
207 |
-
|
208 |
-
if (null === $charset) {
|
209 |
-
$charset = $env->getCharset();
|
210 |
-
}
|
211 |
-
|
212 |
-
switch ($strategy) {
|
213 |
-
case 'html':
|
214 |
-
// see https://www.php.net/htmlspecialchars
|
215 |
-
|
216 |
-
// Using a static variable to avoid initializing the array
|
217 |
-
// each time the function is called. Moving the declaration on the
|
218 |
-
// top of the function slow downs other escaping strategies.
|
219 |
-
static $htmlspecialcharsCharsets = [
|
220 |
-
'ISO-8859-1' => true, 'ISO8859-1' => true,
|
221 |
-
'ISO-8859-15' => true, 'ISO8859-15' => true,
|
222 |
-
'utf-8' => true, 'UTF-8' => true,
|
223 |
-
'CP866' => true, 'IBM866' => true, '866' => true,
|
224 |
-
'CP1251' => true, 'WINDOWS-1251' => true, 'WIN-1251' => true,
|
225 |
-
'1251' => true,
|
226 |
-
'CP1252' => true, 'WINDOWS-1252' => true, '1252' => true,
|
227 |
-
'KOI8-R' => true, 'KOI8-RU' => true, 'KOI8R' => true,
|
228 |
-
'BIG5' => true, '950' => true,
|
229 |
-
'GB2312' => true, '936' => true,
|
230 |
-
'BIG5-HKSCS' => true,
|
231 |
-
'SHIFT_JIS' => true, 'SJIS' => true, '932' => true,
|
232 |
-
'EUC-JP' => true, 'EUCJP' => true,
|
233 |
-
'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true,
|
234 |
-
];
|
235 |
-
|
236 |
-
if (isset($htmlspecialcharsCharsets[$charset])) {
|
237 |
-
return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset);
|
238 |
-
}
|
239 |
-
|
240 |
-
if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) {
|
241 |
-
// cache the lowercase variant for future iterations
|
242 |
-
$htmlspecialcharsCharsets[$charset] = true;
|
243 |
-
|
244 |
-
return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset);
|
245 |
-
}
|
246 |
-
|
247 |
-
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
248 |
-
$string = htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8');
|
249 |
-
|
250 |
-
return iconv('UTF-8', $charset, $string);
|
251 |
-
|
252 |
-
case 'js':
|
253 |
-
// escape all non-alphanumeric characters
|
254 |
-
// into their \x or \uHHHH representations
|
255 |
-
if ('UTF-8' !== $charset) {
|
256 |
-
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
257 |
-
}
|
258 |
-
|
259 |
-
if (!preg_match('//u', $string)) {
|
260 |
-
throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
|
261 |
-
}
|
262 |
-
|
263 |
-
$string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', function ($matches) {
|
264 |
-
$char = $matches[0];
|
265 |
-
|
266 |
-
/*
|
267 |
-
* A few characters have short escape sequences in JSON and JavaScript.
|
268 |
-
* Escape sequences supported only by JavaScript, not JSON, are omitted.
|
269 |
-
* \" is also supported but omitted, because the resulting string is not HTML safe.
|
270 |
-
*/
|
271 |
-
static $shortMap = [
|
272 |
-
'\\' => '\\\\',
|
273 |
-
'/' => '\\/',
|
274 |
-
"\x08" => '\b',
|
275 |
-
"\x0C" => '\f',
|
276 |
-
"\x0A" => '\n',
|
277 |
-
"\x0D" => '\r',
|
278 |
-
"\x09" => '\t',
|
279 |
-
];
|
280 |
-
|
281 |
-
if (isset($shortMap[$char])) {
|
282 |
-
return $shortMap[$char];
|
283 |
-
}
|
284 |
-
|
285 |
-
$codepoint = mb_ord($char, 'UTF-8');
|
286 |
-
if (0x10000 > $codepoint) {
|
287 |
-
return sprintf('\u%04X', $codepoint);
|
288 |
-
}
|
289 |
-
|
290 |
-
// Split characters outside the BMP into surrogate pairs
|
291 |
-
// https://tools.ietf.org/html/rfc2781.html#section-2.1
|
292 |
-
$u = $codepoint - 0x10000;
|
293 |
-
$high = 0xD800 | ($u >> 10);
|
294 |
-
$low = 0xDC00 | ($u & 0x3FF);
|
295 |
-
|
296 |
-
return sprintf('\u%04X\u%04X', $high, $low);
|
297 |
-
}, $string);
|
298 |
-
|
299 |
-
if ('UTF-8' !== $charset) {
|
300 |
-
$string = iconv('UTF-8', $charset, $string);
|
301 |
-
}
|
302 |
-
|
303 |
-
return $string;
|
304 |
-
|
305 |
-
case 'css':
|
306 |
-
if ('UTF-8' !== $charset) {
|
307 |
-
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
308 |
-
}
|
309 |
-
|
310 |
-
if (!preg_match('//u', $string)) {
|
311 |
-
throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
|
312 |
-
}
|
313 |
-
|
314 |
-
$string = preg_replace_callback('#[^a-zA-Z0-9]#Su', function ($matches) {
|
315 |
-
$char = $matches[0];
|
316 |
-
|
317 |
-
return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : mb_ord($char, 'UTF-8'));
|
318 |
-
}, $string);
|
319 |
-
|
320 |
-
if ('UTF-8' !== $charset) {
|
321 |
-
$string = iconv('UTF-8', $charset, $string);
|
322 |
-
}
|
323 |
-
|
324 |
-
return $string;
|
325 |
-
|
326 |
-
case 'html_attr':
|
327 |
-
if ('UTF-8' !== $charset) {
|
328 |
-
$string = twig_convert_encoding($string, 'UTF-8', $charset);
|
329 |
-
}
|
330 |
-
|
331 |
-
if (!preg_match('//u', $string)) {
|
332 |
-
throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
|
333 |
-
}
|
334 |
-
|
335 |
-
$string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', function ($matches) {
|
336 |
-
/**
|
337 |
-
* This function is adapted from code coming from Zend Framework.
|
338 |
-
*
|
339 |
-
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)
|
340 |
-
* @license https://framework.zend.com/license/new-bsd New BSD License
|
341 |
-
*/
|
342 |
-
$chr = $matches[0];
|
343 |
-
$ord = \ord($chr);
|
344 |
-
|
345 |
-
/*
|
346 |
-
* The following replaces characters undefined in HTML with the
|
347 |
-
* hex entity for the Unicode replacement character.
|
348 |
-
*/
|
349 |
-
if (($ord <= 0x1f && "\t" != $chr && "\n" != $chr && "\r" != $chr) || ($ord >= 0x7f && $ord <= 0x9f)) {
|
350 |
-
return '�';
|
351 |
-
}
|
352 |
-
|
353 |
-
/*
|
354 |
-
* Check if the current character to escape has a name entity we should
|
355 |
-
* replace it with while grabbing the hex value of the character.
|
356 |
-
*/
|
357 |
-
if (1 === \strlen($chr)) {
|
358 |
-
/*
|
359 |
-
* While HTML supports far more named entities, the lowest common denominator
|
360 |
-
* has become HTML5's XML Serialisation which is restricted to the those named
|
361 |
-
* entities that XML supports. Using HTML entities would result in this error:
|
362 |
-
* XML Parsing Error: undefined entity
|
363 |
-
*/
|
364 |
-
static $entityMap = [
|
365 |
-
34 => '"', /* quotation mark */
|
366 |
-
38 => '&', /* ampersand */
|
367 |
-
60 => '<', /* less-than sign */
|
368 |
-
62 => '>', /* greater-than sign */
|
369 |
-
];
|
370 |
-
|
371 |
-
if (isset($entityMap[$ord])) {
|
372 |
-
return $entityMap[$ord];
|
373 |
-
}
|
374 |
-
|
375 |
-
return sprintf('&#x%02X;', $ord);
|
376 |
-
}
|
377 |
-
|
378 |
-
/*
|
379 |
-
* Per OWASP recommendations, we'll use hex entities for any other
|
380 |
-
* characters where a named entity does not exist.
|
381 |
-
*/
|
382 |
-
return sprintf('&#x%04X;', mb_ord($chr, 'UTF-8'));
|
383 |
-
}, $string);
|
384 |
-
|
385 |
-
if ('UTF-8' !== $charset) {
|
386 |
-
$string = iconv('UTF-8', $charset, $string);
|
387 |
-
}
|
388 |
-
|
389 |
-
return $string;
|
390 |
-
|
391 |
-
case 'url':
|
392 |
-
return rawurlencode($string);
|
393 |
-
|
394 |
-
default:
|
395 |
-
// check the ones set on CoreExtension for BC (to be removed in 3.0)
|
396 |
-
$legacyEscapers = $env->getExtension(CoreExtension::class)->getEscapers(false);
|
397 |
-
if (array_key_exists($strategy, $legacyEscapers)) {
|
398 |
-
return $legacyEscapers[$strategy]($env, $string, $charset);
|
399 |
-
}
|
400 |
-
|
401 |
-
$escapers = $env->getExtension(EscaperExtension::class)->getEscapers();
|
402 |
-
if (array_key_exists($strategy, $escapers)) {
|
403 |
-
return $escapers[$strategy]($env, $string, $charset);
|
404 |
-
}
|
405 |
-
|
406 |
-
$escapers = array_merge($legacyEscapers, $escapers);
|
407 |
-
$validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers)));
|
408 |
-
|
409 |
-
throw new RuntimeError(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies));
|
410 |
-
}
|
411 |
-
}
|
412 |
-
|
413 |
-
/**
|
414 |
-
* @internal
|
415 |
-
*/
|
416 |
-
function twig_escape_filter_is_safe(Node $filterArgs)
|
417 |
-
{
|
418 |
-
foreach ($filterArgs as $arg) {
|
419 |
-
if ($arg instanceof ConstantExpression) {
|
420 |
-
return [$arg->getAttribute('value')];
|
421 |
-
}
|
422 |
-
|
423 |
-
return [];
|
424 |
-
}
|
425 |
-
|
426 |
-
return ['html'];
|
427 |
-
}
|
428 |
}
|
10 |
*/
|
11 |
|
12 |
namespace Twig\Extension {
|
|
|
13 |
use Twig\NodeVisitor\EscaperNodeVisitor;
|
14 |
use Twig\TokenParser\AutoEscapeTokenParser;
|
15 |
use Twig\TwigFilter;
|
16 |
|
17 |
+
/**
|
18 |
+
* @final
|
19 |
+
*/
|
20 |
+
class EscaperExtension extends AbstractExtension
|
21 |
{
|
22 |
+
protected $defaultStrategy;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
/**
|
25 |
* @param string|false|callable $defaultStrategy An escaping strategy
|
44 |
public function getFilters()
|
45 |
{
|
46 |
return [
|
|
|
|
|
47 |
new TwigFilter('raw', 'twig_raw_filter', ['is_safe' => ['all']]),
|
48 |
];
|
49 |
}
|
58 |
*/
|
59 |
public function setDefaultStrategy($defaultStrategy)
|
60 |
{
|
61 |
+
// for BC
|
62 |
+
if (true === $defaultStrategy) {
|
63 |
+
@trigger_error('Using "true" as the default strategy is deprecated since version 1.21. Use "html" instead.', \E_USER_DEPRECATED);
|
64 |
+
|
65 |
+
$defaultStrategy = 'html';
|
66 |
+
}
|
67 |
+
|
68 |
+
if ('filename' === $defaultStrategy) {
|
69 |
+
@trigger_error('Using "filename" as the default strategy is deprecated since version 1.27. Use "name" instead.', \E_USER_DEPRECATED);
|
70 |
+
|
71 |
+
$defaultStrategy = 'name';
|
72 |
+
}
|
73 |
+
|
74 |
if ('name' === $defaultStrategy) {
|
75 |
+
$defaultStrategy = ['\Twig\FileExtensionEscapingStrategy', 'guess'];
|
76 |
}
|
77 |
|
78 |
$this->defaultStrategy = $defaultStrategy;
|
96 |
return $this->defaultStrategy;
|
97 |
}
|
98 |
|
99 |
+
public function getName()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
{
|
101 |
+
return 'escaper';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
}
|
104 |
|
106 |
}
|
107 |
|
108 |
namespace {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
/**
|
110 |
* Marks a variable as being safe.
|
111 |
*
|
117 |
{
|
118 |
return $string;
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
vendor/twig/twig/src/Extension/ExtensionInterface.php
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
|
12 |
namespace Twig\Extension;
|
13 |
|
|
|
14 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
15 |
use Twig\TokenParser\TokenParserInterface;
|
16 |
use Twig\TwigFilter;
|
@@ -24,6 +25,15 @@ use Twig\TwigTest;
|
|
24 |
*/
|
25 |
interface ExtensionInterface
|
26 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* Returns the token parser instances to add to the existing list.
|
29 |
*
|
@@ -65,6 +75,24 @@ interface ExtensionInterface
|
|
65 |
* @return array<array> First array of unary operators, second array of binary operators
|
66 |
*/
|
67 |
public function getOperators();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
class_alias('Twig\Extension\ExtensionInterface', 'Twig_ExtensionInterface');
|
11 |
|
12 |
namespace Twig\Extension;
|
13 |
|
14 |
+
use Twig\Environment;
|
15 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
16 |
use Twig\TokenParser\TokenParserInterface;
|
17 |
use Twig\TwigFilter;
|
25 |
*/
|
26 |
interface ExtensionInterface
|
27 |
{
|
28 |
+
/**
|
29 |
+
* Initializes the runtime environment.
|
30 |
+
*
|
31 |
+
* This is where you can load some file that contains filter functions for instance.
|
32 |
+
*
|
33 |
+
* @deprecated since 1.23 (to be removed in 2.0), implement \Twig_Extension_InitRuntimeInterface instead
|
34 |
+
*/
|
35 |
+
public function initRuntime(Environment $environment);
|
36 |
+
|
37 |
/**
|
38 |
* Returns the token parser instances to add to the existing list.
|
39 |
*
|
75 |
* @return array<array> First array of unary operators, second array of binary operators
|
76 |
*/
|
77 |
public function getOperators();
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Returns a list of global variables to add to the existing list.
|
81 |
+
*
|
82 |
+
* @return array An array of global variables
|
83 |
+
*
|
84 |
+
* @deprecated since 1.23 (to be removed in 2.0), implement \Twig_Extension_GlobalsInterface instead
|
85 |
+
*/
|
86 |
+
public function getGlobals();
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Returns the name of the extension.
|
90 |
+
*
|
91 |
+
* @return string The extension name
|
92 |
+
*
|
93 |
+
* @deprecated since 1.26 (to be removed in 2.0), not used anymore internally
|
94 |
+
*/
|
95 |
+
public function getName();
|
96 |
}
|
97 |
|
98 |
class_alias('Twig\Extension\ExtensionInterface', 'Twig_ExtensionInterface');
|
vendor/twig/twig/src/Extension/GlobalsInterface.php
CHANGED
@@ -21,12 +21,6 @@ namespace Twig\Extension;
|
|
21 |
*/
|
22 |
interface GlobalsInterface
|
23 |
{
|
24 |
-
/**
|
25 |
-
* Returns a list of global variables to add to the existing list.
|
26 |
-
*
|
27 |
-
* @return array An array of global variables
|
28 |
-
*/
|
29 |
-
public function getGlobals();
|
30 |
}
|
31 |
|
32 |
class_alias('Twig\Extension\GlobalsInterface', 'Twig_Extension_GlobalsInterface');
|
21 |
*/
|
22 |
interface GlobalsInterface
|
23 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
class_alias('Twig\Extension\GlobalsInterface', 'Twig_Extension_GlobalsInterface');
|
vendor/twig/twig/src/Extension/InitRuntimeInterface.php
CHANGED
@@ -11,8 +11,6 @@
|
|
11 |
|
12 |
namespace Twig\Extension;
|
13 |
|
14 |
-
use Twig\Environment;
|
15 |
-
|
16 |
/**
|
17 |
* Enables usage of the deprecated Twig\Extension\AbstractExtension::initRuntime() method.
|
18 |
*
|
@@ -20,17 +18,9 @@ use Twig\Environment;
|
|
20 |
* deprecated initRuntime() method in your extensions.
|
21 |
*
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
-
*
|
24 |
-
* @deprecated since Twig 2.7, to be removed in 3.0
|
25 |
*/
|
26 |
interface InitRuntimeInterface
|
27 |
{
|
28 |
-
/**
|
29 |
-
* Initializes the runtime environment.
|
30 |
-
*
|
31 |
-
* This is where you can load some file that contains filter functions for instance.
|
32 |
-
*/
|
33 |
-
public function initRuntime(Environment $environment);
|
34 |
}
|
35 |
|
36 |
class_alias('Twig\Extension\InitRuntimeInterface', 'Twig_Extension_InitRuntimeInterface');
|
11 |
|
12 |
namespace Twig\Extension;
|
13 |
|
|
|
|
|
14 |
/**
|
15 |
* Enables usage of the deprecated Twig\Extension\AbstractExtension::initRuntime() method.
|
16 |
*
|
18 |
* deprecated initRuntime() method in your extensions.
|
19 |
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
21 |
*/
|
22 |
interface InitRuntimeInterface
|
23 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
class_alias('Twig\Extension\InitRuntimeInterface', 'Twig_Extension_InitRuntimeInterface');
|
vendor/twig/twig/src/Extension/OptimizerExtension.php
CHANGED
@@ -13,9 +13,12 @@ namespace Twig\Extension;
|
|
13 |
|
14 |
use Twig\NodeVisitor\OptimizerNodeVisitor;
|
15 |
|
16 |
-
|
|
|
|
|
|
|
17 |
{
|
18 |
-
|
19 |
|
20 |
public function __construct($optimizers = -1)
|
21 |
{
|
@@ -26,6 +29,11 @@ final class OptimizerExtension extends AbstractExtension
|
|
26 |
{
|
27 |
return [new OptimizerNodeVisitor($this->optimizers)];
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
class_alias('Twig\Extension\OptimizerExtension', 'Twig_Extension_Optimizer');
|
13 |
|
14 |
use Twig\NodeVisitor\OptimizerNodeVisitor;
|
15 |
|
16 |
+
/**
|
17 |
+
* @final
|
18 |
+
*/
|
19 |
+
class OptimizerExtension extends AbstractExtension
|
20 |
{
|
21 |
+
protected $optimizers;
|
22 |
|
23 |
public function __construct($optimizers = -1)
|
24 |
{
|
29 |
{
|
30 |
return [new OptimizerNodeVisitor($this->optimizers)];
|
31 |
}
|
32 |
+
|
33 |
+
public function getName()
|
34 |
+
{
|
35 |
+
return 'optimizer';
|
36 |
+
}
|
37 |
}
|
38 |
|
39 |
class_alias('Twig\Extension\OptimizerExtension', 'Twig_Extension_Optimizer');
|
vendor/twig/twig/src/Extension/ProfilerExtension.php
CHANGED
@@ -43,6 +43,11 @@ class ProfilerExtension extends AbstractExtension
|
|
43 |
{
|
44 |
return [new ProfilerNodeVisitor(static::class)];
|
45 |
}
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
class_alias('Twig\Extension\ProfilerExtension', 'Twig_Extension_Profiler');
|
43 |
{
|
44 |
return [new ProfilerNodeVisitor(static::class)];
|
45 |
}
|
46 |
+
|
47 |
+
public function getName()
|
48 |
+
{
|
49 |
+
return 'profiler';
|
50 |
+
}
|
51 |
}
|
52 |
|
53 |
class_alias('Twig\Extension\ProfilerExtension', 'Twig_Extension_Profiler');
|
vendor/twig/twig/src/Extension/SandboxExtension.php
CHANGED
@@ -12,17 +12,17 @@
|
|
12 |
namespace Twig\Extension;
|
13 |
|
14 |
use Twig\NodeVisitor\SandboxNodeVisitor;
|
15 |
-
use Twig\Sandbox\SecurityNotAllowedMethodError;
|
16 |
-
use Twig\Sandbox\SecurityNotAllowedPropertyError;
|
17 |
use Twig\Sandbox\SecurityPolicyInterface;
|
18 |
-
use Twig\Source;
|
19 |
use Twig\TokenParser\SandboxTokenParser;
|
20 |
|
21 |
-
|
|
|
|
|
|
|
22 |
{
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
|
27 |
public function __construct(SecurityPolicyInterface $policy, $sandboxed = false)
|
28 |
{
|
@@ -77,49 +77,33 @@ final class SandboxExtension extends AbstractExtension
|
|
77 |
}
|
78 |
}
|
79 |
|
80 |
-
public function checkMethodAllowed($obj, $method
|
81 |
{
|
82 |
if ($this->isSandboxed()) {
|
83 |
-
|
84 |
-
$this->policy->checkMethodAllowed($obj, $method);
|
85 |
-
} catch (SecurityNotAllowedMethodError $e) {
|
86 |
-
$e->setSourceContext($source);
|
87 |
-
$e->setTemplateLine($lineno);
|
88 |
-
|
89 |
-
throw $e;
|
90 |
-
}
|
91 |
}
|
92 |
}
|
93 |
|
94 |
-
public function checkPropertyAllowed($obj, $
|
95 |
{
|
96 |
if ($this->isSandboxed()) {
|
97 |
-
|
98 |
-
$this->policy->checkPropertyAllowed($obj, $property);
|
99 |
-
} catch (SecurityNotAllowedPropertyError $e) {
|
100 |
-
$e->setSourceContext($source);
|
101 |
-
$e->setTemplateLine($lineno);
|
102 |
-
|
103 |
-
throw $e;
|
104 |
-
}
|
105 |
}
|
106 |
}
|
107 |
|
108 |
-
public function ensureToStringAllowed($obj
|
109 |
{
|
110 |
if ($this->isSandboxed() && \is_object($obj) && method_exists($obj, '__toString')) {
|
111 |
-
|
112 |
-
$this->policy->checkMethodAllowed($obj, '__toString');
|
113 |
-
} catch (SecurityNotAllowedMethodError $e) {
|
114 |
-
$e->setSourceContext($source);
|
115 |
-
$e->setTemplateLine($lineno);
|
116 |
-
|
117 |
-
throw $e;
|
118 |
-
}
|
119 |
}
|
120 |
|
121 |
return $obj;
|
122 |
}
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
|
125 |
class_alias('Twig\Extension\SandboxExtension', 'Twig_Extension_Sandbox');
|
12 |
namespace Twig\Extension;
|
13 |
|
14 |
use Twig\NodeVisitor\SandboxNodeVisitor;
|
|
|
|
|
15 |
use Twig\Sandbox\SecurityPolicyInterface;
|
|
|
16 |
use Twig\TokenParser\SandboxTokenParser;
|
17 |
|
18 |
+
/**
|
19 |
+
* @final
|
20 |
+
*/
|
21 |
+
class SandboxExtension extends AbstractExtension
|
22 |
{
|
23 |
+
protected $sandboxedGlobally;
|
24 |
+
protected $sandboxed;
|
25 |
+
protected $policy;
|
26 |
|
27 |
public function __construct(SecurityPolicyInterface $policy, $sandboxed = false)
|
28 |
{
|
77 |
}
|
78 |
}
|
79 |
|
80 |
+
public function checkMethodAllowed($obj, $method)
|
81 |
{
|
82 |
if ($this->isSandboxed()) {
|
83 |
+
$this->policy->checkMethodAllowed($obj, $method);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
}
|
86 |
|
87 |
+
public function checkPropertyAllowed($obj, $method)
|
88 |
{
|
89 |
if ($this->isSandboxed()) {
|
90 |
+
$this->policy->checkPropertyAllowed($obj, $method);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
}
|
93 |
|
94 |
+
public function ensureToStringAllowed($obj)
|
95 |
{
|
96 |
if ($this->isSandboxed() && \is_object($obj) && method_exists($obj, '__toString')) {
|
97 |
+
$this->policy->checkMethodAllowed($obj, '__toString');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
return $obj;
|
101 |
}
|
102 |
+
|
103 |
+
public function getName()
|
104 |
+
{
|
105 |
+
return 'sandbox';
|
106 |
+
}
|
107 |
}
|
108 |
|
109 |
class_alias('Twig\Extension\SandboxExtension', 'Twig_Extension_Sandbox');
|
vendor/twig/twig/src/Extension/StagingExtension.php
CHANGED
@@ -13,32 +13,32 @@ namespace Twig\Extension;
|
|
13 |
|
14 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
15 |
use Twig\TokenParser\TokenParserInterface;
|
16 |
-
use Twig\TwigFilter;
|
17 |
-
use Twig\TwigFunction;
|
18 |
-
use Twig\TwigTest;
|
19 |
|
20 |
/**
|
21 |
-
*
|
|
|
|
|
22 |
*
|
23 |
* @author Fabien Potencier <fabien@symfony.com>
|
24 |
*
|
25 |
* @internal
|
26 |
*/
|
27 |
-
|
28 |
{
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
36 |
{
|
37 |
-
if (isset($this->functions[$
|
38 |
-
|
39 |
}
|
40 |
|
41 |
-
$this->functions[$
|
42 |
}
|
43 |
|
44 |
public function getFunctions()
|
@@ -46,13 +46,13 @@ final class StagingExtension extends AbstractExtension
|
|
46 |
return $this->functions;
|
47 |
}
|
48 |
|
49 |
-
public function addFilter(
|
50 |
{
|
51 |
-
if (isset($this->filters[$
|
52 |
-
|
53 |
}
|
54 |
|
55 |
-
$this->filters[$
|
56 |
}
|
57 |
|
58 |
public function getFilters()
|
@@ -73,7 +73,7 @@ final class StagingExtension extends AbstractExtension
|
|
73 |
public function addTokenParser(TokenParserInterface $parser)
|
74 |
{
|
75 |
if (isset($this->tokenParsers[$parser->getTag()])) {
|
76 |
-
|
77 |
}
|
78 |
|
79 |
$this->tokenParsers[$parser->getTag()] = $parser;
|
@@ -84,19 +84,34 @@ final class StagingExtension extends AbstractExtension
|
|
84 |
return $this->tokenParsers;
|
85 |
}
|
86 |
|
87 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
88 |
{
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
|
93 |
-
$this->tests[$
|
94 |
}
|
95 |
|
96 |
public function getTests()
|
97 |
{
|
98 |
return $this->tests;
|
99 |
}
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
|
102 |
class_alias('Twig\Extension\StagingExtension', 'Twig_Extension_Staging');
|
13 |
|
14 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
15 |
use Twig\TokenParser\TokenParserInterface;
|
|
|
|
|
|
|
16 |
|
17 |
/**
|
18 |
+
* Internal class.
|
19 |
+
*
|
20 |
+
* This class is used by \Twig\Environment as a staging area and must not be used directly.
|
21 |
*
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
*
|
24 |
* @internal
|
25 |
*/
|
26 |
+
class StagingExtension extends AbstractExtension
|
27 |
{
|
28 |
+
protected $functions = [];
|
29 |
+
protected $filters = [];
|
30 |
+
protected $visitors = [];
|
31 |
+
protected $tokenParsers = [];
|
32 |
+
protected $globals = [];
|
33 |
+
protected $tests = [];
|
34 |
+
|
35 |
+
public function addFunction($name, $function)
|
36 |
{
|
37 |
+
if (isset($this->functions[$name])) {
|
38 |
+
@trigger_error(sprintf('Overriding function "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), \E_USER_DEPRECATED);
|
39 |
}
|
40 |
|
41 |
+
$this->functions[$name] = $function;
|
42 |
}
|
43 |
|
44 |
public function getFunctions()
|
46 |
return $this->functions;
|
47 |
}
|
48 |
|
49 |
+
public function addFilter($name, $filter)
|
50 |
{
|
51 |
+
if (isset($this->filters[$name])) {
|
52 |
+
@trigger_error(sprintf('Overriding filter "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), \E_USER_DEPRECATED);
|
53 |
}
|
54 |
|
55 |
+
$this->filters[$name] = $filter;
|
56 |
}
|
57 |
|
58 |
public function getFilters()
|
73 |
public function addTokenParser(TokenParserInterface $parser)
|
74 |
{
|
75 |
if (isset($this->tokenParsers[$parser->getTag()])) {
|
76 |
+
@trigger_error(sprintf('Overriding tag "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $parser->getTag()), \E_USER_DEPRECATED);
|
77 |
}
|
78 |
|
79 |
$this->tokenParsers[$parser->getTag()] = $parser;
|
84 |
return $this->tokenParsers;
|
85 |
}
|
86 |
|
87 |
+
public function addGlobal($name, $value)
|
88 |
+
{
|
89 |
+
$this->globals[$name] = $value;
|
90 |
+
}
|
91 |
+
|
92 |
+
public function getGlobals()
|
93 |
{
|
94 |
+
return $this->globals;
|
95 |
+
}
|
96 |
+
|
97 |
+
public function addTest($name, $test)
|
98 |
+
{
|
99 |
+
if (isset($this->tests[$name])) {
|
100 |
+
@trigger_error(sprintf('Overriding test "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), \E_USER_DEPRECATED);
|
101 |
}
|
102 |
|
103 |
+
$this->tests[$name] = $test;
|
104 |
}
|
105 |
|
106 |
public function getTests()
|
107 |
{
|
108 |
return $this->tests;
|
109 |
}
|
110 |
+
|
111 |
+
public function getName()
|
112 |
+
{
|
113 |
+
return 'staging';
|
114 |
+
}
|
115 |
}
|
116 |
|
117 |
class_alias('Twig\Extension\StagingExtension', 'Twig_Extension_Staging');
|
vendor/twig/twig/src/Extension/StringLoaderExtension.php
CHANGED
@@ -12,7 +12,10 @@
|
|
12 |
namespace Twig\Extension {
|
13 |
use Twig\TwigFunction;
|
14 |
|
15 |
-
|
|
|
|
|
|
|
16 |
{
|
17 |
public function getFunctions()
|
18 |
{
|
@@ -20,6 +23,11 @@ final class StringLoaderExtension extends AbstractExtension
|
|
20 |
new TwigFunction('template_from_string', 'twig_template_from_string', ['needs_environment' => true]),
|
21 |
];
|
22 |
}
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
class_alias('Twig\Extension\StringLoaderExtension', 'Twig_Extension_StringLoader');
|
@@ -39,7 +47,7 @@ use Twig\TemplateWrapper;
|
|
39 |
*
|
40 |
* @return TemplateWrapper
|
41 |
*/
|
42 |
-
function twig_template_from_string(Environment $env, $template,
|
43 |
{
|
44 |
return $env->createTemplate((string) $template, $name);
|
45 |
}
|
12 |
namespace Twig\Extension {
|
13 |
use Twig\TwigFunction;
|
14 |
|
15 |
+
/**
|
16 |
+
* @final
|
17 |
+
*/
|
18 |
+
class StringLoaderExtension extends AbstractExtension
|
19 |
{
|
20 |
public function getFunctions()
|
21 |
{
|
23 |
new TwigFunction('template_from_string', 'twig_template_from_string', ['needs_environment' => true]),
|
24 |
];
|
25 |
}
|
26 |
+
|
27 |
+
public function getName()
|
28 |
+
{
|
29 |
+
return 'string_loader';
|
30 |
+
}
|
31 |
}
|
32 |
|
33 |
class_alias('Twig\Extension\StringLoaderExtension', 'Twig_Extension_StringLoader');
|
47 |
*
|
48 |
* @return TemplateWrapper
|
49 |
*/
|
50 |
+
function twig_template_from_string(Environment $env, $template, $name = null)
|
51 |
{
|
52 |
return $env->createTemplate((string) $template, $name);
|
53 |
}
|
vendor/twig/twig/src/ExtensionSet.php
DELETED
@@ -1,475 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
namespace Twig;
|
13 |
-
|
14 |
-
use Twig\Error\RuntimeError;
|
15 |
-
use Twig\Extension\ExtensionInterface;
|
16 |
-
use Twig\Extension\GlobalsInterface;
|
17 |
-
use Twig\Extension\InitRuntimeInterface;
|
18 |
-
use Twig\Extension\StagingExtension;
|
19 |
-
use Twig\NodeVisitor\NodeVisitorInterface;
|
20 |
-
use Twig\TokenParser\TokenParserInterface;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @author Fabien Potencier <fabien@symfony.com>
|
24 |
-
*
|
25 |
-
* @internal
|
26 |
-
*/
|
27 |
-
final class ExtensionSet
|
28 |
-
{
|
29 |
-
private $extensions;
|
30 |
-
private $initialized = false;
|
31 |
-
private $runtimeInitialized = false;
|
32 |
-
private $staging;
|
33 |
-
private $parsers;
|
34 |
-
private $visitors;
|
35 |
-
private $filters;
|
36 |
-
private $tests;
|
37 |
-
private $functions;
|
38 |
-
private $unaryOperators;
|
39 |
-
private $binaryOperators;
|
40 |
-
private $globals;
|
41 |
-
private $functionCallbacks = [];
|
42 |
-
private $filterCallbacks = [];
|
43 |
-
private $lastModified = 0;
|
44 |
-
|
45 |
-
public function __construct()
|
46 |
-
{
|
47 |
-
$this->staging = new StagingExtension();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Initializes the runtime environment.
|
52 |
-
*
|
53 |
-
* @deprecated since Twig 2.7
|
54 |
-
*/
|
55 |
-
public function initRuntime(Environment $env)
|
56 |
-
{
|
57 |
-
if ($this->runtimeInitialized) {
|
58 |
-
return;
|
59 |
-
}
|
60 |
-
|
61 |
-
$this->runtimeInitialized = true;
|
62 |
-
|
63 |
-
foreach ($this->extensions as $extension) {
|
64 |
-
if ($extension instanceof InitRuntimeInterface) {
|
65 |
-
$extension->initRuntime($env);
|
66 |
-
}
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
public function hasExtension(string $class): bool
|
71 |
-
{
|
72 |
-
$class = ltrim($class, '\\');
|
73 |
-
if (!isset($this->extensions[$class]) && class_exists($class, false)) {
|
74 |
-
// For BC/FC with namespaced aliases
|
75 |
-
$class = (new \ReflectionClass($class))->name;
|
76 |
-
}
|
77 |
-
|
78 |
-
return isset($this->extensions[$class]);
|
79 |
-
}
|
80 |
-
|
81 |
-
public function getExtension(string $class): ExtensionInterface
|
82 |
-
{
|
83 |
-
$class = ltrim($class, '\\');
|
84 |
-
if (!isset($this->extensions[$class]) && class_exists($class, false)) {
|
85 |
-
// For BC/FC with namespaced aliases
|
86 |
-
$class = (new \ReflectionClass($class))->name;
|
87 |
-
}
|
88 |
-
|
89 |
-
if (!isset($this->extensions[$class])) {
|
90 |
-
throw new RuntimeError(sprintf('The "%s" extension is not enabled.', $class));
|
91 |
-
}
|
92 |
-
|
93 |
-
return $this->extensions[$class];
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* @param ExtensionInterface[] $extensions
|
98 |
-
*/
|
99 |
-
public function setExtensions(array $extensions)
|
100 |
-
{
|
101 |
-
foreach ($extensions as $extension) {
|
102 |
-
$this->addExtension($extension);
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* @return ExtensionInterface[]
|
108 |
-
*/
|
109 |
-
public function getExtensions(): array
|
110 |
-
{
|
111 |
-
return $this->extensions;
|
112 |
-
}
|
113 |
-
|
114 |
-
public function getSignature(): string
|
115 |
-
{
|
116 |
-
return json_encode(array_keys($this->extensions));
|
117 |
-
}
|
118 |
-
|
119 |
-
public function isInitialized(): bool
|
120 |
-
{
|
121 |
-
return $this->initialized || $this->runtimeInitialized;
|
122 |
-
}
|
123 |
-
|
124 |
-
public function getLastModified(): int
|
125 |
-
{
|
126 |
-
if (0 !== $this->lastModified) {
|
127 |
-
return $this->lastModified;
|
128 |
-
}
|
129 |
-
|
130 |
-
foreach ($this->extensions as $extension) {
|
131 |
-
$r = new \ReflectionObject($extension);
|
132 |
-
if (file_exists($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModified) {
|
133 |
-
$this->lastModified = $extensionTime;
|
134 |
-
}
|
135 |
-
}
|
136 |
-
|
137 |
-
return $this->lastModified;
|
138 |
-
}
|
139 |
-
|
140 |
-
public function addExtension(ExtensionInterface $extension)
|
141 |
-
{
|
142 |
-
$class = \get_class($extension);
|
143 |
-
|
144 |
-
if ($this->initialized) {
|
145 |
-
throw new \LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $class));
|
146 |
-
}
|
147 |
-
|
148 |
-
if (isset($this->extensions[$class])) {
|
149 |
-
throw new \LogicException(sprintf('Unable to register extension "%s" as it is already registered.', $class));
|
150 |
-
}
|
151 |
-
|
152 |
-
$this->extensions[$class] = $extension;
|
153 |
-
}
|
154 |
-
|
155 |
-
public function addFunction(TwigFunction $function)
|
156 |
-
{
|
157 |
-
if ($this->initialized) {
|
158 |
-
throw new \LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $function->getName()));
|
159 |
-
}
|
160 |
-
|
161 |
-
$this->staging->addFunction($function);
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* @return TwigFunction[]
|
166 |
-
*/
|
167 |
-
public function getFunctions(): array
|
168 |
-
{
|
169 |
-
if (!$this->initialized) {
|
170 |
-
$this->initExtensions();
|
171 |
-
}
|
172 |
-
|
173 |
-
return $this->functions;
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* @return TwigFunction|false
|
178 |
-
*/
|
179 |
-
public function getFunction(string $name)
|
180 |
-
{
|
181 |
-
if (!$this->initialized) {
|
182 |
-
$this->initExtensions();
|
183 |
-
}
|
184 |
-
|
185 |
-
if (isset($this->functions[$name])) {
|
186 |
-
return $this->functions[$name];
|
187 |
-
}
|
188 |
-
|
189 |
-
foreach ($this->functions as $pattern => $function) {
|
190 |
-
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
|
191 |
-
|
192 |
-
if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) {
|
193 |
-
array_shift($matches);
|
194 |
-
$function->setArguments($matches);
|
195 |
-
|
196 |
-
return $function;
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
foreach ($this->functionCallbacks as $callback) {
|
201 |
-
if (false !== $function = $callback($name)) {
|
202 |
-
return $function;
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
-
return false;
|
207 |
-
}
|
208 |
-
|
209 |
-
public function registerUndefinedFunctionCallback(callable $callable)
|
210 |
-
{
|
211 |
-
$this->functionCallbacks[] = $callable;
|
212 |
-
}
|
213 |
-
|
214 |
-
public function addFilter(TwigFilter $filter)
|
215 |
-
{
|
216 |
-
if ($this->initialized) {
|
217 |
-
throw new \LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $filter->getName()));
|
218 |
-
}
|
219 |
-
|
220 |
-
$this->staging->addFilter($filter);
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* @return TwigFilter[]
|
225 |
-
*/
|
226 |
-
public function getFilters(): array
|
227 |
-
{
|
228 |
-
if (!$this->initialized) {
|
229 |
-
$this->initExtensions();
|
230 |
-
}
|
231 |
-
|
232 |
-
return $this->filters;
|
233 |
-
}
|
234 |
-
|
235 |
-
/**
|
236 |
-
* @return TwigFilter|false
|
237 |
-
*/
|
238 |
-
public function getFilter(string $name)
|
239 |
-
{
|
240 |
-
if (!$this->initialized) {
|
241 |
-
$this->initExtensions();
|
242 |
-
}
|
243 |
-
|
244 |
-
if (isset($this->filters[$name])) {
|
245 |
-
return $this->filters[$name];
|
246 |
-
}
|
247 |
-
|
248 |
-
foreach ($this->filters as $pattern => $filter) {
|
249 |
-
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
|
250 |
-
|
251 |
-
if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) {
|
252 |
-
array_shift($matches);
|
253 |
-
$filter->setArguments($matches);
|
254 |
-
|
255 |
-
return $filter;
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
foreach ($this->filterCallbacks as $callback) {
|
260 |
-
if (false !== $filter = $callback($name)) {
|
261 |
-
return $filter;
|
262 |
-
}
|
263 |
-
}
|
264 |
-
|
265 |
-
return false;
|
266 |
-
}
|
267 |
-
|
268 |
-
public function registerUndefinedFilterCallback(callable $callable)
|
269 |
-
{
|
270 |
-
$this->filterCallbacks[] = $callable;
|
271 |
-
}
|
272 |
-
|
273 |
-
public function addNodeVisitor(NodeVisitorInterface $visitor)
|
274 |
-
{
|
275 |
-
if ($this->initialized) {
|
276 |
-
throw new \LogicException('Unable to add a node visitor as extensions have already been initialized.');
|
277 |
-
}
|
278 |
-
|
279 |
-
$this->staging->addNodeVisitor($visitor);
|
280 |
-
}
|
281 |
-
|
282 |
-
/**
|
283 |
-
* @return NodeVisitorInterface[]
|
284 |
-
*/
|
285 |
-
public function getNodeVisitors(): array
|
286 |
-
{
|
287 |
-
if (!$this->initialized) {
|
288 |
-
$this->initExtensions();
|
289 |
-
}
|
290 |
-
|
291 |
-
return $this->visitors;
|
292 |
-
}
|
293 |
-
|
294 |
-
public function addTokenParser(TokenParserInterface $parser)
|
295 |
-
{
|
296 |
-
if ($this->initialized) {
|
297 |
-
throw new \LogicException('Unable to add a token parser as extensions have already been initialized.');
|
298 |
-
}
|
299 |
-
|
300 |
-
$this->staging->addTokenParser($parser);
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* @return TokenParserInterface[]
|
305 |
-
*/
|
306 |
-
public function getTokenParsers(): array
|
307 |
-
{
|
308 |
-
if (!$this->initialized) {
|
309 |
-
$this->initExtensions();
|
310 |
-
}
|
311 |
-
|
312 |
-
return $this->parsers;
|
313 |
-
}
|
314 |
-
|
315 |
-
public function getGlobals(): array
|
316 |
-
{
|
317 |
-
if (null !== $this->globals) {
|
318 |
-
return $this->globals;
|
319 |
-
}
|
320 |
-
|
321 |
-
$globals = [];
|
322 |
-
foreach ($this->extensions as $extension) {
|
323 |
-
if (!$extension instanceof GlobalsInterface) {
|
324 |
-
continue;
|
325 |
-
}
|
326 |
-
|
327 |
-
$extGlobals = $extension->getGlobals();
|
328 |
-
if (!\is_array($extGlobals)) {
|
329 |
-
throw new \UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', \get_class($extension)));
|
330 |
-
}
|
331 |
-
|
332 |
-
$globals = array_merge($globals, $extGlobals);
|
333 |
-
}
|
334 |
-
|
335 |
-
if ($this->initialized) {
|
336 |
-
$this->globals = $globals;
|
337 |
-
}
|
338 |
-
|
339 |
-
return $globals;
|
340 |
-
}
|
341 |
-
|
342 |
-
public function addTest(TwigTest $test)
|
343 |
-
{
|
344 |
-
if ($this->initialized) {
|
345 |
-
throw new \LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $test->getName()));
|
346 |
-
}
|
347 |
-
|
348 |
-
$this->staging->addTest($test);
|
349 |
-
}
|
350 |
-
|
351 |
-
/**
|
352 |
-
* @return TwigTest[]
|
353 |
-
*/
|
354 |
-
public function getTests(): array
|
355 |
-
{
|
356 |
-
if (!$this->initialized) {
|
357 |
-
$this->initExtensions();
|
358 |
-
}
|
359 |
-
|
360 |
-
return $this->tests;
|
361 |
-
}
|
362 |
-
|
363 |
-
/**
|
364 |
-
* @return TwigTest|false
|
365 |
-
*/
|
366 |
-
public function getTest(string $name)
|
367 |
-
{
|
368 |
-
if (!$this->initialized) {
|
369 |
-
$this->initExtensions();
|
370 |
-
}
|
371 |
-
|
372 |
-
if (isset($this->tests[$name])) {
|
373 |
-
return $this->tests[$name];
|
374 |
-
}
|
375 |
-
|
376 |
-
foreach ($this->tests as $pattern => $test) {
|
377 |
-
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
|
378 |
-
|
379 |
-
if ($count) {
|
380 |
-
if (preg_match('#^'.$pattern.'$#', $name, $matches)) {
|
381 |
-
array_shift($matches);
|
382 |
-
$test->setArguments($matches);
|
383 |
-
|
384 |
-
return $test;
|
385 |
-
}
|
386 |
-
}
|
387 |
-
}
|
388 |
-
|
389 |
-
return false;
|
390 |
-
}
|
391 |
-
|
392 |
-
public function getUnaryOperators(): array
|
393 |
-
{
|
394 |
-
if (!$this->initialized) {
|
395 |
-
$this->initExtensions();
|
396 |
-
}
|
397 |
-
|
398 |
-
return $this->unaryOperators;
|
399 |
-
}
|
400 |
-
|
401 |
-
public function getBinaryOperators(): array
|
402 |
-
{
|
403 |
-
if (!$this->initialized) {
|
404 |
-
$this->initExtensions();
|
405 |
-
}
|
406 |
-
|
407 |
-
return $this->binaryOperators;
|
408 |
-
}
|
409 |
-
|
410 |
-
private function initExtensions()
|
411 |
-
{
|
412 |
-
$this->parsers = [];
|
413 |
-
$this->filters = [];
|
414 |
-
$this->functions = [];
|
415 |
-
$this->tests = [];
|
416 |
-
$this->visitors = [];
|
417 |
-
$this->unaryOperators = [];
|
418 |
-
$this->binaryOperators = [];
|
419 |
-
|
420 |
-
foreach ($this->extensions as $extension) {
|
421 |
-
$this->initExtension($extension);
|
422 |
-
}
|
423 |
-
$this->initExtension($this->staging);
|
424 |
-
// Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception
|
425 |
-
$this->initialized = true;
|
426 |
-
}
|
427 |
-
|
428 |
-
private function initExtension(ExtensionInterface $extension)
|
429 |
-
{
|
430 |
-
// filters
|
431 |
-
foreach ($extension->getFilters() as $filter) {
|
432 |
-
$this->filters[$filter->getName()] = $filter;
|
433 |
-
}
|
434 |
-
|
435 |
-
// functions
|
436 |
-
foreach ($extension->getFunctions() as $function) {
|
437 |
-
$this->functions[$function->getName()] = $function;
|
438 |
-
}
|
439 |
-
|
440 |
-
// tests
|
441 |
-
foreach ($extension->getTests() as $test) {
|
442 |
-
$this->tests[$test->getName()] = $test;
|
443 |
-
}
|
444 |
-
|
445 |
-
// token parsers
|
446 |
-
foreach ($extension->getTokenParsers() as $parser) {
|
447 |
-
if (!$parser instanceof TokenParserInterface) {
|
448 |
-
throw new \LogicException('getTokenParsers() must return an array of \Twig\TokenParser\TokenParserInterface.');
|
449 |
-
}
|
450 |
-
|
451 |
-
$this->parsers[] = $parser;
|
452 |
-
}
|
453 |
-
|
454 |
-
// node visitors
|
455 |
-
foreach ($extension->getNodeVisitors() as $visitor) {
|
456 |
-
$this->visitors[] = $visitor;
|
457 |
-
}
|
458 |
-
|
459 |
-
// operators
|
460 |
-
if ($operators = $extension->getOperators()) {
|
461 |
-
if (!\is_array($operators)) {
|
462 |
-
throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', \get_class($extension), \is_object($operators) ? \get_class($operators) : \gettype($operators).(\is_resource($operators) ? '' : '#'.$operators)));
|
463 |
-
}
|
464 |
-
|
465 |
-
if (2 !== \count($operators)) {
|
466 |
-
throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array of 2 elements, got %d.', \get_class($extension), \count($operators)));
|
467 |
-
}
|
468 |
-
|
469 |
-
$this->unaryOperators = array_merge($this->unaryOperators, $operators[0]);
|
470 |
-
$this->binaryOperators = array_merge($this->binaryOperators, $operators[1]);
|
471 |
-
}
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
class_alias('Twig\ExtensionSet', 'Twig_ExtensionSet');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/src/Lexer.php
CHANGED
@@ -19,23 +19,26 @@ use Twig\Error\SyntaxError;
|
|
19 |
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
-
class Lexer
|
23 |
{
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
private $source;
|
34 |
-
private $options;
|
35 |
-
private $regexes;
|
36 |
-
private $position;
|
37 |
-
private $positions;
|
38 |
-
private $currentVarBlockLine;
|
39 |
|
40 |
public const STATE_DATA = 0;
|
41 |
public const STATE_BLOCK = 1;
|
@@ -97,7 +100,9 @@ class Lexer
|
|
97 |
$this->options['whitespace_trim']. // -
|
98 |
'|'.
|
99 |
$this->options['whitespace_line_trim']. // ~
|
100 |
-
')?\s*
|
|
|
|
|
101 |
'(?:'.
|
102 |
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}
|
103 |
'|'.
|
@@ -122,7 +127,9 @@ class Lexer
|
|
122 |
|
123 |
// verbatim %}
|
124 |
'lex_block_raw' => '{
|
125 |
-
\s*
|
|
|
|
|
126 |
(?:'.
|
127 |
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}\s*
|
128 |
'|'.
|
@@ -153,10 +160,28 @@ class Lexer
|
|
153 |
];
|
154 |
}
|
155 |
|
156 |
-
public function tokenize(
|
157 |
{
|
158 |
-
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
$this->cursor = 0;
|
161 |
$this->lineno = 1;
|
162 |
$this->end = \strlen($this->code);
|
@@ -196,21 +221,25 @@ class Lexer
|
|
196 |
}
|
197 |
}
|
198 |
|
199 |
-
$this->pushToken(
|
200 |
|
201 |
if (!empty($this->brackets)) {
|
202 |
list($expect, $lineno) = array_pop($this->brackets);
|
203 |
throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source);
|
204 |
}
|
205 |
|
|
|
|
|
|
|
|
|
206 |
return new TokenStream($this->tokens, $this->source);
|
207 |
}
|
208 |
|
209 |
-
|
210 |
{
|
211 |
// if no matches are left we return the rest of the template as simple text token
|
212 |
if ($this->position == \count($this->positions[0]) - 1) {
|
213 |
-
$this->pushToken(
|
214 |
$this->cursor = $this->end;
|
215 |
|
216 |
return;
|
@@ -239,7 +268,7 @@ class Lexer
|
|
239 |
$text = rtrim($text, " \t\0\x0B");
|
240 |
}
|
241 |
}
|
242 |
-
$this->pushToken(
|
243 |
$this->moveCursor($textContent.$position[0]);
|
244 |
|
245 |
switch ($this->positions[1][$this->position][0]) {
|
@@ -251,30 +280,30 @@ class Lexer
|
|
251 |
// raw data?
|
252 |
if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) {
|
253 |
$this->moveCursor($match[0]);
|
254 |
-
$this->lexRawData();
|
255 |
// {% line \d+ %}
|
256 |
} elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) {
|
257 |
$this->moveCursor($match[0]);
|
258 |
$this->lineno = (int) $match[1];
|
259 |
} else {
|
260 |
-
$this->pushToken(
|
261 |
$this->pushState(self::STATE_BLOCK);
|
262 |
$this->currentVarBlockLine = $this->lineno;
|
263 |
}
|
264 |
break;
|
265 |
|
266 |
case $this->options['tag_variable'][0]:
|
267 |
-
$this->pushToken(
|
268 |
$this->pushState(self::STATE_VAR);
|
269 |
$this->currentVarBlockLine = $this->lineno;
|
270 |
break;
|
271 |
}
|
272 |
}
|
273 |
|
274 |
-
|
275 |
{
|
276 |
if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $this->cursor)) {
|
277 |
-
$this->pushToken(
|
278 |
$this->moveCursor($match[0]);
|
279 |
$this->popState();
|
280 |
} else {
|
@@ -282,10 +311,10 @@ class Lexer
|
|
282 |
}
|
283 |
}
|
284 |
|
285 |
-
|
286 |
{
|
287 |
if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this->cursor)) {
|
288 |
-
$this->pushToken(
|
289 |
$this->moveCursor($match[0]);
|
290 |
$this->popState();
|
291 |
} else {
|
@@ -293,7 +322,7 @@ class Lexer
|
|
293 |
}
|
294 |
}
|
295 |
|
296 |
-
|
297 |
{
|
298 |
// whitespace
|
299 |
if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) {
|
@@ -311,12 +340,12 @@ class Lexer
|
|
311 |
}
|
312 |
// operators
|
313 |
elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) {
|
314 |
-
$this->pushToken(
|
315 |
$this->moveCursor($match[0]);
|
316 |
}
|
317 |
// names
|
318 |
elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) {
|
319 |
-
$this->pushToken(
|
320 |
$this->moveCursor($match[0]);
|
321 |
}
|
322 |
// numbers
|
@@ -325,7 +354,7 @@ class Lexer
|
|
325 |
if (ctype_digit($match[0]) && $number <= \PHP_INT_MAX) {
|
326 |
$number = (int) $match[0]; // integers lower than the maximum
|
327 |
}
|
328 |
-
$this->pushToken(
|
329 |
$this->moveCursor($match[0]);
|
330 |
}
|
331 |
// punctuation
|
@@ -346,12 +375,12 @@ class Lexer
|
|
346 |
}
|
347 |
}
|
348 |
|
349 |
-
$this->pushToken(
|
350 |
++$this->cursor;
|
351 |
}
|
352 |
// strings
|
353 |
elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) {
|
354 |
-
$this->pushToken(
|
355 |
$this->moveCursor($match[0]);
|
356 |
}
|
357 |
// opening double quoted string
|
@@ -366,10 +395,14 @@ class Lexer
|
|
366 |
}
|
367 |
}
|
368 |
|
369 |
-
|
370 |
{
|
371 |
-
if (
|
372 |
-
|
|
|
|
|
|
|
|
|
373 |
}
|
374 |
|
375 |
$text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);
|
@@ -387,10 +420,10 @@ class Lexer
|
|
387 |
}
|
388 |
}
|
389 |
|
390 |
-
$this->pushToken(
|
391 |
}
|
392 |
|
393 |
-
|
394 |
{
|
395 |
if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) {
|
396 |
throw new SyntaxError('Unclosed comment.', $this->lineno, $this->source);
|
@@ -399,15 +432,15 @@ class Lexer
|
|
399 |
$this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]);
|
400 |
}
|
401 |
|
402 |
-
|
403 |
{
|
404 |
if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) {
|
405 |
$this->brackets[] = [$this->options['interpolation'][0], $this->lineno];
|
406 |
-
$this->pushToken(
|
407 |
$this->moveCursor($match[0]);
|
408 |
$this->pushState(self::STATE_INTERPOLATION);
|
409 |
} elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && \strlen($match[0]) > 0) {
|
410 |
-
$this->pushToken(
|
411 |
$this->moveCursor($match[0]);
|
412 |
} elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
|
413 |
list($expect, $lineno) = array_pop($this->brackets);
|
@@ -423,12 +456,12 @@ class Lexer
|
|
423 |
}
|
424 |
}
|
425 |
|
426 |
-
|
427 |
{
|
428 |
$bracket = end($this->brackets);
|
429 |
if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->cursor)) {
|
430 |
array_pop($this->brackets);
|
431 |
-
$this->pushToken(
|
432 |
$this->moveCursor($match[0]);
|
433 |
$this->popState();
|
434 |
} else {
|
@@ -436,23 +469,23 @@ class Lexer
|
|
436 |
}
|
437 |
}
|
438 |
|
439 |
-
|
440 |
{
|
441 |
// do not push empty text tokens
|
442 |
-
if (
|
443 |
return;
|
444 |
}
|
445 |
|
446 |
$this->tokens[] = new Token($type, $value, $this->lineno);
|
447 |
}
|
448 |
|
449 |
-
|
450 |
{
|
451 |
$this->cursor += \strlen($text);
|
452 |
$this->lineno += substr_count($text, "\n");
|
453 |
}
|
454 |
|
455 |
-
|
456 |
{
|
457 |
$operators = array_merge(
|
458 |
['='],
|
@@ -486,13 +519,13 @@ class Lexer
|
|
486 |
return '/'.implode('|', $regex).'/A';
|
487 |
}
|
488 |
|
489 |
-
|
490 |
{
|
491 |
$this->states[] = $this->state;
|
492 |
$this->state = $state;
|
493 |
}
|
494 |
|
495 |
-
|
496 |
{
|
497 |
if (0 === \count($this->states)) {
|
498 |
throw new \LogicException('Cannot pop state without a previous state.');
|
19 |
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
+
class Lexer implements \Twig_LexerInterface
|
23 |
{
|
24 |
+
protected $tokens;
|
25 |
+
protected $code;
|
26 |
+
protected $cursor;
|
27 |
+
protected $lineno;
|
28 |
+
protected $end;
|
29 |
+
protected $state;
|
30 |
+
protected $states;
|
31 |
+
protected $brackets;
|
32 |
+
protected $env;
|
33 |
+
// to be renamed to $name in 2.0 (where it is private)
|
34 |
+
protected $filename;
|
35 |
+
protected $options;
|
36 |
+
protected $regexes;
|
37 |
+
protected $position;
|
38 |
+
protected $positions;
|
39 |
+
protected $currentVarBlockLine;
|
40 |
+
|
41 |
private $source;
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
public const STATE_DATA = 0;
|
44 |
public const STATE_BLOCK = 1;
|
100 |
$this->options['whitespace_trim']. // -
|
101 |
'|'.
|
102 |
$this->options['whitespace_line_trim']. // ~
|
103 |
+
')?\s*'.
|
104 |
+
'(?:end%s)'. // endraw or endverbatim
|
105 |
+
'\s*'.
|
106 |
'(?:'.
|
107 |
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}
|
108 |
'|'.
|
127 |
|
128 |
// verbatim %}
|
129 |
'lex_block_raw' => '{
|
130 |
+
\s*
|
131 |
+
(raw|verbatim)
|
132 |
+
\s*
|
133 |
(?:'.
|
134 |
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}\s*
|
135 |
'|'.
|
160 |
];
|
161 |
}
|
162 |
|
163 |
+
public function tokenize($code, $name = null)
|
164 |
{
|
165 |
+
if (!$code instanceof Source) {
|
166 |
+
@trigger_error(sprintf('Passing a string as the $code argument of %s() is deprecated since version 1.27 and will be removed in 2.0. Pass a \Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED);
|
167 |
+
$this->source = new Source($code, $name);
|
168 |
+
} else {
|
169 |
+
$this->source = $code;
|
170 |
+
}
|
171 |
+
|
172 |
+
if (((int) ini_get('mbstring.func_overload')) & 2) {
|
173 |
+
@trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
174 |
+
}
|
175 |
+
|
176 |
+
if (\function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) {
|
177 |
+
$mbEncoding = mb_internal_encoding();
|
178 |
+
mb_internal_encoding('ASCII');
|
179 |
+
} else {
|
180 |
+
$mbEncoding = null;
|
181 |
+
}
|
182 |
+
|
183 |
+
$this->code = str_replace(["\r\n", "\r"], "\n", $this->source->getCode());
|
184 |
+
$this->filename = $this->source->getName();
|
185 |
$this->cursor = 0;
|
186 |
$this->lineno = 1;
|
187 |
$this->end = \strlen($this->code);
|
221 |
}
|
222 |
}
|
223 |
|
224 |
+
$this->pushToken(Token::EOF_TYPE);
|
225 |
|
226 |
if (!empty($this->brackets)) {
|
227 |
list($expect, $lineno) = array_pop($this->brackets);
|
228 |
throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source);
|
229 |
}
|
230 |
|
231 |
+
if ($mbEncoding) {
|
232 |
+
mb_internal_encoding($mbEncoding);
|
233 |
+
}
|
234 |
+
|
235 |
return new TokenStream($this->tokens, $this->source);
|
236 |
}
|
237 |
|
238 |
+
protected function lexData()
|
239 |
{
|
240 |
// if no matches are left we return the rest of the template as simple text token
|
241 |
if ($this->position == \count($this->positions[0]) - 1) {
|
242 |
+
$this->pushToken(Token::TEXT_TYPE, substr($this->code, $this->cursor));
|
243 |
$this->cursor = $this->end;
|
244 |
|
245 |
return;
|
268 |
$text = rtrim($text, " \t\0\x0B");
|
269 |
}
|
270 |
}
|
271 |
+
$this->pushToken(Token::TEXT_TYPE, $text);
|
272 |
$this->moveCursor($textContent.$position[0]);
|
273 |
|
274 |
switch ($this->positions[1][$this->position][0]) {
|
280 |
// raw data?
|
281 |
if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) {
|
282 |
$this->moveCursor($match[0]);
|
283 |
+
$this->lexRawData($match[1]);
|
284 |
// {% line \d+ %}
|
285 |
} elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) {
|
286 |
$this->moveCursor($match[0]);
|
287 |
$this->lineno = (int) $match[1];
|
288 |
} else {
|
289 |
+
$this->pushToken(Token::BLOCK_START_TYPE);
|
290 |
$this->pushState(self::STATE_BLOCK);
|
291 |
$this->currentVarBlockLine = $this->lineno;
|
292 |
}
|
293 |
break;
|
294 |
|
295 |
case $this->options['tag_variable'][0]:
|
296 |
+
$this->pushToken(Token::VAR_START_TYPE);
|
297 |
$this->pushState(self::STATE_VAR);
|
298 |
$this->currentVarBlockLine = $this->lineno;
|
299 |
break;
|
300 |
}
|
301 |
}
|
302 |
|
303 |
+
protected function lexBlock()
|
304 |
{
|
305 |
if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $this->cursor)) {
|
306 |
+
$this->pushToken(Token::BLOCK_END_TYPE);
|
307 |
$this->moveCursor($match[0]);
|
308 |
$this->popState();
|
309 |
} else {
|
311 |
}
|
312 |
}
|
313 |
|
314 |
+
protected function lexVar()
|
315 |
{
|
316 |
if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this->cursor)) {
|
317 |
+
$this->pushToken(Token::VAR_END_TYPE);
|
318 |
$this->moveCursor($match[0]);
|
319 |
$this->popState();
|
320 |
} else {
|
322 |
}
|
323 |
}
|
324 |
|
325 |
+
protected function lexExpression()
|
326 |
{
|
327 |
// whitespace
|
328 |
if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) {
|
340 |
}
|
341 |
// operators
|
342 |
elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) {
|
343 |
+
$this->pushToken(Token::OPERATOR_TYPE, preg_replace('/\s+/', ' ', $match[0]));
|
344 |
$this->moveCursor($match[0]);
|
345 |
}
|
346 |
// names
|
347 |
elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) {
|
348 |
+
$this->pushToken(Token::NAME_TYPE, $match[0]);
|
349 |
$this->moveCursor($match[0]);
|
350 |
}
|
351 |
// numbers
|
354 |
if (ctype_digit($match[0]) && $number <= \PHP_INT_MAX) {
|
355 |
$number = (int) $match[0]; // integers lower than the maximum
|
356 |
}
|
357 |
+
$this->pushToken(Token::NUMBER_TYPE, $number);
|
358 |
$this->moveCursor($match[0]);
|
359 |
}
|
360 |
// punctuation
|
375 |
}
|
376 |
}
|
377 |
|
378 |
+
$this->pushToken(Token::PUNCTUATION_TYPE, $this->code[$this->cursor]);
|
379 |
++$this->cursor;
|
380 |
}
|
381 |
// strings
|
382 |
elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) {
|
383 |
+
$this->pushToken(Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1)));
|
384 |
$this->moveCursor($match[0]);
|
385 |
}
|
386 |
// opening double quoted string
|
395 |
}
|
396 |
}
|
397 |
|
398 |
+
protected function lexRawData($tag)
|
399 |
{
|
400 |
+
if ('raw' === $tag) {
|
401 |
+
@trigger_error(sprintf('Twig Tag "raw" is deprecated since version 1.21. Use "verbatim" instead in %s at line %d.', $this->filename, $this->lineno), \E_USER_DEPRECATED);
|
402 |
+
}
|
403 |
+
|
404 |
+
if (!preg_match(str_replace('%s', $tag, $this->regexes['lex_raw_data']), $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) {
|
405 |
+
throw new SyntaxError(sprintf('Unexpected end of file: Unclosed "%s" block.', $tag), $this->lineno, $this->source);
|
406 |
}
|
407 |
|
408 |
$text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);
|
420 |
}
|
421 |
}
|
422 |
|
423 |
+
$this->pushToken(Token::TEXT_TYPE, $text);
|
424 |
}
|
425 |
|
426 |
+
protected function lexComment()
|
427 |
{
|
428 |
if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) {
|
429 |
throw new SyntaxError('Unclosed comment.', $this->lineno, $this->source);
|
432 |
$this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]);
|
433 |
}
|
434 |
|
435 |
+
protected function lexString()
|
436 |
{
|
437 |
if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) {
|
438 |
$this->brackets[] = [$this->options['interpolation'][0], $this->lineno];
|
439 |
+
$this->pushToken(Token::INTERPOLATION_START_TYPE);
|
440 |
$this->moveCursor($match[0]);
|
441 |
$this->pushState(self::STATE_INTERPOLATION);
|
442 |
} elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && \strlen($match[0]) > 0) {
|
443 |
+
$this->pushToken(Token::STRING_TYPE, stripcslashes($match[0]));
|
444 |
$this->moveCursor($match[0]);
|
445 |
} elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) {
|
446 |
list($expect, $lineno) = array_pop($this->brackets);
|
456 |
}
|
457 |
}
|
458 |
|
459 |
+
protected function lexInterpolation()
|
460 |
{
|
461 |
$bracket = end($this->brackets);
|
462 |
if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->cursor)) {
|
463 |
array_pop($this->brackets);
|
464 |
+
$this->pushToken(Token::INTERPOLATION_END_TYPE);
|
465 |
$this->moveCursor($match[0]);
|
466 |
$this->popState();
|
467 |
} else {
|
469 |
}
|
470 |
}
|
471 |
|
472 |
+
protected function pushToken($type, $value = '')
|
473 |
{
|
474 |
// do not push empty text tokens
|
475 |
+
if (Token::TEXT_TYPE === $type && '' === $value) {
|
476 |
return;
|
477 |
}
|
478 |
|
479 |
$this->tokens[] = new Token($type, $value, $this->lineno);
|
480 |
}
|
481 |
|
482 |
+
protected function moveCursor($text)
|
483 |
{
|
484 |
$this->cursor += \strlen($text);
|
485 |
$this->lineno += substr_count($text, "\n");
|
486 |
}
|
487 |
|
488 |
+
protected function getOperatorRegex()
|
489 |
{
|
490 |
$operators = array_merge(
|
491 |
['='],
|
519 |
return '/'.implode('|', $regex).'/A';
|
520 |
}
|
521 |
|
522 |
+
protected function pushState($state)
|
523 |
{
|
524 |
$this->states[] = $this->state;
|
525 |
$this->state = $state;
|
526 |
}
|
527 |
|
528 |
+
protected function popState()
|
529 |
{
|
530 |
if (0 === \count($this->states)) {
|
531 |
throw new \LogicException('Cannot pop state without a previous state.');
|
vendor/twig/twig/src/Loader/ArrayLoader.php
CHANGED
@@ -24,11 +24,13 @@ use Twig\Source;
|
|
24 |
*
|
25 |
* This loader should only be used for unit testing.
|
26 |
*
|
|
|
|
|
27 |
* @author Fabien Potencier <fabien@symfony.com>
|
28 |
*/
|
29 |
-
|
30 |
{
|
31 |
-
|
32 |
|
33 |
/**
|
34 |
* @param array $templates An array of templates (keys are the names, and values are the source code)
|
@@ -46,7 +48,19 @@ final class ArrayLoader implements LoaderInterface, ExistsLoaderInterface, Sourc
|
|
46 |
*/
|
47 |
public function setTemplate($name, $template)
|
48 |
{
|
49 |
-
$this->templates[$name] = $template;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
public function getSourceContext($name)
|
@@ -61,11 +75,12 @@ final class ArrayLoader implements LoaderInterface, ExistsLoaderInterface, Sourc
|
|
61 |
|
62 |
public function exists($name)
|
63 |
{
|
64 |
-
return isset($this->templates[$name]);
|
65 |
}
|
66 |
|
67 |
public function getCacheKey($name)
|
68 |
{
|
|
|
69 |
if (!isset($this->templates[$name])) {
|
70 |
throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
|
71 |
}
|
@@ -75,6 +90,7 @@ final class ArrayLoader implements LoaderInterface, ExistsLoaderInterface, Sourc
|
|
75 |
|
76 |
public function isFresh($name, $time)
|
77 |
{
|
|
|
78 |
if (!isset($this->templates[$name])) {
|
79 |
throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
|
80 |
}
|
24 |
*
|
25 |
* This loader should only be used for unit testing.
|
26 |
*
|
27 |
+
* @final
|
28 |
+
*
|
29 |
* @author Fabien Potencier <fabien@symfony.com>
|
30 |
*/
|
31 |
+
class ArrayLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
|
32 |
{
|
33 |
+
protected $templates = [];
|
34 |
|
35 |
/**
|
36 |
* @param array $templates An array of templates (keys are the names, and values are the source code)
|
48 |
*/
|
49 |
public function setTemplate($name, $template)
|
50 |
{
|
51 |
+
$this->templates[(string) $name] = $template;
|
52 |
+
}
|
53 |
+
|
54 |
+
public function getSource($name)
|
55 |
+
{
|
56 |
+
@trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', static::class), \E_USER_DEPRECATED);
|
57 |
+
|
58 |
+
$name = (string) $name;
|
59 |
+
if (!isset($this->templates[$name])) {
|
60 |
+
throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
|
61 |
+
}
|
62 |
+
|
63 |
+
return $this->templates[$name];
|
64 |
}
|
65 |
|
66 |
public function getSourceContext($name)
|
75 |
|
76 |
public function exists($name)
|
77 |
{
|
78 |
+
return isset($this->templates[(string) $name]);
|
79 |
}
|
80 |
|
81 |
public function getCacheKey($name)
|
82 |
{
|
83 |
+
$name = (string) $name;
|
84 |
if (!isset($this->templates[$name])) {
|
85 |
throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
|
86 |
}
|
90 |
|
91 |
public function isFresh($name, $time)
|
92 |
{
|
93 |
+
$name = (string) $name;
|
94 |
if (!isset($this->templates[$name])) {
|
95 |
throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
|
96 |
}
|
vendor/twig/twig/src/Loader/ChainLoader.php
CHANGED
@@ -12,16 +12,19 @@
|
|
12 |
namespace Twig\Loader;
|
13 |
|
14 |
use Twig\Error\LoaderError;
|
|
|
15 |
|
16 |
/**
|
17 |
* Loads templates from other loaders.
|
18 |
*
|
|
|
|
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
*/
|
21 |
-
|
22 |
{
|
23 |
private $hasSourceCache = [];
|
24 |
-
|
25 |
|
26 |
/**
|
27 |
* @param LoaderInterface[] $loaders
|
@@ -47,16 +50,40 @@ final class ChainLoader implements LoaderInterface, ExistsLoaderInterface, Sourc
|
|
47 |
return $this->loaders;
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
public function getSourceContext($name)
|
51 |
{
|
52 |
$exceptions = [];
|
53 |
foreach ($this->loaders as $loader) {
|
54 |
-
if (!$loader->exists($name)) {
|
55 |
continue;
|
56 |
}
|
57 |
|
58 |
try {
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
} catch (LoaderError $e) {
|
61 |
$exceptions[] = $e->getMessage();
|
62 |
}
|
@@ -67,13 +94,30 @@ final class ChainLoader implements LoaderInterface, ExistsLoaderInterface, Sourc
|
|
67 |
|
68 |
public function exists($name)
|
69 |
{
|
|
|
|
|
70 |
if (isset($this->hasSourceCache[$name])) {
|
71 |
return $this->hasSourceCache[$name];
|
72 |
}
|
73 |
|
74 |
foreach ($this->loaders as $loader) {
|
75 |
-
if ($loader
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
return $this->hasSourceCache[$name] = true;
|
|
|
77 |
}
|
78 |
}
|
79 |
|
@@ -84,7 +128,7 @@ final class ChainLoader implements LoaderInterface, ExistsLoaderInterface, Sourc
|
|
84 |
{
|
85 |
$exceptions = [];
|
86 |
foreach ($this->loaders as $loader) {
|
87 |
-
if (!$loader->exists($name)) {
|
88 |
continue;
|
89 |
}
|
90 |
|
@@ -102,7 +146,7 @@ final class ChainLoader implements LoaderInterface, ExistsLoaderInterface, Sourc
|
|
102 |
{
|
103 |
$exceptions = [];
|
104 |
foreach ($this->loaders as $loader) {
|
105 |
-
if (!$loader->exists($name)) {
|
106 |
continue;
|
107 |
}
|
108 |
|
12 |
namespace Twig\Loader;
|
13 |
|
14 |
use Twig\Error\LoaderError;
|
15 |
+
use Twig\Source;
|
16 |
|
17 |
/**
|
18 |
* Loads templates from other loaders.
|
19 |
*
|
20 |
+
* @final
|
21 |
+
*
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
*/
|
24 |
+
class ChainLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
|
25 |
{
|
26 |
private $hasSourceCache = [];
|
27 |
+
protected $loaders = [];
|
28 |
|
29 |
/**
|
30 |
* @param LoaderInterface[] $loaders
|
50 |
return $this->loaders;
|
51 |
}
|
52 |
|
53 |
+
public function getSource($name)
|
54 |
+
{
|
55 |
+
@trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', static::class), \E_USER_DEPRECATED);
|
56 |
+
|
57 |
+
$exceptions = [];
|
58 |
+
foreach ($this->loaders as $loader) {
|
59 |
+
if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) {
|
60 |
+
continue;
|
61 |
+
}
|
62 |
+
|
63 |
+
try {
|
64 |
+
return $loader->getSource($name);
|
65 |
+
} catch (LoaderError $e) {
|
66 |
+
$exceptions[] = $e->getMessage();
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
|
71 |
+
}
|
72 |
+
|
73 |
public function getSourceContext($name)
|
74 |
{
|
75 |
$exceptions = [];
|
76 |
foreach ($this->loaders as $loader) {
|
77 |
+
if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) {
|
78 |
continue;
|
79 |
}
|
80 |
|
81 |
try {
|
82 |
+
if ($loader instanceof SourceContextLoaderInterface) {
|
83 |
+
return $loader->getSourceContext($name);
|
84 |
+
}
|
85 |
+
|
86 |
+
return new Source($loader->getSource($name), $name);
|
87 |
} catch (LoaderError $e) {
|
88 |
$exceptions[] = $e->getMessage();
|
89 |
}
|
94 |
|
95 |
public function exists($name)
|
96 |
{
|
97 |
+
$name = (string) $name;
|
98 |
+
|
99 |
if (isset($this->hasSourceCache[$name])) {
|
100 |
return $this->hasSourceCache[$name];
|
101 |
}
|
102 |
|
103 |
foreach ($this->loaders as $loader) {
|
104 |
+
if ($loader instanceof ExistsLoaderInterface) {
|
105 |
+
if ($loader->exists($name)) {
|
106 |
+
return $this->hasSourceCache[$name] = true;
|
107 |
+
}
|
108 |
+
|
109 |
+
continue;
|
110 |
+
}
|
111 |
+
|
112 |
+
try {
|
113 |
+
if ($loader instanceof SourceContextLoaderInterface) {
|
114 |
+
$loader->getSourceContext($name);
|
115 |
+
} else {
|
116 |
+
$loader->getSource($name);
|
117 |
+
}
|
118 |
+
|
119 |
return $this->hasSourceCache[$name] = true;
|
120 |
+
} catch (LoaderError $e) {
|
121 |
}
|
122 |
}
|
123 |
|
128 |
{
|
129 |
$exceptions = [];
|
130 |
foreach ($this->loaders as $loader) {
|
131 |
+
if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) {
|
132 |
continue;
|
133 |
}
|
134 |
|
146 |
{
|
147 |
$exceptions = [];
|
148 |
foreach ($this->loaders as $loader) {
|
149 |
+
if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) {
|
150 |
continue;
|
151 |
}
|
152 |
|
vendor/twig/twig/src/Loader/ExistsLoaderInterface.php
CHANGED
@@ -12,12 +12,22 @@
|
|
12 |
namespace Twig\Loader;
|
13 |
|
14 |
/**
|
15 |
-
*
|
16 |
*
|
17 |
-
* @
|
|
|
|
|
18 |
*/
|
19 |
-
interface ExistsLoaderInterface
|
20 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
class_alias('Twig\Loader\ExistsLoaderInterface', 'Twig_ExistsLoaderInterface');
|
12 |
namespace Twig\Loader;
|
13 |
|
14 |
/**
|
15 |
+
* Adds an exists() method for loaders.
|
16 |
*
|
17 |
+
* @author Florin Patan <florinpatan@gmail.com>
|
18 |
+
*
|
19 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
20 |
*/
|
21 |
+
interface ExistsLoaderInterface
|
22 |
{
|
23 |
+
/**
|
24 |
+
* Check if we have the source code of a template, given its name.
|
25 |
+
*
|
26 |
+
* @param string $name The name of the template to check if we can load
|
27 |
+
*
|
28 |
+
* @return bool If the template source code is handled by this loader or not
|
29 |
+
*/
|
30 |
+
public function exists($name);
|
31 |
}
|
32 |
|
33 |
class_alias('Twig\Loader\ExistsLoaderInterface', 'Twig_ExistsLoaderInterface');
|
vendor/twig/twig/src/Loader/FilesystemLoader.php
CHANGED
@@ -34,7 +34,7 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
|
34 |
* @param string|array $paths A path or an array of paths where to look for templates
|
35 |
* @param string|null $rootPath The root path common to all relative paths (null for getcwd())
|
36 |
*/
|
37 |
-
public function __construct($paths = [],
|
38 |
{
|
39 |
$this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
|
40 |
if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) {
|
@@ -136,6 +136,17 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
|
136 |
}
|
137 |
}
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
public function getSourceContext($name)
|
140 |
{
|
141 |
if (null === ($path = $this->findTemplate($name)) || false === $path) {
|
@@ -166,7 +177,13 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
|
166 |
return true;
|
167 |
}
|
168 |
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
|
172 |
public function isFresh($name, $time)
|
@@ -182,15 +199,13 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
|
182 |
/**
|
183 |
* Checks if the template can be found.
|
184 |
*
|
185 |
-
*
|
186 |
-
*
|
187 |
-
* @param string $name The template name
|
188 |
-
* @param bool $throw Whether to throw an exception when an error occurs
|
189 |
*
|
190 |
* @return string|false|null The template name or false/null
|
191 |
*/
|
192 |
-
protected function findTemplate($name
|
193 |
{
|
|
|
194 |
$name = $this->normalizeName($name);
|
195 |
|
196 |
if (isset($this->cache[$name])) {
|
@@ -250,12 +265,7 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
|
250 |
throw new LoaderError($this->errorCache[$name]);
|
251 |
}
|
252 |
|
253 |
-
|
254 |
-
{
|
255 |
-
return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name));
|
256 |
-
}
|
257 |
-
|
258 |
-
private function parseName($name, $default = self::MAIN_NAMESPACE)
|
259 |
{
|
260 |
if (isset($name[0]) && '@' == $name[0]) {
|
261 |
if (false === $pos = strpos($name, '/')) {
|
@@ -271,7 +281,12 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
|
271 |
return [$default, $name];
|
272 |
}
|
273 |
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
275 |
{
|
276 |
if (false !== strpos($name, "\0")) {
|
277 |
throw new LoaderError('A template name cannot contain NUL bytes.');
|
@@ -297,7 +312,7 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
|
297 |
{
|
298 |
return strspn($file, '/\\', 0, 1)
|
299 |
|| (\strlen($file) > 3 && ctype_alpha($file[0])
|
300 |
-
&& ':' === $file
|
301 |
&& strspn($file, '/\\', 2, 1)
|
302 |
)
|
303 |
|| null !== parse_url($file, \PHP_URL_SCHEME)
|
34 |
* @param string|array $paths A path or an array of paths where to look for templates
|
35 |
* @param string|null $rootPath The root path common to all relative paths (null for getcwd())
|
36 |
*/
|
37 |
+
public function __construct($paths = [], $rootPath = null)
|
38 |
{
|
39 |
$this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
|
40 |
if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) {
|
136 |
}
|
137 |
}
|
138 |
|
139 |
+
public function getSource($name)
|
140 |
+
{
|
141 |
+
@trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', static::class), \E_USER_DEPRECATED);
|
142 |
+
|
143 |
+
if (null === ($path = $this->findTemplate($name)) || false === $path) {
|
144 |
+
return '';
|
145 |
+
}
|
146 |
+
|
147 |
+
return file_get_contents($path);
|
148 |
+
}
|
149 |
+
|
150 |
public function getSourceContext($name)
|
151 |
{
|
152 |
if (null === ($path = $this->findTemplate($name)) || false === $path) {
|
177 |
return true;
|
178 |
}
|
179 |
|
180 |
+
try {
|
181 |
+
return null !== ($path = $this->findTemplate($name, false)) && false !== $path;
|
182 |
+
} catch (LoaderError $e) {
|
183 |
+
@trigger_error(sprintf('In %s::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.', static::class), \E_USER_DEPRECATED);
|
184 |
+
|
185 |
+
return false;
|
186 |
+
}
|
187 |
}
|
188 |
|
189 |
public function isFresh($name, $time)
|
199 |
/**
|
200 |
* Checks if the template can be found.
|
201 |
*
|
202 |
+
* @param string $name The template name
|
|
|
|
|
|
|
203 |
*
|
204 |
* @return string|false|null The template name or false/null
|
205 |
*/
|
206 |
+
protected function findTemplate($name)
|
207 |
{
|
208 |
+
$throw = \func_num_args() > 1 ? func_get_arg(1) : true;
|
209 |
$name = $this->normalizeName($name);
|
210 |
|
211 |
if (isset($this->cache[$name])) {
|
265 |
throw new LoaderError($this->errorCache[$name]);
|
266 |
}
|
267 |
|
268 |
+
protected function parseName($name, $default = self::MAIN_NAMESPACE)
|
|
|
|
|
|
|
|
|
|
|
269 |
{
|
270 |
if (isset($name[0]) && '@' == $name[0]) {
|
271 |
if (false === $pos = strpos($name, '/')) {
|
281 |
return [$default, $name];
|
282 |
}
|
283 |
|
284 |
+
protected function normalizeName($name)
|
285 |
+
{
|
286 |
+
return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name));
|
287 |
+
}
|
288 |
+
|
289 |
+
protected function validateName($name)
|
290 |
{
|
291 |
if (false !== strpos($name, "\0")) {
|
292 |
throw new LoaderError('A template name cannot contain NUL bytes.');
|
312 |
{
|
313 |
return strspn($file, '/\\', 0, 1)
|
314 |
|| (\strlen($file) > 3 && ctype_alpha($file[0])
|
315 |
+
&& ':' === substr($file, 1, 1)
|
316 |
&& strspn($file, '/\\', 2, 1)
|
317 |
)
|
318 |
|| null !== parse_url($file, \PHP_URL_SCHEME)
|
vendor/twig/twig/src/Loader/LoaderInterface.php
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
namespace Twig\Loader;
|
13 |
|
14 |
use Twig\Error\LoaderError;
|
15 |
-
use Twig\Source;
|
16 |
|
17 |
/**
|
18 |
* Interface all loaders must implement.
|
@@ -22,15 +21,17 @@ use Twig\Source;
|
|
22 |
interface LoaderInterface
|
23 |
{
|
24 |
/**
|
25 |
-
*
|
26 |
*
|
27 |
-
* @param string $name The template
|
28 |
*
|
29 |
-
* @return
|
30 |
*
|
31 |
* @throws LoaderError When $name is not found
|
|
|
|
|
32 |
*/
|
33 |
-
public function
|
34 |
|
35 |
/**
|
36 |
* Gets the cache key to use for the cache for a given template name.
|
@@ -55,15 +56,6 @@ interface LoaderInterface
|
|
55 |
* @throws LoaderError When $name is not found
|
56 |
*/
|
57 |
public function isFresh($name, $time);
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Check if we have the source code of a template, given its name.
|
61 |
-
*
|
62 |
-
* @param string $name The name of the template to check if we can load
|
63 |
-
*
|
64 |
-
* @return bool If the template source code is handled by this loader or not
|
65 |
-
*/
|
66 |
-
public function exists($name);
|
67 |
}
|
68 |
|
69 |
class_alias('Twig\Loader\LoaderInterface', 'Twig_LoaderInterface');
|
12 |
namespace Twig\Loader;
|
13 |
|
14 |
use Twig\Error\LoaderError;
|
|
|
15 |
|
16 |
/**
|
17 |
* Interface all loaders must implement.
|
21 |
interface LoaderInterface
|
22 |
{
|
23 |
/**
|
24 |
+
* Gets the source code of a template, given its name.
|
25 |
*
|
26 |
+
* @param string $name The name of the template to load
|
27 |
*
|
28 |
+
* @return string The template source code
|
29 |
*
|
30 |
* @throws LoaderError When $name is not found
|
31 |
+
*
|
32 |
+
* @deprecated since 1.27 (to be removed in 2.0), implement Twig\Loader\SourceContextLoaderInterface
|
33 |
*/
|
34 |
+
public function getSource($name);
|
35 |
|
36 |
/**
|
37 |
* Gets the cache key to use for the cache for a given template name.
|
56 |
* @throws LoaderError When $name is not found
|
57 |
*/
|
58 |
public function isFresh($name, $time);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
class_alias('Twig\Loader\LoaderInterface', 'Twig_LoaderInterface');
|
vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php
CHANGED
@@ -11,11 +11,28 @@
|
|
11 |
|
12 |
namespace Twig\Loader;
|
13 |
|
|
|
|
|
|
|
14 |
/**
|
15 |
-
*
|
|
|
|
|
|
|
|
|
16 |
*/
|
17 |
-
interface SourceContextLoaderInterface
|
18 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
class_alias('Twig\Loader\SourceContextLoaderInterface', 'Twig_SourceContextLoaderInterface');
|
11 |
|
12 |
namespace Twig\Loader;
|
13 |
|
14 |
+
use Twig\Error\LoaderError;
|
15 |
+
use Twig\Source;
|
16 |
+
|
17 |
/**
|
18 |
+
* Adds a getSourceContext() method for loaders.
|
19 |
+
*
|
20 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
+
*
|
22 |
+
* @deprecated since 1.27 (to be removed in 3.0)
|
23 |
*/
|
24 |
+
interface SourceContextLoaderInterface
|
25 |
{
|
26 |
+
/**
|
27 |
+
* Returns the source context for a given template logical name.
|
28 |
+
*
|
29 |
+
* @param string $name The template logical name
|
30 |
+
*
|
31 |
+
* @return Source
|
32 |
+
*
|
33 |
+
* @throws LoaderError When $name is not found
|
34 |
+
*/
|
35 |
+
public function getSourceContext($name);
|
36 |
}
|
37 |
|
38 |
class_alias('Twig\Loader\SourceContextLoaderInterface', 'Twig_SourceContextLoaderInterface');
|
vendor/twig/twig/src/Markup.php
CHANGED
@@ -16,10 +16,10 @@ namespace Twig;
|
|
16 |
*
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
*/
|
19 |
-
class Markup implements \Countable
|
20 |
{
|
21 |
-
|
22 |
-
|
23 |
|
24 |
public function __construct($content, $charset)
|
25 |
{
|
@@ -35,19 +35,9 @@ class Markup implements \Countable, \JsonSerializable
|
|
35 |
/**
|
36 |
* @return int
|
37 |
*/
|
38 |
-
#[\ReturnTypeWillChange]
|
39 |
public function count()
|
40 |
{
|
41 |
-
return mb_strlen($this->content, $this->charset);
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @return mixed
|
46 |
-
*/
|
47 |
-
#[\ReturnTypeWillChange]
|
48 |
-
public function jsonSerialize()
|
49 |
-
{
|
50 |
-
return $this->content;
|
51 |
}
|
52 |
}
|
53 |
|
16 |
*
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
*/
|
19 |
+
class Markup implements \Countable
|
20 |
{
|
21 |
+
protected $content;
|
22 |
+
protected $charset;
|
23 |
|
24 |
public function __construct($content, $charset)
|
25 |
{
|
35 |
/**
|
36 |
* @return int
|
37 |
*/
|
|
|
38 |
public function count()
|
39 |
{
|
40 |
+
return \function_exists('mb_get_info') ? mb_strlen($this->content, $this->charset) : \strlen($this->content);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
}
|
43 |
|
vendor/twig/twig/src/Node/AutoEscapeNode.php
CHANGED
@@ -26,7 +26,7 @@ use Twig\Compiler;
|
|
26 |
*/
|
27 |
class AutoEscapeNode extends Node
|
28 |
{
|
29 |
-
public function __construct($value,
|
30 |
{
|
31 |
parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag);
|
32 |
}
|
26 |
*/
|
27 |
class AutoEscapeNode extends Node
|
28 |
{
|
29 |
+
public function __construct($value, \Twig_NodeInterface $body, $lineno, $tag = 'autoescape')
|
30 |
{
|
31 |
parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag);
|
32 |
}
|
vendor/twig/twig/src/Node/BlockNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Compiler;
|
|
21 |
*/
|
22 |
class BlockNode extends Node
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag);
|
27 |
}
|
@@ -32,7 +32,6 @@ class BlockNode extends Node
|
|
32 |
->addDebugInfo($this)
|
33 |
->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n")
|
34 |
->indent()
|
35 |
-
->write("\$macros = \$this->macros;\n")
|
36 |
;
|
37 |
|
38 |
$compiler
|
21 |
*/
|
22 |
class BlockNode extends Node
|
23 |
{
|
24 |
+
public function __construct($name, \Twig_NodeInterface $body, $lineno, $tag = null)
|
25 |
{
|
26 |
parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag);
|
27 |
}
|
32 |
->addDebugInfo($this)
|
33 |
->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n")
|
34 |
->indent()
|
|
|
35 |
;
|
36 |
|
37 |
$compiler
|
vendor/twig/twig/src/Node/BlockReferenceNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Compiler;
|
|
21 |
*/
|
22 |
class BlockReferenceNode extends Node implements NodeOutputInterface
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
parent::__construct([], ['name' => $name], $lineno, $tag);
|
27 |
}
|
21 |
*/
|
22 |
class BlockReferenceNode extends Node implements NodeOutputInterface
|
23 |
{
|
24 |
+
public function __construct($name, $lineno, $tag = null)
|
25 |
{
|
26 |
parent::__construct([], ['name' => $name], $lineno, $tag);
|
27 |
}
|
vendor/twig/twig/src/Node/CheckSecurityNode.php
CHANGED
@@ -18,9 +18,9 @@ use Twig\Compiler;
|
|
18 |
*/
|
19 |
class CheckSecurityNode extends Node
|
20 |
{
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
|
26 |
{
|
@@ -64,7 +64,7 @@ class CheckSecurityNode extends Node
|
|
64 |
->outdent()
|
65 |
->write("} catch (SecurityError \$e) {\n")
|
66 |
->indent()
|
67 |
-
->write("\$e->setSourceContext(\$this->
|
68 |
->write("if (\$e instanceof SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n")
|
69 |
->indent()
|
70 |
->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n")
|
18 |
*/
|
19 |
class CheckSecurityNode extends Node
|
20 |
{
|
21 |
+
protected $usedFilters;
|
22 |
+
protected $usedTags;
|
23 |
+
protected $usedFunctions;
|
24 |
|
25 |
public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
|
26 |
{
|
64 |
->outdent()
|
65 |
->write("} catch (SecurityError \$e) {\n")
|
66 |
->indent()
|
67 |
+
->write("\$e->setSourceContext(\$this->getSourceContext());\n\n")
|
68 |
->write("if (\$e instanceof SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n")
|
69 |
->indent()
|
70 |
->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n")
|
vendor/twig/twig/src/Node/CheckToStringNode.php
CHANGED
@@ -33,13 +33,10 @@ class CheckToStringNode extends AbstractExpression
|
|
33 |
|
34 |
public function compile(Compiler $compiler)
|
35 |
{
|
36 |
-
$expr = $this->getNode('expr');
|
37 |
$compiler
|
38 |
->raw('$this->sandbox->ensureToStringAllowed(')
|
39 |
-
->subcompile($expr)
|
40 |
-
->raw('
|
41 |
-
->repr($expr->getTemplateLine())
|
42 |
-
->raw(', $this->source)')
|
43 |
;
|
44 |
}
|
45 |
}
|
33 |
|
34 |
public function compile(Compiler $compiler)
|
35 |
{
|
|
|
36 |
$compiler
|
37 |
->raw('$this->sandbox->ensureToStringAllowed(')
|
38 |
+
->subcompile($this->getNode('expr'))
|
39 |
+
->raw(')')
|
|
|
|
|
40 |
;
|
41 |
}
|
42 |
}
|
vendor/twig/twig/src/Node/DeprecatedNode.php
CHANGED
@@ -22,7 +22,7 @@ use Twig\Node\Expression\ConstantExpression;
|
|
22 |
*/
|
23 |
class DeprecatedNode extends Node
|
24 |
{
|
25 |
-
public function __construct(AbstractExpression $expr,
|
26 |
{
|
27 |
parent::__construct(['expr' => $expr], [], $lineno, $tag);
|
28 |
}
|
22 |
*/
|
23 |
class DeprecatedNode extends Node
|
24 |
{
|
25 |
+
public function __construct(AbstractExpression $expr, $lineno, $tag = null)
|
26 |
{
|
27 |
parent::__construct(['expr' => $expr], [], $lineno, $tag);
|
28 |
}
|
vendor/twig/twig/src/Node/DoNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Node\Expression\AbstractExpression;
|
|
21 |
*/
|
22 |
class DoNode extends Node
|
23 |
{
|
24 |
-
public function __construct(AbstractExpression $expr,
|
25 |
{
|
26 |
parent::__construct(['expr' => $expr], [], $lineno, $tag);
|
27 |
}
|
21 |
*/
|
22 |
class DoNode extends Node
|
23 |
{
|
24 |
+
public function __construct(AbstractExpression $expr, $lineno, $tag = null)
|
25 |
{
|
26 |
parent::__construct(['expr' => $expr], [], $lineno, $tag);
|
27 |
}
|
vendor/twig/twig/src/Node/EmbedNode.php
CHANGED
@@ -23,11 +23,13 @@ use Twig\Node\Expression\ConstantExpression;
|
|
23 |
class EmbedNode extends IncludeNode
|
24 |
{
|
25 |
// we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module)
|
26 |
-
public function __construct(
|
27 |
{
|
28 |
parent::__construct(new ConstantExpression('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
|
29 |
|
30 |
$this->setAttribute('name', $name);
|
|
|
|
|
31 |
$this->setAttribute('index', $index);
|
32 |
}
|
33 |
|
23 |
class EmbedNode extends IncludeNode
|
24 |
{
|
25 |
// we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module)
|
26 |
+
public function __construct($name, $index, ?AbstractExpression $variables, $only, $ignoreMissing, $lineno, $tag = null)
|
27 |
{
|
28 |
parent::__construct(new ConstantExpression('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
|
29 |
|
30 |
$this->setAttribute('name', $name);
|
31 |
+
// to be removed in 2.0, used name instead
|
32 |
+
$this->setAttribute('filename', $name);
|
33 |
$this->setAttribute('index', $index);
|
34 |
}
|
35 |
|
vendor/twig/twig/src/Node/Expression/ArrayExpression.php
CHANGED
@@ -15,9 +15,9 @@ use Twig\Compiler;
|
|
15 |
|
16 |
class ArrayExpression extends AbstractExpression
|
17 |
{
|
18 |
-
|
19 |
|
20 |
-
public function __construct(array $elements,
|
21 |
{
|
22 |
parent::__construct($elements, [], $lineno);
|
23 |
|
15 |
|
16 |
class ArrayExpression extends AbstractExpression
|
17 |
{
|
18 |
+
protected $index;
|
19 |
|
20 |
+
public function __construct(array $elements, $lineno)
|
21 |
{
|
22 |
parent::__construct($elements, [], $lineno);
|
23 |
|
vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php
CHANGED
@@ -44,7 +44,7 @@ class ArrowFunctionExpression extends AbstractExpression
|
|
44 |
;
|
45 |
}
|
46 |
$compiler
|
47 |
-
->raw(') use ($context
|
48 |
;
|
49 |
foreach ($this->getNode('names') as $name) {
|
50 |
$compiler
|
44 |
;
|
45 |
}
|
46 |
$compiler
|
47 |
+
->raw(') use ($context) { ')
|
48 |
;
|
49 |
foreach ($this->getNode('names') as $name) {
|
50 |
$compiler
|
vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php
CHANGED
@@ -14,11 +14,10 @@ namespace Twig\Node\Expression\Binary;
|
|
14 |
|
15 |
use Twig\Compiler;
|
16 |
use Twig\Node\Expression\AbstractExpression;
|
17 |
-
use Twig\Node\Node;
|
18 |
|
19 |
abstract class AbstractBinary extends AbstractExpression
|
20 |
{
|
21 |
-
public function __construct(
|
22 |
{
|
23 |
parent::__construct(['left' => $left, 'right' => $right], [], $lineno);
|
24 |
}
|
14 |
|
15 |
use Twig\Compiler;
|
16 |
use Twig\Node\Expression\AbstractExpression;
|
|
|
17 |
|
18 |
abstract class AbstractBinary extends AbstractExpression
|
19 |
{
|
20 |
+
public function __construct(\Twig_NodeInterface $left, \Twig_NodeInterface $right, $lineno)
|
21 |
{
|
22 |
parent::__construct(['left' => $left, 'right' => $right], [], $lineno);
|
23 |
}
|
vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php
CHANGED
@@ -15,6 +15,21 @@ use Twig\Compiler;
|
|
15 |
|
16 |
class PowerBinary extends AbstractBinary
|
17 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
public function operator(Compiler $compiler)
|
19 |
{
|
20 |
return $compiler->raw('**');
|
15 |
|
16 |
class PowerBinary extends AbstractBinary
|
17 |
{
|
18 |
+
public function compile(Compiler $compiler)
|
19 |
+
{
|
20 |
+
if (\PHP_VERSION_ID >= 50600) {
|
21 |
+
return parent::compile($compiler);
|
22 |
+
}
|
23 |
+
|
24 |
+
$compiler
|
25 |
+
->raw('pow(')
|
26 |
+
->subcompile($this->getNode('left'))
|
27 |
+
->raw(', ')
|
28 |
+
->subcompile($this->getNode('right'))
|
29 |
+
->raw(')')
|
30 |
+
;
|
31 |
+
}
|
32 |
+
|
33 |
public function operator(Compiler $compiler)
|
34 |
{
|
35 |
return $compiler->raw('**');
|
vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
namespace Twig\Node\Expression\Binary;
|
13 |
-
|
14 |
-
use Twig\Compiler;
|
15 |
-
|
16 |
-
class SpaceshipBinary extends AbstractBinary
|
17 |
-
{
|
18 |
-
public function operator(Compiler $compiler)
|
19 |
-
{
|
20 |
-
return $compiler->raw('<=>');
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php
CHANGED
@@ -22,8 +22,17 @@ use Twig\Node\Node;
|
|
22 |
*/
|
23 |
class BlockReferenceExpression extends AbstractExpression
|
24 |
{
|
25 |
-
|
|
|
|
|
|
|
26 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
$nodes = ['name' => $name];
|
28 |
if (null !== $template) {
|
29 |
$nodes['template'] = $template;
|
@@ -49,7 +58,7 @@ class BlockReferenceExpression extends AbstractExpression
|
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
private function compileTemplateCall(Compiler $compiler,
|
53 |
{
|
54 |
if (!$this->hasNode('template')) {
|
55 |
$compiler->write('$this');
|
@@ -66,11 +75,12 @@ class BlockReferenceExpression extends AbstractExpression
|
|
66 |
}
|
67 |
|
68 |
$compiler->raw(sprintf('->%s', $method));
|
|
|
69 |
|
70 |
-
return $
|
71 |
}
|
72 |
|
73 |
-
private function compileBlockArguments(Compiler $compiler)
|
74 |
{
|
75 |
$compiler
|
76 |
->raw('(')
|
22 |
*/
|
23 |
class BlockReferenceExpression extends AbstractExpression
|
24 |
{
|
25 |
+
/**
|
26 |
+
* @param Node|null $template
|
27 |
+
*/
|
28 |
+
public function __construct(\Twig_NodeInterface $name, $template, $lineno, $tag = null)
|
29 |
{
|
30 |
+
if (\is_bool($template)) {
|
31 |
+
@trigger_error(sprintf('The %s method "$asString" argument is deprecated since version 1.28 and will be removed in 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
32 |
+
|
33 |
+
$template = null;
|
34 |
+
}
|
35 |
+
|
36 |
$nodes = ['name' => $name];
|
37 |
if (null !== $template) {
|
38 |
$nodes['template'] = $template;
|
58 |
}
|
59 |
}
|
60 |
|
61 |
+
private function compileTemplateCall(Compiler $compiler, $method)
|
62 |
{
|
63 |
if (!$this->hasNode('template')) {
|
64 |
$compiler->write('$this');
|
75 |
}
|
76 |
|
77 |
$compiler->raw(sprintf('->%s', $method));
|
78 |
+
$this->compileBlockArguments($compiler);
|
79 |
|
80 |
+
return $compiler;
|
81 |
}
|
82 |
|
83 |
+
private function compileBlockArguments(Compiler $compiler)
|
84 |
{
|
85 |
$compiler
|
86 |
->raw('(')
|
vendor/twig/twig/src/Node/Expression/CallExpression.php
CHANGED
@@ -22,37 +22,37 @@ abstract class CallExpression extends AbstractExpression
|
|
22 |
|
23 |
protected function compileCallable(Compiler $compiler)
|
24 |
{
|
25 |
-
$
|
26 |
-
|
27 |
-
if (
|
28 |
-
$
|
29 |
-
} else {
|
30 |
-
[$r, $callable] = $this->reflectCallable($callable);
|
31 |
-
|
32 |
-
if (\is_string($callable)) {
|
33 |
$compiler->raw($callable);
|
34 |
-
}
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
$compiler->raw(sprintf('$this->env->getExtension(\'%s\')', $class));
|
45 |
} else {
|
46 |
-
$
|
|
|
|
|
|
|
47 |
}
|
48 |
-
|
49 |
-
$compiler->raw(sprintf('->%s', $callable[1]));
|
50 |
-
} else {
|
51 |
-
$compiler->raw(sprintf('$this->env->get%s(\'%s\')->getCallable()', ucfirst($this->getAttribute('type')), $this->getAttribute('name')));
|
52 |
}
|
|
|
|
|
53 |
}
|
54 |
|
55 |
-
$this->compileArguments($compiler);
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
protected function compileArguments(Compiler $compiler, $isArray = false)
|
@@ -93,8 +93,10 @@ abstract class CallExpression extends AbstractExpression
|
|
93 |
}
|
94 |
|
95 |
if ($this->hasNode('arguments')) {
|
96 |
-
$callable = $this->getAttribute('callable');
|
|
|
97 |
$arguments = $this->getArguments($callable, $this->getNode('arguments'));
|
|
|
98 |
foreach ($arguments as $node) {
|
99 |
if (!$first) {
|
100 |
$compiler->raw(', ');
|
@@ -140,7 +142,7 @@ abstract class CallExpression extends AbstractExpression
|
|
140 |
throw new \LogicException($message);
|
141 |
}
|
142 |
|
143 |
-
|
144 |
$arguments = [];
|
145 |
$names = [];
|
146 |
$missingArguments = [];
|
@@ -194,7 +196,7 @@ abstract class CallExpression extends AbstractExpression
|
|
194 |
}
|
195 |
|
196 |
if ($isVariadic) {
|
197 |
-
$arbitraryArguments =
|
198 |
foreach ($parameters as $key => $value) {
|
199 |
if (\is_int($key)) {
|
200 |
$arbitraryArguments->addElement($value);
|
@@ -237,9 +239,12 @@ abstract class CallExpression extends AbstractExpression
|
|
237 |
return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name));
|
238 |
}
|
239 |
|
240 |
-
private function getCallableParameters($callable,
|
241 |
{
|
242 |
-
|
|
|
|
|
|
|
243 |
|
244 |
$parameters = $r->getParameters();
|
245 |
if ($this->hasNode('node')) {
|
@@ -256,21 +261,22 @@ abstract class CallExpression extends AbstractExpression
|
|
256 |
array_shift($parameters);
|
257 |
}
|
258 |
}
|
259 |
-
$isPhpVariadic = false;
|
260 |
if ($isVariadic) {
|
261 |
$argument = end($parameters);
|
262 |
$isArray = $argument && $argument->hasType() && 'array' === $argument->getType()->getName();
|
263 |
if ($isArray && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) {
|
264 |
array_pop($parameters);
|
265 |
-
} elseif ($argument && $argument->isVariadic()) {
|
266 |
-
array_pop($parameters);
|
267 |
-
$isPhpVariadic = true;
|
268 |
} else {
|
|
|
|
|
|
|
|
|
|
|
269 |
throw new \LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name')));
|
270 |
}
|
271 |
}
|
272 |
|
273 |
-
return
|
274 |
}
|
275 |
|
276 |
private function reflectCallable($callable)
|
@@ -279,42 +285,30 @@ abstract class CallExpression extends AbstractExpression
|
|
279 |
return $this->reflector;
|
280 |
}
|
281 |
|
282 |
-
if (\
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
$r = new \ReflectionMethod($callable[0], $callable[1]);
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
$
|
293 |
-
|
294 |
-
$
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
return $this->reflector = [$r, $callable, 'Closure'];
|
302 |
-
}
|
303 |
-
|
304 |
-
if ($object = $r->getClosureThis()) {
|
305 |
-
$callable = [$object, $r->name];
|
306 |
-
$callableName = (\function_exists('get_debug_type') ? get_debug_type($object) : \get_class($object)).'::'.$r->name;
|
307 |
-
} elseif ($class = $r->getClosureScopeClass()) {
|
308 |
-
$callableName = (\is_array($callable) ? $callable[0] : $class->name).'::'.$r->name;
|
309 |
} else {
|
310 |
-
$
|
311 |
-
}
|
312 |
-
|
313 |
-
if ($checkVisibility && \is_array($callable) && method_exists(...$callable) && !(new \ReflectionMethod(...$callable))->isPublic()) {
|
314 |
-
$callable = $r->getClosure();
|
315 |
}
|
316 |
|
317 |
-
return $this->reflector = [$r, $callable
|
318 |
}
|
319 |
}
|
320 |
|
22 |
|
23 |
protected function compileCallable(Compiler $compiler)
|
24 |
{
|
25 |
+
$closingParenthesis = false;
|
26 |
+
$isArray = false;
|
27 |
+
if ($this->hasAttribute('callable') && $callable = $this->getAttribute('callable')) {
|
28 |
+
if (\is_string($callable) && false === strpos($callable, '::')) {
|
|
|
|
|
|
|
|
|
29 |
$compiler->raw($callable);
|
30 |
+
} else {
|
31 |
+
list($r, $callable) = $this->reflectCallable($callable);
|
32 |
+
if ($r instanceof \ReflectionMethod && \is_string($callable[0])) {
|
33 |
+
if ($r->isStatic()) {
|
34 |
+
$compiler->raw(sprintf('%s::%s', $callable[0], $callable[1]));
|
35 |
+
} else {
|
36 |
+
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
|
37 |
+
}
|
38 |
+
} elseif ($r instanceof \ReflectionMethod && $callable[0] instanceof ExtensionInterface) {
|
39 |
+
$compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s', \get_class($callable[0]), $callable[1]));
|
|
|
40 |
} else {
|
41 |
+
$type = ucfirst($this->getAttribute('type'));
|
42 |
+
$compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), ', $type, $this->getAttribute('name')));
|
43 |
+
$closingParenthesis = true;
|
44 |
+
$isArray = true;
|
45 |
}
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
+
} else {
|
48 |
+
$compiler->raw($this->getAttribute('thing')->compile());
|
49 |
}
|
50 |
|
51 |
+
$this->compileArguments($compiler, $isArray);
|
52 |
+
|
53 |
+
if ($closingParenthesis) {
|
54 |
+
$compiler->raw(')');
|
55 |
+
}
|
56 |
}
|
57 |
|
58 |
protected function compileArguments(Compiler $compiler, $isArray = false)
|
93 |
}
|
94 |
|
95 |
if ($this->hasNode('arguments')) {
|
96 |
+
$callable = $this->hasAttribute('callable') ? $this->getAttribute('callable') : null;
|
97 |
+
|
98 |
$arguments = $this->getArguments($callable, $this->getNode('arguments'));
|
99 |
+
|
100 |
foreach ($arguments as $node) {
|
101 |
if (!$first) {
|
102 |
$compiler->raw(', ');
|
142 |
throw new \LogicException($message);
|
143 |
}
|
144 |
|
145 |
+
$callableParameters = $this->getCallableParameters($callable, $isVariadic);
|
146 |
$arguments = [];
|
147 |
$names = [];
|
148 |
$missingArguments = [];
|
196 |
}
|
197 |
|
198 |
if ($isVariadic) {
|
199 |
+
$arbitraryArguments = new ArrayExpression([], -1);
|
200 |
foreach ($parameters as $key => $value) {
|
201 |
if (\is_int($key)) {
|
202 |
$arbitraryArguments->addElement($value);
|
239 |
return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name));
|
240 |
}
|
241 |
|
242 |
+
private function getCallableParameters($callable, $isVariadic)
|
243 |
{
|
244 |
+
list($r) = $this->reflectCallable($callable);
|
245 |
+
if (null === $r) {
|
246 |
+
return [];
|
247 |
+
}
|
248 |
|
249 |
$parameters = $r->getParameters();
|
250 |
if ($this->hasNode('node')) {
|
261 |
array_shift($parameters);
|
262 |
}
|
263 |
}
|
|
|
264 |
if ($isVariadic) {
|
265 |
$argument = end($parameters);
|
266 |
$isArray = $argument && $argument->hasType() && 'array' === $argument->getType()->getName();
|
267 |
if ($isArray && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) {
|
268 |
array_pop($parameters);
|
|
|
|
|
|
|
269 |
} else {
|
270 |
+
$callableName = $r->name;
|
271 |
+
if ($r instanceof \ReflectionMethod) {
|
272 |
+
$callableName = $r->getDeclaringClass()->name.'::'.$callableName;
|
273 |
+
}
|
274 |
+
|
275 |
throw new \LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name')));
|
276 |
}
|
277 |
}
|
278 |
|
279 |
+
return $parameters;
|
280 |
}
|
281 |
|
282 |
private function reflectCallable($callable)
|
285 |
return $this->reflector;
|
286 |
}
|
287 |
|
288 |
+
if (\is_array($callable)) {
|
289 |
+
if (!method_exists($callable[0], $callable[1])) {
|
290 |
+
// __call()
|
291 |
+
return [null, []];
|
292 |
+
}
|
293 |
$r = new \ReflectionMethod($callable[0], $callable[1]);
|
294 |
+
} elseif (\is_object($callable) && !$callable instanceof \Closure) {
|
295 |
+
$r = new \ReflectionObject($callable);
|
296 |
+
$r = $r->getMethod('__invoke');
|
297 |
+
$callable = [$callable, '__invoke'];
|
298 |
+
} elseif (\is_string($callable) && false !== $pos = strpos($callable, '::')) {
|
299 |
+
$class = substr($callable, 0, $pos);
|
300 |
+
$method = substr($callable, $pos + 2);
|
301 |
+
if (!method_exists($class, $method)) {
|
302 |
+
// __staticCall()
|
303 |
+
return [null, []];
|
304 |
+
}
|
305 |
+
$r = new \ReflectionMethod($callable);
|
306 |
+
$callable = [$class, $method];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
} else {
|
308 |
+
$r = new \ReflectionFunction($callable);
|
|
|
|
|
|
|
|
|
309 |
}
|
310 |
|
311 |
+
return $this->reflector = [$r, $callable];
|
312 |
}
|
313 |
}
|
314 |
|
vendor/twig/twig/src/Node/Expression/ConditionalExpression.php
CHANGED
@@ -16,7 +16,7 @@ use Twig\Compiler;
|
|
16 |
|
17 |
class ConditionalExpression extends AbstractExpression
|
18 |
{
|
19 |
-
public function __construct(AbstractExpression $expr1, AbstractExpression $expr2, AbstractExpression $expr3,
|
20 |
{
|
21 |
parent::__construct(['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno);
|
22 |
}
|
16 |
|
17 |
class ConditionalExpression extends AbstractExpression
|
18 |
{
|
19 |
+
public function __construct(AbstractExpression $expr1, AbstractExpression $expr2, AbstractExpression $expr3, $lineno)
|
20 |
{
|
21 |
parent::__construct(['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno);
|
22 |
}
|
vendor/twig/twig/src/Node/Expression/ConstantExpression.php
CHANGED
@@ -16,7 +16,7 @@ use Twig\Compiler;
|
|
16 |
|
17 |
class ConstantExpression extends AbstractExpression
|
18 |
{
|
19 |
-
public function __construct($value,
|
20 |
{
|
21 |
parent::__construct([], ['value' => $value], $lineno);
|
22 |
}
|
16 |
|
17 |
class ConstantExpression extends AbstractExpression
|
18 |
{
|
19 |
+
public function __construct($value, $lineno)
|
20 |
{
|
21 |
parent::__construct([], ['value' => $value], $lineno);
|
22 |
}
|
vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php
CHANGED
@@ -29,7 +29,7 @@ use Twig\Node\Node;
|
|
29 |
*/
|
30 |
class DefaultFilter extends FilterExpression
|
31 |
{
|
32 |
-
public function __construct(
|
33 |
{
|
34 |
$default = new FilterExpression($node, new ConstantExpression('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine());
|
35 |
|
29 |
*/
|
30 |
class DefaultFilter extends FilterExpression
|
31 |
{
|
32 |
+
public function __construct(\Twig_NodeInterface $node, ConstantExpression $filterName, \Twig_NodeInterface $arguments, $lineno, $tag = null)
|
33 |
{
|
34 |
$default = new FilterExpression($node, new ConstantExpression('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine());
|
35 |
|
vendor/twig/twig/src/Node/Expression/FilterExpression.php
CHANGED
@@ -13,11 +13,11 @@
|
|
13 |
namespace Twig\Node\Expression;
|
14 |
|
15 |
use Twig\Compiler;
|
16 |
-
use Twig\
|
17 |
|
18 |
class FilterExpression extends CallExpression
|
19 |
{
|
20 |
-
public function __construct(
|
21 |
{
|
22 |
parent::__construct(['node' => $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag);
|
23 |
}
|
@@ -29,11 +29,16 @@ class FilterExpression extends CallExpression
|
|
29 |
|
30 |
$this->setAttribute('name', $name);
|
31 |
$this->setAttribute('type', 'filter');
|
|
|
32 |
$this->setAttribute('needs_environment', $filter->needsEnvironment());
|
33 |
$this->setAttribute('needs_context', $filter->needsContext());
|
34 |
$this->setAttribute('arguments', $filter->getArguments());
|
35 |
-
$
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
|
38 |
$this->compileCallable($compiler);
|
39 |
}
|
13 |
namespace Twig\Node\Expression;
|
14 |
|
15 |
use Twig\Compiler;
|
16 |
+
use Twig\TwigFilter;
|
17 |
|
18 |
class FilterExpression extends CallExpression
|
19 |
{
|
20 |
+
public function __construct(\Twig_NodeInterface $node, ConstantExpression $filterName, \Twig_NodeInterface $arguments, $lineno, $tag = null)
|
21 |
{
|
22 |
parent::__construct(['node' => $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag);
|
23 |
}
|
29 |
|
30 |
$this->setAttribute('name', $name);
|
31 |
$this->setAttribute('type', 'filter');
|
32 |
+
$this->setAttribute('thing', $filter);
|
33 |
$this->setAttribute('needs_environment', $filter->needsEnvironment());
|
34 |
$this->setAttribute('needs_context', $filter->needsContext());
|
35 |
$this->setAttribute('arguments', $filter->getArguments());
|
36 |
+
if ($filter instanceof \Twig_FilterCallableInterface || $filter instanceof TwigFilter) {
|
37 |
+
$this->setAttribute('callable', $filter->getCallable());
|
38 |
+
}
|
39 |
+
if ($filter instanceof TwigFilter) {
|
40 |
+
$this->setAttribute('is_variadic', $filter->isVariadic());
|
41 |
+
}
|
42 |
|
43 |
$this->compileCallable($compiler);
|
44 |
}
|
vendor/twig/twig/src/Node/Expression/FunctionExpression.php
CHANGED
@@ -12,11 +12,11 @@
|
|
12 |
namespace Twig\Node\Expression;
|
13 |
|
14 |
use Twig\Compiler;
|
15 |
-
use Twig\
|
16 |
|
17 |
class FunctionExpression extends CallExpression
|
18 |
{
|
19 |
-
public function __construct(
|
20 |
{
|
21 |
parent::__construct(['arguments' => $arguments], ['name' => $name, 'is_defined_test' => false], $lineno);
|
22 |
}
|
@@ -28,15 +28,21 @@ class FunctionExpression extends CallExpression
|
|
28 |
|
29 |
$this->setAttribute('name', $name);
|
30 |
$this->setAttribute('type', 'function');
|
|
|
31 |
$this->setAttribute('needs_environment', $function->needsEnvironment());
|
32 |
$this->setAttribute('needs_context', $function->needsContext());
|
33 |
$this->setAttribute('arguments', $function->getArguments());
|
34 |
-
$
|
35 |
-
|
36 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
-
$this->setAttribute('callable', $callable);
|
39 |
-
$this->setAttribute('is_variadic', $function->isVariadic());
|
40 |
|
41 |
$this->compileCallable($compiler);
|
42 |
}
|
12 |
namespace Twig\Node\Expression;
|
13 |
|
14 |
use Twig\Compiler;
|
15 |
+
use Twig\TwigFunction;
|
16 |
|
17 |
class FunctionExpression extends CallExpression
|
18 |
{
|
19 |
+
public function __construct($name, \Twig_NodeInterface $arguments, $lineno)
|
20 |
{
|
21 |
parent::__construct(['arguments' => $arguments], ['name' => $name, 'is_defined_test' => false], $lineno);
|
22 |
}
|
28 |
|
29 |
$this->setAttribute('name', $name);
|
30 |
$this->setAttribute('type', 'function');
|
31 |
+
$this->setAttribute('thing', $function);
|
32 |
$this->setAttribute('needs_environment', $function->needsEnvironment());
|
33 |
$this->setAttribute('needs_context', $function->needsContext());
|
34 |
$this->setAttribute('arguments', $function->getArguments());
|
35 |
+
if ($function instanceof \Twig_FunctionCallableInterface || $function instanceof TwigFunction) {
|
36 |
+
$callable = $function->getCallable();
|
37 |
+
if ('constant' === $name && $this->getAttribute('is_defined_test')) {
|
38 |
+
$callable = 'twig_constant_is_defined';
|
39 |
+
}
|
40 |
+
|
41 |
+
$this->setAttribute('callable', $callable);
|
42 |
+
}
|
43 |
+
if ($function instanceof TwigFunction) {
|
44 |
+
$this->setAttribute('is_variadic', $function->isVariadic());
|
45 |
}
|
|
|
|
|
46 |
|
47 |
$this->compileCallable($compiler);
|
48 |
}
|
vendor/twig/twig/src/Node/Expression/GetAttrExpression.php
CHANGED
@@ -13,7 +13,6 @@
|
|
13 |
namespace Twig\Node\Expression;
|
14 |
|
15 |
use Twig\Compiler;
|
16 |
-
use Twig\Extension\SandboxExtension;
|
17 |
use Twig\Template;
|
18 |
|
19 |
class GetAttrExpression extends AbstractExpression
|
@@ -25,64 +24,56 @@ class GetAttrExpression extends AbstractExpression
|
|
25 |
$nodes['arguments'] = $arguments;
|
26 |
}
|
27 |
|
28 |
-
parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, '
|
29 |
}
|
30 |
|
31 |
public function compile(Compiler $compiler)
|
32 |
{
|
33 |
-
|
34 |
-
|
35 |
-
// optimize array calls
|
36 |
-
if (
|
37 |
-
$this->getAttribute('optimizable')
|
38 |
-
&& (!$env->isStrictVariables() || $this->getAttribute('ignore_strict_check'))
|
39 |
-
&& !$this->getAttribute('is_defined_test')
|
40 |
-
&& Template::ARRAY_CALL === $this->getAttribute('type')
|
41 |
-
) {
|
42 |
-
$var = '$'.$compiler->getVarName();
|
43 |
-
$compiler
|
44 |
-
->raw('(('.$var.' = ')
|
45 |
-
->subcompile($this->getNode('node'))
|
46 |
-
->raw(') && is_array(')
|
47 |
-
->raw($var)
|
48 |
-
->raw(') || ')
|
49 |
-
->raw($var)
|
50 |
-
->raw(' instanceof ArrayAccess ? (')
|
51 |
-
->raw($var)
|
52 |
-
->raw('[')
|
53 |
-
->subcompile($this->getNode('attribute'))
|
54 |
-
->raw('] ?? null) : null)')
|
55 |
-
;
|
56 |
-
|
57 |
-
return;
|
58 |
}
|
59 |
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
if ($this->getAttribute('ignore_strict_check')) {
|
63 |
$this->getNode('node')->setAttribute('ignore_strict_check', true);
|
64 |
}
|
65 |
|
66 |
-
$compiler
|
67 |
-
->subcompile($this->getNode('node'))
|
68 |
-
->raw(', ')
|
69 |
-
->subcompile($this->getNode('attribute'))
|
70 |
-
;
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
-
$compiler->raw('
|
79 |
-
->repr($this->getAttribute('type'))
|
80 |
-
->raw(', ')->repr($this->getAttribute('is_defined_test'))
|
81 |
-
->raw(', ')->repr($this->getAttribute('ignore_strict_check'))
|
82 |
-
->raw(', ')->repr($env->hasExtension(SandboxExtension::class))
|
83 |
-
->raw(', ')->repr($this->getNode('node')->getTemplateLine())
|
84 |
-
->raw(')')
|
85 |
-
;
|
86 |
}
|
87 |
}
|
88 |
|
13 |
namespace Twig\Node\Expression;
|
14 |
|
15 |
use Twig\Compiler;
|
|
|
16 |
use Twig\Template;
|
17 |
|
18 |
class GetAttrExpression extends AbstractExpression
|
24 |
$nodes['arguments'] = $arguments;
|
25 |
}
|
26 |
|
27 |
+
parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false], $lineno);
|
28 |
}
|
29 |
|
30 |
public function compile(Compiler $compiler)
|
31 |
{
|
32 |
+
if ($this->getAttribute('disable_c_ext')) {
|
33 |
+
@trigger_error(sprintf('Using the "disable_c_ext" attribute on %s is deprecated since version 1.30 and will be removed in 2.0.', __CLASS__), \E_USER_DEPRECATED);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
+
if (\function_exists('twig_template_get_attributes') && !$this->getAttribute('disable_c_ext')) {
|
37 |
+
$compiler->raw('twig_template_get_attributes($this, ');
|
38 |
+
} else {
|
39 |
+
$compiler->raw('$this->getAttribute(');
|
40 |
+
}
|
41 |
|
42 |
if ($this->getAttribute('ignore_strict_check')) {
|
43 |
$this->getNode('node')->setAttribute('ignore_strict_check', true);
|
44 |
}
|
45 |
|
46 |
+
$compiler->subcompile($this->getNode('node'));
|
|
|
|
|
|
|
|
|
47 |
|
48 |
+
$compiler->raw(', ')->subcompile($this->getNode('attribute'));
|
49 |
+
|
50 |
+
// only generate optional arguments when needed (to make generated code more readable)
|
51 |
+
$needFourth = $this->getAttribute('ignore_strict_check');
|
52 |
+
$needThird = $needFourth || $this->getAttribute('is_defined_test');
|
53 |
+
$needSecond = $needThird || Template::ANY_CALL !== $this->getAttribute('type');
|
54 |
+
$needFirst = $needSecond || $this->hasNode('arguments');
|
55 |
+
|
56 |
+
if ($needFirst) {
|
57 |
+
if ($this->hasNode('arguments')) {
|
58 |
+
$compiler->raw(', ')->subcompile($this->getNode('arguments'));
|
59 |
+
} else {
|
60 |
+
$compiler->raw(', []');
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
if ($needSecond) {
|
65 |
+
$compiler->raw(', ')->repr($this->getAttribute('type'));
|
66 |
+
}
|
67 |
+
|
68 |
+
if ($needThird) {
|
69 |
+
$compiler->raw(', ')->repr($this->getAttribute('is_defined_test'));
|
70 |
+
}
|
71 |
+
|
72 |
+
if ($needFourth) {
|
73 |
+
$compiler->raw(', ')->repr($this->getAttribute('ignore_strict_check'));
|
74 |
}
|
75 |
|
76 |
+
$compiler->raw(')');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
}
|
79 |
|
vendor/twig/twig/src/Node/Expression/MethodCallExpression.php
CHANGED
@@ -15,9 +15,9 @@ use Twig\Compiler;
|
|
15 |
|
16 |
class MethodCallExpression extends AbstractExpression
|
17 |
{
|
18 |
-
public function __construct(AbstractExpression $node,
|
19 |
{
|
20 |
-
parent::__construct(['node' => $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false
|
21 |
|
22 |
if ($node instanceof NameExpression) {
|
23 |
$node->setAttribute('always_defined', true);
|
@@ -26,24 +26,11 @@ class MethodCallExpression extends AbstractExpression
|
|
26 |
|
27 |
public function compile(Compiler $compiler)
|
28 |
{
|
29 |
-
if ($this->getAttribute('is_defined_test')) {
|
30 |
-
$compiler
|
31 |
-
->raw('method_exists($macros[')
|
32 |
-
->repr($this->getNode('node')->getAttribute('name'))
|
33 |
-
->raw('], ')
|
34 |
-
->repr($this->getAttribute('method'))
|
35 |
-
->raw(')')
|
36 |
-
;
|
37 |
-
|
38 |
-
return;
|
39 |
-
}
|
40 |
-
|
41 |
$compiler
|
42 |
-
->
|
43 |
-
->
|
44 |
-
->raw('
|
45 |
-
->
|
46 |
-
->raw(', [')
|
47 |
;
|
48 |
$first = true;
|
49 |
foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) {
|
@@ -54,10 +41,7 @@ class MethodCallExpression extends AbstractExpression
|
|
54 |
|
55 |
$compiler->subcompile($pair['value']);
|
56 |
}
|
57 |
-
$compiler
|
58 |
-
->raw('], ')
|
59 |
-
->repr($this->getTemplateLine())
|
60 |
-
->raw(', $context, $this->getSourceContext())');
|
61 |
}
|
62 |
}
|
63 |
|
15 |
|
16 |
class MethodCallExpression extends AbstractExpression
|
17 |
{
|
18 |
+
public function __construct(AbstractExpression $node, $method, ArrayExpression $arguments, $lineno)
|
19 |
{
|
20 |
+
parent::__construct(['node' => $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false], $lineno);
|
21 |
|
22 |
if ($node instanceof NameExpression) {
|
23 |
$node->setAttribute('always_defined', true);
|
26 |
|
27 |
public function compile(Compiler $compiler)
|
28 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$compiler
|
30 |
+
->subcompile($this->getNode('node'))
|
31 |
+
->raw('->')
|
32 |
+
->raw($this->getAttribute('method'))
|
33 |
+
->raw('(')
|
|
|
34 |
;
|
35 |
$first = true;
|
36 |
foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) {
|
41 |
|
42 |
$compiler->subcompile($pair['value']);
|
43 |
}
|
44 |
+
$compiler->raw(')');
|
|
|
|
|
|
|
45 |
}
|
46 |
}
|
47 |
|
vendor/twig/twig/src/Node/Expression/NameExpression.php
CHANGED
@@ -16,13 +16,13 @@ use Twig\Compiler;
|
|
16 |
|
17 |
class NameExpression extends AbstractExpression
|
18 |
{
|
19 |
-
|
20 |
-
'_self' => '$this
|
21 |
'_context' => '$context',
|
22 |
'_charset' => '$this->env->getCharset()',
|
23 |
];
|
24 |
|
25 |
-
public function __construct(
|
26 |
{
|
27 |
parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno);
|
28 |
}
|
@@ -60,25 +60,45 @@ class NameExpression extends AbstractExpression
|
|
60 |
->raw(']')
|
61 |
;
|
62 |
} else {
|
63 |
-
if (
|
|
|
64 |
$compiler
|
65 |
->raw('($context[')
|
66 |
->string($name)
|
67 |
-
->raw('] ??
|
68 |
;
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
$compiler
|
71 |
->raw('(isset($context[')
|
72 |
->string($name)
|
73 |
-
->raw('])
|
74 |
-
->string($name)
|
75 |
-
->raw(', $context) ? $context[')
|
76 |
->string($name)
|
77 |
-
->raw('] :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
->string($name)
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
82 |
->raw(')')
|
83 |
;
|
84 |
}
|
16 |
|
17 |
class NameExpression extends AbstractExpression
|
18 |
{
|
19 |
+
protected $specialVars = [
|
20 |
+
'_self' => '$this',
|
21 |
'_context' => '$context',
|
22 |
'_charset' => '$this->env->getCharset()',
|
23 |
];
|
24 |
|
25 |
+
public function __construct($name, $lineno)
|
26 |
{
|
27 |
parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno);
|
28 |
}
|
60 |
->raw(']')
|
61 |
;
|
62 |
} else {
|
63 |
+
if (\PHP_VERSION_ID >= 70000) {
|
64 |
+
// use PHP 7 null coalescing operator
|
65 |
$compiler
|
66 |
->raw('($context[')
|
67 |
->string($name)
|
68 |
+
->raw('] ?? ')
|
69 |
;
|
70 |
+
|
71 |
+
if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) {
|
72 |
+
$compiler->raw('null)');
|
73 |
+
} else {
|
74 |
+
$compiler->raw('$this->getContext($context, ')->string($name)->raw('))');
|
75 |
+
}
|
76 |
+
} elseif (\PHP_VERSION_ID >= 50400) {
|
77 |
+
// PHP 5.4 ternary operator performance was optimized
|
78 |
$compiler
|
79 |
->raw('(isset($context[')
|
80 |
->string($name)
|
81 |
+
->raw(']) ? $context[')
|
|
|
|
|
82 |
->string($name)
|
83 |
+
->raw('] : ')
|
84 |
+
;
|
85 |
+
|
86 |
+
if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) {
|
87 |
+
$compiler->raw('null)');
|
88 |
+
} else {
|
89 |
+
$compiler->raw('$this->getContext($context, ')->string($name)->raw('))');
|
90 |
+
}
|
91 |
+
} else {
|
92 |
+
$compiler
|
93 |
+
->raw('$this->getContext($context, ')
|
94 |
->string($name)
|
95 |
+
;
|
96 |
+
|
97 |
+
if ($this->getAttribute('ignore_strict_check')) {
|
98 |
+
$compiler->raw(', true');
|
99 |
+
}
|
100 |
+
|
101 |
+
$compiler
|
102 |
->raw(')')
|
103 |
;
|
104 |
}
|
vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php
CHANGED
@@ -20,7 +20,7 @@ use Twig\Node\Node;
|
|
20 |
|
21 |
class NullCoalesceExpression extends ConditionalExpression
|
22 |
{
|
23 |
-
public function __construct(
|
24 |
{
|
25 |
$test = new DefinedTest(clone $left, 'defined', new Node(), $left->getTemplateLine());
|
26 |
// for "block()", we don't need the null test as the return value is always a string
|
@@ -44,7 +44,7 @@ class NullCoalesceExpression extends ConditionalExpression
|
|
44 |
* cases might be implemented as an optimizer node visitor, but has not been done
|
45 |
* as benefits are probably not worth the added complexity.
|
46 |
*/
|
47 |
-
if ($this->getNode('expr2') instanceof NameExpression) {
|
48 |
$this->getNode('expr2')->setAttribute('always_defined', true);
|
49 |
$compiler
|
50 |
->raw('((')
|
20 |
|
21 |
class NullCoalesceExpression extends ConditionalExpression
|
22 |
{
|
23 |
+
public function __construct(\Twig_NodeInterface $left, \Twig_NodeInterface $right, $lineno)
|
24 |
{
|
25 |
$test = new DefinedTest(clone $left, 'defined', new Node(), $left->getTemplateLine());
|
26 |
// for "block()", we don't need the null test as the return value is always a string
|
44 |
* cases might be implemented as an optimizer node visitor, but has not been done
|
45 |
* as benefits are probably not worth the added complexity.
|
46 |
*/
|
47 |
+
if (\PHP_VERSION_ID >= 70000 && $this->getNode('expr2') instanceof NameExpression) {
|
48 |
$this->getNode('expr2')->setAttribute('always_defined', true);
|
49 |
$compiler
|
50 |
->raw('((')
|
vendor/twig/twig/src/Node/Expression/ParentExpression.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Compiler;
|
|
21 |
*/
|
22 |
class ParentExpression extends AbstractExpression
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag);
|
27 |
}
|
21 |
*/
|
22 |
class ParentExpression extends AbstractExpression
|
23 |
{
|
24 |
+
public function __construct($name, $lineno, $tag = null)
|
25 |
{
|
26 |
parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag);
|
27 |
}
|
vendor/twig/twig/src/Node/Expression/TempNameExpression.php
CHANGED
@@ -15,7 +15,7 @@ use Twig\Compiler;
|
|
15 |
|
16 |
class TempNameExpression extends AbstractExpression
|
17 |
{
|
18 |
-
public function __construct(
|
19 |
{
|
20 |
parent::__construct([], ['name' => $name], $lineno);
|
21 |
}
|
15 |
|
16 |
class TempNameExpression extends AbstractExpression
|
17 |
{
|
18 |
+
public function __construct($name, $lineno)
|
19 |
{
|
20 |
parent::__construct([], ['name' => $name], $lineno);
|
21 |
}
|
vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php
CHANGED
@@ -18,10 +18,8 @@ use Twig\Node\Expression\BlockReferenceExpression;
|
|
18 |
use Twig\Node\Expression\ConstantExpression;
|
19 |
use Twig\Node\Expression\FunctionExpression;
|
20 |
use Twig\Node\Expression\GetAttrExpression;
|
21 |
-
use Twig\Node\Expression\MethodCallExpression;
|
22 |
use Twig\Node\Expression\NameExpression;
|
23 |
use Twig\Node\Expression\TestExpression;
|
24 |
-
use Twig\Node\Node;
|
25 |
|
26 |
/**
|
27 |
* Checks if a variable is defined in the current context.
|
@@ -35,7 +33,7 @@ use Twig\Node\Node;
|
|
35 |
*/
|
36 |
class DefinedTest extends TestExpression
|
37 |
{
|
38 |
-
public function __construct(
|
39 |
{
|
40 |
if ($node instanceof NameExpression) {
|
41 |
$node->setAttribute('is_defined_test', true);
|
@@ -48,8 +46,6 @@ class DefinedTest extends TestExpression
|
|
48 |
$node->setAttribute('is_defined_test', true);
|
49 |
} elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) {
|
50 |
$node = new ConstantExpression(true, $node->getTemplateLine());
|
51 |
-
} elseif ($node instanceof MethodCallExpression) {
|
52 |
-
$node->setAttribute('is_defined_test', true);
|
53 |
} else {
|
54 |
throw new SyntaxError('The "defined" test only works with simple variables.', $lineno);
|
55 |
}
|
@@ -57,9 +53,8 @@ class DefinedTest extends TestExpression
|
|
57 |
parent::__construct($node, $name, $arguments, $lineno);
|
58 |
}
|
59 |
|
60 |
-
|
61 |
{
|
62 |
-
$node->setAttribute('optimizable', false);
|
63 |
$node->setAttribute('ignore_strict_check', true);
|
64 |
|
65 |
if ($node->getNode('node') instanceof GetAttrExpression) {
|
18 |
use Twig\Node\Expression\ConstantExpression;
|
19 |
use Twig\Node\Expression\FunctionExpression;
|
20 |
use Twig\Node\Expression\GetAttrExpression;
|
|
|
21 |
use Twig\Node\Expression\NameExpression;
|
22 |
use Twig\Node\Expression\TestExpression;
|
|
|
23 |
|
24 |
/**
|
25 |
* Checks if a variable is defined in the current context.
|
33 |
*/
|
34 |
class DefinedTest extends TestExpression
|
35 |
{
|
36 |
+
public function __construct(\Twig_NodeInterface $node, $name, ?\Twig_NodeInterface $arguments, $lineno)
|
37 |
{
|
38 |
if ($node instanceof NameExpression) {
|
39 |
$node->setAttribute('is_defined_test', true);
|
46 |
$node->setAttribute('is_defined_test', true);
|
47 |
} elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) {
|
48 |
$node = new ConstantExpression(true, $node->getTemplateLine());
|
|
|
|
|
49 |
} else {
|
50 |
throw new SyntaxError('The "defined" test only works with simple variables.', $lineno);
|
51 |
}
|
53 |
parent::__construct($node, $name, $arguments, $lineno);
|
54 |
}
|
55 |
|
56 |
+
protected function changeIgnoreStrictCheck(GetAttrExpression $node)
|
57 |
{
|
|
|
58 |
$node->setAttribute('ignore_strict_check', true);
|
59 |
|
60 |
if ($node->getNode('node') instanceof GetAttrExpression) {
|
vendor/twig/twig/src/Node/Expression/TestExpression.php
CHANGED
@@ -12,11 +12,11 @@
|
|
12 |
namespace Twig\Node\Expression;
|
13 |
|
14 |
use Twig\Compiler;
|
15 |
-
use Twig\
|
16 |
|
17 |
class TestExpression extends CallExpression
|
18 |
{
|
19 |
-
public function __construct(
|
20 |
{
|
21 |
$nodes = ['node' => $node];
|
22 |
if (null !== $arguments) {
|
@@ -33,9 +33,16 @@ class TestExpression extends CallExpression
|
|
33 |
|
34 |
$this->setAttribute('name', $name);
|
35 |
$this->setAttribute('type', 'test');
|
36 |
-
$this->setAttribute('
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
$this->compileCallable($compiler);
|
41 |
}
|
12 |
namespace Twig\Node\Expression;
|
13 |
|
14 |
use Twig\Compiler;
|
15 |
+
use Twig\TwigTest;
|
16 |
|
17 |
class TestExpression extends CallExpression
|
18 |
{
|
19 |
+
public function __construct(\Twig_NodeInterface $node, $name, ?\Twig_NodeInterface $arguments, $lineno)
|
20 |
{
|
21 |
$nodes = ['node' => $node];
|
22 |
if (null !== $arguments) {
|
33 |
|
34 |
$this->setAttribute('name', $name);
|
35 |
$this->setAttribute('type', 'test');
|
36 |
+
$this->setAttribute('thing', $test);
|
37 |
+
if ($test instanceof TwigTest) {
|
38 |
+
$this->setAttribute('arguments', $test->getArguments());
|
39 |
+
}
|
40 |
+
if ($test instanceof \Twig_TestCallableInterface || $test instanceof TwigTest) {
|
41 |
+
$this->setAttribute('callable', $test->getCallable());
|
42 |
+
}
|
43 |
+
if ($test instanceof TwigTest) {
|
44 |
+
$this->setAttribute('is_variadic', $test->isVariadic());
|
45 |
+
}
|
46 |
|
47 |
$this->compileCallable($compiler);
|
48 |
}
|
vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php
CHANGED
@@ -14,11 +14,10 @@ namespace Twig\Node\Expression\Unary;
|
|
14 |
|
15 |
use Twig\Compiler;
|
16 |
use Twig\Node\Expression\AbstractExpression;
|
17 |
-
use Twig\Node\Node;
|
18 |
|
19 |
abstract class AbstractUnary extends AbstractExpression
|
20 |
{
|
21 |
-
public function __construct(
|
22 |
{
|
23 |
parent::__construct(['node' => $node], [], $lineno);
|
24 |
}
|
14 |
|
15 |
use Twig\Compiler;
|
16 |
use Twig\Node\Expression\AbstractExpression;
|
|
|
17 |
|
18 |
abstract class AbstractUnary extends AbstractExpression
|
19 |
{
|
20 |
+
public function __construct(\Twig_NodeInterface $node, $lineno)
|
21 |
{
|
22 |
parent::__construct(['node' => $node], [], $lineno);
|
23 |
}
|
vendor/twig/twig/src/Node/Expression/VariadicExpression.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
namespace Twig\Node\Expression;
|
13 |
-
|
14 |
-
use Twig\Compiler;
|
15 |
-
|
16 |
-
class VariadicExpression extends ArrayExpression
|
17 |
-
{
|
18 |
-
public function compile(Compiler $compiler)
|
19 |
-
{
|
20 |
-
$compiler->raw('...');
|
21 |
-
|
22 |
-
parent::compile($compiler);
|
23 |
-
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/src/Node/FlushNode.php
CHANGED
@@ -20,7 +20,7 @@ use Twig\Compiler;
|
|
20 |
*/
|
21 |
class FlushNode extends Node
|
22 |
{
|
23 |
-
public function __construct(
|
24 |
{
|
25 |
parent::__construct([], [], $lineno, $tag);
|
26 |
}
|
20 |
*/
|
21 |
class FlushNode extends Node
|
22 |
{
|
23 |
+
public function __construct($lineno, $tag)
|
24 |
{
|
25 |
parent::__construct([], [], $lineno, $tag);
|
26 |
}
|
vendor/twig/twig/src/Node/ForLoopNode.php
CHANGED
@@ -20,7 +20,7 @@ use Twig\Compiler;
|
|
20 |
*/
|
21 |
class ForLoopNode extends Node
|
22 |
{
|
23 |
-
public function __construct(
|
24 |
{
|
25 |
parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag);
|
26 |
}
|
20 |
*/
|
21 |
class ForLoopNode extends Node
|
22 |
{
|
23 |
+
public function __construct($lineno, $tag = null)
|
24 |
{
|
25 |
parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag);
|
26 |
}
|
vendor/twig/twig/src/Node/ForNode.php
CHANGED
@@ -23,9 +23,9 @@ use Twig\Node\Expression\AssignNameExpression;
|
|
23 |
*/
|
24 |
class ForNode extends Node
|
25 |
{
|
26 |
-
|
27 |
|
28 |
-
public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?AbstractExpression $ifexpr,
|
29 |
{
|
30 |
$body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]);
|
31 |
|
23 |
*/
|
24 |
class ForNode extends Node
|
25 |
{
|
26 |
+
protected $loop;
|
27 |
|
28 |
+
public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?AbstractExpression $ifexpr, \Twig_NodeInterface $body, ?\Twig_NodeInterface $else, $lineno, $tag = null)
|
29 |
{
|
30 |
$body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]);
|
31 |
|
vendor/twig/twig/src/Node/IfNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Compiler;
|
|
21 |
*/
|
22 |
class IfNode extends Node
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
$nodes = ['tests' => $tests];
|
27 |
if (null !== $else) {
|
21 |
*/
|
22 |
class IfNode extends Node
|
23 |
{
|
24 |
+
public function __construct(\Twig_NodeInterface $tests, ?\Twig_NodeInterface $else, $lineno, $tag = null)
|
25 |
{
|
26 |
$nodes = ['tests' => $tests];
|
27 |
if (null !== $else) {
|
vendor/twig/twig/src/Node/ImportNode.php
CHANGED
@@ -22,28 +22,20 @@ use Twig\Node\Expression\NameExpression;
|
|
22 |
*/
|
23 |
class ImportNode extends Node
|
24 |
{
|
25 |
-
public function __construct(AbstractExpression $expr, AbstractExpression $var,
|
26 |
{
|
27 |
-
parent::__construct(['expr' => $expr, 'var' => $var], [
|
28 |
}
|
29 |
|
30 |
public function compile(Compiler $compiler)
|
31 |
{
|
32 |
$compiler
|
33 |
->addDebugInfo($this)
|
34 |
-
->write('
|
35 |
-
->
|
36 |
-
->raw('
|
37 |
;
|
38 |
|
39 |
-
if ($this->getAttribute('global')) {
|
40 |
-
$compiler
|
41 |
-
->raw('$this->macros[')
|
42 |
-
->repr($this->getNode('var')->getAttribute('name'))
|
43 |
-
->raw('] = ')
|
44 |
-
;
|
45 |
-
}
|
46 |
-
|
47 |
if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) {
|
48 |
$compiler->raw('$this');
|
49 |
} else {
|
22 |
*/
|
23 |
class ImportNode extends Node
|
24 |
{
|
25 |
+
public function __construct(AbstractExpression $expr, AbstractExpression $var, $lineno, $tag = null)
|
26 |
{
|
27 |
+
parent::__construct(['expr' => $expr, 'var' => $var], [], $lineno, $tag);
|
28 |
}
|
29 |
|
30 |
public function compile(Compiler $compiler)
|
31 |
{
|
32 |
$compiler
|
33 |
->addDebugInfo($this)
|
34 |
+
->write('')
|
35 |
+
->subcompile($this->getNode('var'))
|
36 |
+
->raw(' = ')
|
37 |
;
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) {
|
40 |
$compiler->raw('$this');
|
41 |
} else {
|
vendor/twig/twig/src/Node/IncludeNode.php
CHANGED
@@ -22,7 +22,7 @@ use Twig\Node\Expression\AbstractExpression;
|
|
22 |
*/
|
23 |
class IncludeNode extends Node implements NodeOutputInterface
|
24 |
{
|
25 |
-
public function __construct(AbstractExpression $expr, ?AbstractExpression $variables,
|
26 |
{
|
27 |
$nodes = ['expr' => $expr];
|
28 |
if (null !== $variables) {
|
22 |
*/
|
23 |
class IncludeNode extends Node implements NodeOutputInterface
|
24 |
{
|
25 |
+
public function __construct(AbstractExpression $expr, ?AbstractExpression $variables, $only, $ignoreMissing, $lineno, $tag = null)
|
26 |
{
|
27 |
$nodes = ['expr' => $expr];
|
28 |
if (null !== $variables) {
|
vendor/twig/twig/src/Node/MacroNode.php
CHANGED
@@ -23,7 +23,7 @@ class MacroNode extends Node
|
|
23 |
{
|
24 |
public const VARARGS_NAME = 'varargs';
|
25 |
|
26 |
-
public function __construct(
|
27 |
{
|
28 |
foreach ($arguments as $argumentName => $argument) {
|
29 |
if (self::VARARGS_NAME === $argumentName) {
|
@@ -38,7 +38,7 @@ class MacroNode extends Node
|
|
38 |
{
|
39 |
$compiler
|
40 |
->addDebugInfo($this)
|
41 |
-
->write(sprintf('public function
|
42 |
;
|
43 |
|
44 |
$count = \count($this->getNode('arguments'));
|
@@ -54,16 +54,21 @@ class MacroNode extends Node
|
|
54 |
}
|
55 |
}
|
56 |
|
57 |
-
if (
|
58 |
-
$
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
$compiler
|
62 |
-
->raw('...$__varargs__')
|
63 |
->raw(")\n")
|
64 |
->write("{\n")
|
65 |
->indent()
|
66 |
-
|
|
|
|
|
67 |
->write("\$context = \$this->env->mergeGlobals([\n")
|
68 |
->indent()
|
69 |
;
|
@@ -83,8 +88,19 @@ class MacroNode extends Node
|
|
83 |
->raw(' => ')
|
84 |
;
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
$compiler
|
87 |
-
->raw("\$__varargs__,\n")
|
88 |
->outdent()
|
89 |
->write("]);\n\n")
|
90 |
->write("\$blocks = [];\n\n")
|
@@ -98,14 +114,19 @@ class MacroNode extends Node
|
|
98 |
->write("try {\n")
|
99 |
->indent()
|
100 |
->subcompile($this->getNode('body'))
|
101 |
-
->raw("\n")
|
102 |
-
->write("return ('' === \$tmp = ob_get_contents()) ? '' : new Markup(\$tmp, \$this->env->getCharset());\n")
|
103 |
->outdent()
|
104 |
-
->write("}
|
105 |
->indent()
|
106 |
-
->write("ob_end_clean();\n")
|
|
|
107 |
->outdent()
|
108 |
-
->write("}\n")
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
->outdent()
|
110 |
->write("}\n\n")
|
111 |
;
|
23 |
{
|
24 |
public const VARARGS_NAME = 'varargs';
|
25 |
|
26 |
+
public function __construct($name, \Twig_NodeInterface $body, \Twig_NodeInterface $arguments, $lineno, $tag = null)
|
27 |
{
|
28 |
foreach ($arguments as $argumentName => $argument) {
|
29 |
if (self::VARARGS_NAME === $argumentName) {
|
38 |
{
|
39 |
$compiler
|
40 |
->addDebugInfo($this)
|
41 |
+
->write(sprintf('public function get%s(', $this->getAttribute('name')))
|
42 |
;
|
43 |
|
44 |
$count = \count($this->getNode('arguments'));
|
54 |
}
|
55 |
}
|
56 |
|
57 |
+
if (\PHP_VERSION_ID >= 50600) {
|
58 |
+
if ($count) {
|
59 |
+
$compiler->raw(', ');
|
60 |
+
}
|
61 |
+
|
62 |
+
$compiler->raw('...$__varargs__');
|
63 |
}
|
64 |
|
65 |
$compiler
|
|
|
66 |
->raw(")\n")
|
67 |
->write("{\n")
|
68 |
->indent()
|
69 |
+
;
|
70 |
+
|
71 |
+
$compiler
|
72 |
->write("\$context = \$this->env->mergeGlobals([\n")
|
73 |
->indent()
|
74 |
;
|
88 |
->raw(' => ')
|
89 |
;
|
90 |
|
91 |
+
if (\PHP_VERSION_ID >= 50600) {
|
92 |
+
$compiler->raw("\$__varargs__,\n");
|
93 |
+
} else {
|
94 |
+
$compiler
|
95 |
+
->raw('func_num_args() > ')
|
96 |
+
->repr($count)
|
97 |
+
->raw(' ? array_slice(func_get_args(), ')
|
98 |
+
->repr($count)
|
99 |
+
->raw(") : [],\n")
|
100 |
+
;
|
101 |
+
}
|
102 |
+
|
103 |
$compiler
|
|
|
104 |
->outdent()
|
105 |
->write("]);\n\n")
|
106 |
->write("\$blocks = [];\n\n")
|
114 |
->write("try {\n")
|
115 |
->indent()
|
116 |
->subcompile($this->getNode('body'))
|
|
|
|
|
117 |
->outdent()
|
118 |
+
->write("} catch (\Exception \$e) {\n")
|
119 |
->indent()
|
120 |
+
->write("ob_end_clean();\n\n")
|
121 |
+
->write("throw \$e;\n")
|
122 |
->outdent()
|
123 |
+
->write("} catch (\Throwable \$e) {\n")
|
124 |
+
->indent()
|
125 |
+
->write("ob_end_clean();\n\n")
|
126 |
+
->write("throw \$e;\n")
|
127 |
+
->outdent()
|
128 |
+
->write("}\n\n")
|
129 |
+
->write("return ('' === \$tmp = ob_get_clean()) ? '' : new Markup(\$tmp, \$this->env->getCharset());\n")
|
130 |
->outdent()
|
131 |
->write("}\n\n")
|
132 |
;
|
vendor/twig/twig/src/Node/ModuleNode.php
CHANGED
@@ -25,15 +25,16 @@ use Twig\Source;
|
|
25 |
* display_end, constructor_start, constructor_end, and class_end.
|
26 |
*
|
27 |
* @author Fabien Potencier <fabien@symfony.com>
|
28 |
-
*
|
29 |
-
* @final since Twig 2.4.0
|
30 |
*/
|
31 |
class ModuleNode extends Node
|
32 |
{
|
33 |
-
public function __construct(
|
34 |
{
|
35 |
-
if (
|
36 |
-
@trigger_error('
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
$nodes = [
|
@@ -53,11 +54,16 @@ class ModuleNode extends Node
|
|
53 |
|
54 |
// embedded templates are set as attributes so that they are only visited once by the visitors
|
55 |
parent::__construct($nodes, [
|
|
|
|
|
|
|
|
|
56 |
'index' => null,
|
57 |
'embedded_templates' => $embeddedTemplates,
|
58 |
], 1);
|
59 |
|
60 |
// populate the template name of all node children
|
|
|
61 |
$this->setSourceContext($source);
|
62 |
}
|
63 |
|
@@ -83,7 +89,16 @@ class ModuleNode extends Node
|
|
83 |
|
84 |
$this->compileClassHeader($compiler);
|
85 |
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
$this->compileGetParent($compiler);
|
89 |
|
@@ -99,6 +114,8 @@ class ModuleNode extends Node
|
|
99 |
|
100 |
$this->compileDebugInfo($compiler);
|
101 |
|
|
|
|
|
102 |
$this->compileGetSourceContext($compiler);
|
103 |
|
104 |
$this->compileClassFooter($compiler);
|
@@ -149,7 +166,6 @@ class ModuleNode extends Node
|
|
149 |
->write("use Twig\Environment;\n")
|
150 |
->write("use Twig\Error\LoaderError;\n")
|
151 |
->write("use Twig\Error\RuntimeError;\n")
|
152 |
-
->write("use Twig\Extension\SandboxExtension;\n")
|
153 |
->write("use Twig\Markup;\n")
|
154 |
->write("use Twig\Sandbox\SecurityError;\n")
|
155 |
->write("use Twig\Sandbox\SecurityNotAllowedTagError;\n")
|
@@ -163,11 +179,9 @@ class ModuleNode extends Node
|
|
163 |
// if the template name contains */, add a blank to avoid a PHP parse error
|
164 |
->write('/* '.str_replace('*/', '* /', $this->getSourceContext()->getName())." */\n")
|
165 |
->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(), $this->getAttribute('index')))
|
166 |
-
->raw(sprintf(" extends %s\n", $compiler->getEnvironment()->getBaseTemplateClass(
|
167 |
->write("{\n")
|
168 |
->indent()
|
169 |
-
->write("private \$source;\n")
|
170 |
-
->write("private \$macros = [];\n\n")
|
171 |
;
|
172 |
}
|
173 |
|
@@ -178,7 +192,6 @@ class ModuleNode extends Node
|
|
178 |
->indent()
|
179 |
->subcompile($this->getNode('constructor_start'))
|
180 |
->write("parent::__construct(\$env);\n\n")
|
181 |
-
->write("\$this->source = \$this->getSourceContext();\n\n")
|
182 |
;
|
183 |
|
184 |
// parent
|
@@ -190,24 +203,18 @@ class ModuleNode extends Node
|
|
190 |
if ($countTraits) {
|
191 |
// traits
|
192 |
foreach ($this->getNode('traits') as $i => $trait) {
|
193 |
-
$
|
194 |
|
|
|
195 |
$compiler
|
196 |
->addDebugInfo($node)
|
197 |
-
->write(sprintf('$_trait_%s = $this->loadTemplate(', $i))
|
198 |
-
->subcompile($node)
|
199 |
-
->raw(', ')
|
200 |
-
->repr($node->getTemplateName())
|
201 |
-
->raw(', ')
|
202 |
-
->repr($node->getTemplateLine())
|
203 |
-
->raw(");\n")
|
204 |
->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i))
|
205 |
->indent()
|
206 |
->write("throw new RuntimeError('Template \"'.")
|
207 |
->subcompile($trait->getNode('template'))
|
208 |
->raw(".'\" cannot be used as a trait.', ")
|
209 |
->repr($node->getTemplateLine())
|
210 |
-
->raw(", \$this->
|
211 |
->outdent()
|
212 |
->write("}\n")
|
213 |
->write(sprintf("\$_trait_%s_blocks = \$_trait_%s->getBlocks();\n\n", $i, $i))
|
@@ -219,13 +226,13 @@ class ModuleNode extends Node
|
|
219 |
->string($key)
|
220 |
->raw("])) {\n")
|
221 |
->indent()
|
222 |
-
->write("throw new RuntimeError('Block ")
|
223 |
->string($key)
|
224 |
->raw(' is not defined in trait ')
|
225 |
->subcompile($trait->getNode('template'))
|
226 |
-
->raw(".', ")
|
227 |
->repr($node->getTemplateLine())
|
228 |
-
->raw(", \$this->
|
229 |
->outdent()
|
230 |
->write("}\n\n")
|
231 |
|
@@ -311,7 +318,6 @@ class ModuleNode extends Node
|
|
311 |
$compiler
|
312 |
->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n")
|
313 |
->indent()
|
314 |
-
->write("\$macros = \$this->macros;\n")
|
315 |
->subcompile($this->getNode('display_start'))
|
316 |
->subcompile($this->getNode('body'))
|
317 |
;
|
@@ -434,6 +440,20 @@ class ModuleNode extends Node
|
|
434 |
;
|
435 |
}
|
436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
protected function compileGetSourceContext(Compiler $compiler)
|
438 |
{
|
439 |
$compiler
|
25 |
* display_end, constructor_start, constructor_end, and class_end.
|
26 |
*
|
27 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
28 |
*/
|
29 |
class ModuleNode extends Node
|
30 |
{
|
31 |
+
public function __construct(\Twig_NodeInterface $body, ?AbstractExpression $parent, \Twig_NodeInterface $blocks, \Twig_NodeInterface $macros, \Twig_NodeInterface $traits, $embeddedTemplates, $name, $source = '')
|
32 |
{
|
33 |
+
if (!$name instanceof Source) {
|
34 |
+
@trigger_error(sprintf('Passing a string as the $name argument of %s() is deprecated since version 1.27. Pass a \Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED);
|
35 |
+
$source = new Source($source, $name);
|
36 |
+
} else {
|
37 |
+
$source = $name;
|
38 |
}
|
39 |
|
40 |
$nodes = [
|
54 |
|
55 |
// embedded templates are set as attributes so that they are only visited once by the visitors
|
56 |
parent::__construct($nodes, [
|
57 |
+
// source to be remove in 2.0
|
58 |
+
'source' => $source->getCode(),
|
59 |
+
// filename to be remove in 2.0 (use getTemplateName() instead)
|
60 |
+
'filename' => $source->getName(),
|
61 |
'index' => null,
|
62 |
'embedded_templates' => $embeddedTemplates,
|
63 |
], 1);
|
64 |
|
65 |
// populate the template name of all node children
|
66 |
+
$this->setTemplateName($source->getName());
|
67 |
$this->setSourceContext($source);
|
68 |
}
|
69 |
|
89 |
|
90 |
$this->compileClassHeader($compiler);
|
91 |
|
92 |
+
if (
|
93 |
+
\count($this->getNode('blocks'))
|
94 |
+
|| \count($this->getNode('traits'))
|
95 |
+
|| !$this->hasNode('parent')
|
96 |
+
|| $this->getNode('parent') instanceof ConstantExpression
|
97 |
+
|| \count($this->getNode('constructor_start'))
|
98 |
+
|| \count($this->getNode('constructor_end'))
|
99 |
+
) {
|
100 |
+
$this->compileConstructor($compiler);
|
101 |
+
}
|
102 |
|
103 |
$this->compileGetParent($compiler);
|
104 |
|
114 |
|
115 |
$this->compileDebugInfo($compiler);
|
116 |
|
117 |
+
$this->compileGetSource($compiler);
|
118 |
+
|
119 |
$this->compileGetSourceContext($compiler);
|
120 |
|
121 |
$this->compileClassFooter($compiler);
|
166 |
->write("use Twig\Environment;\n")
|
167 |
->write("use Twig\Error\LoaderError;\n")
|
168 |
->write("use Twig\Error\RuntimeError;\n")
|
|
|
169 |
->write("use Twig\Markup;\n")
|
170 |
->write("use Twig\Sandbox\SecurityError;\n")
|
171 |
->write("use Twig\Sandbox\SecurityNotAllowedTagError;\n")
|
179 |
// if the template name contains */, add a blank to avoid a PHP parse error
|
180 |
->write('/* '.str_replace('*/', '* /', $this->getSourceContext()->getName())." */\n")
|
181 |
->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(), $this->getAttribute('index')))
|
182 |
+
->raw(sprintf(" extends %s\n", $compiler->getEnvironment()->getBaseTemplateClass()))
|
183 |
->write("{\n")
|
184 |
->indent()
|
|
|
|
|
185 |
;
|
186 |
}
|
187 |
|
192 |
->indent()
|
193 |
->subcompile($this->getNode('constructor_start'))
|
194 |
->write("parent::__construct(\$env);\n\n")
|
|
|
195 |
;
|
196 |
|
197 |
// parent
|
203 |
if ($countTraits) {
|
204 |
// traits
|
205 |
foreach ($this->getNode('traits') as $i => $trait) {
|
206 |
+
$this->compileLoadTemplate($compiler, $trait->getNode('template'), sprintf('$_trait_%s', $i));
|
207 |
|
208 |
+
$node = $trait->getNode('template');
|
209 |
$compiler
|
210 |
->addDebugInfo($node)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i))
|
212 |
->indent()
|
213 |
->write("throw new RuntimeError('Template \"'.")
|
214 |
->subcompile($trait->getNode('template'))
|
215 |
->raw(".'\" cannot be used as a trait.', ")
|
216 |
->repr($node->getTemplateLine())
|
217 |
+
->raw(", \$this->getSourceContext());\n")
|
218 |
->outdent()
|
219 |
->write("}\n")
|
220 |
->write(sprintf("\$_trait_%s_blocks = \$_trait_%s->getBlocks();\n\n", $i, $i))
|
226 |
->string($key)
|
227 |
->raw("])) {\n")
|
228 |
->indent()
|
229 |
+
->write("throw new RuntimeError(sprintf('Block ")
|
230 |
->string($key)
|
231 |
->raw(' is not defined in trait ')
|
232 |
->subcompile($trait->getNode('template'))
|
233 |
+
->raw(".'), ")
|
234 |
->repr($node->getTemplateLine())
|
235 |
+
->raw(", \$this->getSourceContext());\n")
|
236 |
->outdent()
|
237 |
->write("}\n\n")
|
238 |
|
318 |
$compiler
|
319 |
->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n")
|
320 |
->indent()
|
|
|
321 |
->subcompile($this->getNode('display_start'))
|
322 |
->subcompile($this->getNode('body'))
|
323 |
;
|
440 |
;
|
441 |
}
|
442 |
|
443 |
+
protected function compileGetSource(Compiler $compiler)
|
444 |
+
{
|
445 |
+
$compiler
|
446 |
+
->write("/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */\n")
|
447 |
+
->write("public function getSource()\n", "{\n")
|
448 |
+
->indent()
|
449 |
+
->write("@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);\n\n")
|
450 |
+
->write('return $this->getSourceContext()->getCode();')
|
451 |
+
->raw("\n")
|
452 |
+
->outdent()
|
453 |
+
->write("}\n\n")
|
454 |
+
;
|
455 |
+
}
|
456 |
+
|
457 |
protected function compileGetSourceContext(Compiler $compiler)
|
458 |
{
|
459 |
$compiler
|
vendor/twig/twig/src/Node/Node.php
CHANGED
@@ -20,7 +20,7 @@ use Twig\Source;
|
|
20 |
*
|
21 |
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
*/
|
23 |
-
class Node implements \
|
24 |
{
|
25 |
protected $nodes;
|
26 |
protected $attributes;
|
@@ -36,11 +36,11 @@ class Node implements \Countable, \IteratorAggregate
|
|
36 |
* @param int $lineno The line number
|
37 |
* @param string $tag The tag name associated with the Node
|
38 |
*/
|
39 |
-
public function __construct(array $nodes = [], array $attributes = [],
|
40 |
{
|
41 |
foreach ($nodes as $name => $node) {
|
42 |
-
if (!$node instanceof
|
43 |
-
|
44 |
}
|
45 |
}
|
46 |
$this->nodes = $nodes;
|
@@ -77,6 +77,41 @@ class Node implements \Countable, \IteratorAggregate
|
|
77 |
return implode("\n", $repr);
|
78 |
}
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
public function compile(Compiler $compiler)
|
81 |
{
|
82 |
foreach ($this->nodes as $node) {
|
@@ -89,6 +124,16 @@ class Node implements \Countable, \IteratorAggregate
|
|
89 |
return $this->lineno;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
public function getNodeTag()
|
93 |
{
|
94 |
return $this->tag;
|
@@ -133,7 +178,7 @@ class Node implements \Countable, \IteratorAggregate
|
|
133 |
*/
|
134 |
public function hasNode($name)
|
135 |
{
|
136 |
-
return
|
137 |
}
|
138 |
|
139 |
/**
|
@@ -141,15 +186,19 @@ class Node implements \Countable, \IteratorAggregate
|
|
141 |
*/
|
142 |
public function getNode($name)
|
143 |
{
|
144 |
-
if (
|
145 |
throw new \LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, static::class));
|
146 |
}
|
147 |
|
148 |
return $this->nodes[$name];
|
149 |
}
|
150 |
|
151 |
-
public function setNode($name,
|
152 |
{
|
|
|
|
|
|
|
|
|
153 |
$this->nodes[$name] = $node;
|
154 |
}
|
155 |
|
@@ -161,7 +210,6 @@ class Node implements \Countable, \IteratorAggregate
|
|
161 |
/**
|
162 |
* @return int
|
163 |
*/
|
164 |
-
#[\ReturnTypeWillChange]
|
165 |
public function count()
|
166 |
{
|
167 |
return \count($this->nodes);
|
@@ -170,47 +218,60 @@ class Node implements \Countable, \IteratorAggregate
|
|
170 |
/**
|
171 |
* @return \Traversable
|
172 |
*/
|
173 |
-
#[\ReturnTypeWillChange]
|
174 |
public function getIterator()
|
175 |
{
|
176 |
return new \ArrayIterator($this->nodes);
|
177 |
}
|
178 |
|
179 |
-
|
180 |
-
* @deprecated since 2.8 (to be removed in 3.0)
|
181 |
-
*/
|
182 |
-
public function setTemplateName($name/*, $triggerDeprecation = true */)
|
183 |
{
|
184 |
-
$triggerDeprecation = 2 > \func_num_args() || \func_get_arg(1);
|
185 |
-
if ($triggerDeprecation) {
|
186 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use setSourceContext() instead.', \E_USER_DEPRECATED);
|
187 |
-
}
|
188 |
-
|
189 |
$this->name = $name;
|
190 |
foreach ($this->nodes as $node) {
|
191 |
-
|
|
|
|
|
192 |
}
|
193 |
}
|
194 |
|
195 |
public function getTemplateName()
|
196 |
{
|
197 |
-
return $this->
|
198 |
}
|
199 |
|
200 |
public function setSourceContext(Source $source)
|
201 |
{
|
202 |
$this->sourceContext = $source;
|
203 |
foreach ($this->nodes as $node) {
|
204 |
-
$node
|
|
|
|
|
205 |
}
|
206 |
-
|
207 |
-
$this->setTemplateName($source->getName(), false);
|
208 |
}
|
209 |
|
210 |
public function getSourceContext()
|
211 |
{
|
212 |
return $this->sourceContext;
|
213 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
|
216 |
class_alias('Twig\Node\Node', 'Twig_Node');
|
20 |
*
|
21 |
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
*/
|
23 |
+
class Node implements \Twig_NodeInterface
|
24 |
{
|
25 |
protected $nodes;
|
26 |
protected $attributes;
|
36 |
* @param int $lineno The line number
|
37 |
* @param string $tag The tag name associated with the Node
|
38 |
*/
|
39 |
+
public function __construct(array $nodes = [], array $attributes = [], $lineno = 0, $tag = null)
|
40 |
{
|
41 |
foreach ($nodes as $name => $node) {
|
42 |
+
if (!$node instanceof \Twig_NodeInterface) {
|
43 |
+
@trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class), \E_USER_DEPRECATED);
|
44 |
}
|
45 |
}
|
46 |
$this->nodes = $nodes;
|
77 |
return implode("\n", $repr);
|
78 |
}
|
79 |
|
80 |
+
/**
|
81 |
+
* @deprecated since 1.16.1 (to be removed in 2.0)
|
82 |
+
*/
|
83 |
+
public function toXml($asDom = false)
|
84 |
+
{
|
85 |
+
@trigger_error(sprintf('%s is deprecated since version 1.16.1 and will be removed in 2.0.', __METHOD__), \E_USER_DEPRECATED);
|
86 |
+
|
87 |
+
$dom = new \DOMDocument('1.0', 'UTF-8');
|
88 |
+
$dom->formatOutput = true;
|
89 |
+
$dom->appendChild($xml = $dom->createElement('twig'));
|
90 |
+
|
91 |
+
$xml->appendChild($node = $dom->createElement('node'));
|
92 |
+
$node->setAttribute('class', static::class);
|
93 |
+
|
94 |
+
foreach ($this->attributes as $name => $value) {
|
95 |
+
$node->appendChild($attribute = $dom->createElement('attribute'));
|
96 |
+
$attribute->setAttribute('name', $name);
|
97 |
+
$attribute->appendChild($dom->createTextNode($value));
|
98 |
+
}
|
99 |
+
|
100 |
+
foreach ($this->nodes as $name => $n) {
|
101 |
+
if (null === $n) {
|
102 |
+
continue;
|
103 |
+
}
|
104 |
+
|
105 |
+
$child = $n->toXml(true)->getElementsByTagName('node')->item(0);
|
106 |
+
$child = $dom->importNode($child, true);
|
107 |
+
$child->setAttribute('name', $name);
|
108 |
+
|
109 |
+
$node->appendChild($child);
|
110 |
+
}
|
111 |
+
|
112 |
+
return $asDom ? $dom : $dom->saveXML();
|
113 |
+
}
|
114 |
+
|
115 |
public function compile(Compiler $compiler)
|
116 |
{
|
117 |
foreach ($this->nodes as $node) {
|
124 |
return $this->lineno;
|
125 |
}
|
126 |
|
127 |
+
/**
|
128 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
129 |
+
*/
|
130 |
+
public function getLine()
|
131 |
+
{
|
132 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getTemplateLine() instead.', \E_USER_DEPRECATED);
|
133 |
+
|
134 |
+
return $this->lineno;
|
135 |
+
}
|
136 |
+
|
137 |
public function getNodeTag()
|
138 |
{
|
139 |
return $this->tag;
|
178 |
*/
|
179 |
public function hasNode($name)
|
180 |
{
|
181 |
+
return \array_key_exists($name, $this->nodes);
|
182 |
}
|
183 |
|
184 |
/**
|
186 |
*/
|
187 |
public function getNode($name)
|
188 |
{
|
189 |
+
if (!\array_key_exists($name, $this->nodes)) {
|
190 |
throw new \LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, static::class));
|
191 |
}
|
192 |
|
193 |
return $this->nodes[$name];
|
194 |
}
|
195 |
|
196 |
+
public function setNode($name, $node = null)
|
197 |
{
|
198 |
+
if (!$node instanceof \Twig_NodeInterface) {
|
199 |
+
@trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class), \E_USER_DEPRECATED);
|
200 |
+
}
|
201 |
+
|
202 |
$this->nodes[$name] = $node;
|
203 |
}
|
204 |
|
210 |
/**
|
211 |
* @return int
|
212 |
*/
|
|
|
213 |
public function count()
|
214 |
{
|
215 |
return \count($this->nodes);
|
218 |
/**
|
219 |
* @return \Traversable
|
220 |
*/
|
|
|
221 |
public function getIterator()
|
222 |
{
|
223 |
return new \ArrayIterator($this->nodes);
|
224 |
}
|
225 |
|
226 |
+
public function setTemplateName($name)
|
|
|
|
|
|
|
227 |
{
|
|
|
|
|
|
|
|
|
|
|
228 |
$this->name = $name;
|
229 |
foreach ($this->nodes as $node) {
|
230 |
+
if (null !== $node) {
|
231 |
+
$node->setTemplateName($name);
|
232 |
+
}
|
233 |
}
|
234 |
}
|
235 |
|
236 |
public function getTemplateName()
|
237 |
{
|
238 |
+
return $this->name;
|
239 |
}
|
240 |
|
241 |
public function setSourceContext(Source $source)
|
242 |
{
|
243 |
$this->sourceContext = $source;
|
244 |
foreach ($this->nodes as $node) {
|
245 |
+
if ($node instanceof self) {
|
246 |
+
$node->setSourceContext($source);
|
247 |
+
}
|
248 |
}
|
|
|
|
|
249 |
}
|
250 |
|
251 |
public function getSourceContext()
|
252 |
{
|
253 |
return $this->sourceContext;
|
254 |
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
258 |
+
*/
|
259 |
+
public function setFilename($name)
|
260 |
+
{
|
261 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use setTemplateName() instead.', \E_USER_DEPRECATED);
|
262 |
+
|
263 |
+
$this->setTemplateName($name);
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
268 |
+
*/
|
269 |
+
public function getFilename()
|
270 |
+
{
|
271 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getTemplateName() instead.', \E_USER_DEPRECATED);
|
272 |
+
|
273 |
+
return $this->name;
|
274 |
+
}
|
275 |
}
|
276 |
|
277 |
class_alias('Twig\Node\Node', 'Twig_Node');
|
vendor/twig/twig/src/Node/PrintNode.php
CHANGED
@@ -22,7 +22,7 @@ use Twig\Node\Expression\AbstractExpression;
|
|
22 |
*/
|
23 |
class PrintNode extends Node implements NodeOutputInterface
|
24 |
{
|
25 |
-
public function __construct(AbstractExpression $expr,
|
26 |
{
|
27 |
parent::__construct(['expr' => $expr], [], $lineno, $tag);
|
28 |
}
|
22 |
*/
|
23 |
class PrintNode extends Node implements NodeOutputInterface
|
24 |
{
|
25 |
+
public function __construct(AbstractExpression $expr, $lineno, $tag = null)
|
26 |
{
|
27 |
parent::__construct(['expr' => $expr], [], $lineno, $tag);
|
28 |
}
|
vendor/twig/twig/src/Node/SandboxNode.php
CHANGED
@@ -20,7 +20,7 @@ use Twig\Compiler;
|
|
20 |
*/
|
21 |
class SandboxNode extends Node
|
22 |
{
|
23 |
-
public function __construct(
|
24 |
{
|
25 |
parent::__construct(['body' => $body], [], $lineno, $tag);
|
26 |
}
|
20 |
*/
|
21 |
class SandboxNode extends Node
|
22 |
{
|
23 |
+
public function __construct(\Twig_NodeInterface $body, $lineno, $tag = null)
|
24 |
{
|
25 |
parent::__construct(['body' => $body], [], $lineno, $tag);
|
26 |
}
|
vendor/twig/twig/src/Node/SandboxedPrintNode.php
CHANGED
@@ -13,6 +13,7 @@ namespace Twig\Node;
|
|
13 |
|
14 |
use Twig\Compiler;
|
15 |
use Twig\Node\Expression\ConstantExpression;
|
|
|
16 |
|
17 |
/**
|
18 |
* Adds a check for the __toString() method when the variable is an object and the sandbox is activated.
|
@@ -41,14 +42,28 @@ class SandboxedPrintNode extends PrintNode
|
|
41 |
;
|
42 |
} else {
|
43 |
$compiler
|
44 |
-
->write('$this->
|
45 |
->subcompile($expr)
|
46 |
-
->raw(
|
47 |
-
->repr($expr->getTemplateLine())
|
48 |
-
->raw(", \$this->source);\n")
|
49 |
;
|
50 |
}
|
51 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
class_alias('Twig\Node\SandboxedPrintNode', 'Twig_Node_SandboxedPrint');
|
13 |
|
14 |
use Twig\Compiler;
|
15 |
use Twig\Node\Expression\ConstantExpression;
|
16 |
+
use Twig\Node\Expression\FilterExpression;
|
17 |
|
18 |
/**
|
19 |
* Adds a check for the __toString() method when the variable is an object and the sandbox is activated.
|
42 |
;
|
43 |
} else {
|
44 |
$compiler
|
45 |
+
->write('$this->env->getExtension(\'\Twig\Extension\SandboxExtension\')->ensureToStringAllowed(')
|
46 |
->subcompile($expr)
|
47 |
+
->raw(");\n")
|
|
|
|
|
48 |
;
|
49 |
}
|
50 |
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Removes node filters.
|
54 |
+
*
|
55 |
+
* This is mostly needed when another visitor adds filters (like the escaper one).
|
56 |
+
*
|
57 |
+
* @return Node
|
58 |
+
*/
|
59 |
+
protected function removeNodeFilter(Node $node)
|
60 |
+
{
|
61 |
+
if ($node instanceof FilterExpression) {
|
62 |
+
return $this->removeNodeFilter($node->getNode('node'));
|
63 |
+
}
|
64 |
+
|
65 |
+
return $node;
|
66 |
+
}
|
67 |
}
|
68 |
|
69 |
class_alias('Twig\Node\SandboxedPrintNode', 'Twig_Node_SandboxedPrint');
|
vendor/twig/twig/src/Node/SetNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Node\Expression\ConstantExpression;
|
|
21 |
*/
|
22 |
class SetNode extends Node implements NodeCaptureInterface
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag);
|
27 |
|
21 |
*/
|
22 |
class SetNode extends Node implements NodeCaptureInterface
|
23 |
{
|
24 |
+
public function __construct($capture, \Twig_NodeInterface $names, \Twig_NodeInterface $values, $lineno, $tag = null)
|
25 |
{
|
26 |
parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag);
|
27 |
|
vendor/twig/twig/src/Node/SetTempNode.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Twig\Node;
|
13 |
+
|
14 |
+
use Twig\Compiler;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @internal
|
18 |
+
*/
|
19 |
+
class SetTempNode extends Node
|
20 |
+
{
|
21 |
+
public function __construct($name, $lineno)
|
22 |
+
{
|
23 |
+
parent::__construct([], ['name' => $name], $lineno);
|
24 |
+
}
|
25 |
+
|
26 |
+
public function compile(Compiler $compiler)
|
27 |
+
{
|
28 |
+
$name = $this->getAttribute('name');
|
29 |
+
$compiler
|
30 |
+
->addDebugInfo($this)
|
31 |
+
->write('if (isset($context[')
|
32 |
+
->string($name)
|
33 |
+
->raw('])) { $_')
|
34 |
+
->raw($name)
|
35 |
+
->raw('_ = $context[')
|
36 |
+
->repr($name)
|
37 |
+
->raw(']; } else { $_')
|
38 |
+
->raw($name)
|
39 |
+
->raw("_ = null; }\n")
|
40 |
+
;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
class_alias('Twig\Node\SetTempNode', 'Twig_Node_SetTemp');
|
vendor/twig/twig/src/Node/SpacelessNode.php
CHANGED
@@ -18,13 +18,11 @@ use Twig\Compiler;
|
|
18 |
*
|
19 |
* It removes spaces between HTML tags.
|
20 |
*
|
21 |
-
* @deprecated since Twig 2.7, to be removed in 3.0
|
22 |
-
*
|
23 |
* @author Fabien Potencier <fabien@symfony.com>
|
24 |
*/
|
25 |
-
class SpacelessNode extends Node
|
26 |
{
|
27 |
-
public function __construct(
|
28 |
{
|
29 |
parent::__construct(['body' => $body], [], $lineno, $tag);
|
30 |
}
|
18 |
*
|
19 |
* It removes spaces between HTML tags.
|
20 |
*
|
|
|
|
|
21 |
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
*/
|
23 |
+
class SpacelessNode extends Node
|
24 |
{
|
25 |
+
public function __construct(\Twig_NodeInterface $body, $lineno, $tag = 'spaceless')
|
26 |
{
|
27 |
parent::__construct(['body' => $body], [], $lineno, $tag);
|
28 |
}
|
vendor/twig/twig/src/Node/TextNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Compiler;
|
|
21 |
*/
|
22 |
class TextNode extends Node implements NodeOutputInterface
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
parent::__construct([], ['data' => $data], $lineno);
|
27 |
}
|
21 |
*/
|
22 |
class TextNode extends Node implements NodeOutputInterface
|
23 |
{
|
24 |
+
public function __construct($data, $lineno)
|
25 |
{
|
26 |
parent::__construct([], ['data' => $data], $lineno);
|
27 |
}
|
vendor/twig/twig/src/Node/WithNode.php
CHANGED
@@ -20,14 +20,14 @@ use Twig\Compiler;
|
|
20 |
*/
|
21 |
class WithNode extends Node
|
22 |
{
|
23 |
-
public function __construct(Node $body, ?Node $variables,
|
24 |
{
|
25 |
$nodes = ['body' => $body];
|
26 |
if (null !== $variables) {
|
27 |
$nodes['variables'] = $variables;
|
28 |
}
|
29 |
|
30 |
-
parent::__construct($nodes, ['only' => $only], $lineno, $tag);
|
31 |
}
|
32 |
|
33 |
public function compile(Compiler $compiler)
|
20 |
*/
|
21 |
class WithNode extends Node
|
22 |
{
|
23 |
+
public function __construct(Node $body, ?Node $variables, $only, $lineno, $tag = null)
|
24 |
{
|
25 |
$nodes = ['body' => $body];
|
26 |
if (null !== $variables) {
|
27 |
$nodes['variables'] = $variables;
|
28 |
}
|
29 |
|
30 |
+
parent::__construct($nodes, ['only' => (bool) $only], $lineno, $tag);
|
31 |
}
|
32 |
|
33 |
public function compile(Compiler $compiler)
|
vendor/twig/twig/src/NodeTraverser.php
CHANGED
@@ -11,7 +11,6 @@
|
|
11 |
|
12 |
namespace Twig;
|
13 |
|
14 |
-
use Twig\Node\Node;
|
15 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
16 |
|
17 |
/**
|
@@ -19,12 +18,14 @@ use Twig\NodeVisitor\NodeVisitorInterface;
|
|
19 |
*
|
20 |
* It visits all nodes and their children and calls the given visitor for each.
|
21 |
*
|
|
|
|
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
*/
|
24 |
-
|
25 |
{
|
26 |
-
|
27 |
-
|
28 |
|
29 |
/**
|
30 |
* @param NodeVisitorInterface[] $visitors
|
@@ -44,8 +45,10 @@ final class NodeTraverser
|
|
44 |
|
45 |
/**
|
46 |
* Traverses a node and calls the registered visitors.
|
|
|
|
|
47 |
*/
|
48 |
-
public function traverse(
|
49 |
{
|
50 |
ksort($this->visitors);
|
51 |
foreach ($this->visitors as $visitors) {
|
@@ -57,23 +60,24 @@ final class NodeTraverser
|
|
57 |
return $node;
|
58 |
}
|
59 |
|
60 |
-
|
61 |
-
* @return Node|null
|
62 |
-
*/
|
63 |
-
private function traverseForVisitor(NodeVisitorInterface $visitor, Node $node)
|
64 |
{
|
|
|
|
|
|
|
|
|
65 |
$node = $visitor->enterNode($node, $this->env);
|
66 |
|
67 |
foreach ($node as $k => $n) {
|
|
|
|
|
|
|
|
|
68 |
if (false !== ($m = $this->traverseForVisitor($visitor, $n)) && null !== $m) {
|
69 |
if ($m !== $n) {
|
70 |
$node->setNode($k, $m);
|
71 |
}
|
72 |
} else {
|
73 |
-
if (false === $m) {
|
74 |
-
@trigger_error('Returning "false" to remove a Node from NodeVisitorInterface::leaveNode() is deprecated since Twig version 2.9; return "null" instead.', \E_USER_DEPRECATED);
|
75 |
-
}
|
76 |
-
|
77 |
$node->removeNode($k);
|
78 |
}
|
79 |
}
|
11 |
|
12 |
namespace Twig;
|
13 |
|
|
|
14 |
use Twig\NodeVisitor\NodeVisitorInterface;
|
15 |
|
16 |
/**
|
18 |
*
|
19 |
* It visits all nodes and their children and calls the given visitor for each.
|
20 |
*
|
21 |
+
* @final
|
22 |
+
*
|
23 |
* @author Fabien Potencier <fabien@symfony.com>
|
24 |
*/
|
25 |
+
class NodeTraverser
|
26 |
{
|
27 |
+
protected $env;
|
28 |
+
protected $visitors = [];
|
29 |
|
30 |
/**
|
31 |
* @param NodeVisitorInterface[] $visitors
|
45 |
|
46 |
/**
|
47 |
* Traverses a node and calls the registered visitors.
|
48 |
+
*
|
49 |
+
* @return \Twig_NodeInterface
|
50 |
*/
|
51 |
+
public function traverse(\Twig_NodeInterface $node)
|
52 |
{
|
53 |
ksort($this->visitors);
|
54 |
foreach ($this->visitors as $visitors) {
|
60 |
return $node;
|
61 |
}
|
62 |
|
63 |
+
protected function traverseForVisitor(NodeVisitorInterface $visitor, \Twig_NodeInterface $node = null)
|
|
|
|
|
|
|
64 |
{
|
65 |
+
if (null === $node) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
$node = $visitor->enterNode($node, $this->env);
|
70 |
|
71 |
foreach ($node as $k => $n) {
|
72 |
+
if (null === $n) {
|
73 |
+
continue;
|
74 |
+
}
|
75 |
+
|
76 |
if (false !== ($m = $this->traverseForVisitor($visitor, $n)) && null !== $m) {
|
77 |
if ($m !== $n) {
|
78 |
$node->setNode($k, $m);
|
79 |
}
|
80 |
} else {
|
|
|
|
|
|
|
|
|
81 |
$node->removeNode($k);
|
82 |
}
|
83 |
}
|
vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php
CHANGED
@@ -23,13 +23,21 @@ use Twig\Node\Node;
|
|
23 |
*/
|
24 |
abstract class AbstractNodeVisitor implements NodeVisitorInterface
|
25 |
{
|
26 |
-
final public function enterNode(
|
27 |
{
|
|
|
|
|
|
|
|
|
28 |
return $this->doEnterNode($node, $env);
|
29 |
}
|
30 |
|
31 |
-
final public function leaveNode(
|
32 |
{
|
|
|
|
|
|
|
|
|
33 |
return $this->doLeaveNode($node, $env);
|
34 |
}
|
35 |
|
@@ -43,7 +51,7 @@ abstract class AbstractNodeVisitor implements NodeVisitorInterface
|
|
43 |
/**
|
44 |
* Called after child nodes are visited.
|
45 |
*
|
46 |
-
* @return Node|null The modified node or null if the node must be removed
|
47 |
*/
|
48 |
abstract protected function doLeaveNode(Node $node, Environment $env);
|
49 |
}
|
23 |
*/
|
24 |
abstract class AbstractNodeVisitor implements NodeVisitorInterface
|
25 |
{
|
26 |
+
final public function enterNode(\Twig_NodeInterface $node, Environment $env)
|
27 |
{
|
28 |
+
if (!$node instanceof Node) {
|
29 |
+
throw new \LogicException(sprintf('%s only supports \Twig\Node\Node instances.', __CLASS__));
|
30 |
+
}
|
31 |
+
|
32 |
return $this->doEnterNode($node, $env);
|
33 |
}
|
34 |
|
35 |
+
final public function leaveNode(\Twig_NodeInterface $node, Environment $env)
|
36 |
{
|
37 |
+
if (!$node instanceof Node) {
|
38 |
+
throw new \LogicException(sprintf('%s only supports \Twig\Node\Node instances.', __CLASS__));
|
39 |
+
}
|
40 |
+
|
41 |
return $this->doLeaveNode($node, $env);
|
42 |
}
|
43 |
|
51 |
/**
|
52 |
* Called after child nodes are visited.
|
53 |
*
|
54 |
+
* @return Node|false|null The modified node or null if the node must be removed
|
55 |
*/
|
56 |
abstract protected function doLeaveNode(Node $node, Environment $env);
|
57 |
}
|
vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
namespace Twig\NodeVisitor;
|
13 |
|
14 |
use Twig\Environment;
|
15 |
-
use Twig\Extension\EscaperExtension;
|
16 |
use Twig\Node\AutoEscapeNode;
|
17 |
use Twig\Node\BlockNode;
|
18 |
use Twig\Node\BlockReferenceNode;
|
@@ -28,16 +27,18 @@ use Twig\Node\PrintNode;
|
|
28 |
use Twig\NodeTraverser;
|
29 |
|
30 |
/**
|
|
|
|
|
31 |
* @author Fabien Potencier <fabien@symfony.com>
|
32 |
*/
|
33 |
-
|
34 |
{
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
|
42 |
public function __construct()
|
43 |
{
|
@@ -47,7 +48,7 @@ final class EscaperNodeVisitor extends AbstractNodeVisitor
|
|
47 |
protected function doEnterNode(Node $node, Environment $env)
|
48 |
{
|
49 |
if ($node instanceof ModuleNode) {
|
50 |
-
if ($env->hasExtension(EscaperExtension
|
51 |
$this->defaultStrategy = $defaultStrategy;
|
52 |
}
|
53 |
$this->safeVars = [];
|
@@ -127,7 +128,7 @@ final class EscaperNodeVisitor extends AbstractNodeVisitor
|
|
127 |
return new InlinePrint($this->getEscaperFilter($type, $expression), $node->getTemplateLine());
|
128 |
}
|
129 |
|
130 |
-
|
131 |
{
|
132 |
if (false === $type) {
|
133 |
return $node;
|
@@ -144,7 +145,7 @@ final class EscaperNodeVisitor extends AbstractNodeVisitor
|
|
144 |
return new $class($this->getEscaperFilter($type, $expression), $node->getTemplateLine());
|
145 |
}
|
146 |
|
147 |
-
|
148 |
{
|
149 |
$name = $filter->getNode('filter')->getAttribute('value');
|
150 |
|
@@ -163,7 +164,7 @@ final class EscaperNodeVisitor extends AbstractNodeVisitor
|
|
163 |
return $filter;
|
164 |
}
|
165 |
|
166 |
-
|
167 |
{
|
168 |
$safe = $this->safeAnalysis->getSafe($expression);
|
169 |
|
@@ -181,7 +182,7 @@ final class EscaperNodeVisitor extends AbstractNodeVisitor
|
|
181 |
return \in_array($type, $safe) || \in_array('all', $safe);
|
182 |
}
|
183 |
|
184 |
-
|
185 |
{
|
186 |
if (\count($this->statusStack)) {
|
187 |
return $this->statusStack[\count($this->statusStack) - 1];
|
@@ -190,7 +191,7 @@ final class EscaperNodeVisitor extends AbstractNodeVisitor
|
|
190 |
return $this->defaultStrategy ? $this->defaultStrategy : false;
|
191 |
}
|
192 |
|
193 |
-
|
194 |
{
|
195 |
$line = $node->getTemplateLine();
|
196 |
$name = new ConstantExpression('escape', $line);
|
12 |
namespace Twig\NodeVisitor;
|
13 |
|
14 |
use Twig\Environment;
|
|
|
15 |
use Twig\Node\AutoEscapeNode;
|
16 |
use Twig\Node\BlockNode;
|
17 |
use Twig\Node\BlockReferenceNode;
|
27 |
use Twig\NodeTraverser;
|
28 |
|
29 |
/**
|
30 |
+
* @final
|
31 |
+
*
|
32 |
* @author Fabien Potencier <fabien@symfony.com>
|
33 |
*/
|
34 |
+
class EscaperNodeVisitor extends AbstractNodeVisitor
|
35 |
{
|
36 |
+
protected $statusStack = [];
|
37 |
+
protected $blocks = [];
|
38 |
+
protected $safeAnalysis;
|
39 |
+
protected $traverser;
|
40 |
+
protected $defaultStrategy = false;
|
41 |
+
protected $safeVars = [];
|
42 |
|
43 |
public function __construct()
|
44 |
{
|
48 |
protected function doEnterNode(Node $node, Environment $env)
|
49 |
{
|
50 |
if ($node instanceof ModuleNode) {
|
51 |
+
if ($env->hasExtension('\Twig\Extension\EscaperExtension') && $defaultStrategy = $env->getExtension('\Twig\Extension\EscaperExtension')->getDefaultStrategy($node->getTemplateName())) {
|
52 |
$this->defaultStrategy = $defaultStrategy;
|
53 |
}
|
54 |
$this->safeVars = [];
|
128 |
return new InlinePrint($this->getEscaperFilter($type, $expression), $node->getTemplateLine());
|
129 |
}
|
130 |
|
131 |
+
protected function escapePrintNode(PrintNode $node, Environment $env, $type)
|
132 |
{
|
133 |
if (false === $type) {
|
134 |
return $node;
|
145 |
return new $class($this->getEscaperFilter($type, $expression), $node->getTemplateLine());
|
146 |
}
|
147 |
|
148 |
+
protected function preEscapeFilterNode(FilterExpression $filter, Environment $env)
|
149 |
{
|
150 |
$name = $filter->getNode('filter')->getAttribute('value');
|
151 |
|
164 |
return $filter;
|
165 |
}
|
166 |
|
167 |
+
protected function isSafeFor($type, \Twig_NodeInterface $expression, $env)
|
168 |
{
|
169 |
$safe = $this->safeAnalysis->getSafe($expression);
|
170 |
|
182 |
return \in_array($type, $safe) || \in_array('all', $safe);
|
183 |
}
|
184 |
|
185 |
+
protected function needEscaping(Environment $env)
|
186 |
{
|
187 |
if (\count($this->statusStack)) {
|
188 |
return $this->statusStack[\count($this->statusStack) - 1];
|
191 |
return $this->defaultStrategy ? $this->defaultStrategy : false;
|
192 |
}
|
193 |
|
194 |
+
protected function getEscaperFilter($type, \Twig_NodeInterface $node)
|
195 |
{
|
196 |
$line = $node->getTemplateLine();
|
197 |
$name = new ConstantExpression('escape', $line);
|
vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) Fabien Potencier
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
namespace Twig\NodeVisitor;
|
13 |
-
|
14 |
-
use Twig\Environment;
|
15 |
-
use Twig\Node\Expression\AssignNameExpression;
|
16 |
-
use Twig\Node\Expression\ConstantExpression;
|
17 |
-
use Twig\Node\Expression\GetAttrExpression;
|
18 |
-
use Twig\Node\Expression\MethodCallExpression;
|
19 |
-
use Twig\Node\Expression\NameExpression;
|
20 |
-
use Twig\Node\ImportNode;
|
21 |
-
use Twig\Node\ModuleNode;
|
22 |
-
use Twig\Node\Node;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @author Fabien Potencier <fabien@symfony.com>
|
26 |
-
*/
|
27 |
-
final class MacroAutoImportNodeVisitor implements NodeVisitorInterface
|
28 |
-
{
|
29 |
-
private $inAModule = false;
|
30 |
-
private $hasMacroCalls = false;
|
31 |
-
|
32 |
-
public function enterNode(Node $node, Environment $env)
|
33 |
-
{
|
34 |
-
if ($node instanceof ModuleNode) {
|
35 |
-
$this->inAModule = true;
|
36 |
-
$this->hasMacroCalls = false;
|
37 |
-
}
|
38 |
-
|
39 |
-
return $node;
|
40 |
-
}
|
41 |
-
|
42 |
-
public function leaveNode(Node $node, Environment $env)
|
43 |
-
{
|
44 |
-
if ($node instanceof ModuleNode) {
|
45 |
-
$this->inAModule = false;
|
46 |
-
if ($this->hasMacroCalls) {
|
47 |
-
$node->getNode('constructor_end')->setNode('_auto_macro_import', new ImportNode(new NameExpression('_self', 0), new AssignNameExpression('_self', 0), 0, 'import', true));
|
48 |
-
}
|
49 |
-
} elseif ($this->inAModule) {
|
50 |
-
if (
|
51 |
-
$node instanceof GetAttrExpression &&
|
52 |
-
$node->getNode('node') instanceof NameExpression &&
|
53 |
-
'_self' === $node->getNode('node')->getAttribute('name') &&
|
54 |
-
$node->getNode('attribute') instanceof ConstantExpression
|
55 |
-
) {
|
56 |
-
$this->hasMacroCalls = true;
|
57 |
-
|
58 |
-
$name = $node->getNode('attribute')->getAttribute('value');
|
59 |
-
$node = new MethodCallExpression($node->getNode('node'), 'macro_'.$name, $node->getNode('arguments'), $node->getTemplateLine());
|
60 |
-
$node->setAttribute('safe', true);
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
return $node;
|
65 |
-
}
|
66 |
-
|
67 |
-
public function getPriority()
|
68 |
-
{
|
69 |
-
// we must be ran before auto-escaping
|
70 |
-
return -10;
|
71 |
-
}
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
namespace Twig\NodeVisitor;
|
13 |
|
14 |
use Twig\Environment;
|
15 |
-
use Twig\Node\Node;
|
16 |
|
17 |
/**
|
18 |
* Interface for node visitor classes.
|
@@ -24,16 +23,16 @@ interface NodeVisitorInterface
|
|
24 |
/**
|
25 |
* Called before child nodes are visited.
|
26 |
*
|
27 |
-
* @return
|
28 |
*/
|
29 |
-
public function enterNode(
|
30 |
|
31 |
/**
|
32 |
* Called after child nodes are visited.
|
33 |
*
|
34 |
-
* @return
|
35 |
*/
|
36 |
-
public function leaveNode(
|
37 |
|
38 |
/**
|
39 |
* Returns the priority for this visitor.
|
12 |
namespace Twig\NodeVisitor;
|
13 |
|
14 |
use Twig\Environment;
|
|
|
15 |
|
16 |
/**
|
17 |
* Interface for node visitor classes.
|
23 |
/**
|
24 |
* Called before child nodes are visited.
|
25 |
*
|
26 |
+
* @return \Twig_NodeInterface The modified node
|
27 |
*/
|
28 |
+
public function enterNode(\Twig_NodeInterface $node, Environment $env);
|
29 |
|
30 |
/**
|
31 |
* Called after child nodes are visited.
|
32 |
*
|
33 |
+
* @return \Twig_NodeInterface|false|null The modified node or null if the node must be removed
|
34 |
*/
|
35 |
+
public function leaveNode(\Twig_NodeInterface $node, Environment $env);
|
36 |
|
37 |
/**
|
38 |
* Returns the priority for this visitor.
|
vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php
CHANGED
@@ -13,6 +13,8 @@ namespace Twig\NodeVisitor;
|
|
13 |
|
14 |
use Twig\Environment;
|
15 |
use Twig\Node\BlockReferenceNode;
|
|
|
|
|
16 |
use Twig\Node\Expression\BlockReferenceExpression;
|
17 |
use Twig\Node\Expression\ConstantExpression;
|
18 |
use Twig\Node\Expression\FilterExpression;
|
@@ -20,10 +22,12 @@ use Twig\Node\Expression\FunctionExpression;
|
|
20 |
use Twig\Node\Expression\GetAttrExpression;
|
21 |
use Twig\Node\Expression\NameExpression;
|
22 |
use Twig\Node\Expression\ParentExpression;
|
|
|
23 |
use Twig\Node\ForNode;
|
24 |
use Twig\Node\IncludeNode;
|
25 |
use Twig\Node\Node;
|
26 |
use Twig\Node\PrintNode;
|
|
|
27 |
|
28 |
/**
|
29 |
* Tries to optimize the AST.
|
@@ -33,25 +37,28 @@ use Twig\Node\PrintNode;
|
|
33 |
* You can configure which optimizations you want to activate via the
|
34 |
* optimizer mode.
|
35 |
*
|
|
|
|
|
36 |
* @author Fabien Potencier <fabien@symfony.com>
|
37 |
*/
|
38 |
-
|
39 |
{
|
40 |
public const OPTIMIZE_ALL = -1;
|
41 |
public const OPTIMIZE_NONE = 0;
|
42 |
public const OPTIMIZE_FOR = 2;
|
43 |
public const OPTIMIZE_RAW_FILTER = 4;
|
44 |
-
// obsolete, does not do anything
|
45 |
public const OPTIMIZE_VAR_ACCESS = 8;
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
50 |
|
51 |
/**
|
52 |
* @param int $optimizers The optimizer mode
|
53 |
*/
|
54 |
-
public function __construct(
|
55 |
{
|
56 |
if (!\is_int($optimizers) || $optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER | self::OPTIMIZE_VAR_ACCESS)) {
|
57 |
throw new \InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers));
|
@@ -66,11 +73,27 @@ final class OptimizerNodeVisitor extends AbstractNodeVisitor
|
|
66 |
$this->enterOptimizeFor($node, $env);
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
return $node;
|
70 |
}
|
71 |
|
72 |
protected function doLeaveNode(Node $node, Environment $env)
|
73 |
{
|
|
|
|
|
74 |
if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) {
|
75 |
$this->leaveOptimizeFor($node, $env);
|
76 |
}
|
@@ -81,6 +104,33 @@ final class OptimizerNodeVisitor extends AbstractNodeVisitor
|
|
81 |
|
82 |
$node = $this->optimizePrintNode($node, $env);
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
return $node;
|
85 |
}
|
86 |
|
@@ -90,8 +140,10 @@ final class OptimizerNodeVisitor extends AbstractNodeVisitor
|
|
90 |
* It replaces:
|
91 |
*
|
92 |
* * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()"
|
|
|
|
|
93 |
*/
|
94 |
-
|
95 |
{
|
96 |
if (!$node instanceof PrintNode) {
|
97 |
return $node;
|
@@ -112,8 +164,10 @@ final class OptimizerNodeVisitor extends AbstractNodeVisitor
|
|
112 |
|
113 |
/**
|
114 |
* Removes "raw" filters.
|
|
|
|
|
115 |
*/
|
116 |
-
|
117 |
{
|
118 |
if ($node instanceof FilterExpression && 'raw' == $node->getNode('filter')->getAttribute('value')) {
|
119 |
return $node->getNode('node');
|
@@ -125,7 +179,7 @@ final class OptimizerNodeVisitor extends AbstractNodeVisitor
|
|
125 |
/**
|
126 |
* Optimizes "for" tag by removing the "loop" variable creation whenever possible.
|
127 |
*/
|
128 |
-
|
129 |
{
|
130 |
if ($node instanceof ForNode) {
|
131 |
// disable the loop variable by default
|
@@ -189,7 +243,7 @@ final class OptimizerNodeVisitor extends AbstractNodeVisitor
|
|
189 |
/**
|
190 |
* Optimizes "for" tag by removing the "loop" variable creation whenever possible.
|
191 |
*/
|
192 |
-
|
193 |
{
|
194 |
if ($node instanceof ForNode) {
|
195 |
array_shift($this->loops);
|
@@ -198,12 +252,12 @@ final class OptimizerNodeVisitor extends AbstractNodeVisitor
|
|
198 |
}
|
199 |
}
|
200 |
|
201 |
-
|
202 |
{
|
203 |
$this->loops[0]->setAttribute('with_loop', true);
|
204 |
}
|
205 |
|
206 |
-
|
207 |
{
|
208 |
foreach ($this->loops as $loop) {
|
209 |
$loop->setAttribute('with_loop', true);
|
13 |
|
14 |
use Twig\Environment;
|
15 |
use Twig\Node\BlockReferenceNode;
|
16 |
+
use Twig\Node\BodyNode;
|
17 |
+
use Twig\Node\Expression\AbstractExpression;
|
18 |
use Twig\Node\Expression\BlockReferenceExpression;
|
19 |
use Twig\Node\Expression\ConstantExpression;
|
20 |
use Twig\Node\Expression\FilterExpression;
|
22 |
use Twig\Node\Expression\GetAttrExpression;
|
23 |
use Twig\Node\Expression\NameExpression;
|
24 |
use Twig\Node\Expression\ParentExpression;
|
25 |
+
use Twig\Node\Expression\TempNameExpression;
|
26 |
use Twig\Node\ForNode;
|
27 |
use Twig\Node\IncludeNode;
|
28 |
use Twig\Node\Node;
|
29 |
use Twig\Node\PrintNode;
|
30 |
+
use Twig\Node\SetTempNode;
|
31 |
|
32 |
/**
|
33 |
* Tries to optimize the AST.
|
37 |
* You can configure which optimizations you want to activate via the
|
38 |
* optimizer mode.
|
39 |
*
|
40 |
+
* @final
|
41 |
+
*
|
42 |
* @author Fabien Potencier <fabien@symfony.com>
|
43 |
*/
|
44 |
+
class OptimizerNodeVisitor extends AbstractNodeVisitor
|
45 |
{
|
46 |
public const OPTIMIZE_ALL = -1;
|
47 |
public const OPTIMIZE_NONE = 0;
|
48 |
public const OPTIMIZE_FOR = 2;
|
49 |
public const OPTIMIZE_RAW_FILTER = 4;
|
|
|
50 |
public const OPTIMIZE_VAR_ACCESS = 8;
|
51 |
|
52 |
+
protected $loops = [];
|
53 |
+
protected $loopsTargets = [];
|
54 |
+
protected $optimizers;
|
55 |
+
protected $prependedNodes = [];
|
56 |
+
protected $inABody = false;
|
57 |
|
58 |
/**
|
59 |
* @param int $optimizers The optimizer mode
|
60 |
*/
|
61 |
+
public function __construct($optimizers = -1)
|
62 |
{
|
63 |
if (!\is_int($optimizers) || $optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER | self::OPTIMIZE_VAR_ACCESS)) {
|
64 |
throw new \InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers));
|
73 |
$this->enterOptimizeFor($node, $env);
|
74 |
}
|
75 |
|
76 |
+
if (\PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('\Twig\Extension\SandboxExtension')) {
|
77 |
+
if ($this->inABody) {
|
78 |
+
if (!$node instanceof AbstractExpression) {
|
79 |
+
if ('Twig_Node' !== \get_class($node)) {
|
80 |
+
array_unshift($this->prependedNodes, []);
|
81 |
+
}
|
82 |
+
} else {
|
83 |
+
$node = $this->optimizeVariables($node, $env);
|
84 |
+
}
|
85 |
+
} elseif ($node instanceof BodyNode) {
|
86 |
+
$this->inABody = true;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
return $node;
|
91 |
}
|
92 |
|
93 |
protected function doLeaveNode(Node $node, Environment $env)
|
94 |
{
|
95 |
+
$expression = $node instanceof AbstractExpression;
|
96 |
+
|
97 |
if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) {
|
98 |
$this->leaveOptimizeFor($node, $env);
|
99 |
}
|
104 |
|
105 |
$node = $this->optimizePrintNode($node, $env);
|
106 |
|
107 |
+
if (self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('\Twig\Extension\SandboxExtension')) {
|
108 |
+
if ($node instanceof BodyNode) {
|
109 |
+
$this->inABody = false;
|
110 |
+
} elseif ($this->inABody) {
|
111 |
+
if (!$expression && 'Twig_Node' !== \get_class($node) && $prependedNodes = array_shift($this->prependedNodes)) {
|
112 |
+
$nodes = [];
|
113 |
+
foreach (array_unique($prependedNodes) as $name) {
|
114 |
+
$nodes[] = new SetTempNode($name, $node->getTemplateLine());
|
115 |
+
}
|
116 |
+
|
117 |
+
$nodes[] = $node;
|
118 |
+
$node = new Node($nodes);
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
return $node;
|
124 |
+
}
|
125 |
+
|
126 |
+
protected function optimizeVariables(\Twig_NodeInterface $node, Environment $env)
|
127 |
+
{
|
128 |
+
if ('Twig_Node_Expression_Name' === \get_class($node) && $node->isSimple()) {
|
129 |
+
$this->prependedNodes[0][] = $node->getAttribute('name');
|
130 |
+
|
131 |
+
return new TempNameExpression($node->getAttribute('name'), $node->getTemplateLine());
|
132 |
+
}
|
133 |
+
|
134 |
return $node;
|
135 |
}
|
136 |
|
140 |
* It replaces:
|
141 |
*
|
142 |
* * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()"
|
143 |
+
*
|
144 |
+
* @return \Twig_NodeInterface
|
145 |
*/
|
146 |
+
protected function optimizePrintNode(\Twig_NodeInterface $node, Environment $env)
|
147 |
{
|
148 |
if (!$node instanceof PrintNode) {
|
149 |
return $node;
|
164 |
|
165 |
/**
|
166 |
* Removes "raw" filters.
|
167 |
+
*
|
168 |
+
* @return \Twig_NodeInterface
|
169 |
*/
|
170 |
+
protected function optimizeRawFilter(\Twig_NodeInterface $node, Environment $env)
|
171 |
{
|
172 |
if ($node instanceof FilterExpression && 'raw' == $node->getNode('filter')->getAttribute('value')) {
|
173 |
return $node->getNode('node');
|
179 |
/**
|
180 |
* Optimizes "for" tag by removing the "loop" variable creation whenever possible.
|
181 |
*/
|
182 |
+
protected function enterOptimizeFor(\Twig_NodeInterface $node, Environment $env)
|
183 |
{
|
184 |
if ($node instanceof ForNode) {
|
185 |
// disable the loop variable by default
|
243 |
/**
|
244 |
* Optimizes "for" tag by removing the "loop" variable creation whenever possible.
|
245 |
*/
|
246 |
+
protected function leaveOptimizeFor(\Twig_NodeInterface $node, Environment $env)
|
247 |
{
|
248 |
if ($node instanceof ForNode) {
|
249 |
array_shift($this->loops);
|
252 |
}
|
253 |
}
|
254 |
|
255 |
+
protected function addLoopToCurrent()
|
256 |
{
|
257 |
$this->loops[0]->setAttribute('with_loop', true);
|
258 |
}
|
259 |
|
260 |
+
protected function addLoopToAll()
|
261 |
{
|
262 |
foreach ($this->loops as $loop) {
|
263 |
$loop->setAttribute('with_loop', true);
|
vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php
CHANGED
@@ -23,17 +23,20 @@ use Twig\Node\Expression\NameExpression;
|
|
23 |
use Twig\Node\Expression\ParentExpression;
|
24 |
use Twig\Node\Node;
|
25 |
|
26 |
-
|
|
|
|
|
|
|
27 |
{
|
28 |
-
|
29 |
-
|
30 |
|
31 |
public function setSafeVars($safeVars)
|
32 |
{
|
33 |
$this->safeVars = $safeVars;
|
34 |
}
|
35 |
|
36 |
-
public function getSafe(
|
37 |
{
|
38 |
$hash = spl_object_hash($node);
|
39 |
if (!isset($this->data[$hash])) {
|
@@ -53,7 +56,7 @@ final class SafeAnalysisNodeVisitor extends AbstractNodeVisitor
|
|
53 |
}
|
54 |
}
|
55 |
|
56 |
-
|
57 |
{
|
58 |
$hash = spl_object_hash($node);
|
59 |
if (isset($this->data[$hash])) {
|
@@ -122,7 +125,8 @@ final class SafeAnalysisNodeVisitor extends AbstractNodeVisitor
|
|
122 |
}
|
123 |
} elseif ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression) {
|
124 |
$name = $node->getNode('node')->getAttribute('name');
|
125 |
-
|
|
|
126 |
$this->setSafe($node, ['all']);
|
127 |
} else {
|
128 |
$this->setSafe($node, []);
|
@@ -134,7 +138,7 @@ final class SafeAnalysisNodeVisitor extends AbstractNodeVisitor
|
|
134 |
return $node;
|
135 |
}
|
136 |
|
137 |
-
|
138 |
{
|
139 |
if (null === $a || null === $b) {
|
140 |
return [];
|
23 |
use Twig\Node\Expression\ParentExpression;
|
24 |
use Twig\Node\Node;
|
25 |
|
26 |
+
/**
|
27 |
+
* @final
|
28 |
+
*/
|
29 |
+
class SafeAnalysisNodeVisitor extends AbstractNodeVisitor
|
30 |
{
|
31 |
+
protected $data = [];
|
32 |
+
protected $safeVars = [];
|
33 |
|
34 |
public function setSafeVars($safeVars)
|
35 |
{
|
36 |
$this->safeVars = $safeVars;
|
37 |
}
|
38 |
|
39 |
+
public function getSafe(\Twig_NodeInterface $node)
|
40 |
{
|
41 |
$hash = spl_object_hash($node);
|
42 |
if (!isset($this->data[$hash])) {
|
56 |
}
|
57 |
}
|
58 |
|
59 |
+
protected function setSafe(\Twig_NodeInterface $node, array $safe)
|
60 |
{
|
61 |
$hash = spl_object_hash($node);
|
62 |
if (isset($this->data[$hash])) {
|
125 |
}
|
126 |
} elseif ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression) {
|
127 |
$name = $node->getNode('node')->getAttribute('name');
|
128 |
+
// attributes on template instances are safe
|
129 |
+
if ('_self' == $name || \in_array($name, $this->safeVars)) {
|
130 |
$this->setSafe($node, ['all']);
|
131 |
} else {
|
132 |
$this->setSafe($node, []);
|
138 |
return $node;
|
139 |
}
|
140 |
|
141 |
+
protected function intersectSafe(array $a = null, array $b = null)
|
142 |
{
|
143 |
if (null === $a || null === $b) {
|
144 |
return [];
|
vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php
CHANGED
@@ -27,14 +27,16 @@ use Twig\Node\PrintNode;
|
|
27 |
use Twig\Node\SetNode;
|
28 |
|
29 |
/**
|
|
|
|
|
30 |
* @author Fabien Potencier <fabien@symfony.com>
|
31 |
*/
|
32 |
-
|
33 |
{
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
|
39 |
private $needsToStringWrap = false;
|
40 |
|
@@ -112,7 +114,7 @@ final class SandboxNodeVisitor extends AbstractNodeVisitor
|
|
112 |
return $node;
|
113 |
}
|
114 |
|
115 |
-
private function wrapNode(Node $node,
|
116 |
{
|
117 |
$expr = $node->getNode($name);
|
118 |
if ($expr instanceof NameExpression || $expr instanceof GetAttrExpression) {
|
@@ -120,7 +122,7 @@ final class SandboxNodeVisitor extends AbstractNodeVisitor
|
|
120 |
}
|
121 |
}
|
122 |
|
123 |
-
private function wrapArrayNode(Node $node,
|
124 |
{
|
125 |
$args = $node->getNode($name);
|
126 |
foreach ($args as $name => $_) {
|
27 |
use Twig\Node\SetNode;
|
28 |
|
29 |
/**
|
30 |
+
* @final
|
31 |
+
*
|
32 |
* @author Fabien Potencier <fabien@symfony.com>
|
33 |
*/
|
34 |
+
class SandboxNodeVisitor extends AbstractNodeVisitor
|
35 |
{
|
36 |
+
protected $inAModule = false;
|
37 |
+
protected $tags;
|
38 |
+
protected $filters;
|
39 |
+
protected $functions;
|
40 |
|
41 |
private $needsToStringWrap = false;
|
42 |
|
114 |
return $node;
|
115 |
}
|
116 |
|
117 |
+
private function wrapNode(Node $node, $name)
|
118 |
{
|
119 |
$expr = $node->getNode($name);
|
120 |
if ($expr instanceof NameExpression || $expr instanceof GetAttrExpression) {
|
122 |
}
|
123 |
}
|
124 |
|
125 |
+
private function wrapArrayNode(Node $node, $name)
|
126 |
{
|
127 |
$args = $node->getNode($name);
|
128 |
foreach ($args as $name => $_) {
|
vendor/twig/twig/src/Parser.php
CHANGED
@@ -23,8 +23,8 @@ use Twig\Node\Node;
|
|
23 |
use Twig\Node\NodeCaptureInterface;
|
24 |
use Twig\Node\NodeOutputInterface;
|
25 |
use Twig\Node\PrintNode;
|
26 |
-
use Twig\Node\SpacelessNode;
|
27 |
use Twig\Node\TextNode;
|
|
|
28 |
use Twig\TokenParser\TokenParserInterface;
|
29 |
|
30 |
/**
|
@@ -32,21 +32,22 @@ use Twig\TokenParser\TokenParserInterface;
|
|
32 |
*
|
33 |
* @author Fabien Potencier <fabien@symfony.com>
|
34 |
*/
|
35 |
-
class Parser
|
36 |
{
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
50 |
private $varNameSalt = 0;
|
51 |
|
52 |
public function __construct(Environment $env)
|
@@ -54,25 +55,48 @@ class Parser
|
|
54 |
$this->env = $env;
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
public function getVarName()
|
58 |
{
|
59 |
-
return sprintf('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
public function parse(TokenStream $stream, $test = null, $dropNeedle = false)
|
63 |
{
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
$this->stack[] = $vars;
|
67 |
|
68 |
// tag handlers
|
69 |
if (null === $this->handlers) {
|
70 |
-
$this->handlers =
|
71 |
-
|
72 |
-
$handler->setParser($this);
|
73 |
-
|
74 |
-
$this->handlers[$handler->getTag()] = $handler;
|
75 |
-
}
|
76 |
}
|
77 |
|
78 |
// node visitors
|
@@ -92,6 +116,7 @@ class Parser
|
|
92 |
$this->blockStack = [];
|
93 |
$this->importedSymbols = [[]];
|
94 |
$this->embeddedTemplates = [];
|
|
|
95 |
|
96 |
try {
|
97 |
$body = $this->subparse($test, $dropNeedle);
|
@@ -131,27 +156,27 @@ class Parser
|
|
131 |
$rv = [];
|
132 |
while (!$this->stream->isEOF()) {
|
133 |
switch ($this->getCurrentToken()->getType()) {
|
134 |
-
case
|
135 |
$token = $this->stream->next();
|
136 |
$rv[] = new TextNode($token->getValue(), $token->getLine());
|
137 |
break;
|
138 |
|
139 |
-
case
|
140 |
$token = $this->stream->next();
|
141 |
$expr = $this->expressionParser->parseExpression();
|
142 |
-
$this->stream->expect(
|
143 |
$rv[] = new PrintNode($expr, $token->getLine());
|
144 |
break;
|
145 |
|
146 |
-
case
|
147 |
$this->stream->next();
|
148 |
$token = $this->getCurrentToken();
|
149 |
|
150 |
-
if (
|
151 |
throw new SyntaxError('A block must start with a tag name.', $token->getLine(), $this->stream->getSourceContext());
|
152 |
}
|
153 |
|
154 |
-
if (null !== $test && $test
|
155 |
if ($dropNeedle) {
|
156 |
$this->stream->next();
|
157 |
}
|
@@ -163,7 +188,8 @@ class Parser
|
|
163 |
return new Node($rv, [], $lineno);
|
164 |
}
|
165 |
|
166 |
-
|
|
|
167 |
if (null !== $test) {
|
168 |
$e = new SyntaxError(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->stream->getSourceContext());
|
169 |
|
@@ -180,7 +206,6 @@ class Parser
|
|
180 |
|
181 |
$this->stream->next();
|
182 |
|
183 |
-
$subparser = $this->handlers[$token->getValue()];
|
184 |
$node = $subparser->parse($token);
|
185 |
if (null !== $node) {
|
186 |
$rv[] = $node;
|
@@ -199,6 +224,26 @@ class Parser
|
|
199 |
return new Node($rv, [], $lineno);
|
200 |
}
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
public function getBlockStack()
|
203 |
{
|
204 |
return $this->blockStack;
|
@@ -241,17 +286,28 @@ class Parser
|
|
241 |
|
242 |
public function setMacro($name, MacroNode $node)
|
243 |
{
|
|
|
|
|
|
|
|
|
244 |
$this->macros[$name] = $node;
|
245 |
}
|
246 |
|
247 |
-
/**
|
248 |
-
* @deprecated since Twig 2.7 as there are no reserved macro names anymore, will be removed in 3.0.
|
249 |
-
*/
|
250 |
public function isReservedMacroName($name)
|
251 |
{
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
-
return
|
255 |
}
|
256 |
|
257 |
public function addTrait($trait)
|
@@ -278,8 +334,19 @@ class Parser
|
|
278 |
|
279 |
public function getImportedSymbol($type, $alias)
|
280 |
{
|
281 |
-
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
}
|
284 |
|
285 |
public function isMainScope()
|
@@ -331,14 +398,13 @@ class Parser
|
|
331 |
return $this->stream->getCurrent();
|
332 |
}
|
333 |
|
334 |
-
|
335 |
{
|
336 |
// check that the body does not contain non-empty output nodes
|
337 |
if (
|
338 |
($node instanceof TextNode && !ctype_space($node->getAttribute('data')))
|
339 |
||
|
340 |
-
|
341 |
-
(!$node instanceof TextNode && !$node instanceof BlockReferenceNode && ($node instanceof NodeOutputInterface && !$node instanceof SpacelessNode))
|
342 |
) {
|
343 |
if (false !== strpos((string) $node, \chr(0xEF).\chr(0xBB).\chr(0xBF))) {
|
344 |
$t = substr($node->getAttribute('data'), 3);
|
@@ -351,37 +417,17 @@ class Parser
|
|
351 |
throw new SyntaxError('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext());
|
352 |
}
|
353 |
|
354 |
-
// bypass nodes that "capture" the output
|
355 |
if ($node instanceof NodeCaptureInterface) {
|
356 |
-
// a "block" tag in such a node will serve as a block definition AND be displayed in place as well
|
357 |
return $node;
|
358 |
}
|
359 |
|
360 |
-
|
361 |
-
if (!$nested && $node instanceof SpacelessNode) {
|
362 |
-
@trigger_error(sprintf('Using the spaceless tag at the root level of a child template in "%s" at line %d is deprecated since Twig 2.5.0 and will become a syntax error in 3.0.', $this->stream->getSourceContext()->getName(), $node->getTemplateLine()), \E_USER_DEPRECATED);
|
363 |
-
}
|
364 |
-
|
365 |
-
// "block" tags that are not captured (see above) are only used for defining
|
366 |
-
// the content of the block. In such a case, nesting it does not work as
|
367 |
-
// expected as the definition is not part of the default template code flow.
|
368 |
-
if ($nested && ($node instanceof BlockReferenceNode || $node instanceof \Twig_Node_BlockReference)) {
|
369 |
-
//throw new SyntaxError('A block definition cannot be nested under non-capturing nodes.', $node->getTemplateLine(), $this->stream->getSourceContext());
|
370 |
-
@trigger_error(sprintf('Nesting a block definition under a non-capturing node in "%s" at line %d is deprecated since Twig 2.5.0 and will become a syntax error in 3.0.', $this->stream->getSourceContext()->getName(), $node->getTemplateLine()), \E_USER_DEPRECATED);
|
371 |
-
|
372 |
-
return;
|
373 |
-
}
|
374 |
-
|
375 |
-
// the "&& !$node instanceof SpacelessNode" part of the condition must be removed in 3.0
|
376 |
-
if ($node instanceof NodeOutputInterface && !$node instanceof SpacelessNode) {
|
377 |
return;
|
378 |
}
|
379 |
|
380 |
-
// here, $nested means "being at the root level of a child template"
|
381 |
-
// we need to discard the wrapping "Twig_Node" for the "body" node
|
382 |
-
$nested = $nested || ('Twig_Node' !== \get_class($node) && Node::class !== \get_class($node));
|
383 |
foreach ($node as $k => $n) {
|
384 |
-
if (null !== $n && null === $this->filterBodyNodes($n
|
385 |
$node->removeNode($k);
|
386 |
}
|
387 |
}
|
23 |
use Twig\Node\NodeCaptureInterface;
|
24 |
use Twig\Node\NodeOutputInterface;
|
25 |
use Twig\Node\PrintNode;
|
|
|
26 |
use Twig\Node\TextNode;
|
27 |
+
use Twig\NodeVisitor\NodeVisitorInterface;
|
28 |
use Twig\TokenParser\TokenParserInterface;
|
29 |
|
30 |
/**
|
32 |
*
|
33 |
* @author Fabien Potencier <fabien@symfony.com>
|
34 |
*/
|
35 |
+
class Parser implements \Twig_ParserInterface
|
36 |
{
|
37 |
+
protected $stack = [];
|
38 |
+
protected $stream;
|
39 |
+
protected $parent;
|
40 |
+
protected $handlers;
|
41 |
+
protected $visitors;
|
42 |
+
protected $expressionParser;
|
43 |
+
protected $blocks;
|
44 |
+
protected $blockStack;
|
45 |
+
protected $macros;
|
46 |
+
protected $env;
|
47 |
+
protected $reservedMacroNames;
|
48 |
+
protected $importedSymbols;
|
49 |
+
protected $traits;
|
50 |
+
protected $embeddedTemplates = [];
|
51 |
private $varNameSalt = 0;
|
52 |
|
53 |
public function __construct(Environment $env)
|
55 |
$this->env = $env;
|
56 |
}
|
57 |
|
58 |
+
/**
|
59 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
60 |
+
*/
|
61 |
+
public function getEnvironment()
|
62 |
+
{
|
63 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
64 |
+
|
65 |
+
return $this->env;
|
66 |
+
}
|
67 |
+
|
68 |
public function getVarName()
|
69 |
{
|
70 |
+
return sprintf('__internal_%s', hash('sha256', __METHOD__.$this->stream->getSourceContext()->getCode().$this->varNameSalt++));
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @deprecated since 1.27 (to be removed in 2.0). Use $parser->getStream()->getSourceContext()->getPath() instead.
|
75 |
+
*/
|
76 |
+
public function getFilename()
|
77 |
+
{
|
78 |
+
@trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use $parser->getStream()->getSourceContext()->getPath() instead.', __METHOD__), \E_USER_DEPRECATED);
|
79 |
+
|
80 |
+
return $this->stream->getSourceContext()->getName();
|
81 |
}
|
82 |
|
83 |
public function parse(TokenStream $stream, $test = null, $dropNeedle = false)
|
84 |
{
|
85 |
+
// push all variables into the stack to keep the current state of the parser
|
86 |
+
// using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336
|
87 |
+
// This hack can be removed when min version if PHP 7.0
|
88 |
+
$vars = [];
|
89 |
+
foreach ($this as $k => $v) {
|
90 |
+
$vars[$k] = $v;
|
91 |
+
}
|
92 |
+
|
93 |
+
unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']);
|
94 |
$this->stack[] = $vars;
|
95 |
|
96 |
// tag handlers
|
97 |
if (null === $this->handlers) {
|
98 |
+
$this->handlers = $this->env->getTokenParsers();
|
99 |
+
$this->handlers->setParser($this);
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
|
102 |
// node visitors
|
116 |
$this->blockStack = [];
|
117 |
$this->importedSymbols = [[]];
|
118 |
$this->embeddedTemplates = [];
|
119 |
+
$this->varNameSalt = 0;
|
120 |
|
121 |
try {
|
122 |
$body = $this->subparse($test, $dropNeedle);
|
156 |
$rv = [];
|
157 |
while (!$this->stream->isEOF()) {
|
158 |
switch ($this->getCurrentToken()->getType()) {
|
159 |
+
case Token::TEXT_TYPE:
|
160 |
$token = $this->stream->next();
|
161 |
$rv[] = new TextNode($token->getValue(), $token->getLine());
|
162 |
break;
|
163 |
|
164 |
+
case Token::VAR_START_TYPE:
|
165 |
$token = $this->stream->next();
|
166 |
$expr = $this->expressionParser->parseExpression();
|
167 |
+
$this->stream->expect(Token::VAR_END_TYPE);
|
168 |
$rv[] = new PrintNode($expr, $token->getLine());
|
169 |
break;
|
170 |
|
171 |
+
case Token::BLOCK_START_TYPE:
|
172 |
$this->stream->next();
|
173 |
$token = $this->getCurrentToken();
|
174 |
|
175 |
+
if (Token::NAME_TYPE !== $token->getType()) {
|
176 |
throw new SyntaxError('A block must start with a tag name.', $token->getLine(), $this->stream->getSourceContext());
|
177 |
}
|
178 |
|
179 |
+
if (null !== $test && \call_user_func($test, $token)) {
|
180 |
if ($dropNeedle) {
|
181 |
$this->stream->next();
|
182 |
}
|
188 |
return new Node($rv, [], $lineno);
|
189 |
}
|
190 |
|
191 |
+
$subparser = $this->handlers->getTokenParser($token->getValue());
|
192 |
+
if (null === $subparser) {
|
193 |
if (null !== $test) {
|
194 |
$e = new SyntaxError(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->stream->getSourceContext());
|
195 |
|
206 |
|
207 |
$this->stream->next();
|
208 |
|
|
|
209 |
$node = $subparser->parse($token);
|
210 |
if (null !== $node) {
|
211 |
$rv[] = $node;
|
224 |
return new Node($rv, [], $lineno);
|
225 |
}
|
226 |
|
227 |
+
/**
|
228 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
229 |
+
*/
|
230 |
+
public function addHandler($name, $class)
|
231 |
+
{
|
232 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
233 |
+
|
234 |
+
$this->handlers[$name] = $class;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
239 |
+
*/
|
240 |
+
public function addNodeVisitor(NodeVisitorInterface $visitor)
|
241 |
+
{
|
242 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
243 |
+
|
244 |
+
$this->visitors[] = $visitor;
|
245 |
+
}
|
246 |
+
|
247 |
public function getBlockStack()
|
248 |
{
|
249 |
return $this->blockStack;
|
286 |
|
287 |
public function setMacro($name, MacroNode $node)
|
288 |
{
|
289 |
+
if ($this->isReservedMacroName($name)) {
|
290 |
+
throw new SyntaxError(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword.', $name), $node->getTemplateLine(), $this->stream->getSourceContext());
|
291 |
+
}
|
292 |
+
|
293 |
$this->macros[$name] = $node;
|
294 |
}
|
295 |
|
|
|
|
|
|
|
296 |
public function isReservedMacroName($name)
|
297 |
{
|
298 |
+
if (null === $this->reservedMacroNames) {
|
299 |
+
$this->reservedMacroNames = [];
|
300 |
+
$r = new \ReflectionClass($this->env->getBaseTemplateClass());
|
301 |
+
foreach ($r->getMethods() as $method) {
|
302 |
+
$methodName = strtr($method->getName(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
|
303 |
+
|
304 |
+
if ('get' === substr($methodName, 0, 3) && isset($methodName[3])) {
|
305 |
+
$this->reservedMacroNames[] = substr($methodName, 3);
|
306 |
+
}
|
307 |
+
}
|
308 |
+
}
|
309 |
|
310 |
+
return \in_array(strtr($name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), $this->reservedMacroNames);
|
311 |
}
|
312 |
|
313 |
public function addTrait($trait)
|
334 |
|
335 |
public function getImportedSymbol($type, $alias)
|
336 |
{
|
337 |
+
if (null !== $this->peekBlockStack()) {
|
338 |
+
foreach ($this->importedSymbols as $functions) {
|
339 |
+
if (isset($functions[$type][$alias])) {
|
340 |
+
if (\count($this->blockStack) > 1) {
|
341 |
+
return null;
|
342 |
+
}
|
343 |
+
|
344 |
+
return $functions[$type][$alias];
|
345 |
+
}
|
346 |
+
}
|
347 |
+
} else {
|
348 |
+
return isset($this->importedSymbols[0][$type][$alias]) ? $this->importedSymbols[0][$type][$alias] : null;
|
349 |
+
}
|
350 |
}
|
351 |
|
352 |
public function isMainScope()
|
398 |
return $this->stream->getCurrent();
|
399 |
}
|
400 |
|
401 |
+
protected function filterBodyNodes(\Twig_NodeInterface $node)
|
402 |
{
|
403 |
// check that the body does not contain non-empty output nodes
|
404 |
if (
|
405 |
($node instanceof TextNode && !ctype_space($node->getAttribute('data')))
|
406 |
||
|
407 |
+
(!$node instanceof TextNode && !$node instanceof BlockReferenceNode && $node instanceof NodeOutputInterface)
|
|
|
408 |
) {
|
409 |
if (false !== strpos((string) $node, \chr(0xEF).\chr(0xBB).\chr(0xBF))) {
|
410 |
$t = substr($node->getAttribute('data'), 3);
|
417 |
throw new SyntaxError('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext());
|
418 |
}
|
419 |
|
420 |
+
// bypass nodes that will "capture" the output
|
421 |
if ($node instanceof NodeCaptureInterface) {
|
|
|
422 |
return $node;
|
423 |
}
|
424 |
|
425 |
+
if ($node instanceof NodeOutputInterface) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
return;
|
427 |
}
|
428 |
|
|
|
|
|
|
|
429 |
foreach ($node as $k => $n) {
|
430 |
+
if (null !== $n && null === $this->filterBodyNodes($n)) {
|
431 |
$node->removeNode($k);
|
432 |
}
|
433 |
}
|
vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php
CHANGED
@@ -31,7 +31,7 @@ abstract class BaseDumper
|
|
31 |
|
32 |
abstract protected function formatTime(Profile $profile, $percent);
|
33 |
|
34 |
-
private function dumpProfile(Profile $profile, $prefix = '', $sibling = false)
|
35 |
{
|
36 |
if ($profile->isRoot()) {
|
37 |
$this->root = $profile->getDuration();
|
31 |
|
32 |
abstract protected function formatTime(Profile $profile, $percent);
|
33 |
|
34 |
+
private function dumpProfile(Profile $profile, $prefix = '', $sibling = false)
|
35 |
{
|
36 |
if ($profile->isRoot()) {
|
37 |
$this->root = $profile->getDuration();
|
vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php
CHANGED
@@ -15,8 +15,10 @@ use Twig\Profiler\Profile;
|
|
15 |
|
16 |
/**
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
18 |
*/
|
19 |
-
|
20 |
{
|
21 |
public function dump(Profile $profile)
|
22 |
{
|
@@ -40,7 +42,7 @@ EOF;
|
|
40 |
return $str;
|
41 |
}
|
42 |
|
43 |
-
private function dumpChildren(
|
44 |
{
|
45 |
foreach ($profile as $p) {
|
46 |
if ($p->isTemplate()) {
|
@@ -53,7 +55,7 @@ EOF;
|
|
53 |
}
|
54 |
}
|
55 |
|
56 |
-
private function dumpProfile(
|
57 |
{
|
58 |
if (isset($data[$edge])) {
|
59 |
++$data[$edge]['ct'];
|
15 |
|
16 |
/**
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @final
|
20 |
*/
|
21 |
+
class BlackfireDumper
|
22 |
{
|
23 |
public function dump(Profile $profile)
|
24 |
{
|
42 |
return $str;
|
43 |
}
|
44 |
|
45 |
+
private function dumpChildren($parent, Profile $profile, &$data)
|
46 |
{
|
47 |
foreach ($profile as $p) {
|
48 |
if ($p->isTemplate()) {
|
55 |
}
|
56 |
}
|
57 |
|
58 |
+
private function dumpProfile($edge, Profile $profile, &$data)
|
59 |
{
|
60 |
if (isset($data[$edge])) {
|
61 |
++$data[$edge]['ct'];
|
vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php
CHANGED
@@ -15,8 +15,10 @@ use Twig\Profiler\Profile;
|
|
15 |
|
16 |
/**
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
18 |
*/
|
19 |
-
|
20 |
{
|
21 |
private static $colors = [
|
22 |
'block' => '#dfd',
|
15 |
|
16 |
/**
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @final
|
20 |
*/
|
21 |
+
class HtmlDumper extends BaseDumper
|
22 |
{
|
23 |
private static $colors = [
|
24 |
'block' => '#dfd',
|
vendor/twig/twig/src/Profiler/Dumper/TextDumper.php
CHANGED
@@ -15,8 +15,10 @@ use Twig\Profiler\Profile;
|
|
15 |
|
16 |
/**
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
18 |
*/
|
19 |
-
|
20 |
{
|
21 |
protected function formatTemplate(Profile $profile, $prefix)
|
22 |
{
|
15 |
|
16 |
/**
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
+
*
|
19 |
+
* @final
|
20 |
*/
|
21 |
+
class TextDumper extends BaseDumper
|
22 |
{
|
23 |
protected function formatTemplate(Profile $profile, $prefix)
|
24 |
{
|
vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Node\Node;
|
|
21 |
*/
|
22 |
class EnterProfileNode extends Node
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]);
|
27 |
}
|
@@ -29,9 +29,9 @@ class EnterProfileNode extends Node
|
|
29 |
public function compile(Compiler $compiler)
|
30 |
{
|
31 |
$compiler
|
32 |
-
->write(sprintf('$%s = $this->
|
33 |
->repr($this->getAttribute('extension_name'))
|
34 |
-
->raw("
|
35 |
->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
|
36 |
->repr($this->getAttribute('type'))
|
37 |
->raw(', ')
|
21 |
*/
|
22 |
class EnterProfileNode extends Node
|
23 |
{
|
24 |
+
public function __construct($extensionName, $type, $name, $varName)
|
25 |
{
|
26 |
parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]);
|
27 |
}
|
29 |
public function compile(Compiler $compiler)
|
30 |
{
|
31 |
$compiler
|
32 |
+
->write(sprintf('$%s = $this->env->getExtension(', $this->getAttribute('var_name')))
|
33 |
->repr($this->getAttribute('extension_name'))
|
34 |
+
->raw(");\n")
|
35 |
->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
|
36 |
->repr($this->getAttribute('type'))
|
37 |
->raw(', ')
|
vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php
CHANGED
@@ -21,7 +21,7 @@ use Twig\Node\Node;
|
|
21 |
*/
|
22 |
class LeaveProfileNode extends Node
|
23 |
{
|
24 |
-
public function __construct(
|
25 |
{
|
26 |
parent::__construct([], ['var_name' => $varName]);
|
27 |
}
|
21 |
*/
|
22 |
class LeaveProfileNode extends Node
|
23 |
{
|
24 |
+
public function __construct($varName)
|
25 |
{
|
26 |
parent::__construct([], ['var_name' => $varName]);
|
27 |
}
|
vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php
CHANGED
@@ -24,16 +24,16 @@ use Twig\Profiler\Profile;
|
|
24 |
|
25 |
/**
|
26 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
27 |
*/
|
28 |
-
|
29 |
{
|
30 |
private $extensionName;
|
31 |
-
private $varName;
|
32 |
|
33 |
-
public function __construct(
|
34 |
{
|
35 |
$this->extensionName = $extensionName;
|
36 |
-
$this->varName = sprintf('__internal_%s', hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $extensionName));
|
37 |
}
|
38 |
|
39 |
protected function doEnterNode(Node $node, Environment $env)
|
@@ -44,25 +44,33 @@ final class ProfilerNodeVisitor extends AbstractNodeVisitor
|
|
44 |
protected function doLeaveNode(Node $node, Environment $env)
|
45 |
{
|
46 |
if ($node instanceof ModuleNode) {
|
47 |
-
$
|
48 |
-
$node->setNode('
|
|
|
49 |
} elseif ($node instanceof BlockNode) {
|
|
|
50 |
$node->setNode('body', new BodyNode([
|
51 |
-
new EnterProfileNode($this->extensionName, Profile::BLOCK, $node->getAttribute('name'), $
|
52 |
$node->getNode('body'),
|
53 |
-
new LeaveProfileNode($
|
54 |
]));
|
55 |
} elseif ($node instanceof MacroNode) {
|
|
|
56 |
$node->setNode('body', new BodyNode([
|
57 |
-
new EnterProfileNode($this->extensionName, Profile::MACRO, $node->getAttribute('name'), $
|
58 |
$node->getNode('body'),
|
59 |
-
new LeaveProfileNode($
|
60 |
]));
|
61 |
}
|
62 |
|
63 |
return $node;
|
64 |
}
|
65 |
|
|
|
|
|
|
|
|
|
|
|
66 |
public function getPriority()
|
67 |
{
|
68 |
return 0;
|
24 |
|
25 |
/**
|
26 |
* @author Fabien Potencier <fabien@symfony.com>
|
27 |
+
*
|
28 |
+
* @final
|
29 |
*/
|
30 |
+
class ProfilerNodeVisitor extends AbstractNodeVisitor
|
31 |
{
|
32 |
private $extensionName;
|
|
|
33 |
|
34 |
+
public function __construct($extensionName)
|
35 |
{
|
36 |
$this->extensionName = $extensionName;
|
|
|
37 |
}
|
38 |
|
39 |
protected function doEnterNode(Node $node, Environment $env)
|
44 |
protected function doLeaveNode(Node $node, Environment $env)
|
45 |
{
|
46 |
if ($node instanceof ModuleNode) {
|
47 |
+
$varName = $this->getVarName();
|
48 |
+
$node->setNode('display_start', new Node([new EnterProfileNode($this->extensionName, Profile::TEMPLATE, $node->getTemplateName(), $varName), $node->getNode('display_start')]));
|
49 |
+
$node->setNode('display_end', new Node([new LeaveProfileNode($varName), $node->getNode('display_end')]));
|
50 |
} elseif ($node instanceof BlockNode) {
|
51 |
+
$varName = $this->getVarName();
|
52 |
$node->setNode('body', new BodyNode([
|
53 |
+
new EnterProfileNode($this->extensionName, Profile::BLOCK, $node->getAttribute('name'), $varName),
|
54 |
$node->getNode('body'),
|
55 |
+
new LeaveProfileNode($varName),
|
56 |
]));
|
57 |
} elseif ($node instanceof MacroNode) {
|
58 |
+
$varName = $this->getVarName();
|
59 |
$node->setNode('body', new BodyNode([
|
60 |
+
new EnterProfileNode($this->extensionName, Profile::MACRO, $node->getAttribute('name'), $varName),
|
61 |
$node->getNode('body'),
|
62 |
+
new LeaveProfileNode($varName),
|
63 |
]));
|
64 |
}
|
65 |
|
66 |
return $node;
|
67 |
}
|
68 |
|
69 |
+
private function getVarName()
|
70 |
+
{
|
71 |
+
return sprintf('__internal_%s', hash('sha256', $this->extensionName));
|
72 |
+
}
|
73 |
+
|
74 |
public function getPriority()
|
75 |
{
|
76 |
return 0;
|
vendor/twig/twig/src/Profiler/Profile.php
CHANGED
@@ -14,7 +14,7 @@ namespace Twig\Profiler;
|
|
14 |
/**
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
*
|
17 |
-
* @final
|
18 |
*/
|
19 |
class Profile implements \IteratorAggregate, \Serializable
|
20 |
{
|
@@ -30,12 +30,8 @@ class Profile implements \IteratorAggregate, \Serializable
|
|
30 |
private $ends = [];
|
31 |
private $profiles = [];
|
32 |
|
33 |
-
public function __construct(
|
34 |
{
|
35 |
-
if (__CLASS__ !== static::class) {
|
36 |
-
@trigger_error('Overriding '.__CLASS__.' is deprecated since Twig 2.4.0 and the class will be final in 3.0.', \E_USER_DEPRECATED);
|
37 |
-
}
|
38 |
-
|
39 |
$this->template = $template;
|
40 |
$this->type = $type;
|
41 |
$this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name;
|
@@ -157,7 +153,6 @@ class Profile implements \IteratorAggregate, \Serializable
|
|
157 |
$this->enter();
|
158 |
}
|
159 |
|
160 |
-
#[\ReturnTypeWillChange]
|
161 |
public function getIterator(): \Traversable
|
162 |
{
|
163 |
return new \ArrayIterator($this->profiles);
|
14 |
/**
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
*
|
17 |
+
* @final
|
18 |
*/
|
19 |
class Profile implements \IteratorAggregate, \Serializable
|
20 |
{
|
30 |
private $ends = [];
|
31 |
private $profiles = [];
|
32 |
|
33 |
+
public function __construct($template = 'main', $type = self::ROOT, $name = 'main')
|
34 |
{
|
|
|
|
|
|
|
|
|
35 |
$this->template = $template;
|
36 |
$this->type = $type;
|
37 |
$this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name;
|
153 |
$this->enter();
|
154 |
}
|
155 |
|
|
|
156 |
public function getIterator(): \Traversable
|
157 |
{
|
158 |
return new \ArrayIterator($this->profiles);
|
vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php
CHANGED
@@ -23,7 +23,7 @@ class FactoryRuntimeLoader implements RuntimeLoaderInterface
|
|
23 |
/**
|
24 |
* @param array $map An array where keys are class names and values factory callables
|
25 |
*/
|
26 |
-
public function __construct(
|
27 |
{
|
28 |
$this->map = $map;
|
29 |
}
|
23 |
/**
|
24 |
* @param array $map An array where keys are class names and values factory callables
|
25 |
*/
|
26 |
+
public function __construct($map = [])
|
27 |
{
|
28 |
$this->map = $map;
|
29 |
}
|
vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php
CHANGED
@@ -15,24 +15,13 @@ namespace Twig\Sandbox;
|
|
15 |
* Exception thrown when a not allowed filter is used in a template.
|
16 |
*
|
17 |
* @author Martin Hasoň <martin.hason@gmail.com>
|
18 |
-
*
|
19 |
-
* @final
|
20 |
*/
|
21 |
class SecurityNotAllowedFilterError extends SecurityError
|
22 |
{
|
23 |
private $filterName;
|
24 |
|
25 |
-
public function __construct(
|
26 |
{
|
27 |
-
if (-1 !== $lineno) {
|
28 |
-
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
29 |
-
}
|
30 |
-
if (null !== $filename) {
|
31 |
-
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
32 |
-
}
|
33 |
-
if (null !== $previous) {
|
34 |
-
@trigger_error(sprintf('Passing $previous as a 5th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
35 |
-
}
|
36 |
parent::__construct($message, $lineno, $filename, $previous);
|
37 |
$this->filterName = $functionName;
|
38 |
}
|
15 |
* Exception thrown when a not allowed filter is used in a template.
|
16 |
*
|
17 |
* @author Martin Hasoň <martin.hason@gmail.com>
|
|
|
|
|
18 |
*/
|
19 |
class SecurityNotAllowedFilterError extends SecurityError
|
20 |
{
|
21 |
private $filterName;
|
22 |
|
23 |
+
public function __construct($message, $functionName, $lineno = -1, $filename = null, \Exception $previous = null)
|
24 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
parent::__construct($message, $lineno, $filename, $previous);
|
26 |
$this->filterName = $functionName;
|
27 |
}
|
vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php
CHANGED
@@ -15,24 +15,13 @@ namespace Twig\Sandbox;
|
|
15 |
* Exception thrown when a not allowed function is used in a template.
|
16 |
*
|
17 |
* @author Martin Hasoň <martin.hason@gmail.com>
|
18 |
-
*
|
19 |
-
* @final
|
20 |
*/
|
21 |
class SecurityNotAllowedFunctionError extends SecurityError
|
22 |
{
|
23 |
private $functionName;
|
24 |
|
25 |
-
public function __construct(
|
26 |
{
|
27 |
-
if (-1 !== $lineno) {
|
28 |
-
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
29 |
-
}
|
30 |
-
if (null !== $filename) {
|
31 |
-
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
32 |
-
}
|
33 |
-
if (null !== $previous) {
|
34 |
-
@trigger_error(sprintf('Passing $previous as a 5th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
35 |
-
}
|
36 |
parent::__construct($message, $lineno, $filename, $previous);
|
37 |
$this->functionName = $functionName;
|
38 |
}
|
15 |
* Exception thrown when a not allowed function is used in a template.
|
16 |
*
|
17 |
* @author Martin Hasoň <martin.hason@gmail.com>
|
|
|
|
|
18 |
*/
|
19 |
class SecurityNotAllowedFunctionError extends SecurityError
|
20 |
{
|
21 |
private $functionName;
|
22 |
|
23 |
+
public function __construct($message, $functionName, $lineno = -1, $filename = null, \Exception $previous = null)
|
24 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
parent::__construct($message, $lineno, $filename, $previous);
|
26 |
$this->functionName = $functionName;
|
27 |
}
|
vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php
CHANGED
@@ -15,25 +15,14 @@ namespace Twig\Sandbox;
|
|
15 |
* Exception thrown when a not allowed class method is used in a template.
|
16 |
*
|
17 |
* @author Kit Burton-Senior <mail@kitbs.com>
|
18 |
-
*
|
19 |
-
* @final
|
20 |
*/
|
21 |
class SecurityNotAllowedMethodError extends SecurityError
|
22 |
{
|
23 |
private $className;
|
24 |
private $methodName;
|
25 |
|
26 |
-
public function __construct(
|
27 |
{
|
28 |
-
if (-1 !== $lineno) {
|
29 |
-
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
30 |
-
}
|
31 |
-
if (null !== $filename) {
|
32 |
-
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
33 |
-
}
|
34 |
-
if (null !== $previous) {
|
35 |
-
@trigger_error(sprintf('Passing $previous as a 5th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
36 |
-
}
|
37 |
parent::__construct($message, $lineno, $filename, $previous);
|
38 |
$this->className = $className;
|
39 |
$this->methodName = $methodName;
|
15 |
* Exception thrown when a not allowed class method is used in a template.
|
16 |
*
|
17 |
* @author Kit Burton-Senior <mail@kitbs.com>
|
|
|
|
|
18 |
*/
|
19 |
class SecurityNotAllowedMethodError extends SecurityError
|
20 |
{
|
21 |
private $className;
|
22 |
private $methodName;
|
23 |
|
24 |
+
public function __construct($message, $className, $methodName, $lineno = -1, $filename = null, \Exception $previous = null)
|
25 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
parent::__construct($message, $lineno, $filename, $previous);
|
27 |
$this->className = $className;
|
28 |
$this->methodName = $methodName;
|
vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php
CHANGED
@@ -15,25 +15,14 @@ namespace Twig\Sandbox;
|
|
15 |
* Exception thrown when a not allowed class property is used in a template.
|
16 |
*
|
17 |
* @author Kit Burton-Senior <mail@kitbs.com>
|
18 |
-
*
|
19 |
-
* @final
|
20 |
*/
|
21 |
class SecurityNotAllowedPropertyError extends SecurityError
|
22 |
{
|
23 |
private $className;
|
24 |
private $propertyName;
|
25 |
|
26 |
-
public function __construct(
|
27 |
{
|
28 |
-
if (-1 !== $lineno) {
|
29 |
-
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
30 |
-
}
|
31 |
-
if (null !== $filename) {
|
32 |
-
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
33 |
-
}
|
34 |
-
if (null !== $previous) {
|
35 |
-
@trigger_error(sprintf('Passing $previous as a 5th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
36 |
-
}
|
37 |
parent::__construct($message, $lineno, $filename, $previous);
|
38 |
$this->className = $className;
|
39 |
$this->propertyName = $propertyName;
|
15 |
* Exception thrown when a not allowed class property is used in a template.
|
16 |
*
|
17 |
* @author Kit Burton-Senior <mail@kitbs.com>
|
|
|
|
|
18 |
*/
|
19 |
class SecurityNotAllowedPropertyError extends SecurityError
|
20 |
{
|
21 |
private $className;
|
22 |
private $propertyName;
|
23 |
|
24 |
+
public function __construct($message, $className, $propertyName, $lineno = -1, $filename = null, \Exception $previous = null)
|
25 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
parent::__construct($message, $lineno, $filename, $previous);
|
27 |
$this->className = $className;
|
28 |
$this->propertyName = $propertyName;
|
vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php
CHANGED
@@ -15,24 +15,13 @@ namespace Twig\Sandbox;
|
|
15 |
* Exception thrown when a not allowed tag is used in a template.
|
16 |
*
|
17 |
* @author Martin Hasoň <martin.hason@gmail.com>
|
18 |
-
*
|
19 |
-
* @final
|
20 |
*/
|
21 |
class SecurityNotAllowedTagError extends SecurityError
|
22 |
{
|
23 |
private $tagName;
|
24 |
|
25 |
-
public function __construct(
|
26 |
{
|
27 |
-
if (-1 !== $lineno) {
|
28 |
-
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
29 |
-
}
|
30 |
-
if (null !== $filename) {
|
31 |
-
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
32 |
-
}
|
33 |
-
if (null !== $previous) {
|
34 |
-
@trigger_error(sprintf('Passing $previous as a 5th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), \E_USER_DEPRECATED);
|
35 |
-
}
|
36 |
parent::__construct($message, $lineno, $filename, $previous);
|
37 |
$this->tagName = $tagName;
|
38 |
}
|
15 |
* Exception thrown when a not allowed tag is used in a template.
|
16 |
*
|
17 |
* @author Martin Hasoň <martin.hason@gmail.com>
|
|
|
|
|
18 |
*/
|
19 |
class SecurityNotAllowedTagError extends SecurityError
|
20 |
{
|
21 |
private $tagName;
|
22 |
|
23 |
+
public function __construct($message, $tagName, $lineno = -1, $filename = null, \Exception $previous = null)
|
24 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
parent::__construct($message, $lineno, $filename, $previous);
|
26 |
$this->tagName = $tagName;
|
27 |
}
|
vendor/twig/twig/src/Sandbox/SecurityPolicy.php
CHANGED
@@ -12,20 +12,21 @@
|
|
12 |
namespace Twig\Sandbox;
|
13 |
|
14 |
use Twig\Markup;
|
15 |
-
use Twig\Template;
|
16 |
|
17 |
/**
|
18 |
* Represents a security policy which need to be enforced when sandbox mode is enabled.
|
19 |
*
|
|
|
|
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
-
|
23 |
{
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = [])
|
31 |
{
|
@@ -87,7 +88,7 @@ final class SecurityPolicy implements SecurityPolicyInterface
|
|
87 |
|
88 |
public function checkMethodAllowed($obj, $method)
|
89 |
{
|
90 |
-
if ($obj instanceof
|
91 |
return;
|
92 |
}
|
93 |
|
12 |
namespace Twig\Sandbox;
|
13 |
|
14 |
use Twig\Markup;
|
|
|
15 |
|
16 |
/**
|
17 |
* Represents a security policy which need to be enforced when sandbox mode is enabled.
|
18 |
*
|
19 |
+
* @final
|
20 |
+
*
|
21 |
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
*/
|
23 |
+
class SecurityPolicy implements SecurityPolicyInterface
|
24 |
{
|
25 |
+
protected $allowedTags;
|
26 |
+
protected $allowedFilters;
|
27 |
+
protected $allowedMethods;
|
28 |
+
protected $allowedProperties;
|
29 |
+
protected $allowedFunctions;
|
30 |
|
31 |
public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = [])
|
32 |
{
|
88 |
|
89 |
public function checkMethodAllowed($obj, $method)
|
90 |
{
|
91 |
+
if ($obj instanceof \Twig_TemplateInterface || $obj instanceof Markup) {
|
92 |
return;
|
93 |
}
|
94 |
|
vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php
CHANGED
@@ -18,30 +18,11 @@ namespace Twig\Sandbox;
|
|
18 |
*/
|
19 |
interface SecurityPolicyInterface
|
20 |
{
|
21 |
-
/**
|
22 |
-
* @param string[] $tags
|
23 |
-
* @param string[] $filters
|
24 |
-
* @param string[] $functions
|
25 |
-
*
|
26 |
-
* @throws SecurityError
|
27 |
-
*/
|
28 |
public function checkSecurity($tags, $filters, $functions);
|
29 |
|
30 |
-
/**
|
31 |
-
* @param object $obj
|
32 |
-
* @param string $method
|
33 |
-
*
|
34 |
-
* @throws SecurityNotAllowedMethodError
|
35 |
-
*/
|
36 |
public function checkMethodAllowed($obj, $method);
|
37 |
|
38 |
-
|
39 |
-
* @param object $obj
|
40 |
-
* @param string $property
|
41 |
-
*
|
42 |
-
* @throws SecurityNotAllowedPropertyError
|
43 |
-
*/
|
44 |
-
public function checkPropertyAllowed($obj, $property);
|
45 |
}
|
46 |
|
47 |
class_alias('Twig\Sandbox\SecurityPolicyInterface', 'Twig_Sandbox_SecurityPolicyInterface');
|
18 |
*/
|
19 |
interface SecurityPolicyInterface
|
20 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function checkSecurity($tags, $filters, $functions);
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
public function checkMethodAllowed($obj, $method);
|
24 |
|
25 |
+
public function checkPropertyAllowed($obj, $method);
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
class_alias('Twig\Sandbox\SecurityPolicyInterface', 'Twig_Sandbox_SecurityPolicyInterface');
|
vendor/twig/twig/src/Source.php
CHANGED
@@ -14,9 +14,11 @@ namespace Twig;
|
|
14 |
/**
|
15 |
* Holds information about a non-compiled Twig template.
|
16 |
*
|
|
|
|
|
17 |
* @author Fabien Potencier <fabien@symfony.com>
|
18 |
*/
|
19 |
-
|
20 |
{
|
21 |
private $code;
|
22 |
private $name;
|
@@ -27,14 +29,14 @@ final class Source
|
|
27 |
* @param string $name The template logical name
|
28 |
* @param string $path The filesystem path of the template if any
|
29 |
*/
|
30 |
-
public function __construct(
|
31 |
{
|
32 |
$this->code = $code;
|
33 |
$this->name = $name;
|
34 |
$this->path = $path;
|
35 |
}
|
36 |
|
37 |
-
public function getCode()
|
38 |
{
|
39 |
return $this->code;
|
40 |
}
|
@@ -44,7 +46,7 @@ final class Source
|
|
44 |
return $this->name;
|
45 |
}
|
46 |
|
47 |
-
public function getPath()
|
48 |
{
|
49 |
return $this->path;
|
50 |
}
|
14 |
/**
|
15 |
* Holds information about a non-compiled Twig template.
|
16 |
*
|
17 |
+
* @final
|
18 |
+
*
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
*/
|
21 |
+
class Source
|
22 |
{
|
23 |
private $code;
|
24 |
private $name;
|
29 |
* @param string $name The template logical name
|
30 |
* @param string $path The filesystem path of the template if any
|
31 |
*/
|
32 |
+
public function __construct($code, $name, $path = '')
|
33 |
{
|
34 |
$this->code = $code;
|
35 |
$this->name = $name;
|
36 |
$this->path = $path;
|
37 |
}
|
38 |
|
39 |
+
public function getCode()
|
40 |
{
|
41 |
return $this->code;
|
42 |
}
|
46 |
return $this->name;
|
47 |
}
|
48 |
|
49 |
+
public function getPath()
|
50 |
{
|
51 |
return $this->path;
|
52 |
}
|
vendor/twig/twig/src/Template.php
CHANGED
@@ -27,28 +27,27 @@ use Twig\Error\RuntimeError;
|
|
27 |
*
|
28 |
* @internal
|
29 |
*/
|
30 |
-
abstract class Template
|
31 |
{
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
35 |
|
36 |
protected $parent;
|
37 |
protected $parents = [];
|
38 |
protected $env;
|
39 |
protected $blocks = [];
|
40 |
protected $traits = [];
|
41 |
-
protected $extensions = [];
|
42 |
protected $sandbox;
|
43 |
|
44 |
public function __construct(Environment $env)
|
45 |
{
|
46 |
$this->env = $env;
|
47 |
-
$this->extensions = $env->getExtensions();
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
-
* @internal this method will be removed in
|
52 |
*/
|
53 |
public function __toString()
|
54 |
{
|
@@ -67,7 +66,24 @@ abstract class Template
|
|
67 |
*
|
68 |
* @return array Debug information
|
69 |
*/
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
/**
|
73 |
* Returns information about the original template source code.
|
@@ -79,13 +95,25 @@ abstract class Template
|
|
79 |
return new Source('', $this->getTemplateName());
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
/**
|
83 |
* Returns the parent template.
|
84 |
*
|
85 |
* This method is for internal use only and should never be called
|
86 |
* directly.
|
87 |
*
|
88 |
-
* @return
|
|
|
|
|
89 |
*/
|
90 |
public function getParent(array $context)
|
91 |
{
|
@@ -139,6 +167,8 @@ abstract class Template
|
|
139 |
*/
|
140 |
public function displayParentBlock($name, array $context, array $blocks = [])
|
141 |
{
|
|
|
|
|
142 |
if (isset($this->traits[$name])) {
|
143 |
$this->traits[$name][0]->displayBlock($name, $context, $blocks, false);
|
144 |
} elseif (false !== $parent = $this->getParent($context)) {
|
@@ -159,8 +189,10 @@ abstract class Template
|
|
159 |
* @param array $blocks The current set of blocks
|
160 |
* @param bool $useBlocks Whether to use the current set of blocks
|
161 |
*/
|
162 |
-
public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true
|
163 |
{
|
|
|
|
|
164 |
if ($useBlocks && isset($blocks[$name])) {
|
165 |
$template = $blocks[$name][0];
|
166 |
$block = $blocks[$name][1];
|
@@ -199,11 +231,9 @@ abstract class Template
|
|
199 |
throw $e;
|
200 |
}
|
201 |
} elseif (false !== $parent = $this->getParent($context)) {
|
202 |
-
$parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false
|
203 |
-
} elseif (isset($blocks[$name])) {
|
204 |
-
throw new RuntimeError(sprintf('Block "%s" should not call parent() in "%s" as the block does not exist in the parent template "%s".', $name, $blocks[$name][0]->getTemplateName(), $this->getTemplateName()), -1, $blocks[$name][0]->getSourceContext());
|
205 |
} else {
|
206 |
-
|
207 |
}
|
208 |
}
|
209 |
|
@@ -268,8 +298,14 @@ abstract class Template
|
|
268 |
*
|
269 |
* @return bool true if the block exists, false otherwise
|
270 |
*/
|
271 |
-
public function hasBlock($name, array $context, array $blocks = [])
|
272 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
if (isset($blocks[$name])) {
|
274 |
return $blocks[$name][0] instanceof self;
|
275 |
}
|
@@ -296,8 +332,14 @@ abstract class Template
|
|
296 |
*
|
297 |
* @return array An array of block names
|
298 |
*/
|
299 |
-
public function getBlockNames(array $context, array $blocks = [])
|
300 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
$names = array_merge(array_keys($blocks), array_keys($this->blocks));
|
302 |
|
303 |
if (false !== $parent = $this->getParent($context)) {
|
@@ -388,6 +430,12 @@ abstract class Template
|
|
388 |
}
|
389 |
try {
|
390 |
$this->display($context);
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
} catch (\Throwable $e) {
|
392 |
while (ob_get_level() > $level) {
|
393 |
ob_end_clean();
|
@@ -430,6 +478,254 @@ abstract class Template
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
}
|
434 |
|
435 |
class_alias('Twig\Template', 'Twig_Template');
|
27 |
*
|
28 |
* @internal
|
29 |
*/
|
30 |
+
abstract class Template implements \Twig_TemplateInterface
|
31 |
{
|
32 |
+
/**
|
33 |
+
* @internal
|
34 |
+
*/
|
35 |
+
protected static $cache = [];
|
36 |
|
37 |
protected $parent;
|
38 |
protected $parents = [];
|
39 |
protected $env;
|
40 |
protected $blocks = [];
|
41 |
protected $traits = [];
|
|
|
42 |
protected $sandbox;
|
43 |
|
44 |
public function __construct(Environment $env)
|
45 |
{
|
46 |
$this->env = $env;
|
|
|
47 |
}
|
48 |
|
49 |
/**
|
50 |
+
* @internal this method will be removed in 2.0 and is only used internally to provide an upgrade path from 1.x to 2.0
|
51 |
*/
|
52 |
public function __toString()
|
53 |
{
|
66 |
*
|
67 |
* @return array Debug information
|
68 |
*/
|
69 |
+
public function getDebugInfo()
|
70 |
+
{
|
71 |
+
return [];
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Returns the template source code.
|
76 |
+
*
|
77 |
+
* @return string The template source code
|
78 |
+
*
|
79 |
+
* @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead
|
80 |
+
*/
|
81 |
+
public function getSource()
|
82 |
+
{
|
83 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', \E_USER_DEPRECATED);
|
84 |
+
|
85 |
+
return '';
|
86 |
+
}
|
87 |
|
88 |
/**
|
89 |
* Returns information about the original template source code.
|
95 |
return new Source('', $this->getTemplateName());
|
96 |
}
|
97 |
|
98 |
+
/**
|
99 |
+
* @deprecated since 1.20 (to be removed in 2.0)
|
100 |
+
*/
|
101 |
+
public function getEnvironment()
|
102 |
+
{
|
103 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.20 and will be removed in 2.0.', \E_USER_DEPRECATED);
|
104 |
+
|
105 |
+
return $this->env;
|
106 |
+
}
|
107 |
+
|
108 |
/**
|
109 |
* Returns the parent template.
|
110 |
*
|
111 |
* This method is for internal use only and should never be called
|
112 |
* directly.
|
113 |
*
|
114 |
+
* @return \Twig_TemplateInterface|TemplateWrapper|false The parent template or false if there is no parent
|
115 |
+
*
|
116 |
+
* @internal
|
117 |
*/
|
118 |
public function getParent(array $context)
|
119 |
{
|
167 |
*/
|
168 |
public function displayParentBlock($name, array $context, array $blocks = [])
|
169 |
{
|
170 |
+
$name = (string) $name;
|
171 |
+
|
172 |
if (isset($this->traits[$name])) {
|
173 |
$this->traits[$name][0]->displayBlock($name, $context, $blocks, false);
|
174 |
} elseif (false !== $parent = $this->getParent($context)) {
|
189 |
* @param array $blocks The current set of blocks
|
190 |
* @param bool $useBlocks Whether to use the current set of blocks
|
191 |
*/
|
192 |
+
public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true)
|
193 |
{
|
194 |
+
$name = (string) $name;
|
195 |
+
|
196 |
if ($useBlocks && isset($blocks[$name])) {
|
197 |
$template = $blocks[$name][0];
|
198 |
$block = $blocks[$name][1];
|
231 |
throw $e;
|
232 |
}
|
233 |
} elseif (false !== $parent = $this->getParent($context)) {
|
234 |
+
$parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
|
|
|
|
|
235 |
} else {
|
236 |
+
@trigger_error(sprintf('Silent display of undefined block "%s" in template "%s" is deprecated since version 1.29 and will throw an exception in 2.0. Use the "block(\'%s\') is defined" expression to test for block existence.', $name, $this->getTemplateName(), $name), \E_USER_DEPRECATED);
|
237 |
}
|
238 |
}
|
239 |
|
298 |
*
|
299 |
* @return bool true if the block exists, false otherwise
|
300 |
*/
|
301 |
+
public function hasBlock($name, array $context = null, array $blocks = [])
|
302 |
{
|
303 |
+
if (null === $context) {
|
304 |
+
@trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', \E_USER_DEPRECATED);
|
305 |
+
|
306 |
+
return isset($this->blocks[(string) $name]);
|
307 |
+
}
|
308 |
+
|
309 |
if (isset($blocks[$name])) {
|
310 |
return $blocks[$name][0] instanceof self;
|
311 |
}
|
332 |
*
|
333 |
* @return array An array of block names
|
334 |
*/
|
335 |
+
public function getBlockNames(array $context = null, array $blocks = [])
|
336 |
{
|
337 |
+
if (null === $context) {
|
338 |
+
@trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', \E_USER_DEPRECATED);
|
339 |
+
|
340 |
+
return array_keys($this->blocks);
|
341 |
+
}
|
342 |
+
|
343 |
$names = array_merge(array_keys($blocks), array_keys($this->blocks));
|
344 |
|
345 |
if (false !== $parent = $this->getParent($context)) {
|
430 |
}
|
431 |
try {
|
432 |
$this->display($context);
|
433 |
+
} catch (\Exception $e) {
|
434 |
+
while (ob_get_level() > $level) {
|
435 |
+
ob_end_clean();
|
436 |
+
}
|
437 |
+
|
438 |
+
throw $e;
|
439 |
} catch (\Throwable $e) {
|
440 |
while (ob_get_level() > $level) {
|
441 |
ob_end_clean();
|
478 |
* @param array $blocks An array of blocks to pass to the template
|
479 |
*/
|
480 |
abstract protected function doDisplay(array $context, array $blocks = []);
|
481 |
+
|
482 |
+
/**
|
483 |
+
* Returns a variable from the context.
|
484 |
+
*
|
485 |
+
* This method is for internal use only and should never be called
|
486 |
+
* directly.
|
487 |
+
*
|
488 |
+
* This method should not be overridden in a sub-class as this is an
|
489 |
+
* implementation detail that has been introduced to optimize variable
|
490 |
+
* access for versions of PHP before 5.4. This is not a way to override
|
491 |
+
* the way to get a variable value.
|
492 |
+
*
|
493 |
+
* @param array $context The context
|
494 |
+
* @param string $item The variable to return from the context
|
495 |
+
* @param bool $ignoreStrictCheck Whether to ignore the strict variable check or not
|
496 |
+
*
|
497 |
+
* @return mixed The content of the context variable
|
498 |
+
*
|
499 |
+
* @throws RuntimeError if the variable does not exist and Twig is running in strict mode
|
500 |
+
*
|
501 |
+
* @internal
|
502 |
+
*/
|
503 |
+
final protected function getContext($context, $item, $ignoreStrictCheck = false)
|
504 |
+
{
|
505 |
+
if (!\array_key_exists($item, $context)) {
|
506 |
+
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
507 |
+
return;
|
508 |
+
}
|
509 |
+
|
510 |
+
throw new RuntimeError(sprintf('Variable "%s" does not exist.', $item), -1, $this->getSourceContext());
|
511 |
+
}
|
512 |
+
|
513 |
+
return $context[$item];
|
514 |
+
}
|
515 |
+
|
516 |
+
/**
|
517 |
+
* Returns the attribute value for a given array/object.
|
518 |
+
*
|
519 |
+
* @param mixed $object The object or array from where to get the item
|
520 |
+
* @param mixed $item The item to get from the array or object
|
521 |
+
* @param array $arguments An array of arguments to pass if the item is an object method
|
522 |
+
* @param string $type The type of attribute (@see \Twig\Template constants)
|
523 |
+
* @param bool $isDefinedTest Whether this is only a defined check
|
524 |
+
* @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not
|
525 |
+
*
|
526 |
+
* @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
|
527 |
+
*
|
528 |
+
* @throws RuntimeError if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false
|
529 |
+
*
|
530 |
+
* @internal
|
531 |
+
*/
|
532 |
+
protected function getAttribute($object, $item, array $arguments = [], $type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false)
|
533 |
+
{
|
534 |
+
// array
|
535 |
+
if (self::METHOD_CALL !== $type) {
|
536 |
+
$arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item;
|
537 |
+
|
538 |
+
if (((\is_array($object) || $object instanceof \ArrayObject) && (isset($object[$arrayItem]) || \array_key_exists($arrayItem, (array) $object)))
|
539 |
+
|| ($object instanceof \ArrayAccess && isset($object[$arrayItem]))
|
540 |
+
) {
|
541 |
+
if ($isDefinedTest) {
|
542 |
+
return true;
|
543 |
+
}
|
544 |
+
|
545 |
+
return $object[$arrayItem];
|
546 |
+
}
|
547 |
+
|
548 |
+
if (self::ARRAY_CALL === $type || !\is_object($object)) {
|
549 |
+
if ($isDefinedTest) {
|
550 |
+
return false;
|
551 |
+
}
|
552 |
+
|
553 |
+
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
554 |
+
return;
|
555 |
+
}
|
556 |
+
|
557 |
+
if ($object instanceof \ArrayAccess) {
|
558 |
+
$message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, \get_class($object));
|
559 |
+
} elseif (\is_object($object)) {
|
560 |
+
$message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object));
|
561 |
+
} elseif (\is_array($object)) {
|
562 |
+
if (empty($object)) {
|
563 |
+
$message = sprintf('Key "%s" does not exist as the array is empty.', $arrayItem);
|
564 |
+
} else {
|
565 |
+
$message = sprintf('Key "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object)));
|
566 |
+
}
|
567 |
+
} elseif (self::ARRAY_CALL === $type) {
|
568 |
+
if (null === $object) {
|
569 |
+
$message = sprintf('Impossible to access a key ("%s") on a null variable.', $item);
|
570 |
+
} else {
|
571 |
+
$message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
|
572 |
+
}
|
573 |
+
} elseif (null === $object) {
|
574 |
+
$message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item);
|
575 |
+
} else {
|
576 |
+
$message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
|
577 |
+
}
|
578 |
+
|
579 |
+
throw new RuntimeError($message, -1, $this->getSourceContext());
|
580 |
+
}
|
581 |
+
}
|
582 |
+
|
583 |
+
if (!\is_object($object)) {
|
584 |
+
if ($isDefinedTest) {
|
585 |
+
return false;
|
586 |
+
}
|
587 |
+
|
588 |
+
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
589 |
+
return;
|
590 |
+
}
|
591 |
+
|
592 |
+
if (null === $object) {
|
593 |
+
$message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item);
|
594 |
+
} elseif (\is_array($object)) {
|
595 |
+
$message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
|
596 |
+
} else {
|
597 |
+
$message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
|
598 |
+
}
|
599 |
+
|
600 |
+
throw new RuntimeError($message, -1, $this->getSourceContext());
|
601 |
+
}
|
602 |
+
|
603 |
+
// object property
|
604 |
+
if (self::METHOD_CALL !== $type && !$object instanceof self) { // \Twig\Template does not have public properties, and we don't want to allow access to internal ones
|
605 |
+
if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) {
|
606 |
+
if ($isDefinedTest) {
|
607 |
+
return true;
|
608 |
+
}
|
609 |
+
|
610 |
+
if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
|
611 |
+
$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkPropertyAllowed($object, $item);
|
612 |
+
}
|
613 |
+
|
614 |
+
return $object->$item;
|
615 |
+
}
|
616 |
+
}
|
617 |
+
|
618 |
+
$class = \get_class($object);
|
619 |
+
|
620 |
+
// object method
|
621 |
+
if (!isset(self::$cache[$class])) {
|
622 |
+
// get_class_methods returns all methods accessible in the scope, but we only want public ones to be accessible in templates
|
623 |
+
if ($object instanceof self) {
|
624 |
+
$ref = new \ReflectionClass($class);
|
625 |
+
$methods = [];
|
626 |
+
|
627 |
+
foreach ($ref->getMethods(\ReflectionMethod::IS_PUBLIC) as $refMethod) {
|
628 |
+
// Accessing the environment from templates is forbidden to prevent untrusted changes to the environment
|
629 |
+
if ('getenvironment' !== strtr($refMethod->name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) {
|
630 |
+
$methods[] = $refMethod->name;
|
631 |
+
}
|
632 |
+
}
|
633 |
+
} else {
|
634 |
+
$methods = get_class_methods($object);
|
635 |
+
}
|
636 |
+
// sort values to have consistent behavior, so that "get" methods win precedence over "is" methods
|
637 |
+
sort($methods);
|
638 |
+
|
639 |
+
$cache = [];
|
640 |
+
|
641 |
+
foreach ($methods as $method) {
|
642 |
+
$cache[$method] = $method;
|
643 |
+
$cache[$lcName = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')] = $method;
|
644 |
+
|
645 |
+
if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) {
|
646 |
+
$name = substr($method, 3);
|
647 |
+
$lcName = substr($lcName, 3);
|
648 |
+
} elseif ('i' === $lcName[0] && 0 === strpos($lcName, 'is')) {
|
649 |
+
$name = substr($method, 2);
|
650 |
+
$lcName = substr($lcName, 2);
|
651 |
+
} else {
|
652 |
+
continue;
|
653 |
+
}
|
654 |
+
|
655 |
+
// skip get() and is() methods (in which case, $name is empty)
|
656 |
+
if ($name) {
|
657 |
+
if (!isset($cache[$name])) {
|
658 |
+
$cache[$name] = $method;
|
659 |
+
}
|
660 |
+
if (!isset($cache[$lcName])) {
|
661 |
+
$cache[$lcName] = $method;
|
662 |
+
}
|
663 |
+
}
|
664 |
+
}
|
665 |
+
self::$cache[$class] = $cache;
|
666 |
+
}
|
667 |
+
|
668 |
+
$call = false;
|
669 |
+
if (isset(self::$cache[$class][$item])) {
|
670 |
+
$method = self::$cache[$class][$item];
|
671 |
+
} elseif (isset(self::$cache[$class][$lcItem = strtr($item, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')])) {
|
672 |
+
$method = self::$cache[$class][$lcItem];
|
673 |
+
} elseif (isset(self::$cache[$class]['__call'])) {
|
674 |
+
$method = $item;
|
675 |
+
$call = true;
|
676 |
+
} else {
|
677 |
+
if ($isDefinedTest) {
|
678 |
+
return false;
|
679 |
+
}
|
680 |
+
|
681 |
+
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
682 |
+
return;
|
683 |
+
}
|
684 |
+
|
685 |
+
throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
|
686 |
+
}
|
687 |
+
|
688 |
+
if ($isDefinedTest) {
|
689 |
+
return true;
|
690 |
+
}
|
691 |
+
|
692 |
+
if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
|
693 |
+
$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
|
694 |
+
}
|
695 |
+
|
696 |
+
// Some objects throw exceptions when they have __call, and the method we try
|
697 |
+
// to call is not supported. If ignoreStrictCheck is true, we should return null.
|
698 |
+
try {
|
699 |
+
if (!$arguments) {
|
700 |
+
$ret = $object->$method();
|
701 |
+
} else {
|
702 |
+
$ret = \call_user_func_array([$object, $method], $arguments);
|
703 |
+
}
|
704 |
+
} catch (\BadMethodCallException $e) {
|
705 |
+
if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
|
706 |
+
return;
|
707 |
+
}
|
708 |
+
throw $e;
|
709 |
+
}
|
710 |
+
|
711 |
+
// @deprecated in 1.28
|
712 |
+
if ($object instanceof \Twig_TemplateInterface) {
|
713 |
+
$self = $object->getTemplateName() === $this->getTemplateName();
|
714 |
+
$message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
|
715 |
+
if ('renderBlock' === $method || 'displayBlock' === $method) {
|
716 |
+
$message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
|
717 |
+
} elseif ('hasBlock' === $method) {
|
718 |
+
$message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
|
719 |
+
} elseif ('render' === $method || 'display' === $method) {
|
720 |
+
$message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
|
721 |
+
}
|
722 |
+
@trigger_error($message, \E_USER_DEPRECATED);
|
723 |
+
|
724 |
+
return '' === $ret ? '' : new Markup($ret, $this->env->getCharset());
|
725 |
+
}
|
726 |
+
|
727 |
+
return $ret;
|
728 |
+
}
|
729 |
}
|
730 |
|
731 |
class_alias('Twig\Template', 'Twig_Template');
|
vendor/twig/twig/src/TemplateWrapper.php
CHANGED
@@ -37,12 +37,14 @@ final class TemplateWrapper
|
|
37 |
* Renders the template.
|
38 |
*
|
39 |
* @param array $context An array of parameters to pass to the template
|
|
|
|
|
40 |
*/
|
41 |
-
public function render(
|
42 |
{
|
43 |
// using func_get_args() allows to not expose the blocks argument
|
44 |
// as it should only be used by internal code
|
45 |
-
return $this->template->render($context, \
|
46 |
}
|
47 |
|
48 |
/**
|
@@ -50,11 +52,11 @@ final class TemplateWrapper
|
|
50 |
*
|
51 |
* @param array $context An array of parameters to pass to the template
|
52 |
*/
|
53 |
-
public function display(
|
54 |
{
|
55 |
// using func_get_args() allows to not expose the blocks argument
|
56 |
// as it should only be used by internal code
|
57 |
-
$this->template->display($context, \
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -62,8 +64,10 @@ final class TemplateWrapper
|
|
62 |
*
|
63 |
* @param string $name The block name
|
64 |
* @param array $context An array of parameters to pass to the template
|
|
|
|
|
65 |
*/
|
66 |
-
public function hasBlock(
|
67 |
{
|
68 |
return $this->template->hasBlock($name, $context);
|
69 |
}
|
@@ -75,7 +79,7 @@ final class TemplateWrapper
|
|
75 |
*
|
76 |
* @return string[] An array of defined template block names
|
77 |
*/
|
78 |
-
public function getBlockNames(
|
79 |
{
|
80 |
return $this->template->getBlockNames($context);
|
81 |
}
|
@@ -88,7 +92,7 @@ final class TemplateWrapper
|
|
88 |
*
|
89 |
* @return string The rendered block
|
90 |
*/
|
91 |
-
public function renderBlock(
|
92 |
{
|
93 |
$context = $this->env->mergeGlobals($context);
|
94 |
$level = ob_get_level();
|
@@ -99,6 +103,12 @@ final class TemplateWrapper
|
|
99 |
}
|
100 |
try {
|
101 |
$this->template->displayBlock($name, $context);
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
} catch (\Throwable $e) {
|
103 |
while (ob_get_level() > $level) {
|
104 |
ob_end_clean();
|
@@ -116,17 +126,23 @@ final class TemplateWrapper
|
|
116 |
* @param string $name The block name to render
|
117 |
* @param array $context An array of parameters to pass to the template
|
118 |
*/
|
119 |
-
public function displayBlock(
|
120 |
{
|
121 |
$this->template->displayBlock($name, $this->env->mergeGlobals($context));
|
122 |
}
|
123 |
|
124 |
-
|
|
|
|
|
|
|
125 |
{
|
126 |
return $this->template->getSourceContext();
|
127 |
}
|
128 |
|
129 |
-
|
|
|
|
|
|
|
130 |
{
|
131 |
return $this->template->getTemplateName();
|
132 |
}
|
37 |
* Renders the template.
|
38 |
*
|
39 |
* @param array $context An array of parameters to pass to the template
|
40 |
+
*
|
41 |
+
* @return string The rendered template
|
42 |
*/
|
43 |
+
public function render($context = [])
|
44 |
{
|
45 |
// using func_get_args() allows to not expose the blocks argument
|
46 |
// as it should only be used by internal code
|
47 |
+
return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
|
48 |
}
|
49 |
|
50 |
/**
|
52 |
*
|
53 |
* @param array $context An array of parameters to pass to the template
|
54 |
*/
|
55 |
+
public function display($context = [])
|
56 |
{
|
57 |
// using func_get_args() allows to not expose the blocks argument
|
58 |
// as it should only be used by internal code
|
59 |
+
$this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
|
60 |
}
|
61 |
|
62 |
/**
|
64 |
*
|
65 |
* @param string $name The block name
|
66 |
* @param array $context An array of parameters to pass to the template
|
67 |
+
*
|
68 |
+
* @return bool
|
69 |
*/
|
70 |
+
public function hasBlock($name, $context = [])
|
71 |
{
|
72 |
return $this->template->hasBlock($name, $context);
|
73 |
}
|
79 |
*
|
80 |
* @return string[] An array of defined template block names
|
81 |
*/
|
82 |
+
public function getBlockNames($context = [])
|
83 |
{
|
84 |
return $this->template->getBlockNames($context);
|
85 |
}
|
92 |
*
|
93 |
* @return string The rendered block
|
94 |
*/
|
95 |
+
public function renderBlock($name, $context = [])
|
96 |
{
|
97 |
$context = $this->env->mergeGlobals($context);
|
98 |
$level = ob_get_level();
|
103 |
}
|
104 |
try {
|
105 |
$this->template->displayBlock($name, $context);
|
106 |
+
} catch (\Exception $e) {
|
107 |
+
while (ob_get_level() > $level) {
|
108 |
+
ob_end_clean();
|
109 |
+
}
|
110 |
+
|
111 |
+
throw $e;
|
112 |
} catch (\Throwable $e) {
|
113 |
while (ob_get_level() > $level) {
|
114 |
ob_end_clean();
|
126 |
* @param string $name The block name to render
|
127 |
* @param array $context An array of parameters to pass to the template
|
128 |
*/
|
129 |
+
public function displayBlock($name, $context = [])
|
130 |
{
|
131 |
$this->template->displayBlock($name, $this->env->mergeGlobals($context));
|
132 |
}
|
133 |
|
134 |
+
/**
|
135 |
+
* @return Source
|
136 |
+
*/
|
137 |
+
public function getSourceContext()
|
138 |
{
|
139 |
return $this->template->getSourceContext();
|
140 |
}
|
141 |
|
142 |
+
/**
|
143 |
+
* @return string
|
144 |
+
*/
|
145 |
+
public function getTemplateName()
|
146 |
{
|
147 |
return $this->template->getTemplateName();
|
148 |
}
|
vendor/twig/twig/src/Test/IntegrationTestCase.php
CHANGED
@@ -16,7 +16,9 @@ use Twig\Environment;
|
|
16 |
use Twig\Error\Error;
|
17 |
use Twig\Extension\ExtensionInterface;
|
18 |
use Twig\Loader\ArrayLoader;
|
|
|
19 |
use Twig\RuntimeLoader\RuntimeLoaderInterface;
|
|
|
20 |
use Twig\TwigFilter;
|
21 |
use Twig\TwigFunction;
|
22 |
use Twig\TwigTest;
|
@@ -77,18 +79,18 @@ abstract class IntegrationTestCase extends TestCase
|
|
77 |
/**
|
78 |
* @dataProvider getTests
|
79 |
*/
|
80 |
-
public function testIntegration($file, $message, $condition, $templates, $exception, $outputs
|
81 |
{
|
82 |
-
$this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
* @dataProvider getLegacyTests
|
87 |
* @group legacy
|
88 |
*/
|
89 |
-
public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs
|
90 |
{
|
91 |
-
$this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs
|
92 |
}
|
93 |
|
94 |
public function getTests($name, $legacyTests = false)
|
@@ -107,25 +109,23 @@ abstract class IntegrationTestCase extends TestCase
|
|
107 |
|
108 |
$test = file_get_contents($file->getRealpath());
|
109 |
|
110 |
-
if (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*(
|
111 |
$message = $match[1];
|
112 |
$condition = $match[2];
|
113 |
-
$
|
114 |
-
$
|
115 |
-
$
|
116 |
-
|
117 |
-
} elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*(?:--DEPRECATION--\s*(.*?))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) {
|
118 |
$message = $match[1];
|
119 |
$condition = $match[2];
|
120 |
-
$
|
121 |
-
$templates = self::parseTemplates($match[4]);
|
122 |
$exception = false;
|
123 |
preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, \PREG_SET_ORDER);
|
124 |
} else {
|
125 |
throw new \InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file)));
|
126 |
}
|
127 |
|
128 |
-
$tests[] = [str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs
|
129 |
}
|
130 |
|
131 |
if ($legacyTests && empty($tests)) {
|
@@ -141,7 +141,7 @@ abstract class IntegrationTestCase extends TestCase
|
|
141 |
return $this->getTests('testLegacyIntegration', true);
|
142 |
}
|
143 |
|
144 |
-
protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs
|
145 |
{
|
146 |
if (!$outputs) {
|
147 |
$this->markTestSkipped('no tests to run');
|
@@ -183,23 +183,11 @@ abstract class IntegrationTestCase extends TestCase
|
|
183 |
$twig->addFunction($function);
|
184 |
}
|
185 |
|
186 |
-
// avoid using the same PHP class name for different cases
|
187 |
$p = new \ReflectionProperty($twig, 'templateClassPrefix');
|
188 |
$p->setAccessible(true);
|
189 |
-
$p->setValue($twig, '__TwigTemplate_'.hash(
|
190 |
|
191 |
-
$deprecations = [];
|
192 |
try {
|
193 |
-
$prevHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$prevHandler) {
|
194 |
-
if (\E_USER_DEPRECATED === $type) {
|
195 |
-
$deprecations[] = $msg;
|
196 |
-
|
197 |
-
return true;
|
198 |
-
}
|
199 |
-
|
200 |
-
return $prevHandler ? $prevHandler($type, $msg, $file, $line, $context) : false;
|
201 |
-
});
|
202 |
-
|
203 |
$template = $twig->load('index.twig');
|
204 |
} catch (\Exception $e) {
|
205 |
if (false !== $exception) {
|
@@ -212,12 +200,8 @@ abstract class IntegrationTestCase extends TestCase
|
|
212 |
}
|
213 |
|
214 |
throw new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e);
|
215 |
-
} finally {
|
216 |
-
restore_error_handler();
|
217 |
}
|
218 |
|
219 |
-
$this->assertSame($deprecation, implode("\n", $deprecations));
|
220 |
-
|
221 |
try {
|
222 |
$output = trim($template->render(eval($match[1].';')), "\n ");
|
223 |
} catch (\Exception $e) {
|
@@ -245,7 +229,13 @@ abstract class IntegrationTestCase extends TestCase
|
|
245 |
|
246 |
foreach (array_keys($templates) as $name) {
|
247 |
echo "Template: $name\n";
|
248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
}
|
250 |
}
|
251 |
$this->assertEquals($expected, $output, $message.' (in '.$file.')');
|
16 |
use Twig\Error\Error;
|
17 |
use Twig\Extension\ExtensionInterface;
|
18 |
use Twig\Loader\ArrayLoader;
|
19 |
+
use Twig\Loader\SourceContextLoaderInterface;
|
20 |
use Twig\RuntimeLoader\RuntimeLoaderInterface;
|
21 |
+
use Twig\Source;
|
22 |
use Twig\TwigFilter;
|
23 |
use Twig\TwigFunction;
|
24 |
use Twig\TwigTest;
|
79 |
/**
|
80 |
* @dataProvider getTests
|
81 |
*/
|
82 |
+
public function testIntegration($file, $message, $condition, $templates, $exception, $outputs)
|
83 |
{
|
84 |
+
$this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs);
|
85 |
}
|
86 |
|
87 |
/**
|
88 |
* @dataProvider getLegacyTests
|
89 |
* @group legacy
|
90 |
*/
|
91 |
+
public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs)
|
92 |
{
|
93 |
+
$this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs);
|
94 |
}
|
95 |
|
96 |
public function getTests($name, $legacyTests = false)
|
109 |
|
110 |
$test = file_get_contents($file->getRealpath());
|
111 |
|
112 |
+
if (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) {
|
113 |
$message = $match[1];
|
114 |
$condition = $match[2];
|
115 |
+
$templates = self::parseTemplates($match[3]);
|
116 |
+
$exception = $match[5];
|
117 |
+
$outputs = [[null, $match[4], null, '']];
|
118 |
+
} elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) {
|
|
|
119 |
$message = $match[1];
|
120 |
$condition = $match[2];
|
121 |
+
$templates = self::parseTemplates($match[3]);
|
|
|
122 |
$exception = false;
|
123 |
preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, \PREG_SET_ORDER);
|
124 |
} else {
|
125 |
throw new \InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file)));
|
126 |
}
|
127 |
|
128 |
+
$tests[] = [str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs];
|
129 |
}
|
130 |
|
131 |
if ($legacyTests && empty($tests)) {
|
141 |
return $this->getTests('testLegacyIntegration', true);
|
142 |
}
|
143 |
|
144 |
+
protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs)
|
145 |
{
|
146 |
if (!$outputs) {
|
147 |
$this->markTestSkipped('no tests to run');
|
183 |
$twig->addFunction($function);
|
184 |
}
|
185 |
|
|
|
186 |
$p = new \ReflectionProperty($twig, 'templateClassPrefix');
|
187 |
$p->setAccessible(true);
|
188 |
+
$p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_');
|
189 |
|
|
|
190 |
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
$template = $twig->load('index.twig');
|
192 |
} catch (\Exception $e) {
|
193 |
if (false !== $exception) {
|
200 |
}
|
201 |
|
202 |
throw new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e);
|
|
|
|
|
203 |
}
|
204 |
|
|
|
|
|
205 |
try {
|
206 |
$output = trim($template->render(eval($match[1].';')), "\n ");
|
207 |
} catch (\Exception $e) {
|
229 |
|
230 |
foreach (array_keys($templates) as $name) {
|
231 |
echo "Template: $name\n";
|
232 |
+
$loader = $twig->getLoader();
|
233 |
+
if (!$loader instanceof SourceContextLoaderInterface) {
|
234 |
+
$source = new Source($loader->getSource($name), $name);
|
235 |
+
} else {
|
236 |
+
$source = $loader->getSourceContext($name);
|
237 |
+
}
|
238 |
+
echo $twig->compile($twig->parse($twig->tokenize($source)));
|
239 |
}
|
240 |
}
|
241 |
$this->assertEquals($expected, $output, $message.' (in '.$file.')');
|
vendor/twig/twig/src/Test/NodeTestCase.php
CHANGED
@@ -55,12 +55,24 @@ abstract class NodeTestCase extends TestCase
|
|
55 |
{
|
56 |
$line = $line > 0 ? "// line {$line}\n" : '';
|
57 |
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
protected function getAttributeGetter()
|
62 |
{
|
63 |
-
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
}
|
66 |
|
55 |
{
|
56 |
$line = $line > 0 ? "// line {$line}\n" : '';
|
57 |
|
58 |
+
if (\PHP_VERSION_ID >= 70000) {
|
59 |
+
return sprintf('%s($context["%s"] ?? null)', $line, $name);
|
60 |
+
}
|
61 |
+
|
62 |
+
if (\PHP_VERSION_ID >= 50400) {
|
63 |
+
return sprintf('%s(isset($context["%s"]) ? $context["%s"] : null)', $line, $name, $name);
|
64 |
+
}
|
65 |
+
|
66 |
+
return sprintf('%s$this->getContext($context, "%s")', $line, $name);
|
67 |
}
|
68 |
|
69 |
protected function getAttributeGetter()
|
70 |
{
|
71 |
+
if (\function_exists('twig_template_get_attributes')) {
|
72 |
+
return 'twig_template_get_attributes($this, ';
|
73 |
+
}
|
74 |
+
|
75 |
+
return '$this->getAttribute(';
|
76 |
}
|
77 |
}
|
78 |
|
vendor/twig/twig/src/Token.php
CHANGED
@@ -16,12 +16,14 @@ namespace Twig;
|
|
16 |
* Represents a Token.
|
17 |
*
|
18 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
19 |
*/
|
20 |
-
|
21 |
{
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
public const EOF_TYPE = -1;
|
27 |
public const TEXT_TYPE = 0;
|
16 |
* Represents a Token.
|
17 |
*
|
18 |
* @author Fabien Potencier <fabien@symfony.com>
|
19 |
+
*
|
20 |
+
* @final
|
21 |
*/
|
22 |
+
class Token
|
23 |
{
|
24 |
+
protected $value;
|
25 |
+
protected $type;
|
26 |
+
protected $lineno;
|
27 |
|
28 |
public const EOF_TYPE = -1;
|
29 |
public const TEXT_TYPE = 0;
|
vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php
CHANGED
@@ -18,27 +18,58 @@ use Twig\Token;
|
|
18 |
|
19 |
/**
|
20 |
* Marks a section of a template to be escaped or not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
*/
|
22 |
-
|
23 |
{
|
24 |
public function parse(Token $token)
|
25 |
{
|
26 |
$lineno = $token->getLine();
|
27 |
$stream = $this->parser->getStream();
|
28 |
|
29 |
-
if ($stream->test(
|
30 |
$value = 'html';
|
31 |
} else {
|
32 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
33 |
if (!$expr instanceof ConstantExpression) {
|
34 |
-
throw new SyntaxError('An escaping strategy must be a string or
|
35 |
}
|
36 |
$value = $expr->getAttribute('value');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
-
$stream->expect(
|
40 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
41 |
-
$stream->expect(
|
42 |
|
43 |
return new AutoEscapeNode($value, $body, $lineno, $this->getTag());
|
44 |
}
|
18 |
|
19 |
/**
|
20 |
* Marks a section of a template to be escaped or not.
|
21 |
+
*
|
22 |
+
* {% autoescape true %}
|
23 |
+
* Everything will be automatically escaped in this block
|
24 |
+
* {% endautoescape %}
|
25 |
+
*
|
26 |
+
* {% autoescape false %}
|
27 |
+
* Everything will be outputed as is in this block
|
28 |
+
* {% endautoescape %}
|
29 |
+
*
|
30 |
+
* {% autoescape true js %}
|
31 |
+
* Everything will be automatically escaped in this block
|
32 |
+
* using the js escaping strategy
|
33 |
+
* {% endautoescape %}
|
34 |
+
*
|
35 |
+
* @final
|
36 |
*/
|
37 |
+
class AutoEscapeTokenParser extends AbstractTokenParser
|
38 |
{
|
39 |
public function parse(Token $token)
|
40 |
{
|
41 |
$lineno = $token->getLine();
|
42 |
$stream = $this->parser->getStream();
|
43 |
|
44 |
+
if ($stream->test(Token::BLOCK_END_TYPE)) {
|
45 |
$value = 'html';
|
46 |
} else {
|
47 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
48 |
if (!$expr instanceof ConstantExpression) {
|
49 |
+
throw new SyntaxError('An escaping strategy must be a string or a bool.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
50 |
}
|
51 |
$value = $expr->getAttribute('value');
|
52 |
+
|
53 |
+
$compat = true === $value || false === $value;
|
54 |
+
|
55 |
+
if (true === $value) {
|
56 |
+
$value = 'html';
|
57 |
+
}
|
58 |
+
|
59 |
+
if ($compat && $stream->test(Token::NAME_TYPE)) {
|
60 |
+
@trigger_error('Using the autoescape tag with "true" or "false" before the strategy name is deprecated since version 1.21.', \E_USER_DEPRECATED);
|
61 |
+
|
62 |
+
if (false === $value) {
|
63 |
+
throw new SyntaxError('Unexpected escaping strategy as you set autoescaping to false.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
64 |
+
}
|
65 |
+
|
66 |
+
$value = $stream->next()->getValue();
|
67 |
+
}
|
68 |
}
|
69 |
|
70 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
71 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
72 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
73 |
|
74 |
return new AutoEscapeNode($value, $body, $lineno, $this->getTag());
|
75 |
}
|
vendor/twig/twig/src/TokenParser/BlockTokenParser.php
CHANGED
@@ -26,14 +26,16 @@ use Twig\Token;
|
|
26 |
* <link rel="stylesheet" href="style.css" />
|
27 |
* <title>{% block title %}{% endblock %} - My Webpage</title>
|
28 |
* {% endblock %}
|
|
|
|
|
29 |
*/
|
30 |
-
|
31 |
{
|
32 |
public function parse(Token $token)
|
33 |
{
|
34 |
$lineno = $token->getLine();
|
35 |
$stream = $this->parser->getStream();
|
36 |
-
$name = $stream->expect(
|
37 |
if ($this->parser->hasBlock($name)) {
|
38 |
throw new SyntaxError(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
39 |
}
|
@@ -41,9 +43,9 @@ final class BlockTokenParser extends AbstractTokenParser
|
|
41 |
$this->parser->pushLocalScope();
|
42 |
$this->parser->pushBlockStack($name);
|
43 |
|
44 |
-
if ($stream->nextIf(
|
45 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
46 |
-
if ($token = $stream->nextIf(
|
47 |
$value = $token->getValue();
|
48 |
|
49 |
if ($value != $name) {
|
@@ -55,7 +57,7 @@ final class BlockTokenParser extends AbstractTokenParser
|
|
55 |
new PrintNode($this->parser->getExpressionParser()->parseExpression(), $lineno),
|
56 |
]);
|
57 |
}
|
58 |
-
$stream->expect(
|
59 |
|
60 |
$block->setNode('body', $body);
|
61 |
$this->parser->popBlockStack();
|
26 |
* <link rel="stylesheet" href="style.css" />
|
27 |
* <title>{% block title %}{% endblock %} - My Webpage</title>
|
28 |
* {% endblock %}
|
29 |
+
*
|
30 |
+
* @final
|
31 |
*/
|
32 |
+
class BlockTokenParser extends AbstractTokenParser
|
33 |
{
|
34 |
public function parse(Token $token)
|
35 |
{
|
36 |
$lineno = $token->getLine();
|
37 |
$stream = $this->parser->getStream();
|
38 |
+
$name = $stream->expect(Token::NAME_TYPE)->getValue();
|
39 |
if ($this->parser->hasBlock($name)) {
|
40 |
throw new SyntaxError(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
41 |
}
|
43 |
$this->parser->pushLocalScope();
|
44 |
$this->parser->pushBlockStack($name);
|
45 |
|
46 |
+
if ($stream->nextIf(Token::BLOCK_END_TYPE)) {
|
47 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
48 |
+
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
|
49 |
$value = $token->getValue();
|
50 |
|
51 |
if ($value != $name) {
|
57 |
new PrintNode($this->parser->getExpressionParser()->parseExpression(), $lineno),
|
58 |
]);
|
59 |
}
|
60 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
61 |
|
62 |
$block->setNode('body', $body);
|
63 |
$this->parser->popBlockStack();
|
vendor/twig/twig/src/TokenParser/DoTokenParser.php
CHANGED
@@ -16,14 +16,16 @@ use Twig\Token;
|
|
16 |
|
17 |
/**
|
18 |
* Evaluates an expression, discarding the returned value.
|
|
|
|
|
19 |
*/
|
20 |
-
|
21 |
{
|
22 |
public function parse(Token $token)
|
23 |
{
|
24 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
25 |
|
26 |
-
$this->parser->getStream()->expect(
|
27 |
|
28 |
return new DoNode($expr, $token->getLine(), $this->getTag());
|
29 |
}
|
16 |
|
17 |
/**
|
18 |
* Evaluates an expression, discarding the returned value.
|
19 |
+
*
|
20 |
+
* @final
|
21 |
*/
|
22 |
+
class DoTokenParser extends AbstractTokenParser
|
23 |
{
|
24 |
public function parse(Token $token)
|
25 |
{
|
26 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
27 |
|
28 |
+
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
|
29 |
|
30 |
return new DoNode($expr, $token->getLine(), $this->getTag());
|
31 |
}
|
vendor/twig/twig/src/TokenParser/EmbedTokenParser.php
CHANGED
@@ -18,8 +18,10 @@ use Twig\Token;
|
|
18 |
|
19 |
/**
|
20 |
* Embeds a template.
|
|
|
|
|
21 |
*/
|
22 |
-
|
23 |
{
|
24 |
public function parse(Token $token)
|
25 |
{
|
@@ -29,19 +31,19 @@ final class EmbedTokenParser extends IncludeTokenParser
|
|
29 |
|
30 |
list($variables, $only, $ignoreMissing) = $this->parseArguments();
|
31 |
|
32 |
-
$parentToken = $fakeParentToken = new Token(
|
33 |
if ($parent instanceof ConstantExpression) {
|
34 |
-
$parentToken = new Token(
|
35 |
} elseif ($parent instanceof NameExpression) {
|
36 |
-
$parentToken = new Token(
|
37 |
}
|
38 |
|
39 |
// inject a fake parent to make the parent() function work
|
40 |
$stream->injectTokens([
|
41 |
-
new Token(
|
42 |
-
new Token(
|
43 |
$parentToken,
|
44 |
-
new Token(
|
45 |
]);
|
46 |
|
47 |
$module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true);
|
@@ -53,7 +55,7 @@ final class EmbedTokenParser extends IncludeTokenParser
|
|
53 |
|
54 |
$this->parser->embedTemplate($module);
|
55 |
|
56 |
-
$stream->expect(
|
57 |
|
58 |
return new EmbedNode($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
|
59 |
}
|
18 |
|
19 |
/**
|
20 |
* Embeds a template.
|
21 |
+
*
|
22 |
+
* @final
|
23 |
*/
|
24 |
+
class EmbedTokenParser extends IncludeTokenParser
|
25 |
{
|
26 |
public function parse(Token $token)
|
27 |
{
|
31 |
|
32 |
list($variables, $only, $ignoreMissing) = $this->parseArguments();
|
33 |
|
34 |
+
$parentToken = $fakeParentToken = new Token(Token::STRING_TYPE, '__parent__', $token->getLine());
|
35 |
if ($parent instanceof ConstantExpression) {
|
36 |
+
$parentToken = new Token(Token::STRING_TYPE, $parent->getAttribute('value'), $token->getLine());
|
37 |
} elseif ($parent instanceof NameExpression) {
|
38 |
+
$parentToken = new Token(Token::NAME_TYPE, $parent->getAttribute('name'), $token->getLine());
|
39 |
}
|
40 |
|
41 |
// inject a fake parent to make the parent() function work
|
42 |
$stream->injectTokens([
|
43 |
+
new Token(Token::BLOCK_START_TYPE, '', $token->getLine()),
|
44 |
+
new Token(Token::NAME_TYPE, 'extends', $token->getLine()),
|
45 |
$parentToken,
|
46 |
+
new Token(Token::BLOCK_END_TYPE, '', $token->getLine()),
|
47 |
]);
|
48 |
|
49 |
$module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true);
|
55 |
|
56 |
$this->parser->embedTemplate($module);
|
57 |
|
58 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
59 |
|
60 |
return new EmbedNode($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
|
61 |
}
|
vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php
CHANGED
@@ -20,8 +20,10 @@ use Twig\Token;
|
|
20 |
* Extends a template by another one.
|
21 |
*
|
22 |
* {% extends "base.html" %}
|
|
|
|
|
23 |
*/
|
24 |
-
|
25 |
{
|
26 |
public function parse(Token $token)
|
27 |
{
|
20 |
* Extends a template by another one.
|
21 |
*
|
22 |
* {% extends "base.html" %}
|
23 |
+
*
|
24 |
+
* @final
|
25 |
*/
|
26 |
+
class ExtendsTokenParser extends AbstractTokenParser
|
27 |
{
|
28 |
public function parse(Token $token)
|
29 |
{
|
vendor/twig/twig/src/TokenParser/FilterTokenParser.php
CHANGED
@@ -24,30 +24,25 @@ use Twig\Token;
|
|
24 |
* This text becomes uppercase
|
25 |
* {% endfilter %}
|
26 |
*
|
27 |
-
* @
|
28 |
*/
|
29 |
-
|
30 |
{
|
31 |
public function parse(Token $token)
|
32 |
{
|
33 |
-
$stream = $this->parser->getStream();
|
34 |
-
$lineno = $token->getLine();
|
35 |
-
|
36 |
-
@trigger_error(sprintf('The "filter" tag in "%s" at line %d is deprecated since Twig 2.9, use the "apply" tag instead.', $stream->getSourceContext()->getName(), $lineno), \E_USER_DEPRECATED);
|
37 |
-
|
38 |
$name = $this->parser->getVarName();
|
39 |
-
$ref = new BlockReferenceExpression(new ConstantExpression($name, $
|
40 |
|
41 |
$filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag());
|
42 |
-
$
|
43 |
|
44 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
45 |
-
$
|
46 |
|
47 |
-
$block = new BlockNode($name, $body, $
|
48 |
$this->parser->setBlock($name, $block);
|
49 |
|
50 |
-
return new PrintNode($filter, $
|
51 |
}
|
52 |
|
53 |
public function decideBlockEnd(Token $token)
|
24 |
* This text becomes uppercase
|
25 |
* {% endfilter %}
|
26 |
*
|
27 |
+
* @final
|
28 |
*/
|
29 |
+
class FilterTokenParser extends AbstractTokenParser
|
30 |
{
|
31 |
public function parse(Token $token)
|
32 |
{
|
|
|
|
|
|
|
|
|
|
|
33 |
$name = $this->parser->getVarName();
|
34 |
+
$ref = new BlockReferenceExpression(new ConstantExpression($name, $token->getLine()), null, $token->getLine(), $this->getTag());
|
35 |
|
36 |
$filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag());
|
37 |
+
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
|
38 |
|
39 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
40 |
+
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
|
41 |
|
42 |
+
$block = new BlockNode($name, $body, $token->getLine());
|
43 |
$this->parser->setBlock($name, $block);
|
44 |
|
45 |
+
return new PrintNode($filter, $token->getLine(), $this->getTag());
|
46 |
}
|
47 |
|
48 |
public function decideBlockEnd(Token $token)
|
vendor/twig/twig/src/TokenParser/FlushTokenParser.php
CHANGED
@@ -18,12 +18,14 @@ use Twig\Token;
|
|
18 |
* Flushes the output to the client.
|
19 |
*
|
20 |
* @see flush()
|
|
|
|
|
21 |
*/
|
22 |
-
|
23 |
{
|
24 |
public function parse(Token $token)
|
25 |
{
|
26 |
-
$this->parser->getStream()->expect(
|
27 |
|
28 |
return new FlushNode($token->getLine(), $this->getTag());
|
29 |
}
|
18 |
* Flushes the output to the client.
|
19 |
*
|
20 |
* @see flush()
|
21 |
+
*
|
22 |
+
* @final
|
23 |
*/
|
24 |
+
class FlushTokenParser extends AbstractTokenParser
|
25 |
{
|
26 |
public function parse(Token $token)
|
27 |
{
|
28 |
+
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
|
29 |
|
30 |
return new FlushNode($token->getLine(), $this->getTag());
|
31 |
}
|
vendor/twig/twig/src/TokenParser/ForTokenParser.php
CHANGED
@@ -18,7 +18,6 @@ use Twig\Node\Expression\ConstantExpression;
|
|
18 |
use Twig\Node\Expression\GetAttrExpression;
|
19 |
use Twig\Node\Expression\NameExpression;
|
20 |
use Twig\Node\ForNode;
|
21 |
-
use Twig\Node\Node;
|
22 |
use Twig\Token;
|
23 |
use Twig\TokenStream;
|
24 |
|
@@ -30,33 +29,33 @@ use Twig\TokenStream;
|
|
30 |
* <li>{{ user.username|e }}</li>
|
31 |
* {% endfor %}
|
32 |
* </ul>
|
|
|
|
|
33 |
*/
|
34 |
-
|
35 |
{
|
36 |
public function parse(Token $token)
|
37 |
{
|
38 |
$lineno = $token->getLine();
|
39 |
$stream = $this->parser->getStream();
|
40 |
$targets = $this->parser->getExpressionParser()->parseAssignmentExpression();
|
41 |
-
$stream->expect(
|
42 |
$seq = $this->parser->getExpressionParser()->parseExpression();
|
43 |
|
44 |
$ifexpr = null;
|
45 |
-
if ($stream->nextIf(
|
46 |
-
@trigger_error(sprintf('Using an "if" condition on "for" tag in "%s" at line %d is deprecated since Twig 2.10.0, use a "filter" filter or an "if" condition inside the "for" body instead (if your condition depends on a variable updated inside the loop).', $stream->getSourceContext()->getName(), $lineno), \E_USER_DEPRECATED);
|
47 |
-
|
48 |
$ifexpr = $this->parser->getExpressionParser()->parseExpression();
|
49 |
}
|
50 |
|
51 |
-
$stream->expect(
|
52 |
$body = $this->parser->subparse([$this, 'decideForFork']);
|
53 |
if ('else' == $stream->next()->getValue()) {
|
54 |
-
$stream->expect(
|
55 |
$else = $this->parser->subparse([$this, 'decideForEnd'], true);
|
56 |
} else {
|
57 |
$else = null;
|
58 |
}
|
59 |
-
$stream->expect(
|
60 |
|
61 |
if (\count($targets) > 1) {
|
62 |
$keyTarget = $targets->getNode(0);
|
@@ -88,7 +87,7 @@ final class ForTokenParser extends AbstractTokenParser
|
|
88 |
}
|
89 |
|
90 |
// the loop variable cannot be used in the condition
|
91 |
-
|
92 |
{
|
93 |
if ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression && 'loop' == $node->getNode('node')->getAttribute('name')) {
|
94 |
throw new SyntaxError('The "loop" variable cannot be used in a looping condition.', $node->getTemplateLine(), $stream->getSourceContext());
|
@@ -105,7 +104,7 @@ final class ForTokenParser extends AbstractTokenParser
|
|
105 |
|
106 |
// check usage of non-defined loop-items
|
107 |
// it does not catch all problems (for instance when a for is included into another or when the variable is used in an include)
|
108 |
-
|
109 |
{
|
110 |
if ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression && 'loop' == $node->getNode('node')->getAttribute('name')) {
|
111 |
$attribute = $node->getNode('attribute');
|
18 |
use Twig\Node\Expression\GetAttrExpression;
|
19 |
use Twig\Node\Expression\NameExpression;
|
20 |
use Twig\Node\ForNode;
|
|
|
21 |
use Twig\Token;
|
22 |
use Twig\TokenStream;
|
23 |
|
29 |
* <li>{{ user.username|e }}</li>
|
30 |
* {% endfor %}
|
31 |
* </ul>
|
32 |
+
*
|
33 |
+
* @final
|
34 |
*/
|
35 |
+
class ForTokenParser extends AbstractTokenParser
|
36 |
{
|
37 |
public function parse(Token $token)
|
38 |
{
|
39 |
$lineno = $token->getLine();
|
40 |
$stream = $this->parser->getStream();
|
41 |
$targets = $this->parser->getExpressionParser()->parseAssignmentExpression();
|
42 |
+
$stream->expect(Token::OPERATOR_TYPE, 'in');
|
43 |
$seq = $this->parser->getExpressionParser()->parseExpression();
|
44 |
|
45 |
$ifexpr = null;
|
46 |
+
if ($stream->nextIf(Token::NAME_TYPE, 'if')) {
|
|
|
|
|
47 |
$ifexpr = $this->parser->getExpressionParser()->parseExpression();
|
48 |
}
|
49 |
|
50 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
51 |
$body = $this->parser->subparse([$this, 'decideForFork']);
|
52 |
if ('else' == $stream->next()->getValue()) {
|
53 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
54 |
$else = $this->parser->subparse([$this, 'decideForEnd'], true);
|
55 |
} else {
|
56 |
$else = null;
|
57 |
}
|
58 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
59 |
|
60 |
if (\count($targets) > 1) {
|
61 |
$keyTarget = $targets->getNode(0);
|
87 |
}
|
88 |
|
89 |
// the loop variable cannot be used in the condition
|
90 |
+
protected function checkLoopUsageCondition(TokenStream $stream, \Twig_NodeInterface $node)
|
91 |
{
|
92 |
if ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression && 'loop' == $node->getNode('node')->getAttribute('name')) {
|
93 |
throw new SyntaxError('The "loop" variable cannot be used in a looping condition.', $node->getTemplateLine(), $stream->getSourceContext());
|
104 |
|
105 |
// check usage of non-defined loop-items
|
106 |
// it does not catch all problems (for instance when a for is included into another or when the variable is used in an include)
|
107 |
+
protected function checkLoopUsageBody(TokenStream $stream, \Twig_NodeInterface $node)
|
108 |
{
|
109 |
if ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression && 'loop' == $node->getNode('node')->getAttribute('name')) {
|
110 |
$attribute = $node->getNode('attribute');
|
vendor/twig/twig/src/TokenParser/FromTokenParser.php
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
|
12 |
namespace Twig\TokenParser;
|
13 |
|
|
|
14 |
use Twig\Node\Expression\AssignNameExpression;
|
15 |
use Twig\Node\ImportNode;
|
16 |
use Twig\Token;
|
@@ -19,38 +20,44 @@ use Twig\Token;
|
|
19 |
* Imports macros.
|
20 |
*
|
21 |
* {% from 'forms.html' import forms %}
|
|
|
|
|
22 |
*/
|
23 |
-
|
24 |
{
|
25 |
public function parse(Token $token)
|
26 |
{
|
27 |
$macro = $this->parser->getExpressionParser()->parseExpression();
|
28 |
$stream = $this->parser->getStream();
|
29 |
-
$stream->expect(
|
30 |
|
31 |
$targets = [];
|
32 |
do {
|
33 |
-
$name = $stream->expect(
|
34 |
|
35 |
$alias = $name;
|
36 |
if ($stream->nextIf('as')) {
|
37 |
-
$alias = $stream->expect(
|
38 |
}
|
39 |
|
40 |
$targets[$name] = $alias;
|
41 |
|
42 |
-
if (!$stream->nextIf(
|
43 |
break;
|
44 |
}
|
45 |
} while (true);
|
46 |
|
47 |
-
$stream->expect(
|
48 |
|
49 |
$var = new AssignNameExpression($this->parser->getVarName(), $token->getLine());
|
50 |
-
$node = new ImportNode($macro, $var, $token->getLine(), $this->getTag()
|
51 |
|
52 |
foreach ($targets as $name => $alias) {
|
53 |
-
$this->parser->
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
return $node;
|
11 |
|
12 |
namespace Twig\TokenParser;
|
13 |
|
14 |
+
use Twig\Error\SyntaxError;
|
15 |
use Twig\Node\Expression\AssignNameExpression;
|
16 |
use Twig\Node\ImportNode;
|
17 |
use Twig\Token;
|
20 |
* Imports macros.
|
21 |
*
|
22 |
* {% from 'forms.html' import forms %}
|
23 |
+
*
|
24 |
+
* @final
|
25 |
*/
|
26 |
+
class FromTokenParser extends AbstractTokenParser
|
27 |
{
|
28 |
public function parse(Token $token)
|
29 |
{
|
30 |
$macro = $this->parser->getExpressionParser()->parseExpression();
|
31 |
$stream = $this->parser->getStream();
|
32 |
+
$stream->expect(Token::NAME_TYPE, 'import');
|
33 |
|
34 |
$targets = [];
|
35 |
do {
|
36 |
+
$name = $stream->expect(Token::NAME_TYPE)->getValue();
|
37 |
|
38 |
$alias = $name;
|
39 |
if ($stream->nextIf('as')) {
|
40 |
+
$alias = $stream->expect(Token::NAME_TYPE)->getValue();
|
41 |
}
|
42 |
|
43 |
$targets[$name] = $alias;
|
44 |
|
45 |
+
if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) {
|
46 |
break;
|
47 |
}
|
48 |
} while (true);
|
49 |
|
50 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
51 |
|
52 |
$var = new AssignNameExpression($this->parser->getVarName(), $token->getLine());
|
53 |
+
$node = new ImportNode($macro, $var, $token->getLine(), $this->getTag());
|
54 |
|
55 |
foreach ($targets as $name => $alias) {
|
56 |
+
if ($this->parser->isReservedMacroName($name)) {
|
57 |
+
throw new SyntaxError(sprintf('"%s" cannot be an imported macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getSourceContext());
|
58 |
+
}
|
59 |
+
|
60 |
+
$this->parser->addImportedSymbol('function', $alias, 'get'.$name, $var);
|
61 |
}
|
62 |
|
63 |
return $node;
|
vendor/twig/twig/src/TokenParser/IfTokenParser.php
CHANGED
@@ -27,15 +27,17 @@ use Twig\Token;
|
|
27 |
* {% endfor %}
|
28 |
* </ul>
|
29 |
* {% endif %}
|
|
|
|
|
30 |
*/
|
31 |
-
|
32 |
{
|
33 |
public function parse(Token $token)
|
34 |
{
|
35 |
$lineno = $token->getLine();
|
36 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
37 |
$stream = $this->parser->getStream();
|
38 |
-
$stream->expect(
|
39 |
$body = $this->parser->subparse([$this, 'decideIfFork']);
|
40 |
$tests = [$expr, $body];
|
41 |
$else = null;
|
@@ -44,13 +46,13 @@ final class IfTokenParser extends AbstractTokenParser
|
|
44 |
while (!$end) {
|
45 |
switch ($stream->next()->getValue()) {
|
46 |
case 'else':
|
47 |
-
$stream->expect(
|
48 |
$else = $this->parser->subparse([$this, 'decideIfEnd']);
|
49 |
break;
|
50 |
|
51 |
case 'elseif':
|
52 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
53 |
-
$stream->expect(
|
54 |
$body = $this->parser->subparse([$this, 'decideIfFork']);
|
55 |
$tests[] = $expr;
|
56 |
$tests[] = $body;
|
@@ -65,7 +67,7 @@ final class IfTokenParser extends AbstractTokenParser
|
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
$stream->expect(
|
69 |
|
70 |
return new IfNode(new Node($tests), $else, $lineno, $this->getTag());
|
71 |
}
|
27 |
* {% endfor %}
|
28 |
* </ul>
|
29 |
* {% endif %}
|
30 |
+
*
|
31 |
+
* @final
|
32 |
*/
|
33 |
+
class IfTokenParser extends AbstractTokenParser
|
34 |
{
|
35 |
public function parse(Token $token)
|
36 |
{
|
37 |
$lineno = $token->getLine();
|
38 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
39 |
$stream = $this->parser->getStream();
|
40 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
41 |
$body = $this->parser->subparse([$this, 'decideIfFork']);
|
42 |
$tests = [$expr, $body];
|
43 |
$else = null;
|
46 |
while (!$end) {
|
47 |
switch ($stream->next()->getValue()) {
|
48 |
case 'else':
|
49 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
50 |
$else = $this->parser->subparse([$this, 'decideIfEnd']);
|
51 |
break;
|
52 |
|
53 |
case 'elseif':
|
54 |
$expr = $this->parser->getExpressionParser()->parseExpression();
|
55 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
56 |
$body = $this->parser->subparse([$this, 'decideIfFork']);
|
57 |
$tests[] = $expr;
|
58 |
$tests[] = $body;
|
67 |
}
|
68 |
}
|
69 |
|
70 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
71 |
|
72 |
return new IfNode(new Node($tests), $else, $lineno, $this->getTag());
|
73 |
}
|
vendor/twig/twig/src/TokenParser/ImportTokenParser.php
CHANGED
@@ -19,19 +19,21 @@ use Twig\Token;
|
|
19 |
* Imports macros.
|
20 |
*
|
21 |
* {% import 'forms.html' as forms %}
|
|
|
|
|
22 |
*/
|
23 |
-
|
24 |
{
|
25 |
public function parse(Token $token)
|
26 |
{
|
27 |
$macro = $this->parser->getExpressionParser()->parseExpression();
|
28 |
-
$this->parser->getStream()->expect(
|
29 |
-
$var = new AssignNameExpression($this->parser->getStream()->expect(
|
30 |
-
$this->parser->getStream()->expect(
|
31 |
|
32 |
$this->parser->addImportedSymbol('template', $var->getAttribute('name'));
|
33 |
|
34 |
-
return new ImportNode($macro, $var, $token->getLine(), $this->getTag()
|
35 |
}
|
36 |
|
37 |
public function getTag()
|
19 |
* Imports macros.
|
20 |
*
|
21 |
* {% import 'forms.html' as forms %}
|
22 |
+
*
|
23 |
+
* @final
|
24 |
*/
|
25 |
+
class ImportTokenParser extends AbstractTokenParser
|
26 |
{
|
27 |
public function parse(Token $token)
|
28 |
{
|
29 |
$macro = $this->parser->getExpressionParser()->parseExpression();
|
30 |
+
$this->parser->getStream()->expect(Token::NAME_TYPE, 'as');
|
31 |
+
$var = new AssignNameExpression($this->parser->getStream()->expect(Token::NAME_TYPE)->getValue(), $token->getLine());
|
32 |
+
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
|
33 |
|
34 |
$this->parser->addImportedSymbol('template', $var->getAttribute('name'));
|
35 |
|
36 |
+
return new ImportNode($macro, $var, $token->getLine(), $this->getTag());
|
37 |
}
|
38 |
|
39 |
public function getTag()
|
vendor/twig/twig/src/TokenParser/IncludeTokenParser.php
CHANGED
@@ -38,23 +38,23 @@ class IncludeTokenParser extends AbstractTokenParser
|
|
38 |
$stream = $this->parser->getStream();
|
39 |
|
40 |
$ignoreMissing = false;
|
41 |
-
if ($stream->nextIf(
|
42 |
-
$stream->expect(
|
43 |
|
44 |
$ignoreMissing = true;
|
45 |
}
|
46 |
|
47 |
$variables = null;
|
48 |
-
if ($stream->nextIf(
|
49 |
$variables = $this->parser->getExpressionParser()->parseExpression();
|
50 |
}
|
51 |
|
52 |
$only = false;
|
53 |
-
if ($stream->nextIf(
|
54 |
$only = true;
|
55 |
}
|
56 |
|
57 |
-
$stream->expect(
|
58 |
|
59 |
return [$variables, $only, $ignoreMissing];
|
60 |
}
|
38 |
$stream = $this->parser->getStream();
|
39 |
|
40 |
$ignoreMissing = false;
|
41 |
+
if ($stream->nextIf(Token::NAME_TYPE, 'ignore')) {
|
42 |
+
$stream->expect(Token::NAME_TYPE, 'missing');
|
43 |
|
44 |
$ignoreMissing = true;
|
45 |
}
|
46 |
|
47 |
$variables = null;
|
48 |
+
if ($stream->nextIf(Token::NAME_TYPE, 'with')) {
|
49 |
$variables = $this->parser->getExpressionParser()->parseExpression();
|
50 |
}
|
51 |
|
52 |
$only = false;
|
53 |
+
if ($stream->nextIf(Token::NAME_TYPE, 'only')) {
|
54 |
$only = true;
|
55 |
}
|
56 |
|
57 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
58 |
|
59 |
return [$variables, $only, $ignoreMissing];
|
60 |
}
|
vendor/twig/twig/src/TokenParser/MacroTokenParser.php
CHANGED
@@ -23,21 +23,23 @@ use Twig\Token;
|
|
23 |
* {% macro input(name, value, type, size) %}
|
24 |
* <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
|
25 |
* {% endmacro %}
|
|
|
|
|
26 |
*/
|
27 |
-
|
28 |
{
|
29 |
public function parse(Token $token)
|
30 |
{
|
31 |
$lineno = $token->getLine();
|
32 |
$stream = $this->parser->getStream();
|
33 |
-
$name = $stream->expect(
|
34 |
|
35 |
$arguments = $this->parser->getExpressionParser()->parseArguments(true, true);
|
36 |
|
37 |
-
$stream->expect(
|
38 |
$this->parser->pushLocalScope();
|
39 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
40 |
-
if ($token = $stream->nextIf(
|
41 |
$value = $token->getValue();
|
42 |
|
43 |
if ($value != $name) {
|
@@ -45,7 +47,7 @@ final class MacroTokenParser extends AbstractTokenParser
|
|
45 |
}
|
46 |
}
|
47 |
$this->parser->popLocalScope();
|
48 |
-
$stream->expect(
|
49 |
|
50 |
$this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag()));
|
51 |
|
23 |
* {% macro input(name, value, type, size) %}
|
24 |
* <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
|
25 |
* {% endmacro %}
|
26 |
+
*
|
27 |
+
* @final
|
28 |
*/
|
29 |
+
class MacroTokenParser extends AbstractTokenParser
|
30 |
{
|
31 |
public function parse(Token $token)
|
32 |
{
|
33 |
$lineno = $token->getLine();
|
34 |
$stream = $this->parser->getStream();
|
35 |
+
$name = $stream->expect(Token::NAME_TYPE)->getValue();
|
36 |
|
37 |
$arguments = $this->parser->getExpressionParser()->parseArguments(true, true);
|
38 |
|
39 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
40 |
$this->parser->pushLocalScope();
|
41 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
42 |
+
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
|
43 |
$value = $token->getValue();
|
44 |
|
45 |
if ($value != $name) {
|
47 |
}
|
48 |
}
|
49 |
$this->parser->popLocalScope();
|
50 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
51 |
|
52 |
$this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag()));
|
53 |
|
vendor/twig/twig/src/TokenParser/SandboxTokenParser.php
CHANGED
@@ -25,15 +25,17 @@ use Twig\Token;
|
|
25 |
* {% endsandbox %}
|
26 |
*
|
27 |
* @see https://twig.symfony.com/doc/api.html#sandbox-extension for details
|
|
|
|
|
28 |
*/
|
29 |
-
|
30 |
{
|
31 |
public function parse(Token $token)
|
32 |
{
|
33 |
$stream = $this->parser->getStream();
|
34 |
-
$stream->expect(
|
35 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
36 |
-
$stream->expect(
|
37 |
|
38 |
// in a sandbox tag, only include tags are allowed
|
39 |
if (!$body instanceof IncludeNode) {
|
25 |
* {% endsandbox %}
|
26 |
*
|
27 |
* @see https://twig.symfony.com/doc/api.html#sandbox-extension for details
|
28 |
+
*
|
29 |
+
* @final
|
30 |
*/
|
31 |
+
class SandboxTokenParser extends AbstractTokenParser
|
32 |
{
|
33 |
public function parse(Token $token)
|
34 |
{
|
35 |
$stream = $this->parser->getStream();
|
36 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
37 |
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
38 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
39 |
|
40 |
// in a sandbox tag, only include tags are allowed
|
41 |
if (!$body instanceof IncludeNode) {
|
vendor/twig/twig/src/TokenParser/SetTokenParser.php
CHANGED
@@ -24,8 +24,10 @@ use Twig\Token;
|
|
24 |
* {% set foo = 'foo' ~ 'bar' %}
|
25 |
* {% set foo, bar = 'foo', 'bar' %}
|
26 |
* {% set foo %}Some content{% endset %}
|
|
|
|
|
27 |
*/
|
28 |
-
|
29 |
{
|
30 |
public function parse(Token $token)
|
31 |
{
|
@@ -34,10 +36,10 @@ final class SetTokenParser extends AbstractTokenParser
|
|
34 |
$names = $this->parser->getExpressionParser()->parseAssignmentExpression();
|
35 |
|
36 |
$capture = false;
|
37 |
-
if ($stream->nextIf(
|
38 |
$values = $this->parser->getExpressionParser()->parseMultitargetExpression();
|
39 |
|
40 |
-
$stream->expect(
|
41 |
|
42 |
if (\count($names) !== \count($values)) {
|
43 |
throw new SyntaxError('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
@@ -49,10 +51,10 @@ final class SetTokenParser extends AbstractTokenParser
|
|
49 |
throw new SyntaxError('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
50 |
}
|
51 |
|
52 |
-
$stream->expect(
|
53 |
|
54 |
$values = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
55 |
-
$stream->expect(
|
56 |
}
|
57 |
|
58 |
return new SetNode($capture, $names, $values, $lineno, $this->getTag());
|
24 |
* {% set foo = 'foo' ~ 'bar' %}
|
25 |
* {% set foo, bar = 'foo', 'bar' %}
|
26 |
* {% set foo %}Some content{% endset %}
|
27 |
+
*
|
28 |
+
* @final
|
29 |
*/
|
30 |
+
class SetTokenParser extends AbstractTokenParser
|
31 |
{
|
32 |
public function parse(Token $token)
|
33 |
{
|
36 |
$names = $this->parser->getExpressionParser()->parseAssignmentExpression();
|
37 |
|
38 |
$capture = false;
|
39 |
+
if ($stream->nextIf(Token::OPERATOR_TYPE, '=')) {
|
40 |
$values = $this->parser->getExpressionParser()->parseMultitargetExpression();
|
41 |
|
42 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
43 |
|
44 |
if (\count($names) !== \count($values)) {
|
45 |
throw new SyntaxError('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
51 |
throw new SyntaxError('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
|
52 |
}
|
53 |
|
54 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
55 |
|
56 |
$values = $this->parser->subparse([$this, 'decideBlockEnd'], true);
|
57 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
58 |
}
|
59 |
|
60 |
return new SetNode($capture, $names, $values, $lineno, $this->getTag());
|
vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php
CHANGED
@@ -24,20 +24,17 @@ use Twig\Token;
|
|
24 |
* {% endspaceless %}
|
25 |
* {# output will be <div><strong>foo</strong></div> #}
|
26 |
*
|
27 |
-
* @
|
28 |
*/
|
29 |
-
|
30 |
{
|
31 |
public function parse(Token $token)
|
32 |
{
|
33 |
-
$stream = $this->parser->getStream();
|
34 |
$lineno = $token->getLine();
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
$stream->expect(/* Token::BLOCK_END_TYPE */ 3);
|
39 |
$body = $this->parser->subparse([$this, 'decideSpacelessEnd'], true);
|
40 |
-
$
|
41 |
|
42 |
return new SpacelessNode($body, $lineno, $this->getTag());
|
43 |
}
|
24 |
* {% endspaceless %}
|
25 |
* {# output will be <div><strong>foo</strong></div> #}
|
26 |
*
|
27 |
+
* @final
|
28 |
*/
|
29 |
+
class SpacelessTokenParser extends AbstractTokenParser
|
30 |
{
|
31 |
public function parse(Token $token)
|
32 |
{
|
|
|
33 |
$lineno = $token->getLine();
|
34 |
|
35 |
+
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
|
|
|
|
|
36 |
$body = $this->parser->subparse([$this, 'decideSpacelessEnd'], true);
|
37 |
+
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
|
38 |
|
39 |
return new SpacelessNode($body, $lineno, $this->getTag());
|
40 |
}
|
vendor/twig/twig/src/TokenParser/TokenParserInterface.php
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
namespace Twig\TokenParser;
|
13 |
|
14 |
use Twig\Error\SyntaxError;
|
15 |
-
use Twig\Node\Node;
|
16 |
use Twig\Parser;
|
17 |
use Twig\Token;
|
18 |
|
@@ -31,7 +30,7 @@ interface TokenParserInterface
|
|
31 |
/**
|
32 |
* Parses a token and returns a node.
|
33 |
*
|
34 |
-
* @return
|
35 |
*
|
36 |
* @throws SyntaxError
|
37 |
*/
|
12 |
namespace Twig\TokenParser;
|
13 |
|
14 |
use Twig\Error\SyntaxError;
|
|
|
15 |
use Twig\Parser;
|
16 |
use Twig\Token;
|
17 |
|
30 |
/**
|
31 |
* Parses a token and returns a node.
|
32 |
*
|
33 |
+
* @return \Twig_NodeInterface
|
34 |
*
|
35 |
* @throws SyntaxError
|
36 |
*/
|
vendor/twig/twig/src/TokenParser/UseTokenParser.php
CHANGED
@@ -27,8 +27,10 @@ use Twig\Token;
|
|
27 |
* {% block content %}{% endblock %}
|
28 |
*
|
29 |
* @see https://twig.symfony.com/doc/templates.html#horizontal-reuse for details.
|
|
|
|
|
30 |
*/
|
31 |
-
|
32 |
{
|
33 |
public function parse(Token $token)
|
34 |
{
|
@@ -42,22 +44,22 @@ final class UseTokenParser extends AbstractTokenParser
|
|
42 |
$targets = [];
|
43 |
if ($stream->nextIf('with')) {
|
44 |
do {
|
45 |
-
$name = $stream->expect(
|
46 |
|
47 |
$alias = $name;
|
48 |
if ($stream->nextIf('as')) {
|
49 |
-
$alias = $stream->expect(
|
50 |
}
|
51 |
|
52 |
$targets[$name] = new ConstantExpression($alias, -1);
|
53 |
|
54 |
-
if (!$stream->nextIf(
|
55 |
break;
|
56 |
}
|
57 |
} while (true);
|
58 |
}
|
59 |
|
60 |
-
$stream->expect(
|
61 |
|
62 |
$this->parser->addTrait(new Node(['template' => $template, 'targets' => new Node($targets)]));
|
63 |
|
27 |
* {% block content %}{% endblock %}
|
28 |
*
|
29 |
* @see https://twig.symfony.com/doc/templates.html#horizontal-reuse for details.
|
30 |
+
*
|
31 |
+
* @final
|
32 |
*/
|
33 |
+
class UseTokenParser extends AbstractTokenParser
|
34 |
{
|
35 |
public function parse(Token $token)
|
36 |
{
|
44 |
$targets = [];
|
45 |
if ($stream->nextIf('with')) {
|
46 |
do {
|
47 |
+
$name = $stream->expect(Token::NAME_TYPE)->getValue();
|
48 |
|
49 |
$alias = $name;
|
50 |
if ($stream->nextIf('as')) {
|
51 |
+
$alias = $stream->expect(Token::NAME_TYPE)->getValue();
|
52 |
}
|
53 |
|
54 |
$targets[$name] = new ConstantExpression($alias, -1);
|
55 |
|
56 |
+
if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) {
|
57 |
break;
|
58 |
}
|
59 |
} while (true);
|
60 |
}
|
61 |
|
62 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
63 |
|
64 |
$this->parser->addTrait(new Node(['template' => $template, 'targets' => new Node($targets)]));
|
65 |
|
vendor/twig/twig/src/TokenParser/WithTokenParser.php
CHANGED
@@ -18,8 +18,10 @@ use Twig\Token;
|
|
18 |
* Creates a nested scope.
|
19 |
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
21 |
*/
|
22 |
-
|
23 |
{
|
24 |
public function parse(Token $token)
|
25 |
{
|
@@ -27,16 +29,16 @@ final class WithTokenParser extends AbstractTokenParser
|
|
27 |
|
28 |
$variables = null;
|
29 |
$only = false;
|
30 |
-
if (!$stream->test(
|
31 |
$variables = $this->parser->getExpressionParser()->parseExpression();
|
32 |
-
$only =
|
33 |
}
|
34 |
|
35 |
-
$stream->expect(
|
36 |
|
37 |
$body = $this->parser->subparse([$this, 'decideWithEnd'], true);
|
38 |
|
39 |
-
$stream->expect(
|
40 |
|
41 |
return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag());
|
42 |
}
|
18 |
* Creates a nested scope.
|
19 |
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
+
*
|
22 |
+
* @final
|
23 |
*/
|
24 |
+
class WithTokenParser extends AbstractTokenParser
|
25 |
{
|
26 |
public function parse(Token $token)
|
27 |
{
|
29 |
|
30 |
$variables = null;
|
31 |
$only = false;
|
32 |
+
if (!$stream->test(Token::BLOCK_END_TYPE)) {
|
33 |
$variables = $this->parser->getExpressionParser()->parseExpression();
|
34 |
+
$only = $stream->nextIf(Token::NAME_TYPE, 'only');
|
35 |
}
|
36 |
|
37 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
38 |
|
39 |
$body = $this->parser->subparse([$this, 'decideWithEnd'], true);
|
40 |
|
41 |
+
$stream->expect(Token::BLOCK_END_TYPE);
|
42 |
|
43 |
return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag());
|
44 |
}
|
vendor/twig/twig/src/TokenStream.php
CHANGED
@@ -17,18 +17,38 @@ use Twig\Error\SyntaxError;
|
|
17 |
/**
|
18 |
* Represents a token stream.
|
19 |
*
|
|
|
|
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
-
|
23 |
{
|
24 |
-
|
25 |
-
|
|
|
|
|
26 |
private $source;
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
29 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$this->tokens = $tokens;
|
31 |
-
|
|
|
|
|
32 |
}
|
33 |
|
34 |
public function __toString()
|
@@ -43,8 +63,10 @@ final class TokenStream
|
|
43 |
|
44 |
/**
|
45 |
* Sets the pointer to the next token and returns the old one.
|
|
|
|
|
46 |
*/
|
47 |
-
public function next()
|
48 |
{
|
49 |
if (!isset($this->tokens[++$this->current])) {
|
50 |
throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->source);
|
@@ -67,8 +89,10 @@ final class TokenStream
|
|
67 |
|
68 |
/**
|
69 |
* Tests a token and returns it or throws a syntax error.
|
|
|
|
|
70 |
*/
|
71 |
-
public function expect($type, $value = null,
|
72 |
{
|
73 |
$token = $this->tokens[$this->current];
|
74 |
if (!$token->test($type, $value)) {
|
@@ -89,8 +113,12 @@ final class TokenStream
|
|
89 |
|
90 |
/**
|
91 |
* Looks at the next token.
|
|
|
|
|
|
|
|
|
92 |
*/
|
93 |
-
public function look(
|
94 |
{
|
95 |
if (!isset($this->tokens[$this->current + $number])) {
|
96 |
throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->source);
|
@@ -101,31 +129,70 @@ final class TokenStream
|
|
101 |
|
102 |
/**
|
103 |
* Tests the current token.
|
|
|
|
|
104 |
*/
|
105 |
-
public function test($primary, $secondary = null)
|
106 |
{
|
107 |
return $this->tokens[$this->current]->test($primary, $secondary);
|
108 |
}
|
109 |
|
110 |
/**
|
111 |
* Checks if end of stream was reached.
|
|
|
|
|
112 |
*/
|
113 |
-
public function isEOF()
|
114 |
{
|
115 |
-
return
|
116 |
}
|
117 |
|
118 |
-
|
|
|
|
|
|
|
119 |
{
|
120 |
return $this->tokens[$this->current];
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
/**
|
124 |
* Gets the source associated with this stream.
|
125 |
*
|
|
|
|
|
126 |
* @internal
|
127 |
*/
|
128 |
-
public function getSourceContext()
|
129 |
{
|
130 |
return $this->source;
|
131 |
}
|
17 |
/**
|
18 |
* Represents a token stream.
|
19 |
*
|
20 |
+
* @final
|
21 |
+
*
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
*/
|
24 |
+
class TokenStream
|
25 |
{
|
26 |
+
protected $tokens;
|
27 |
+
protected $current = 0;
|
28 |
+
protected $filename;
|
29 |
+
|
30 |
private $source;
|
31 |
|
32 |
+
/**
|
33 |
+
* @param array $tokens An array of tokens
|
34 |
+
* @param string|null $name The name of the template which tokens are associated with
|
35 |
+
* @param string|null $source The source code associated with the tokens
|
36 |
+
*/
|
37 |
+
public function __construct(array $tokens, $name = null, $source = null)
|
38 |
{
|
39 |
+
if (!$name instanceof Source) {
|
40 |
+
if (null !== $name || null !== $source) {
|
41 |
+
@trigger_error(sprintf('Passing a string as the $name argument of %s() is deprecated since version 1.27. Pass a \Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED);
|
42 |
+
}
|
43 |
+
$this->source = new Source($source, $name);
|
44 |
+
} else {
|
45 |
+
$this->source = $name;
|
46 |
+
}
|
47 |
+
|
48 |
$this->tokens = $tokens;
|
49 |
+
|
50 |
+
// deprecated, not used anymore, to be removed in 2.0
|
51 |
+
$this->filename = $this->source->getName();
|
52 |
}
|
53 |
|
54 |
public function __toString()
|
63 |
|
64 |
/**
|
65 |
* Sets the pointer to the next token and returns the old one.
|
66 |
+
*
|
67 |
+
* @return Token
|
68 |
*/
|
69 |
+
public function next()
|
70 |
{
|
71 |
if (!isset($this->tokens[++$this->current])) {
|
72 |
throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->source);
|
89 |
|
90 |
/**
|
91 |
* Tests a token and returns it or throws a syntax error.
|
92 |
+
*
|
93 |
+
* @return Token
|
94 |
*/
|
95 |
+
public function expect($type, $value = null, $message = null)
|
96 |
{
|
97 |
$token = $this->tokens[$this->current];
|
98 |
if (!$token->test($type, $value)) {
|
113 |
|
114 |
/**
|
115 |
* Looks at the next token.
|
116 |
+
*
|
117 |
+
* @param int $number
|
118 |
+
*
|
119 |
+
* @return Token
|
120 |
*/
|
121 |
+
public function look($number = 1)
|
122 |
{
|
123 |
if (!isset($this->tokens[$this->current + $number])) {
|
124 |
throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->source);
|
129 |
|
130 |
/**
|
131 |
* Tests the current token.
|
132 |
+
*
|
133 |
+
* @return bool
|
134 |
*/
|
135 |
+
public function test($primary, $secondary = null)
|
136 |
{
|
137 |
return $this->tokens[$this->current]->test($primary, $secondary);
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
* Checks if end of stream was reached.
|
142 |
+
*
|
143 |
+
* @return bool
|
144 |
*/
|
145 |
+
public function isEOF()
|
146 |
{
|
147 |
+
return Token::EOF_TYPE === $this->tokens[$this->current]->getType();
|
148 |
}
|
149 |
|
150 |
+
/**
|
151 |
+
* @return Token
|
152 |
+
*/
|
153 |
+
public function getCurrent()
|
154 |
{
|
155 |
return $this->tokens[$this->current];
|
156 |
}
|
157 |
|
158 |
+
/**
|
159 |
+
* Gets the name associated with this stream (null if not defined).
|
160 |
+
*
|
161 |
+
* @return string|null
|
162 |
+
*
|
163 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
164 |
+
*/
|
165 |
+
public function getFilename()
|
166 |
+
{
|
167 |
+
@trigger_error(sprintf('The %s() method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED);
|
168 |
+
|
169 |
+
return $this->source->getName();
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Gets the source code associated with this stream.
|
174 |
+
*
|
175 |
+
* @return string
|
176 |
+
*
|
177 |
+
* @internal Don't use this as it might be empty depending on the environment configuration
|
178 |
+
*
|
179 |
+
* @deprecated since 1.27 (to be removed in 2.0)
|
180 |
+
*/
|
181 |
+
public function getSource()
|
182 |
+
{
|
183 |
+
@trigger_error(sprintf('The %s() method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED);
|
184 |
+
|
185 |
+
return $this->source->getCode();
|
186 |
+
}
|
187 |
+
|
188 |
/**
|
189 |
* Gets the source associated with this stream.
|
190 |
*
|
191 |
+
* @return Source
|
192 |
+
*
|
193 |
* @internal
|
194 |
*/
|
195 |
+
public function getSourceContext()
|
196 |
{
|
197 |
return $this->source;
|
198 |
}
|
vendor/twig/twig/src/TwigFilter.php
CHANGED
@@ -11,38 +11,24 @@
|
|
11 |
|
12 |
namespace Twig;
|
13 |
|
14 |
-
use Twig\Node\Expression\FilterExpression;
|
15 |
use Twig\Node\Node;
|
16 |
|
17 |
/**
|
18 |
* Represents a template filter.
|
19 |
*
|
20 |
-
* @final
|
21 |
*
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
-
*
|
24 |
-
* @see https://twig.symfony.com/doc/templates.html#filters
|
25 |
*/
|
26 |
class TwigFilter
|
27 |
{
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Creates a template filter.
|
35 |
-
*
|
36 |
-
* @param string $name Name of this filter
|
37 |
-
* @param callable|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation.
|
38 |
-
* @param array $options Options array
|
39 |
-
*/
|
40 |
-
public function __construct(string $name, $callable = null, array $options = [])
|
41 |
-
{
|
42 |
-
if (__CLASS__ !== static::class) {
|
43 |
-
@trigger_error('Overriding '.__CLASS__.' is deprecated since Twig 2.4.0 and the class will be final in 3.0.', \E_USER_DEPRECATED);
|
44 |
-
}
|
45 |
|
|
|
|
|
46 |
$this->name = $name;
|
47 |
$this->callable = $callable;
|
48 |
$this->options = array_merge([
|
@@ -53,7 +39,7 @@ class TwigFilter
|
|
53 |
'is_safe_callback' => null,
|
54 |
'pre_escape' => null,
|
55 |
'preserves_safety' => null,
|
56 |
-
'node_class' => FilterExpression
|
57 |
'deprecated' => false,
|
58 |
'alternative' => null,
|
59 |
], $options);
|
@@ -64,11 +50,6 @@ class TwigFilter
|
|
64 |
return $this->name;
|
65 |
}
|
66 |
|
67 |
-
/**
|
68 |
-
* Returns the callable to execute for this filter.
|
69 |
-
*
|
70 |
-
* @return callable|null
|
71 |
-
*/
|
72 |
public function getCallable()
|
73 |
{
|
74 |
return $this->callable;
|
@@ -106,7 +87,7 @@ class TwigFilter
|
|
106 |
}
|
107 |
|
108 |
if (null !== $this->options['is_safe_callback']) {
|
109 |
-
return $this->options['is_safe_callback']
|
110 |
}
|
111 |
}
|
112 |
|
@@ -141,10 +122,7 @@ class TwigFilter
|
|
141 |
}
|
142 |
}
|
143 |
|
144 |
-
|
145 |
-
class_alias('Twig\TwigFilter', 'Twig_SimpleFilter', false);
|
146 |
-
|
147 |
-
class_alias('Twig\TwigFilter', 'Twig_Filter');
|
148 |
|
149 |
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
150 |
class_exists('Twig\Node\Node');
|
11 |
|
12 |
namespace Twig;
|
13 |
|
|
|
14 |
use Twig\Node\Node;
|
15 |
|
16 |
/**
|
17 |
* Represents a template filter.
|
18 |
*
|
19 |
+
* @final
|
20 |
*
|
21 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
22 |
*/
|
23 |
class TwigFilter
|
24 |
{
|
25 |
+
protected $name;
|
26 |
+
protected $callable;
|
27 |
+
protected $options;
|
28 |
+
protected $arguments = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
public function __construct($name, $callable, array $options = [])
|
31 |
+
{
|
32 |
$this->name = $name;
|
33 |
$this->callable = $callable;
|
34 |
$this->options = array_merge([
|
39 |
'is_safe_callback' => null,
|
40 |
'pre_escape' => null,
|
41 |
'preserves_safety' => null,
|
42 |
+
'node_class' => '\Twig\Node\Expression\FilterExpression',
|
43 |
'deprecated' => false,
|
44 |
'alternative' => null,
|
45 |
], $options);
|
50 |
return $this->name;
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
public function getCallable()
|
54 |
{
|
55 |
return $this->callable;
|
87 |
}
|
88 |
|
89 |
if (null !== $this->options['is_safe_callback']) {
|
90 |
+
return \call_user_func($this->options['is_safe_callback'], $filterArgs);
|
91 |
}
|
92 |
}
|
93 |
|
122 |
}
|
123 |
}
|
124 |
|
125 |
+
class_alias('Twig\TwigFilter', 'Twig_SimpleFilter');
|
|
|
|
|
|
|
126 |
|
127 |
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
128 |
class_exists('Twig\Node\Node');
|
vendor/twig/twig/src/TwigFunction.php
CHANGED
@@ -11,7 +11,6 @@
|
|
11 |
|
12 |
namespace Twig;
|
13 |
|
14 |
-
use Twig\Node\Expression\FunctionExpression;
|
15 |
use Twig\Node\Node;
|
16 |
|
17 |
/**
|
@@ -20,29 +19,16 @@ use Twig\Node\Node;
|
|
20 |
* @final
|
21 |
*
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
-
*
|
24 |
-
* @see https://twig.symfony.com/doc/templates.html#functions
|
25 |
*/
|
26 |
class TwigFunction
|
27 |
{
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Creates a template function.
|
35 |
-
*
|
36 |
-
* @param string $name Name of this function
|
37 |
-
* @param callable|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation.
|
38 |
-
* @param array $options Options array
|
39 |
-
*/
|
40 |
-
public function __construct(string $name, $callable = null, array $options = [])
|
41 |
-
{
|
42 |
-
if (__CLASS__ !== static::class) {
|
43 |
-
@trigger_error('Overriding '.__CLASS__.' is deprecated since Twig 2.4.0 and the class will be final in 3.0.', \E_USER_DEPRECATED);
|
44 |
-
}
|
45 |
|
|
|
|
|
46 |
$this->name = $name;
|
47 |
$this->callable = $callable;
|
48 |
$this->options = array_merge([
|
@@ -51,7 +37,7 @@ class TwigFunction
|
|
51 |
'is_variadic' => false,
|
52 |
'is_safe' => null,
|
53 |
'is_safe_callback' => null,
|
54 |
-
'node_class' => FunctionExpression
|
55 |
'deprecated' => false,
|
56 |
'alternative' => null,
|
57 |
], $options);
|
@@ -62,11 +48,6 @@ class TwigFunction
|
|
62 |
return $this->name;
|
63 |
}
|
64 |
|
65 |
-
/**
|
66 |
-
* Returns the callable to execute for this function.
|
67 |
-
*
|
68 |
-
* @return callable|null
|
69 |
-
*/
|
70 |
public function getCallable()
|
71 |
{
|
72 |
return $this->callable;
|
@@ -104,7 +85,7 @@ class TwigFunction
|
|
104 |
}
|
105 |
|
106 |
if (null !== $this->options['is_safe_callback']) {
|
107 |
-
return $this->options['is_safe_callback']
|
108 |
}
|
109 |
|
110 |
return [];
|
@@ -131,10 +112,7 @@ class TwigFunction
|
|
131 |
}
|
132 |
}
|
133 |
|
134 |
-
|
135 |
-
class_alias('Twig\TwigFunction', 'Twig_SimpleFunction', false);
|
136 |
-
|
137 |
-
class_alias('Twig\TwigFunction', 'Twig_Function');
|
138 |
|
139 |
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
140 |
class_exists('Twig\Node\Node');
|
11 |
|
12 |
namespace Twig;
|
13 |
|
|
|
14 |
use Twig\Node\Node;
|
15 |
|
16 |
/**
|
19 |
* @final
|
20 |
*
|
21 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
22 |
*/
|
23 |
class TwigFunction
|
24 |
{
|
25 |
+
protected $name;
|
26 |
+
protected $callable;
|
27 |
+
protected $options;
|
28 |
+
protected $arguments = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
public function __construct($name, $callable, array $options = [])
|
31 |
+
{
|
32 |
$this->name = $name;
|
33 |
$this->callable = $callable;
|
34 |
$this->options = array_merge([
|
37 |
'is_variadic' => false,
|
38 |
'is_safe' => null,
|
39 |
'is_safe_callback' => null,
|
40 |
+
'node_class' => '\Twig\Node\Expression\FunctionExpression',
|
41 |
'deprecated' => false,
|
42 |
'alternative' => null,
|
43 |
], $options);
|
48 |
return $this->name;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
public function getCallable()
|
52 |
{
|
53 |
return $this->callable;
|
85 |
}
|
86 |
|
87 |
if (null !== $this->options['is_safe_callback']) {
|
88 |
+
return \call_user_func($this->options['is_safe_callback'], $functionArgs);
|
89 |
}
|
90 |
|
91 |
return [];
|
112 |
}
|
113 |
}
|
114 |
|
115 |
+
class_alias('Twig\TwigFunction', 'Twig_SimpleFunction');
|
|
|
|
|
|
|
116 |
|
117 |
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
118 |
class_exists('Twig\Node\Node');
|
vendor/twig/twig/src/TwigTest.php
CHANGED
@@ -11,42 +11,28 @@
|
|
11 |
|
12 |
namespace Twig;
|
13 |
|
14 |
-
use Twig\Node\Expression\TestExpression;
|
15 |
-
|
16 |
/**
|
17 |
* Represents a template test.
|
18 |
*
|
19 |
-
* @final
|
20 |
*
|
21 |
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
-
*
|
23 |
-
* @see https://twig.symfony.com/doc/templates.html#test-operator
|
24 |
*/
|
25 |
class TwigTest
|
26 |
{
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
30 |
private $arguments = [];
|
31 |
|
32 |
-
|
33 |
-
* Creates a template test.
|
34 |
-
*
|
35 |
-
* @param string $name Name of this test
|
36 |
-
* @param callable|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation.
|
37 |
-
* @param array $options Options array
|
38 |
-
*/
|
39 |
-
public function __construct(string $name, $callable = null, array $options = [])
|
40 |
{
|
41 |
-
if (__CLASS__ !== static::class) {
|
42 |
-
@trigger_error('Overriding '.__CLASS__.' is deprecated since Twig 2.4.0 and the class will be final in 3.0.', \E_USER_DEPRECATED);
|
43 |
-
}
|
44 |
-
|
45 |
$this->name = $name;
|
46 |
$this->callable = $callable;
|
47 |
$this->options = array_merge([
|
48 |
'is_variadic' => false,
|
49 |
-
'node_class' => TestExpression
|
50 |
'deprecated' => false,
|
51 |
'alternative' => null,
|
52 |
'one_mandatory_argument' => false,
|
@@ -58,11 +44,6 @@ class TwigTest
|
|
58 |
return $this->name;
|
59 |
}
|
60 |
|
61 |
-
/**
|
62 |
-
* Returns the callable to execute for this test.
|
63 |
-
*
|
64 |
-
* @return callable|null
|
65 |
-
*/
|
66 |
public function getCallable()
|
67 |
{
|
68 |
return $this->callable;
|
@@ -73,16 +54,6 @@ class TwigTest
|
|
73 |
return $this->options['node_class'];
|
74 |
}
|
75 |
|
76 |
-
public function setArguments($arguments)
|
77 |
-
{
|
78 |
-
$this->arguments = $arguments;
|
79 |
-
}
|
80 |
-
|
81 |
-
public function getArguments()
|
82 |
-
{
|
83 |
-
return $this->arguments;
|
84 |
-
}
|
85 |
-
|
86 |
public function isVariadic()
|
87 |
{
|
88 |
return $this->options['is_variadic'];
|
@@ -103,13 +74,20 @@ class TwigTest
|
|
103 |
return $this->options['alternative'];
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
public function hasOneMandatoryArgument(): bool
|
107 |
{
|
108 |
return (bool) $this->options['one_mandatory_argument'];
|
109 |
}
|
110 |
}
|
111 |
|
112 |
-
|
113 |
-
class_alias('Twig\TwigTest', 'Twig_SimpleTest', false);
|
114 |
-
|
115 |
-
class_alias('Twig\TwigTest', 'Twig_Test');
|
11 |
|
12 |
namespace Twig;
|
13 |
|
|
|
|
|
14 |
/**
|
15 |
* Represents a template test.
|
16 |
*
|
17 |
+
* @final
|
18 |
*
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
20 |
*/
|
21 |
class TwigTest
|
22 |
{
|
23 |
+
protected $name;
|
24 |
+
protected $callable;
|
25 |
+
protected $options;
|
26 |
+
|
27 |
private $arguments = [];
|
28 |
|
29 |
+
public function __construct($name, $callable, array $options = [])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
{
|
|
|
|
|
|
|
|
|
31 |
$this->name = $name;
|
32 |
$this->callable = $callable;
|
33 |
$this->options = array_merge([
|
34 |
'is_variadic' => false,
|
35 |
+
'node_class' => '\Twig\Node\Expression\TestExpression',
|
36 |
'deprecated' => false,
|
37 |
'alternative' => null,
|
38 |
'one_mandatory_argument' => false,
|
44 |
return $this->name;
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
47 |
public function getCallable()
|
48 |
{
|
49 |
return $this->callable;
|
54 |
return $this->options['node_class'];
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
public function isVariadic()
|
58 |
{
|
59 |
return $this->options['is_variadic'];
|
74 |
return $this->options['alternative'];
|
75 |
}
|
76 |
|
77 |
+
public function setArguments($arguments)
|
78 |
+
{
|
79 |
+
$this->arguments = $arguments;
|
80 |
+
}
|
81 |
+
|
82 |
+
public function getArguments()
|
83 |
+
{
|
84 |
+
return $this->arguments;
|
85 |
+
}
|
86 |
+
|
87 |
public function hasOneMandatoryArgument(): bool
|
88 |
{
|
89 |
return (bool) $this->options['one_mandatory_argument'];
|
90 |
}
|
91 |
}
|
92 |
|
93 |
+
class_alias('Twig\TwigTest', 'Twig_SimpleTest');
|
|
|
|
|
|
vendor/twig/twig/src/Util/DeprecationCollector.php
CHANGED
@@ -17,10 +17,13 @@ use Twig\Source;
|
|
17 |
|
18 |
/**
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
|
20 |
*/
|
21 |
-
|
22 |
{
|
23 |
private $twig;
|
|
|
24 |
|
25 |
public function __construct(Environment $twig)
|
26 |
{
|
@@ -55,12 +58,9 @@ final class DeprecationCollector
|
|
55 |
*/
|
56 |
public function collect(\Traversable $iterator)
|
57 |
{
|
58 |
-
$deprecations = [];
|
59 |
-
|
60 |
-
|
61 |
-
$deprecations[] = $msg;
|
62 |
-
}
|
63 |
-
});
|
64 |
|
65 |
foreach ($iterator as $name => $contents) {
|
66 |
try {
|
@@ -72,8 +72,21 @@ final class DeprecationCollector
|
|
72 |
|
73 |
restore_error_handler();
|
74 |
|
|
|
|
|
|
|
75 |
return $deprecations;
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
class_alias('Twig\Util\DeprecationCollector', 'Twig_Util_DeprecationCollector');
|
17 |
|
18 |
/**
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
20 |
+
*
|
21 |
+
* @final
|
22 |
*/
|
23 |
+
class DeprecationCollector
|
24 |
{
|
25 |
private $twig;
|
26 |
+
private $deprecations;
|
27 |
|
28 |
public function __construct(Environment $twig)
|
29 |
{
|
58 |
*/
|
59 |
public function collect(\Traversable $iterator)
|
60 |
{
|
61 |
+
$this->deprecations = [];
|
62 |
+
|
63 |
+
set_error_handler([$this, 'errorHandler']);
|
|
|
|
|
|
|
64 |
|
65 |
foreach ($iterator as $name => $contents) {
|
66 |
try {
|
72 |
|
73 |
restore_error_handler();
|
74 |
|
75 |
+
$deprecations = $this->deprecations;
|
76 |
+
$this->deprecations = [];
|
77 |
+
|
78 |
return $deprecations;
|
79 |
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* @internal
|
83 |
+
*/
|
84 |
+
public function errorHandler($type, $msg)
|
85 |
+
{
|
86 |
+
if (\E_USER_DEPRECATED === $type) {
|
87 |
+
$this->deprecations[] = $msg;
|
88 |
+
}
|
89 |
+
}
|
90 |
}
|
91 |
|
92 |
class_alias('Twig\Util\DeprecationCollector', 'Twig_Util_DeprecationCollector');
|
vendor/twig/twig/src/Util/TemplateDirIterator.php
CHANGED
@@ -16,19 +16,11 @@ namespace Twig\Util;
|
|
16 |
*/
|
17 |
class TemplateDirIterator extends \IteratorIterator
|
18 |
{
|
19 |
-
/**
|
20 |
-
* @return mixed
|
21 |
-
*/
|
22 |
-
#[\ReturnTypeWillChange]
|
23 |
public function current()
|
24 |
{
|
25 |
return file_get_contents(parent::current());
|
26 |
}
|
27 |
|
28 |
-
/**
|
29 |
-
* @return mixed
|
30 |
-
*/
|
31 |
-
#[\ReturnTypeWillChange]
|
32 |
public function key()
|
33 |
{
|
34 |
return (string) parent::key();
|
16 |
*/
|
17 |
class TemplateDirIterator extends \IteratorIterator
|
18 |
{
|
|
|
|
|
|
|
|
|
19 |
public function current()
|
20 |
{
|
21 |
return file_get_contents(parent::current());
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
24 |
public function key()
|
25 |
{
|
26 |
return (string) parent::key();
|