Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
PK���[�ʺ9.php_cs.distnu�[���<?php
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
'php_unit_dedicate_assert' => ['target'
=> '5.6'],
'array_syntax' => ['syntax' =>
'short'],
'php_unit_fqcn_annotation' => true,
'no_unreachable_default_argument_value' => false,
'braces' => ['allow_single_line_closure'
=> true],
'heredoc_to_nowdoc' => false,
'ordered_imports' => true,
'phpdoc_types_order' => ['null_adjustment'
=> 'always_last', 'sort_algorithm' =>
'none'],
'native_function_invocation' => ['include'
=> ['@compiler_optimized'], 'scope' =>
'all'],
])
->setRiskyAllowed(true)
->setFinder(PhpCsFixer\Finder::create()->in(__DIR__))
;
PK���[_P?>��
composer.jsonnu�[���{
"name": "twig/twig",
"type": "library",
"description": "Twig, the flexible, fast, and secure
template language for PHP",
"keywords": ["templating"],
"homepage": "https://twig.symfony.com",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Twig Team",
"role": "Contributors"
},
{
"name": "Armin Ronacher",
"email": "armin.ronacher@active-4.com",
"role": "Project Founder"
}
],
"require": {
"php": ">=5.5.0",
"symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.4|^5.0",
"psr/container": "^1.0"
},
"autoload": {
"psr-0" : {
"Twig_" : "lib/"
},
"psr-4" : {
"Twig\\" : "src/"
}
},
"autoload-dev": {
"psr-4" : {
"Twig\\Tests\\" : "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.42-dev"
}
}
}
PK���[�g���lib/Twig/Autoloader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Autoloads Twig classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.21 and will be removed in 2.0. Use Composer instead.
2.0.
*/
class Twig_Autoloader
{
/**
* Registers Twig_Autoloader as an SPL autoloader.
*
* @param bool $prepend whether to prepend the autoloader or not
*/
public static function register($prepend = false)
{
@trigger_error('Using Twig_Autoloader is deprecated since
version 1.21. Use Composer instead.', E_USER_DEPRECATED);
spl_autoload_register([__CLASS__, 'autoload'], true,
$prepend);
}
/**
* Handles autoloading of classes.
*
* @param string $class a class name
*/
public static function autoload($class)
{
if (0 !== strpos($class, 'Twig')) {
return;
}
if (is_file($file =
__DIR__.'/../'.str_replace(['_', "\0"],
['/', ''], $class).'.php')) {
require $file;
} elseif (is_file($file =
__DIR__.'/../../src/'.str_replace(['Twig\\',
'\\', "\0"], ['', '/',
''], $class).'.php')) {
require $file;
}
}
}
PK���[&����lib/Twig/BaseNodeVisitor.phpnu�[���<?php
use Twig\NodeVisitor\AbstractNodeVisitor;
class_exists('Twig\NodeVisitor\AbstractNodeVisitor');
if (\false) {
class Twig_BaseNodeVisitor extends AbstractNodeVisitor
{
}
}
PK���[Q�����lib/Twig/Cache/Filesystem.phpnu�[���<?php
use Twig\Cache\FilesystemCache;
class_exists('Twig\Cache\FilesystemCache');
if (\false) {
class Twig_Cache_Filesystem extends FilesystemCache
{
}
}
PK���[ ��ʑ�lib/Twig/Cache/Null.phpnu�[���<?php
use Twig\Cache\NullCache;
class_exists('Twig\Cache\NullCache');
if (\false) {
class Twig_Cache_Null extends NullCache
{
}
}
PK���[�=����lib/Twig/CacheInterface.phpnu�[���<?php
use Twig\Cache\CacheInterface;
class_exists('Twig\Cache\CacheInterface');
if (\false) {
class Twig_CacheInterface extends CacheInterface
{
}
}
PK���[�Vv3��lib/Twig/Compiler.phpnu�[���<?php
use Twig\Compiler;
class_exists('Twig\Compiler');
if (\false) {
class Twig_Compiler extends Compiler
{
}
}
PK���[��R��lib/Twig/CompilerInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Interface implemented by compiler classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_CompilerInterface
{
/**
* Compiles a node.
*
* @return $this
*/
public function compile(Twig_NodeInterface $node);
/**
* Gets the current PHP code after compilation.
*
* @return string The PHP code
*/
public function getSource();
}
PK���[ɻ�T��#lib/Twig/ContainerRuntimeLoader.phpnu�[���<?php
use Twig\RuntimeLoader\ContainerRuntimeLoader;
class_exists('Twig\RuntimeLoader\ContainerRuntimeLoader');
if (\false) {
class Twig_ContainerRuntimeLoader extends ContainerRuntimeLoader
{
}
}
PK���[��9���lib/Twig/Environment.phpnu�[���<?php
use Twig\Environment;
class_exists('Twig\Environment');
if (\false) {
class Twig_Environment extends Environment
{
}
}
PK���[�
ei��lib/Twig/Error/Loader.phpnu�[���<?php
use Twig\Error\LoaderError;
class_exists('Twig\Error\LoaderError');
if (\false) {
class Twig_Error_Loader extends LoaderError
{
}
}
PK���[�#ڝ�lib/Twig/Error/Runtime.phpnu�[���<?php
use Twig\Error\RuntimeError;
class_exists('Twig\Error\RuntimeError');
if (\false) {
class Twig_Error_Runtime extends RuntimeError
{
}
}
PK���[d�˃��lib/Twig/Error/Syntax.phpnu�[���<?php
use Twig\Error\SyntaxError;
class_exists('Twig\Error\SyntaxError');
if (\false) {
class Twig_Error_Syntax extends SyntaxError
{
}
}
PK���[�Bڨ��lib/Twig/Error.phpnu�[���<?php
use Twig\Error\Error;
class_exists('Twig\Error\Error');
if (\false) {
class Twig_Error extends Error
{
}
}
PK���[ð�=��"lib/Twig/ExistsLoaderInterface.phpnu�[���<?php
use Twig\Loader\ExistsLoaderInterface;
class_exists('Twig\Loader\ExistsLoaderInterface');
if (\false) {
class Twig_ExistsLoaderInterface extends ExistsLoaderInterface
{
}
}
PK���[D;��lib/Twig/ExpressionParser.phpnu�[���<?php
use Twig\ExpressionParser;
class_exists('Twig\ExpressionParser');
if (\false) {
class Twig_ExpressionParser extends ExpressionParser
{
}
}
PK���["G���lib/Twig/Extension/Core.phpnu�[���<?php
use Twig\Extension\CoreExtension;
class_exists('Twig\Extension\CoreExtension');
if (\false) {
class Twig_Extension_Core extends CoreExtension
{
}
}
PK���[:��e��lib/Twig/Extension/Debug.phpnu�[���<?php
use Twig\Extension\DebugExtension;
class_exists('Twig\Extension\DebugExtension');
if (\false) {
class Twig_Extension_Debug extends DebugExtension
{
}
}
PK���[��Aٵ�lib/Twig/Extension/Escaper.phpnu�[���<?php
use Twig\Extension\EscaperExtension;
class_exists('Twig\Extension\EscaperExtension');
if (\false) {
class Twig_Extension_Escaper extends EscaperExtension
{
}
}
PK���[��I��'lib/Twig/Extension/GlobalsInterface.phpnu�[���<?php
use Twig\Extension\GlobalsInterface;
class_exists('Twig\Extension\GlobalsInterface');
if (\false) {
class Twig_Extension_GlobalsInterface extends GlobalsInterface
{
}
}
PK���[�����+lib/Twig/Extension/InitRuntimeInterface.phpnu�[���<?php
use Twig\Extension\InitRuntimeInterface;
class_exists('Twig\Extension\InitRuntimeInterface');
if (\false) {
class Twig_Extension_InitRuntimeInterface extends InitRuntimeInterface
{
}
}
PK���[n���
lib/Twig/Extension/Optimizer.phpnu�[���<?php
use Twig\Extension\OptimizerExtension;
class_exists('Twig\Extension\OptimizerExtension');
if (\false) {
class Twig_Extension_Optimizer extends OptimizerExtension
{
}
}
PK���[ѕu��lib/Twig/Extension/Profiler.phpnu�[���<?php
use Twig\Extension\ProfilerExtension;
class_exists('Twig\Extension\ProfilerExtension');
if (\false) {
class Twig_Extension_Profiler extends ProfilerExtension
{
}
}
PK���[��3���lib/Twig/Extension/Sandbox.phpnu�[���<?php
use Twig\Extension\SandboxExtension;
class_exists('Twig\Extension\SandboxExtension');
if (\false) {
class Twig_Extension_Sandbox extends SandboxExtension
{
}
}
PK���[P�El��lib/Twig/Extension/Staging.phpnu�[���<?php
use Twig\Extension\StagingExtension;
class_exists('Twig\Extension\StagingExtension');
if (\false) {
class Twig_Extension_Staging extends StagingExtension
{
}
}
PK���[��"���#lib/Twig/Extension/StringLoader.phpnu�[���<?php
use Twig\Extension\StringLoaderExtension;
class_exists('Twig\Extension\StringLoaderExtension');
if (\false) {
class Twig_Extension_StringLoader extends StringLoaderExtension
{
}
}
PK���[����lib/Twig/Extension.phpnu�[���<?php
use Twig\Extension\AbstractExtension;
class_exists('Twig\Extension\AbstractExtension');
if (\false) {
class Twig_Extension extends AbstractExtension
{
}
}
PK���[�3���lib/Twig/ExtensionInterface.phpnu�[���<?php
use Twig\Extension\ExtensionInterface;
class_exists('Twig\Extension\ExtensionInterface');
if (\false) {
class Twig_ExtensionInterface extends ExtensionInterface
{
}
}
PK���[�<���!lib/Twig/FactoryRuntimeLoader.phpnu�[���<?php
use Twig\RuntimeLoader\FactoryRuntimeLoader;
class_exists('Twig\RuntimeLoader\FactoryRuntimeLoader');
if (\false) {
class Twig_FactoryRuntimeLoader extends FactoryRuntimeLoader
{
}
}
PK���[�,L���*lib/Twig/FileExtensionEscapingStrategy.phpnu�[���<?php
use Twig\FileExtensionEscapingStrategy;
class_exists('Twig\FileExtensionEscapingStrategy');
if (\false) {
class Twig_FileExtensionEscapingStrategy extends
FileExtensionEscapingStrategy
{
}
}
PK���[�R��lib/Twig/Filter/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a function template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Function extends Twig_Filter
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}
PK���[�M�MXXlib/Twig/Filter/Method.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Extension\ExtensionInterface;
@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);
/**
* Represents a method template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Method extends Twig_Filter
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method,
array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return
sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($this->extension), $this->method);
}
}
PK���[��`pplib/Twig/Filter/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a template filter as a node.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Node extends Twig_Filter
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}
PK���[��k���lib/Twig/Filter.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
@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);
/**
* Represents a template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
abstract class Twig_Filter implements Twig_FilterInterface,
Twig_FilterCallableInterface
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'pre_escape' => null,
'preserves_safety' => null,
'callable' => null,
], $options);
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $filterArgs)
{
if (isset($this->options['is_safe'])) {
return $this->options['is_safe'];
}
if (isset($this->options['is_safe_callback'])) {
return
\call_user_func($this->options['is_safe_callback'],
$filterArgs);
}
}
public function getPreservesSafety()
{
return $this->options['preserves_safety'];
}
public function getPreEscape()
{
return $this->options['pre_escape'];
}
public function getCallable()
{
return $this->options['callable'];
}
}
PK���[,ı+��$lib/Twig/FilterCallableInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a callable template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FilterCallableInterface
{
public function getCallable();
}
PK���[� �?[[lib/Twig/FilterInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
/**
* Represents a template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FilterInterface
{
/**
* Compiles a filter.
*
* @return string The PHP code for the filter
*/
public function compile();
public function needsEnvironment();
public function needsContext();
public function getSafe(Node $filterArgs);
public function getPreservesSafety();
public function getPreEscape();
public function setArguments($arguments);
public function getArguments();
}
PK���[�Ὢ��lib/Twig/Function/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a function template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Function_Function extends Twig_Function
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}
PK���[�a��{{lib/Twig/Function/Method.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Extension\ExtensionInterface;
@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);
/**
* Represents a method template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Function_Method extends Twig_Function
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method,
array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return
sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($this->extension), $this->method);
}
}
PK���[ �|||lib/Twig/Function/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a template function as a node.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Function_Node extends Twig_Function
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}
PK���[So�)��lib/Twig/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
@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);
/**
* Represents a template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
abstract class Twig_Function implements Twig_FunctionInterface,
Twig_FunctionCallableInterface
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'callable' => null,
], $options);
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $functionArgs)
{
if (isset($this->options['is_safe'])) {
return $this->options['is_safe'];
}
if (isset($this->options['is_safe_callback'])) {
return
\call_user_func($this->options['is_safe_callback'],
$functionArgs);
}
return [];
}
public function getCallable()
{
return $this->options['callable'];
}
}
PK���[d����&lib/Twig/FunctionCallableInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a callable template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FunctionCallableInterface
{
public function getCallable();
}
PK���[9t/,,lib/Twig/FunctionInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
/**
* Represents a template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FunctionInterface
{
/**
* Compiles a function.
*
* @return string The PHP code for the function
*/
public function compile();
public function needsEnvironment();
public function needsContext();
public function getSafe(Node $filterArgs);
public function setArguments($arguments);
public function getArguments();
}
PK���[��t�ttlib/Twig/Lexer.phpnu�[���<?php
use Twig\Lexer;
class_exists('Twig\Lexer');
if (\false) {
class Twig_Lexer extends Lexer
{
}
}
PK���[�Y�lib/Twig/LexerInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Error\SyntaxError;
use Twig\Source;
use Twig\TokenStream;
/**
* Interface implemented by lexer classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_LexerInterface
{
/**
* Tokenizes a source code.
*
* @param string|Source $code The source code
* @param string $name A unique identifier for the source code
*
* @return TokenStream
*
* @throws SyntaxError When the code is syntactically wrong
*/
public function tokenize($code, $name = null);
}
PK���[�) ��lib/Twig/Loader/Array.phpnu�[���<?php
use Twig\Loader\ArrayLoader;
class_exists('Twig\Loader\ArrayLoader');
if (\false) {
class Twig_Loader_Array extends ArrayLoader
{
}
}
PK���[�#�ʛ�lib/Twig/Loader/Chain.phpnu�[���<?php
use Twig\Loader\ChainLoader;
class_exists('Twig\Loader\ChainLoader');
if (\false) {
class Twig_Loader_Chain extends ChainLoader
{
}
}
PK���[4`v˯�lib/Twig/Loader/Filesystem.phpnu�[���<?php
use Twig\Loader\FilesystemLoader;
class_exists('Twig\Loader\FilesystemLoader');
if (\false) {
class Twig_Loader_Filesystem extends FilesystemLoader
{
}
}
PK���[T����lib/Twig/Loader/String.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Loader\ExistsLoaderInterface;
use Twig\Loader\LoaderInterface;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\Source;
@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);
/**
* Loads a template from a string.
*
* This loader should NEVER be used. It only exists for Twig internal
purposes.
*
* When using this loader with a cache mechanism, you should know that a
new cache
* key is generated each time a template content "changes" (the
cache key being the
* source code of the template). If you don't want to see your cache
grows out of
* control, you need to take care of clearing the old cache file by
yourself.
*
* @deprecated since 1.18.1 (to be removed in 2.0)
*
* @internal
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_Loader_String implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
return $name;
}
public function getSourceContext($name)
{
return new Source($name, $name);
}
public function exists($name)
{
return true;
}
public function getCacheKey($name)
{
return $name;
}
public function isFresh($name, $time)
{
return true;
}
}
PK���[7b����lib/Twig/LoaderInterface.phpnu�[���<?php
use Twig\Loader\LoaderInterface;
class_exists('Twig\Loader\LoaderInterface');
if (\false) {
class Twig_LoaderInterface extends LoaderInterface
{
}
}
PK���[^�<�xxlib/Twig/Markup.phpnu�[���<?php
use Twig\Markup;
class_exists('Twig\Markup');
if (\false) {
class Twig_Markup extends Markup
{
}
}
PK���[���lib/Twig/Node/AutoEscape.phpnu�[���<?php
use Twig\Node\AutoEscapeNode;
class_exists('Twig\Node\AutoEscapeNode');
if (\false) {
class Twig_Node_AutoEscape extends AutoEscapeNode
{
}
}
PK���[V��~��lib/Twig/Node/Block.phpnu�[���<?php
use Twig\Node\BlockNode;
class_exists('Twig\Node\BlockNode');
if (\false) {
class Twig_Node_Block extends BlockNode
{
}
}
PK���[<B�G��
lib/Twig/Node/BlockReference.phpnu�[���<?php
use Twig\Node\BlockReferenceNode;
class_exists('Twig\Node\BlockReferenceNode');
if (\false) {
class Twig_Node_BlockReference extends BlockReferenceNode
{
}
}
PK���[�Z�
��lib/Twig/Node/Body.phpnu�[���<?php
use Twig\Node\BodyNode;
class_exists('Twig\Node\BodyNode');
if (\false) {
class Twig_Node_Body extends BodyNode
{
}
}
PK���[m8�2��lib/Twig/Node/CheckSecurity.phpnu�[���<?php
use Twig\Node\CheckSecurityNode;
class_exists('Twig\Node\CheckSecurityNode');
if (\false) {
class Twig_Node_CheckSecurity extends CheckSecurityNode
{
}
}
PK���[c��ţ�lib/Twig/Node/Deprecated.phpnu�[���<?php
use Twig\Node\DeprecatedNode;
class_exists('Twig\Node\DeprecatedNode');
if (\false) {
class Twig_Node_Deprecated extends DeprecatedNode
{
}
}
PK���[�a���lib/Twig/Node/Do.phpnu�[���<?php
use Twig\Node\DoNode;
class_exists('Twig\Node\DoNode');
if (\false) {
class Twig_Node_Do extends DoNode
{
}
}
PK���[C��ԏ�lib/Twig/Node/Embed.phpnu�[���<?php
use Twig\Node\EmbedNode;
class_exists('Twig\Node\EmbedNode');
if (\false) {
class Twig_Node_Embed extends EmbedNode
{
}
}
PK���[����"lib/Twig/Node/Expression/Array.phpnu�[���<?php
use Twig\Node\Expression\ArrayExpression;
class_exists('Twig\Node\Expression\ArrayExpression');
if (\false) {
class Twig_Node_Expression_Array extends ArrayExpression
{
}
}
PK���[B&���'lib/Twig/Node/Expression/AssignName.phpnu�[���<?php
use Twig\Node\Expression\AssignNameExpression;
class_exists('Twig\Node\Expression\AssignNameExpression');
if (\false) {
class Twig_Node_Expression_AssignName extends AssignNameExpression
{
}
}
PK���[2K����'lib/Twig/Node/Expression/Binary/Add.phpnu�[���<?php
use Twig\Node\Expression\Binary\AddBinary;
class_exists('Twig\Node\Expression\Binary\AddBinary');
if (\false) {
class Twig_Node_Expression_Binary_Add extends AddBinary
{
}
}
PK���[�~����'lib/Twig/Node/Expression/Binary/And.phpnu�[���<?php
use Twig\Node\Expression\Binary\AndBinary;
class_exists('Twig\Node\Expression\Binary\AndBinary');
if (\false) {
class Twig_Node_Expression_Binary_And extends AndBinary
{
}
}
PK���[S
���.lib/Twig/Node/Expression/Binary/BitwiseAnd.phpnu�[���<?php
use Twig\Node\Expression\Binary\BitwiseAndBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseAndBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseAnd extends BitwiseAndBinary
{
}
}
PK���[�ѣ���-lib/Twig/Node/Expression/Binary/BitwiseOr.phpnu�[���<?php
use Twig\Node\Expression\Binary\BitwiseOrBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseOrBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseOr extends BitwiseOrBinary
{
}
}
PK���[���.lib/Twig/Node/Expression/Binary/BitwiseXor.phpnu�[���<?php
use Twig\Node\Expression\Binary\BitwiseXorBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseXorBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseXor extends BitwiseXorBinary
{
}
}
PK���[������*lib/Twig/Node/Expression/Binary/Concat.phpnu�[���<?php
use Twig\Node\Expression\Binary\ConcatBinary;
class_exists('Twig\Node\Expression\Binary\ConcatBinary');
if (\false) {
class Twig_Node_Expression_Binary_Concat extends ConcatBinary
{
}
}
PK���[(�B���'lib/Twig/Node/Expression/Binary/Div.phpnu�[���<?php
use Twig\Node\Expression\Binary\DivBinary;
class_exists('Twig\Node\Expression\Binary\DivBinary');
if (\false) {
class Twig_Node_Expression_Binary_Div extends DivBinary
{
}
}
PK���[W��G��,lib/Twig/Node/Expression/Binary/EndsWith.phpnu�[���<?php
use Twig\Node\Expression\Binary\EndsWithBinary;
class_exists('Twig\Node\Expression\Binary\EndsWithBinary');
if (\false) {
class Twig_Node_Expression_Binary_EndsWith extends EndsWithBinary
{
}
}
PK���[}�n2��)lib/Twig/Node/Expression/Binary/Equal.phpnu�[���<?php
use Twig\Node\Expression\Binary\EqualBinary;
class_exists('Twig\Node\Expression\Binary\EqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_Equal extends EqualBinary
{
}
}
PK���[�*�/��,lib/Twig/Node/Expression/Binary/FloorDiv.phpnu�[���<?php
use Twig\Node\Expression\Binary\FloorDivBinary;
class_exists('Twig\Node\Expression\Binary\FloorDivBinary');
if (\false) {
class Twig_Node_Expression_Binary_FloorDiv extends FloorDivBinary
{
}
}
PK���[-�Z��+lib/Twig/Node/Expression/Binary/Greater.phpnu�[���<?php
use Twig\Node\Expression\Binary\GreaterBinary;
class_exists('Twig\Node\Expression\Binary\GreaterBinary');
if (\false) {
class Twig_Node_Expression_Binary_Greater extends GreaterBinary
{
}
}
PK���[ߞ����0lib/Twig/Node/Expression/Binary/GreaterEqual.phpnu�[���<?php
use Twig\Node\Expression\Binary\GreaterEqualBinary;
class_exists('Twig\Node\Expression\Binary\GreaterEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_GreaterEqual extends
GreaterEqualBinary
{
}
}
PK���[K�n���&lib/Twig/Node/Expression/Binary/In.phpnu�[���<?php
use Twig\Node\Expression\Binary\InBinary;
class_exists('Twig\Node\Expression\Binary\InBinary');
if (\false) {
class Twig_Node_Expression_Binary_In extends InBinary
{
}
}
PK���[�w�~��(lib/Twig/Node/Expression/Binary/Less.phpnu�[���<?php
use Twig\Node\Expression\Binary\LessBinary;
class_exists('Twig\Node\Expression\Binary\LessBinary');
if (\false) {
class Twig_Node_Expression_Binary_Less extends LessBinary
{
}
}
PK���[�[�%��-lib/Twig/Node/Expression/Binary/LessEqual.phpnu�[���<?php
use Twig\Node\Expression\Binary\LessEqualBinary;
class_exists('Twig\Node\Expression\Binary\LessEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_LessEqual extends LessEqualBinary
{
}
}
PK���[�y����+lib/Twig/Node/Expression/Binary/Matches.phpnu�[���<?php
use Twig\Node\Expression\Binary\MatchesBinary;
class_exists('Twig\Node\Expression\Binary\MatchesBinary');
if (\false) {
class Twig_Node_Expression_Binary_Matches extends MatchesBinary
{
}
}
PK���[�aL���'lib/Twig/Node/Expression/Binary/Mod.phpnu�[���<?php
use Twig\Node\Expression\Binary\ModBinary;
class_exists('Twig\Node\Expression\Binary\ModBinary');
if (\false) {
class Twig_Node_Expression_Binary_Mod extends ModBinary
{
}
}
PK���[8Vd'��'lib/Twig/Node/Expression/Binary/Mul.phpnu�[���<?php
use Twig\Node\Expression\Binary\MulBinary;
class_exists('Twig\Node\Expression\Binary\MulBinary');
if (\false) {
class Twig_Node_Expression_Binary_Mul extends MulBinary
{
}
}
PK���[DCO��,lib/Twig/Node/Expression/Binary/NotEqual.phpnu�[���<?php
use Twig\Node\Expression\Binary\NotEqualBinary;
class_exists('Twig\Node\Expression\Binary\NotEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_NotEqual extends NotEqualBinary
{
}
}
PK���[�ސB��)lib/Twig/Node/Expression/Binary/NotIn.phpnu�[���<?php
use Twig\Node\Expression\Binary\NotInBinary;
class_exists('Twig\Node\Expression\Binary\NotInBinary');
if (\false) {
class Twig_Node_Expression_Binary_NotIn extends NotInBinary
{
}
}
PK���[�����&lib/Twig/Node/Expression/Binary/Or.phpnu�[���<?php
use Twig\Node\Expression\Binary\OrBinary;
class_exists('Twig\Node\Expression\Binary\OrBinary');
if (\false) {
class Twig_Node_Expression_Binary_Or extends OrBinary
{
}
}
PK���[�~u@��)lib/Twig/Node/Expression/Binary/Power.phpnu�[���<?php
use Twig\Node\Expression\Binary\PowerBinary;
class_exists('Twig\Node\Expression\Binary\PowerBinary');
if (\false) {
class Twig_Node_Expression_Binary_Power extends PowerBinary
{
}
}
PK���[ٰ�w��)lib/Twig/Node/Expression/Binary/Range.phpnu�[���<?php
use Twig\Node\Expression\Binary\RangeBinary;
class_exists('Twig\Node\Expression\Binary\RangeBinary');
if (\false) {
class Twig_Node_Expression_Binary_Range extends RangeBinary
{
}
}
PK���[��s��.lib/Twig/Node/Expression/Binary/StartsWith.phpnu�[���<?php
use Twig\Node\Expression\Binary\StartsWithBinary;
class_exists('Twig\Node\Expression\Binary\StartsWithBinary');
if (\false) {
class Twig_Node_Expression_Binary_StartsWith extends StartsWithBinary
{
}
}
PK���[�nڸ��'lib/Twig/Node/Expression/Binary/Sub.phpnu�[���<?php
use Twig\Node\Expression\Binary\SubBinary;
class_exists('Twig\Node\Expression\Binary\SubBinary');
if (\false) {
class Twig_Node_Expression_Binary_Sub extends SubBinary
{
}
}
PK���[��q5��#lib/Twig/Node/Expression/Binary.phpnu�[���<?php
use Twig\Node\Expression\Binary\AbstractBinary;
class_exists('Twig\Node\Expression\Binary\AbstractBinary');
if (\false) {
class Twig_Node_Expression_Binary extends AbstractBinary
{
}
}
PK���[(d���+lib/Twig/Node/Expression/BlockReference.phpnu�[���<?php
use Twig\Node\Expression\BlockReferenceExpression;
class_exists('Twig\Node\Expression\BlockReferenceExpression');
if (\false) {
class Twig_Node_Expression_BlockReference extends
BlockReferenceExpression
{
}
}
PK���[p��,��!lib/Twig/Node/Expression/Call.phpnu�[���<?php
use Twig\Node\Expression\CallExpression;
class_exists('Twig\Node\Expression\CallExpression');
if (\false) {
class Twig_Node_Expression_Call extends CallExpression
{
}
}
PK���[�R�!��(lib/Twig/Node/Expression/Conditional.phpnu�[���<?php
use Twig\Node\Expression\ConditionalExpression;
class_exists('Twig\Node\Expression\ConditionalExpression');
if (\false) {
class Twig_Node_Expression_Conditional extends ConditionalExpression
{
}
}
PK���[���T��%lib/Twig/Node/Expression/Constant.phpnu�[���<?php
use Twig\Node\Expression\ConstantExpression;
class_exists('Twig\Node\Expression\ConstantExpression');
if (\false) {
class Twig_Node_Expression_Constant extends ConstantExpression
{
}
}
PK���[����/lib/Twig/Node/Expression/ExtensionReference.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
@trigger_error('The Twig_Node_Expression_ExtensionReference class is
deprecated since version 1.23 and will be removed in 2.0.',
E_USER_DEPRECATED);
/**
* Represents an extension call node.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.23 and will be removed in 2.0.
*/
class Twig_Node_Expression_ExtensionReference extends AbstractExpression
{
public function __construct($name, $lineno, $tag = null)
{
parent::__construct([], ['name' => $name], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler->raw(sprintf("\$this->env->getExtension('%s')",
$this->getAttribute('name')));
}
}
PK���[#�"0��+lib/Twig/Node/Expression/Filter/Default.phpnu�[���<?php
use Twig\Node\Expression\Filter\DefaultFilter;
class_exists('Twig\Node\Expression\Filter\DefaultFilter');
if (\false) {
class Twig_Node_Expression_Filter_Default extends DefaultFilter
{
}
}
PK���[f��#lib/Twig/Node/Expression/Filter.phpnu�[���<?php
use Twig\Node\Expression\FilterExpression;
class_exists('Twig\Node\Expression\FilterExpression');
if (\false) {
class Twig_Node_Expression_Filter extends FilterExpression
{
}
}
PK���[��j!��%lib/Twig/Node/Expression/Function.phpnu�[���<?php
use Twig\Node\Expression\FunctionExpression;
class_exists('Twig\Node\Expression\FunctionExpression');
if (\false) {
class Twig_Node_Expression_Function extends FunctionExpression
{
}
}
PK���[����$lib/Twig/Node/Expression/GetAttr.phpnu�[���<?php
use Twig\Node\Expression\GetAttrExpression;
class_exists('Twig\Node\Expression\GetAttrExpression');
if (\false) {
class Twig_Node_Expression_GetAttr extends GetAttrExpression
{
}
}
PK���[�����'lib/Twig/Node/Expression/MethodCall.phpnu�[���<?php
use Twig\Node\Expression\MethodCallExpression;
class_exists('Twig\Node\Expression\MethodCallExpression');
if (\false) {
class Twig_Node_Expression_MethodCall extends MethodCallExpression
{
}
}
PK���[�c�Ѿ�!lib/Twig/Node/Expression/Name.phpnu�[���<?php
use Twig\Node\Expression\NameExpression;
class_exists('Twig\Node\Expression\NameExpression');
if (\false) {
class Twig_Node_Expression_Name extends NameExpression
{
}
}
PK���[�=߲��)lib/Twig/Node/Expression/NullCoalesce.phpnu�[���<?php
use Twig\Node\Expression\NullCoalesceExpression;
class_exists('Twig\Node\Expression\NullCoalesceExpression');
if (\false) {
class Twig_Node_Expression_NullCoalesce extends NullCoalesceExpression
{
}
}
PK���[4\3���#lib/Twig/Node/Expression/Parent.phpnu�[���<?php
use Twig\Node\Expression\ParentExpression;
class_exists('Twig\Node\Expression\ParentExpression');
if (\false) {
class Twig_Node_Expression_Parent extends ParentExpression
{
}
}
PK���[�U��%lib/Twig/Node/Expression/TempName.phpnu�[���<?php
use Twig\Node\Expression\TempNameExpression;
class_exists('Twig\Node\Expression\TempNameExpression');
if (\false) {
class Twig_Node_Expression_TempName extends TempNameExpression
{
}
}
PK���[�7o��*lib/Twig/Node/Expression/Test/Constant.phpnu�[���<?php
use Twig\Node\Expression\Test\ConstantTest;
class_exists('Twig\Node\Expression\Test\ConstantTest');
if (\false) {
class Twig_Node_Expression_Test_Constant extends ConstantTest
{
}
}
PK���[��!%��)lib/Twig/Node/Expression/Test/Defined.phpnu�[���<?php
use Twig\Node\Expression\Test\DefinedTest;
class_exists('Twig\Node\Expression\Test\DefinedTest');
if (\false) {
class Twig_Node_Expression_Test_Defined extends DefinedTest
{
}
}
PK���[�h�n��-lib/Twig/Node/Expression/Test/Divisibleby.phpnu�[���<?php
use Twig\Node\Expression\Test\DivisiblebyTest;
class_exists('Twig\Node\Expression\Test\DivisiblebyTest');
if (\false) {
class Twig_Node_Expression_Test_Divisibleby extends DivisiblebyTest
{
}
}
PK���[�DLc��&lib/Twig/Node/Expression/Test/Even.phpnu�[���<?php
use Twig\Node\Expression\Test\EvenTest;
class_exists('Twig\Node\Expression\Test\EvenTest');
if (\false) {
class Twig_Node_Expression_Test_Even extends EvenTest
{
}
}
PK���[���&lib/Twig/Node/Expression/Test/Null.phpnu�[���<?php
use Twig\Node\Expression\Test\NullTest;
class_exists('Twig\Node\Expression\Test\NullTest');
if (\false) {
class Twig_Node_Expression_Test_Null extends NullTest
{
}
}
PK���[��H��%lib/Twig/Node/Expression/Test/Odd.phpnu�[���<?php
use Twig\Node\Expression\Test\OddTest;
class_exists('Twig\Node\Expression\Test\OddTest');
if (\false) {
class Twig_Node_Expression_Test_Odd extends OddTest
{
}
}
PK���[b@R���(lib/Twig/Node/Expression/Test/Sameas.phpnu�[���<?php
use Twig\Node\Expression\Test\SameasTest;
class_exists('Twig\Node\Expression\Test\SameasTest');
if (\false) {
class Twig_Node_Expression_Test_Sameas extends SameasTest
{
}
}
PK���[��C��!lib/Twig/Node/Expression/Test.phpnu�[���<?php
use Twig\Node\Expression\TestExpression;
class_exists('Twig\Node\Expression\TestExpression');
if (\false) {
class Twig_Node_Expression_Test extends TestExpression
{
}
}
PK���[��\C��&lib/Twig/Node/Expression/Unary/Neg.phpnu�[���<?php
use Twig\Node\Expression\Unary\NegUnary;
class_exists('Twig\Node\Expression\Unary\NegUnary');
if (\false) {
class Twig_Node_Expression_Unary_Neg extends NegUnary
{
}
}
PK���[V�I��&lib/Twig/Node/Expression/Unary/Not.phpnu�[���<?php
use Twig\Node\Expression\Unary\NotUnary;
class_exists('Twig\Node\Expression\Unary\NotUnary');
if (\false) {
class Twig_Node_Expression_Unary_Not extends NotUnary
{
}
}
PK���[�P����&lib/Twig/Node/Expression/Unary/Pos.phpnu�[���<?php
use Twig\Node\Expression\Unary\PosUnary;
class_exists('Twig\Node\Expression\Unary\PosUnary');
if (\false) {
class Twig_Node_Expression_Unary_Pos extends PosUnary
{
}
}
PK���[=��y��"lib/Twig/Node/Expression/Unary.phpnu�[���<?php
use Twig\Node\Expression\Unary\AbstractUnary;
class_exists('Twig\Node\Expression\Unary\AbstractUnary');
if (\false) {
class Twig_Node_Expression_Unary extends AbstractUnary
{
}
}
PK���[b��d��lib/Twig/Node/Expression.phpnu�[���<?php
use Twig\Node\Expression\AbstractExpression;
class_exists('Twig\Node\Expression\AbstractExpression');
if (\false) {
class Twig_Node_Expression extends AbstractExpression
{
}
}
PK���[FzP��lib/Twig/Node/Flush.phpnu�[���<?php
use Twig\Node\FlushNode;
class_exists('Twig\Node\FlushNode');
if (\false) {
class Twig_Node_Flush extends FlushNode
{
}
}
PK���[*�b��lib/Twig/Node/For.phpnu�[���<?php
use Twig\Node\ForNode;
class_exists('Twig\Node\ForNode');
if (\false) {
class Twig_Node_For extends ForNode
{
}
}
PK���[�Nח�lib/Twig/Node/ForLoop.phpnu�[���<?php
use Twig\Node\ForLoopNode;
class_exists('Twig\Node\ForLoopNode');
if (\false) {
class Twig_Node_ForLoop extends ForLoopNode
{
}
}
PK���[w=����lib/Twig/Node/If.phpnu�[���<?php
use Twig\Node\IfNode;
class_exists('Twig\Node\IfNode');
if (\false) {
class Twig_Node_If extends IfNode
{
}
}
PK���[��n��lib/Twig/Node/Import.phpnu�[���<?php
use Twig\Node\ImportNode;
class_exists('Twig\Node\ImportNode');
if (\false) {
class Twig_Node_Import extends ImportNode
{
}
}
PK���[�0��lib/Twig/Node/Include.phpnu�[���<?php
use Twig\Node\IncludeNode;
class_exists('Twig\Node\IncludeNode');
if (\false) {
class Twig_Node_Include extends IncludeNode
{
}
}
PK���[��<A��lib/Twig/Node/Macro.phpnu�[���<?php
use Twig\Node\MacroNode;
class_exists('Twig\Node\MacroNode');
if (\false) {
class Twig_Node_Macro extends MacroNode
{
}
}
PK���[��禎�lib/Twig/Node/Module.phpnu�[���<?php
use Twig\Node\ModuleNode;
class_exists('Twig\Node\ModuleNode');
if (\false) {
class Twig_Node_Module extends ModuleNode
{
}
}
PK���[ԡ�Ï�lib/Twig/Node/Print.phpnu�[���<?php
use Twig\Node\PrintNode;
class_exists('Twig\Node\PrintNode');
if (\false) {
class Twig_Node_Print extends PrintNode
{
}
}
PK���[�~���lib/Twig/Node/Sandbox.phpnu�[���<?php
use Twig\Node\SandboxNode;
class_exists('Twig\Node\SandboxNode');
if (\false) {
class Twig_Node_Sandbox extends SandboxNode
{
}
}
PK���[�y�@��
lib/Twig/Node/SandboxedPrint.phpnu�[���<?php
use Twig\Node\SandboxedPrintNode;
class_exists('Twig\Node\SandboxedPrintNode');
if (\false) {
class Twig_Node_SandboxedPrint extends SandboxedPrintNode
{
}
}
PK���[絡߇�lib/Twig/Node/Set.phpnu�[���<?php
use Twig\Node\SetNode;
class_exists('Twig\Node\SetNode');
if (\false) {
class Twig_Node_Set extends SetNode
{
}
}
PK���[0�f��lib/Twig/Node/SetTemp.phpnu�[���<?php
use Twig\Node\SetTempNode;
class_exists('Twig\Node\SetTempNode');
if (\false) {
class Twig_Node_SetTemp extends SetTempNode
{
}
}
PK���[��͟�lib/Twig/Node/Spaceless.phpnu�[���<?php
use Twig\Node\SpacelessNode;
class_exists('Twig\Node\SpacelessNode');
if (\false) {
class Twig_Node_Spaceless extends SpacelessNode
{
}
}
PK���[5c�x��lib/Twig/Node/Text.phpnu�[���<?php
use Twig\Node\TextNode;
class_exists('Twig\Node\TextNode');
if (\false) {
class Twig_Node_Text extends TextNode
{
}
}
PK���[@3�&��lib/Twig/Node/With.phpnu�[���<?php
use Twig\Node\WithNode;
class_exists('Twig\Node\WithNode');
if (\false) {
class Twig_Node_With extends WithNode
{
}
}
PK���[~ң�zzlib/Twig/Node.phpnu�[���<?php
use Twig\Node\Node;
class_exists('Twig\Node\Node');
if (\false) {
class Twig_Node extends Node
{
}
}
PK���[��N��!lib/Twig/NodeCaptureInterface.phpnu�[���<?php
use Twig\Node\NodeCaptureInterface;
class_exists('Twig\Node\NodeCaptureInterface');
if (\false) {
class Twig_NodeCaptureInterface extends NodeCaptureInterface
{
}
}
PK���[br����lib/Twig/NodeInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Compiler;
/**
* Represents a node in the AST.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_NodeInterface extends \Countable, \IteratorAggregate
{
/**
* Compiles the node to PHP.
*/
public function compile(Compiler $compiler);
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getLine();
public function getNodeTag();
}
PK���[O�8��
lib/Twig/NodeOutputInterface.phpnu�[���<?php
use Twig\Node\NodeOutputInterface;
class_exists('Twig\Node\NodeOutputInterface');
if (\false) {
class Twig_NodeOutputInterface extends NodeOutputInterface
{
}
}
PK���[��퓔�lib/Twig/NodeTraverser.phpnu�[���<?php
use Twig\NodeTraverser;
class_exists('Twig\NodeTraverser');
if (\false) {
class Twig_NodeTraverser extends NodeTraverser
{
}
}
PK���[h��
lib/Twig/NodeVisitor/Escaper.phpnu�[���<?php
use Twig\NodeVisitor\EscaperNodeVisitor;
class_exists('Twig\NodeVisitor\EscaperNodeVisitor');
if (\false) {
class Twig_NodeVisitor_Escaper extends EscaperNodeVisitor
{
}
}
PK���[$�����"lib/Twig/NodeVisitor/Optimizer.phpnu�[���<?php
use Twig\NodeVisitor\OptimizerNodeVisitor;
class_exists('Twig\NodeVisitor\OptimizerNodeVisitor');
if (\false) {
class Twig_NodeVisitor_Optimizer extends OptimizerNodeVisitor
{
}
}
PK���[�����%lib/Twig/NodeVisitor/SafeAnalysis.phpnu�[���<?php
use Twig\NodeVisitor\SafeAnalysisNodeVisitor;
class_exists('Twig\NodeVisitor\SafeAnalysisNodeVisitor');
if (\false) {
class Twig_NodeVisitor_SafeAnalysis extends SafeAnalysisNodeVisitor
{
}
}
PK���[�����
lib/Twig/NodeVisitor/Sandbox.phpnu�[���<?php
use Twig\NodeVisitor\SandboxNodeVisitor;
class_exists('Twig\NodeVisitor\SandboxNodeVisitor');
if (\false) {
class Twig_NodeVisitor_Sandbox extends SandboxNodeVisitor
{
}
}
PK���[�N@��!lib/Twig/NodeVisitorInterface.phpnu�[���<?php
use Twig\NodeVisitor\NodeVisitorInterface;
class_exists('Twig\NodeVisitor\NodeVisitorInterface');
if (\false) {
class Twig_NodeVisitorInterface extends NodeVisitorInterface
{
}
}
PK���[�(%xxlib/Twig/Parser.phpnu�[���<?php
use Twig\Parser;
class_exists('Twig\Parser');
if (\false) {
class Twig_Parser extends Parser
{
}
}
PK���[L�E���lib/Twig/ParserInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Error\SyntaxError;
use Twig\Node\ModuleNode;
use Twig\TokenStream;
/**
* Interface implemented by parser classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_ParserInterface
{
/**
* Converts a token stream to a node tree.
*
* @return ModuleNode
*
* @throws SyntaxError When the token stream is syntactically or
semantically wrong
*/
public function parse(TokenStream $stream);
}
PK���[
��!lib/Twig/Profiler/Dumper/Base.phpnu�[���<?php
use Twig\Profiler\Dumper\BaseDumper;
class_exists('Twig\Profiler\Dumper\BaseDumper');
if (\false) {
class Twig_Profiler_Dumper_Base extends BaseDumper
{
}
}
PK���[w���&lib/Twig/Profiler/Dumper/Blackfire.phpnu�[���<?php
use Twig\Profiler\Dumper\BlackfireDumper;
class_exists('Twig\Profiler\Dumper\BlackfireDumper');
if (\false) {
class Twig_Profiler_Dumper_Blackfire extends BlackfireDumper
{
}
}
PK���[X�f���!lib/Twig/Profiler/Dumper/Html.phpnu�[���<?php
use Twig\Profiler\Dumper\HtmlDumper;
class_exists('Twig\Profiler\Dumper\HtmlDumper');
if (\false) {
class Twig_Profiler_Dumper_Html extends HtmlDumper
{
}
}
PK���[�����!lib/Twig/Profiler/Dumper/Text.phpnu�[���<?php
use Twig\Profiler\Dumper\TextDumper;
class_exists('Twig\Profiler\Dumper\TextDumper');
if (\false) {
class Twig_Profiler_Dumper_Text extends TextDumper
{
}
}
PK���[d����'lib/Twig/Profiler/Node/EnterProfile.phpnu�[���<?php
use Twig\Profiler\Node\EnterProfileNode;
class_exists('Twig\Profiler\Node\EnterProfileNode');
if (\false) {
class Twig_Profiler_Node_EnterProfile extends EnterProfileNode
{
}
}
PK���[�����'lib/Twig/Profiler/Node/LeaveProfile.phpnu�[���<?php
use Twig\Profiler\Node\LeaveProfileNode;
class_exists('Twig\Profiler\Node\LeaveProfileNode');
if (\false) {
class Twig_Profiler_Node_LeaveProfile extends LeaveProfileNode
{
}
}
PK���[~�~��*lib/Twig/Profiler/NodeVisitor/Profiler.phpnu�[���<?php
use Twig\Profiler\NodeVisitor\ProfilerNodeVisitor;
class_exists('Twig\Profiler\NodeVisitor\ProfilerNodeVisitor');
if (\false) {
class Twig_Profiler_NodeVisitor_Profiler extends ProfilerNodeVisitor
{
}
}
PK���[%V��lib/Twig/Profiler/Profile.phpnu�[���<?php
use Twig\Profiler\Profile;
class_exists('Twig\Profiler\Profile');
if (\false) {
class Twig_Profiler_Profile extends Profile
{
}
}
PK���[Stʼ��#lib/Twig/RuntimeLoaderInterface.phpnu�[���<?php
use Twig\RuntimeLoader\RuntimeLoaderInterface;
class_exists('Twig\RuntimeLoader\RuntimeLoaderInterface');
if (\false) {
class Twig_RuntimeLoaderInterface extends RuntimeLoaderInterface
{
}
}
PK���[
����"lib/Twig/Sandbox/SecurityError.phpnu�[���<?php
use Twig\Sandbox\SecurityError;
class_exists('Twig\Sandbox\SecurityError');
if (\false) {
class Twig_Sandbox_SecurityError extends SecurityError
{
}
}
PK���[�����2lib/Twig/Sandbox/SecurityNotAllowedFilterError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedFilterError;
class_exists('Twig\Sandbox\SecurityNotAllowedFilterError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedFilterError extends
SecurityNotAllowedFilterError
{
}
}
PK���[����4lib/Twig/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedFunctionError;
class_exists('Twig\Sandbox\SecurityNotAllowedFunctionError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedFunctionError extends
SecurityNotAllowedFunctionError
{
}
}
PK���[y,����2lib/Twig/Sandbox/SecurityNotAllowedMethodError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedMethodError;
class_exists('Twig\Sandbox\SecurityNotAllowedMethodError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedMethodError extends
SecurityNotAllowedMethodError
{
}
}
PK���[PMQ��4lib/Twig/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedPropertyError;
class_exists('Twig\Sandbox\SecurityNotAllowedPropertyError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedPropertyError extends
SecurityNotAllowedPropertyError
{
}
}
PK���[�M����/lib/Twig/Sandbox/SecurityNotAllowedTagError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedTagError;
class_exists('Twig\Sandbox\SecurityNotAllowedTagError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedTagError extends
SecurityNotAllowedTagError
{
}
}
PK���[�}@���#lib/Twig/Sandbox/SecurityPolicy.phpnu�[���<?php
use Twig\Sandbox\SecurityPolicy;
class_exists('Twig\Sandbox\SecurityPolicy');
if (\false) {
class Twig_Sandbox_SecurityPolicy extends SecurityPolicy
{
}
}
PK���[��W���,lib/Twig/Sandbox/SecurityPolicyInterface.phpnu�[���<?php
use Twig\Sandbox\SecurityPolicyInterface;
class_exists('Twig\Sandbox\SecurityPolicyInterface');
if (\false) {
class Twig_Sandbox_SecurityPolicyInterface extends
SecurityPolicyInterface
{
}
}
PK���[�S�lib/Twig/SimpleFilter.phpnu�[���<?php
use Twig\TwigFilter;
class_exists('Twig\TwigFilter');
if (\false) {
class Twig_SimpleFilter extends TwigFilter
{
}
}
PK���[�\��lib/Twig/SimpleFunction.phpnu�[���<?php
use Twig\TwigFunction;
class_exists('Twig\TwigFunction');
if (\false) {
class Twig_SimpleFunction extends TwigFunction
{
}
}
PK���[���m��lib/Twig/SimpleTest.phpnu�[���<?php
use Twig\TwigTest;
class_exists('Twig\TwigTest');
if (\false) {
class Twig_SimpleTest extends TwigTest
{
}
}
PK���[��vxxlib/Twig/Source.phpnu�[���<?php
use Twig\Source;
class_exists('Twig\Source');
if (\false) {
class Twig_Source extends Source
{
}
}
PK���[�����)lib/Twig/SourceContextLoaderInterface.phpnu�[���<?php
use Twig\Loader\SourceContextLoaderInterface;
class_exists('Twig\Loader\SourceContextLoaderInterface');
if (\false) {
class Twig_SourceContextLoaderInterface extends
SourceContextLoaderInterface
{
}
}
PK���[ֹ鈀�lib/Twig/Template.phpnu�[���<?php
use Twig\Template;
class_exists('Twig\Template');
if (\false) {
class Twig_Template extends Template
{
}
}
PK���[�yv���lib/Twig/TemplateInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Environment;
/**
* Interface implemented by all compiled templates.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_TemplateInterface
{
const ANY_CALL = 'any';
const ARRAY_CALL = 'array';
const METHOD_CALL = 'method';
/**
* Renders the template with the given context and returns it as
string.
*
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*/
public function render(array $context);
/**
* Displays the template with the given context.
*
* @param array $context An array of parameters to pass to the template
* @param array $blocks An array of blocks to pass to the template
*/
public function display(array $context, array $blocks = []);
/**
* Returns the bound environment for this template.
*
* @return Environment
*/
public function getEnvironment();
}
PK���[�����lib/Twig/TemplateWrapper.phpnu�[���<?php
use Twig\TemplateWrapper;
class_exists('Twig\TemplateWrapper');
if (\false) {
class Twig_TemplateWrapper extends TemplateWrapper
{
}
}
PK���[i��WWlib/Twig/Test/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a function template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Test_Function extends Twig_Test
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}
PK���[��U��%lib/Twig/Test/IntegrationTestCase.phpnu�[���<?php
use Twig\Test\IntegrationTestCase;
class_exists('Twig\Test\IntegrationTestCase');
if (\false) {
class Twig_Test_IntegrationTestCase extends IntegrationTestCase
{
}
}
PK���[_�<**lib/Twig/Test/Method.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Extension\ExtensionInterface;
@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);
/**
* Represents a method template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Test_Method extends Twig_Test
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method,
array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return
sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($this->extension), $this->method);
}
}
PK���[�r�\&&lib/Twig/Test/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@trigger_error('The Twig_Test_Node class is deprecated since version
1.12 and will be removed in 2.0.', E_USER_DEPRECATED);
/**
* Represents a template test as a Node.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Test_Node extends Twig_Test
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}
PK���[��P^��lib/Twig/Test/NodeTestCase.phpnu�[���<?php
use Twig\Test\NodeTestCase;
class_exists('Twig\Test\NodeTestCase');
if (\false) {
class Twig_Test_NodeTestCase extends NodeTestCase
{
}
}
PK���[�@'ttlib/Twig/Test.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
abstract class Twig_Test implements Twig_TestInterface,
Twig_TestCallableInterface
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'callable' => null,
], $options);
}
public function getCallable()
{
return $this->options['callable'];
}
}
PK���[�5}��"lib/Twig/TestCallableInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a callable template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_TestCallableInterface
{
public function getCallable();
}
PK���[�J3��lib/Twig/TestInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_TestInterface
{
/**
* Compiles a test.
*
* @return string The PHP code for the test
*/
public function compile();
}
PK���[�ttlib/Twig/Token.phpnu�[���<?php
use Twig\Token;
class_exists('Twig\Token');
if (\false) {
class Twig_Token extends Token
{
}
}
PK���[ ��R��#lib/Twig/TokenParser/AutoEscape.phpnu�[���<?php
use Twig\TokenParser\AutoEscapeTokenParser;
class_exists('Twig\TokenParser\AutoEscapeTokenParser');
if (\false) {
class Twig_TokenParser_AutoEscape extends AutoEscapeTokenParser
{
}
}
PK���[���lib/Twig/TokenParser/Block.phpnu�[���<?php
use Twig\TokenParser\BlockTokenParser;
class_exists('Twig\TokenParser\BlockTokenParser');
if (\false) {
class Twig_TokenParser_Block extends BlockTokenParser
{
}
}
PK���[�+�b��#lib/Twig/TokenParser/Deprecated.phpnu�[���<?php
use Twig\TokenParser\DeprecatedTokenParser;
class_exists('Twig\TokenParser\DeprecatedTokenParser');
if (\false) {
class Twig_TokenParser_Deprecated extends DeprecatedTokenParser
{
}
}
PK���[:IA[��lib/Twig/TokenParser/Do.phpnu�[���<?php
use Twig\TokenParser\DoTokenParser;
class_exists('Twig\TokenParser\DoTokenParser');
if (\false) {
class Twig_TokenParser_Do extends DoTokenParser
{
}
}
PK���[�!'�lib/Twig/TokenParser/Embed.phpnu�[���<?php
use Twig\TokenParser\EmbedTokenParser;
class_exists('Twig\TokenParser\EmbedTokenParser');
if (\false) {
class Twig_TokenParser_Embed extends EmbedTokenParser
{
}
}
PK���[�z���
lib/Twig/TokenParser/Extends.phpnu�[���<?php
use Twig\TokenParser\ExtendsTokenParser;
class_exists('Twig\TokenParser\ExtendsTokenParser');
if (\false) {
class Twig_TokenParser_Extends extends ExtendsTokenParser
{
}
}
PK���[�UTK��lib/Twig/TokenParser/Filter.phpnu�[���<?php
use Twig\TokenParser\FilterTokenParser;
class_exists('Twig\TokenParser\FilterTokenParser');
if (\false) {
class Twig_TokenParser_Filter extends FilterTokenParser
{
}
}
PK���[�����lib/Twig/TokenParser/Flush.phpnu�[���<?php
use Twig\TokenParser\FlushTokenParser;
class_exists('Twig\TokenParser\FlushTokenParser');
if (\false) {
class Twig_TokenParser_Flush extends FlushTokenParser
{
}
}
PK���[N
���lib/Twig/TokenParser/For.phpnu�[���<?php
use Twig\TokenParser\ForTokenParser;
class_exists('Twig\TokenParser\ForTokenParser');
if (\false) {
class Twig_TokenParser_For extends ForTokenParser
{
}
}
PK���[e�mU��lib/Twig/TokenParser/From.phpnu�[���<?php
use Twig\TokenParser\FromTokenParser;
class_exists('Twig\TokenParser\FromTokenParser');
if (\false) {
class Twig_TokenParser_From extends FromTokenParser
{
}
}
PK���[?_d`��lib/Twig/TokenParser/If.phpnu�[���<?php
use Twig\TokenParser\IfTokenParser;
class_exists('Twig\TokenParser\IfTokenParser');
if (\false) {
class Twig_TokenParser_If extends IfTokenParser
{
}
}
PK���[�1 ��lib/Twig/TokenParser/Import.phpnu�[���<?php
use Twig\TokenParser\ImportTokenParser;
class_exists('Twig\TokenParser\ImportTokenParser');
if (\false) {
class Twig_TokenParser_Import extends ImportTokenParser
{
}
}
PK���[�@�|��
lib/Twig/TokenParser/Include.phpnu�[���<?php
use Twig\TokenParser\IncludeTokenParser;
class_exists('Twig\TokenParser\IncludeTokenParser');
if (\false) {
class Twig_TokenParser_Include extends IncludeTokenParser
{
}
}
PK���[Bl�
��lib/Twig/TokenParser/Macro.phpnu�[���<?php
use Twig\TokenParser\MacroTokenParser;
class_exists('Twig\TokenParser\MacroTokenParser');
if (\false) {
class Twig_TokenParser_Macro extends MacroTokenParser
{
}
}
PK���[�V̐��
lib/Twig/TokenParser/Sandbox.phpnu�[���<?php
use Twig\TokenParser\SandboxTokenParser;
class_exists('Twig\TokenParser\SandboxTokenParser');
if (\false) {
class Twig_TokenParser_Sandbox extends SandboxTokenParser
{
}
}
PK���[g����lib/Twig/TokenParser/Set.phpnu�[���<?php
use Twig\TokenParser\SetTokenParser;
class_exists('Twig\TokenParser\SetTokenParser');
if (\false) {
class Twig_TokenParser_Set extends SetTokenParser
{
}
}
PK���[������"lib/Twig/TokenParser/Spaceless.phpnu�[���<?php
use Twig\TokenParser\SpacelessTokenParser;
class_exists('Twig\TokenParser\SpacelessTokenParser');
if (\false) {
class Twig_TokenParser_Spaceless extends SpacelessTokenParser
{
}
}
PK���[A�[��lib/Twig/TokenParser/Use.phpnu�[���<?php
use Twig\TokenParser\UseTokenParser;
class_exists('Twig\TokenParser\UseTokenParser');
if (\false) {
class Twig_TokenParser_Use extends UseTokenParser
{
}
}
PK���[�ou��lib/Twig/TokenParser/With.phpnu�[���<?php
use Twig\TokenParser\WithTokenParser;
class_exists('Twig\TokenParser\WithTokenParser');
if (\false) {
class Twig_TokenParser_With extends WithTokenParser
{
}
}
PK���[/u�:��lib/Twig/TokenParser.phpnu�[���<?php
use Twig\TokenParser\AbstractTokenParser;
class_exists('Twig\TokenParser\AbstractTokenParser');
if (\false) {
class Twig_TokenParser extends AbstractTokenParser
{
}
}
PK���[��Z�lib/Twig/TokenParserBroker.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\TokenParser\TokenParserInterface;
/**
* Default implementation of a token parser broker.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface
{
protected $parser;
protected $parsers = [];
protected $brokers = [];
/**
* @param array|\Traversable $parsers A \Traversable of
Twig_TokenParserInterface instances
* @param array|\Traversable $brokers A \Traversable of
Twig_TokenParserBrokerInterface instances
* @param bool $triggerDeprecationError
*/
public function __construct($parsers = [], $brokers = [],
$triggerDeprecationError = true)
{
if ($triggerDeprecationError) {
@trigger_error('The '.__CLASS__.' class is
deprecated since version 1.12 and will be removed in 2.0.',
E_USER_DEPRECATED);
}
foreach ($parsers as $parser) {
if (!$parser instanceof TokenParserInterface) {
throw new \LogicException('$parsers must a an array of
Twig_TokenParserInterface.');
}
$this->parsers[$parser->getTag()] = $parser;
}
foreach ($brokers as $broker) {
if (!$broker instanceof Twig_TokenParserBrokerInterface) {
throw new \LogicException('$brokers must a an array of
Twig_TokenParserBrokerInterface.');
}
$this->brokers[] = $broker;
}
}
public function addTokenParser(TokenParserInterface $parser)
{
$this->parsers[$parser->getTag()] = $parser;
}
public function removeTokenParser(TokenParserInterface $parser)
{
$name = $parser->getTag();
if (isset($this->parsers[$name]) && $parser ===
$this->parsers[$name]) {
unset($this->parsers[$name]);
}
}
public function addTokenParserBroker(self $broker)
{
$this->brokers[] = $broker;
}
public function removeTokenParserBroker(self $broker)
{
if (false !== $pos = array_search($broker, $this->brokers)) {
unset($this->brokers[$pos]);
}
}
/**
* Gets a suitable TokenParser for a tag.
*
* First looks in parsers, then in brokers.
*
* @param string $tag A tag name
*
* @return TokenParserInterface|null A Twig_TokenParserInterface or
null if no suitable TokenParser was found
*/
public function getTokenParser($tag)
{
if (isset($this->parsers[$tag])) {
return $this->parsers[$tag];
}
$broker = end($this->brokers);
while (false !== $broker) {
$parser = $broker->getTokenParser($tag);
if (null !== $parser) {
return $parser;
}
$broker = prev($this->brokers);
}
}
public function getParsers()
{
return $this->parsers;
}
public function getParser()
{
return $this->parser;
}
public function setParser(Twig_ParserInterface $parser)
{
$this->parser = $parser;
foreach ($this->parsers as $tokenParser) {
$tokenParser->setParser($parser);
}
foreach ($this->brokers as $broker) {
$broker->setParser($parser);
}
}
}
PK���[�@v#��'lib/Twig/TokenParserBrokerInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\TokenParser\TokenParserInterface;
/**
* Interface implemented by token parser brokers.
*
* Token parser brokers allows to implement custom logic in the process of
resolving a token parser for a given tag name.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_TokenParserBrokerInterface
{
/**
* Gets a TokenParser suitable for a tag.
*
* @param string $tag A tag name
*
* @return TokenParserInterface|null A Twig_TokenParserInterface or
null if no suitable TokenParser was found
*/
public function getTokenParser($tag);
/**
* Calls Twig\TokenParser\TokenParserInterface::setParser on all
parsers the implementation knows of.
*/
public function setParser(Twig_ParserInterface $parser);
/**
* Gets the Twig_ParserInterface.
*
* @return Twig_ParserInterface|null A Twig_ParserInterface instance or
null
*/
public function getParser();
}
PK���[����!lib/Twig/TokenParserInterface.phpnu�[���<?php
use Twig\TokenParser\TokenParserInterface;
class_exists('Twig\TokenParser\TokenParserInterface');
if (\false) {
class Twig_TokenParserInterface extends TokenParserInterface
{
}
}
PK���[�ܚ��lib/Twig/TokenStream.phpnu�[���<?php
use Twig\TokenStream;
class_exists('Twig\TokenStream');
if (\false) {
class Twig_TokenStream extends TokenStream
{
}
}
PK���["�ǿ�&lib/Twig/Util/DeprecationCollector.phpnu�[���<?php
use Twig\Util\DeprecationCollector;
class_exists('Twig\Util\DeprecationCollector');
if (\false) {
class Twig_Util_DeprecationCollector extends DeprecationCollector
{
}
}
PK���[Z8�Q��%lib/Twig/Util/TemplateDirIterator.phpnu�[���<?php
use Twig\Util\TemplateDirIterator;
class_exists('Twig\Util\TemplateDirIterator');
if (\false) {
class Twig_Util_TemplateDirIterator extends TemplateDirIterator
{
}
}
PK���[��P;��src/Cache/CacheInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Cache;
/**
* Interface implemented by cache classes.
*
* It is highly recommended to always store templates on the filesystem to
* benefit from the PHP opcode cache. This interface is mostly useful if
you
* need to implement a custom strategy for storing templates on the
filesystem.
*
* @author Andrew Tch <andrew@noop.lv>
*/
interface CacheInterface
{
/**
* Generates a cache key for the given template class name.
*
* @param string $name The template name
* @param string $className The template class name
*
* @return string
*/
public function generateKey($name, $className);
/**
* Writes the compiled template to cache.
*
* @param string $key The cache key
* @param string $content The template representation as a PHP class
*/
public function write($key, $content);
/**
* Loads a template from the cache.
*
* @param string $key The cache key
*/
public function load($key);
/**
* Returns the modification timestamp of a key.
*
* @param string $key The cache key
*
* @return int
*/
public function getTimestamp($key);
}
class_alias('Twig\Cache\CacheInterface',
'Twig_CacheInterface');
PK���[E���0
0
src/Cache/FilesystemCache.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Cache;
/**
* Implements a cache on the filesystem.
*
* @author Andrew Tch <andrew@noop.lv>
*/
class FilesystemCache implements CacheInterface
{
const FORCE_BYTECODE_INVALIDATION = 1;
private $directory;
private $options;
/**
* @param string $directory The root cache directory
* @param int $options A set of options
*/
public function __construct($directory, $options = 0)
{
$this->directory = rtrim($directory,
'\/').'/';
$this->options = $options;
}
public function generateKey($name, $className)
{
$hash = hash('sha256', $className);
return
$this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
}
public function load($key)
{
if (file_exists($key)) {
@include_once $key;
}
}
public function write($key, $content)
{
$dir = \dirname($key);
if (!is_dir($dir)) {
if (false === @mkdir($dir, 0777, true)) {
clearstatcache(true, $dir);
if (!is_dir($dir)) {
throw new \RuntimeException(sprintf('Unable to
create the cache directory (%s).', $dir));
}
}
} elseif (!is_writable($dir)) {
throw new \RuntimeException(sprintf('Unable to write in
the cache directory (%s).', $dir));
}
$tmpFile = tempnam($dir, basename($key));
if (false !== @file_put_contents($tmpFile, $content) &&
@rename($tmpFile, $key)) {
@chmod($key, 0666 & ~umask());
if (self::FORCE_BYTECODE_INVALIDATION == ($this->options
& self::FORCE_BYTECODE_INVALIDATION)) {
// Compile cached file into bytecode cache
if (\function_exists('opcache_invalidate')
&& filter_var(ini_get('opcache.enable'),
FILTER_VALIDATE_BOOLEAN)) {
@opcache_invalidate($key, true);
} elseif (\function_exists('apc_compile_file')) {
apc_compile_file($key);
}
}
return;
}
throw new \RuntimeException(sprintf('Failed to write cache
file "%s".', $key));
}
public function getTimestamp($key)
{
if (!file_exists($key)) {
return 0;
}
return (int) @filemtime($key);
}
}
class_alias('Twig\Cache\FilesystemCache',
'Twig_Cache_Filesystem');
PK���[�6T��src/Cache/NullCache.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Cache;
/**
* Implements a no-cache strategy.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class NullCache implements CacheInterface
{
public function generateKey($name, $className)
{
return '';
}
public function write($key, $content)
{
}
public function load($key)
{
}
public function getTimestamp($key)
{
return 0;
}
}
class_alias('Twig\Cache\NullCache', 'Twig_Cache_Null');
PK���[:��Xzzsrc/Compiler.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Node\ModuleNode;
/**
* Compiles a node to PHP code.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Compiler implements \Twig_CompilerInterface
{
protected $lastLine;
protected $source;
protected $indentation;
protected $env;
protected $debugInfo = [];
protected $sourceOffset;
protected $sourceLine;
protected $filename;
private $varNameSalt = 0;
public function __construct(Environment $env)
{
$this->env = $env;
}
/**
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getFilename()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
return $this->filename;
}
/**
* Returns the environment instance related to this compiler.
*
* @return Environment
*/
public function getEnvironment()
{
return $this->env;
}
/**
* Gets the current PHP code after compilation.
*
* @return string The PHP code
*/
public function getSource()
{
return $this->source;
}
/**
* Compiles a node.
*
* @param int $indentation The current indentation
*
* @return $this
*/
public function compile(\Twig_NodeInterface $node, $indentation = 0)
{
$this->lastLine = null;
$this->source = '';
$this->debugInfo = [];
$this->sourceOffset = 0;
// source code starts at 1 (as we then increment it when we
encounter new lines)
$this->sourceLine = 1;
$this->indentation = $indentation;
$this->varNameSalt = 0;
if ($node instanceof ModuleNode) {
// to be removed in 2.0
$this->filename = $node->getTemplateName();
}
$node->compile($this);
return $this;
}
public function subcompile(\Twig_NodeInterface $node, $raw = true)
{
if (false === $raw) {
$this->source .= str_repeat(' ',
$this->indentation * 4);
}
$node->compile($this);
return $this;
}
/**
* Adds a raw string to the compiled code.
*
* @param string $string The string
*
* @return $this
*/
public function raw($string)
{
$this->source .= $string;
return $this;
}
/**
* Writes a string to the compiled code by adding indentation.
*
* @return $this
*/
public function write()
{
$strings = \func_get_args();
foreach ($strings as $string) {
$this->source .= str_repeat(' ',
$this->indentation * 4).$string;
}
return $this;
}
/**
* Appends an indentation to the current PHP code after compilation.
*
* @return $this
*
* @deprecated since 1.27 (to be removed in 2.0).
*/
public function addIndentation()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
write(\'\') instead.', E_USER_DEPRECATED);
$this->source .= str_repeat(' ', $this->indentation
* 4);
return $this;
}
/**
* Adds a quoted string to the compiled code.
*
* @param string $value The string
*
* @return $this
*/
public function string($value)
{
$this->source .= sprintf('"%s"',
addcslashes($value, "\0\t\"\$\\"));
return $this;
}
/**
* Returns a PHP representation of a given value.
*
* @param mixed $value The value to convert
*
* @return $this
*/
public function repr($value)
{
if (\is_int($value) || \is_float($value)) {
if (false !== $locale = setlocale(LC_NUMERIC, '0')) {
setlocale(LC_NUMERIC, 'C');
}
$this->raw(var_export($value, true));
if (false !== $locale) {
setlocale(LC_NUMERIC, $locale);
}
} elseif (null === $value) {
$this->raw('null');
} elseif (\is_bool($value)) {
$this->raw($value ? 'true' : 'false');
} elseif (\is_array($value)) {
$this->raw('[');
$first = true;
foreach ($value as $key => $v) {
if (!$first) {
$this->raw(', ');
}
$first = false;
$this->repr($key);
$this->raw(' => ');
$this->repr($v);
}
$this->raw(']');
} else {
$this->string($value);
}
return $this;
}
/**
* Adds debugging information.
*
* @return $this
*/
public function addDebugInfo(\Twig_NodeInterface $node)
{
if ($node->getTemplateLine() != $this->lastLine) {
$this->write(sprintf("// line %d\n",
$node->getTemplateLine()));
// when mbstring.func_overload is set to 2
// mb_substr_count() replaces substr_count()
// but they have different signatures!
if (((int) ini_get('mbstring.func_overload')) &
2) {
@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);
// this is much slower than the "right" version
$this->sourceLine +=
mb_substr_count(mb_substr($this->source, $this->sourceOffset),
"\n");
} else {
$this->sourceLine += substr_count($this->source,
"\n", $this->sourceOffset);
}
$this->sourceOffset = \strlen($this->source);
$this->debugInfo[$this->sourceLine] =
$node->getTemplateLine();
$this->lastLine = $node->getTemplateLine();
}
return $this;
}
public function getDebugInfo()
{
ksort($this->debugInfo);
return $this->debugInfo;
}
/**
* Indents the generated code.
*
* @param int $step The number of indentation to add
*
* @return $this
*/
public function indent($step = 1)
{
$this->indentation += $step;
return $this;
}
/**
* Outdents the generated code.
*
* @param int $step The number of indentation to remove
*
* @return $this
*
* @throws \LogicException When trying to outdent too much so the
indentation would become negative
*/
public function outdent($step = 1)
{
// can't outdent by more steps than the current indentation
level
if ($this->indentation < $step) {
throw new \LogicException('Unable to call outdent() as the
indentation would become negative.');
}
$this->indentation -= $step;
return $this;
}
public function getVarName()
{
return sprintf('__internal_%s', hash('sha256',
__METHOD__.$this->varNameSalt++));
}
}
class_alias('Twig\Compiler', 'Twig_Compiler');
PK���[��.����src/Environment.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Cache\CacheInterface;
use Twig\Cache\FilesystemCache;
use Twig\Cache\NullCache;
use Twig\Error\Error;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use Twig\Extension\CoreExtension;
use Twig\Extension\EscaperExtension;
use Twig\Extension\ExtensionInterface;
use Twig\Extension\GlobalsInterface;
use Twig\Extension\InitRuntimeInterface;
use Twig\Extension\OptimizerExtension;
use Twig\Extension\StagingExtension;
use Twig\Loader\ArrayLoader;
use Twig\Loader\ChainLoader;
use Twig\Loader\LoaderInterface;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\Node\ModuleNode;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\RuntimeLoader\RuntimeLoaderInterface;
use Twig\TokenParser\TokenParserInterface;
/**
* Stores the Twig configuration.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Environment
{
const VERSION = '1.42.5';
const VERSION_ID = 14205;
const MAJOR_VERSION = 1;
const MINOR_VERSION = 42;
const RELEASE_VERSION = 5;
const EXTRA_VERSION = '';
protected $charset;
protected $loader;
protected $debug;
protected $autoReload;
protected $cache;
protected $lexer;
protected $parser;
protected $compiler;
protected $baseTemplateClass;
protected $extensions;
protected $parsers;
protected $visitors;
protected $filters;
protected $tests;
protected $functions;
protected $globals;
protected $runtimeInitialized = false;
protected $extensionInitialized = false;
protected $loadedTemplates;
protected $strictVariables;
protected $unaryOperators;
protected $binaryOperators;
protected $templateClassPrefix = '__TwigTemplate_';
protected $functionCallbacks = [];
protected $filterCallbacks = [];
protected $staging;
private $originalCache;
private $bcWriteCacheFile = false;
private $bcGetCacheFilename = false;
private $lastModifiedExtension = 0;
private $extensionsByClass = [];
private $runtimeLoaders = [];
private $runtimes = [];
private $optionsHash;
/**
* Constructor.
*
* Available options:
*
* * debug: When set to true, it automatically set
"auto_reload" to true as
* well (default to false).
*
* * charset: The charset used by the templates (default to UTF-8).
*
* * base_template_class: The base template class to use for generated
* templates (default to \Twig\Template).
*
* * cache: An absolute path where to store the compiled templates,
* a \Twig\Cache\CacheInterface implementation,
* or false to disable compilation cache (default).
*
* * auto_reload: Whether to reload the template if the original
source changed.
* If you don't provide the auto_reload option, it
will be
* determined automatically based on the debug value.
*
* * strict_variables: Whether to ignore invalid variables in
templates
* (default to false).
*
* * autoescape: Whether to enable auto-escaping (default to html):
* * false: disable auto-escaping
* * true: equivalent to html
* * html, js: set the autoescaping to one of the
supported strategies
* * name: set the autoescaping strategy based on the
template name extension
* * PHP callback: a PHP callback that returns an
escaping strategy based on the template "name"
*
* * optimizations: A flag that indicates which optimizations to apply
* (default to -1 which means that all optimizations
are enabled;
* set it to 0 to disable).
*/
public function __construct(LoaderInterface $loader = null, $options =
[])
{
if (null !== $loader) {
$this->setLoader($loader);
} else {
@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);
}
$options = array_merge([
'debug' => false,
'charset' => 'UTF-8',
'base_template_class' =>
'\Twig\Template',
'strict_variables' => false,
'autoescape' => 'html',
'cache' => false,
'auto_reload' => null,
'optimizations' => -1,
], $options);
$this->debug = (bool) $options['debug'];
$this->charset = strtoupper($options['charset']);
$this->baseTemplateClass =
$options['base_template_class'];
$this->autoReload = null === $options['auto_reload'] ?
$this->debug : (bool) $options['auto_reload'];
$this->strictVariables = (bool)
$options['strict_variables'];
$this->setCache($options['cache']);
$this->addExtension(new CoreExtension());
$this->addExtension(new
EscaperExtension($options['autoescape']));
$this->addExtension(new
OptimizerExtension($options['optimizations']));
$this->staging = new StagingExtension();
// For BC
if (\is_string($this->originalCache)) {
$r = new \ReflectionMethod($this, 'writeCacheFile');
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error('The Twig\Environment::writeCacheFile
method is deprecated since version 1.22 and will be removed in Twig
2.0.', E_USER_DEPRECATED);
$this->bcWriteCacheFile = true;
}
$r = new \ReflectionMethod($this,
'getCacheFilename');
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error('The Twig\Environment::getCacheFilename
method is deprecated since version 1.22 and will be removed in Twig
2.0.', E_USER_DEPRECATED);
$this->bcGetCacheFilename = true;
}
}
}
/**
* Gets the base template class for compiled templates.
*
* @return string The base template class name
*/
public function getBaseTemplateClass()
{
return $this->baseTemplateClass;
}
/**
* Sets the base template class for compiled templates.
*
* @param string $class The base template class name
*/
public function setBaseTemplateClass($class)
{
$this->baseTemplateClass = $class;
$this->updateOptionsHash();
}
/**
* Enables debugging mode.
*/
public function enableDebug()
{
$this->debug = true;
$this->updateOptionsHash();
}
/**
* Disables debugging mode.
*/
public function disableDebug()
{
$this->debug = false;
$this->updateOptionsHash();
}
/**
* Checks if debug mode is enabled.
*
* @return bool true if debug mode is enabled, false otherwise
*/
public function isDebug()
{
return $this->debug;
}
/**
* Enables the auto_reload option.
*/
public function enableAutoReload()
{
$this->autoReload = true;
}
/**
* Disables the auto_reload option.
*/
public function disableAutoReload()
{
$this->autoReload = false;
}
/**
* Checks if the auto_reload option is enabled.
*
* @return bool true if auto_reload is enabled, false otherwise
*/
public function isAutoReload()
{
return $this->autoReload;
}
/**
* Enables the strict_variables option.
*/
public function enableStrictVariables()
{
$this->strictVariables = true;
$this->updateOptionsHash();
}
/**
* Disables the strict_variables option.
*/
public function disableStrictVariables()
{
$this->strictVariables = false;
$this->updateOptionsHash();
}
/**
* Checks if the strict_variables option is enabled.
*
* @return bool true if strict_variables is enabled, false otherwise
*/
public function isStrictVariables()
{
return $this->strictVariables;
}
/**
* Gets the current cache implementation.
*
* @param bool $original Whether to return the original cache option or
the real cache instance
*
* @return CacheInterface|string|false A Twig\Cache\CacheInterface
implementation,
* an absolute path to the compiled
templates,
* or false to disable cache
*/
public function getCache($original = true)
{
return $original ? $this->originalCache : $this->cache;
}
/**
* Sets the current cache implementation.
*
* @param CacheInterface|string|false $cache A
Twig\Cache\CacheInterface implementation,
* an absolute path to the
compiled templates,
* or false to disable cache
*/
public function setCache($cache)
{
if (\is_string($cache)) {
$this->originalCache = $cache;
$this->cache = new FilesystemCache($cache);
} elseif (false === $cache) {
$this->originalCache = $cache;
$this->cache = new NullCache();
} elseif (null === $cache) {
@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);
$this->originalCache = false;
$this->cache = new NullCache();
} elseif ($cache instanceof CacheInterface) {
$this->originalCache = $this->cache = $cache;
} else {
throw new \LogicException(sprintf('Cache can only be a
string, false, or a \Twig\Cache\CacheInterface implementation.'));
}
}
/**
* Gets the cache filename for a given template.
*
* @param string $name The template name
*
* @return string|false The cache file name or false when caching is
disabled
*
* @deprecated since 1.22 (to be removed in 2.0)
*/
public function getCacheFilename($name)
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.22 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
$key = $this->cache->generateKey($name,
$this->getTemplateClass($name));
return !$key ? false : $key;
}
/**
* Gets the template class associated with the given string.
*
* The generated template class is based on the following parameters:
*
* * The cache key for the given template;
* * The currently enabled extensions;
* * Whether the Twig C extension is available or not;
* * PHP version;
* * Twig version;
* * Options with what environment was created.
*
* @param string $name The name for which to calculate the template
class name
* @param int|null $index The index if it is an embedded template
*
* @return string The template class name
*/
public function getTemplateClass($name, $index = null)
{
$key =
$this->getLoader()->getCacheKey($name).$this->optionsHash;
return $this->templateClassPrefix.hash('sha256',
$key).(null === $index ? '' : '___'.$index);
}
/**
* Gets the template class prefix.
*
* @return string The template class prefix
*
* @deprecated since 1.22 (to be removed in 2.0)
*/
public function getTemplateClassPrefix()
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.22 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
return $this->templateClassPrefix;
}
/**
* Renders a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to
pass to the template
*
* @return string The rendered template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = [])
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to
pass to the template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function display($name, array $context = [])
{
$this->load($name)->display($context);
}
/**
* Loads a template.
*
* @param string|TemplateWrapper|\Twig\Template $name The template name
*
* @throws LoaderError When the template cannot be found
* @throws RuntimeError When a previously generated cache is corrupted
* @throws SyntaxError When an error occurred during compilation
*
* @return TemplateWrapper
*/
public function load($name)
{
if ($name instanceof TemplateWrapper) {
return $name;
}
if ($name instanceof Template) {
return new TemplateWrapper($this, $name);
}
return new TemplateWrapper($this, $this->loadTemplate($name));
}
/**
* Loads a template internal representation.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The template name
* @param int $index The index if it is an embedded template
*
* @return \Twig_TemplateInterface A template instance representing the
given template name
*
* @throws LoaderError When the template cannot be found
* @throws RuntimeError When a previously generated cache is corrupted
* @throws SyntaxError When an error occurred during compilation
*
* @internal
*/
public function loadTemplate($name, $index = null)
{
return $this->loadClass($this->getTemplateClass($name),
$name, $index);
}
/**
* @internal
*/
public function loadClass($cls, $name, $index = null)
{
$mainCls = $cls;
if (null !== $index) {
$cls .= '___'.$index;
}
if (isset($this->loadedTemplates[$cls])) {
return $this->loadedTemplates[$cls];
}
if (!class_exists($cls, false)) {
if ($this->bcGetCacheFilename) {
$key = $this->getCacheFilename($name);
} else {
$key = $this->cache->generateKey($name, $mainCls);
}
if (!$this->isAutoReload() ||
$this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
$this->cache->load($key);
}
$source = null;
if (!class_exists($cls, false)) {
$loader = $this->getLoader();
if (!$loader instanceof SourceContextLoaderInterface) {
$source = new Source($loader->getSource($name),
$name);
} else {
$source = $loader->getSourceContext($name);
}
$content = $this->compileSource($source);
if ($this->bcWriteCacheFile) {
$this->writeCacheFile($key, $content);
} else {
$this->cache->write($key, $content);
$this->cache->load($key);
}
if (!class_exists($mainCls, false)) {
/* Last line of defense if either
$this->bcWriteCacheFile was used,
* $this->cache is implemented as a no-op or we have
a race condition
* where the cache was cleared between the above calls
to write to and load from
* the cache.
*/
eval('?>'.$content);
}
}
if (!class_exists($cls, false)) {
throw new RuntimeError(sprintf('Failed to load Twig
template "%s", index "%s": cache might be
corrupted.', $name, $index), -1, $source);
}
}
if (!$this->runtimeInitialized) {
$this->initRuntime();
}
return $this->loadedTemplates[$cls] = new $cls($this);
}
/**
* Creates a template from source.
*
* This method should not be used as a generic way to load templates.
*
* @param string $template The template source
* @param string $name An optional name of the template to be used
in error messages
*
* @return TemplateWrapper A template instance representing the given
template name
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
*/
public function createTemplate($template, $name = null)
{
$hash = hash('sha256', $template, false);
if (null !== $name) {
$name = sprintf('%s (string template %s)', $name,
$hash);
} else {
$name = sprintf('__string_template__%s', $hash);
}
$loader = new ChainLoader([
new ArrayLoader([$name => $template]),
$current = $this->getLoader(),
]);
$this->setLoader($loader);
try {
$template = new TemplateWrapper($this,
$this->loadTemplate($name));
} catch (\Exception $e) {
$this->setLoader($current);
throw $e;
} catch (\Throwable $e) {
$this->setLoader($current);
throw $e;
}
$this->setLoader($current);
return $template;
}
/**
* Returns true if the template is still fresh.
*
* Besides checking the loader for freshness information,
* this method also checks if the enabled extensions have
* not changed.
*
* @param string $name The template name
* @param int $time The last modification time of the cached
template
*
* @return bool true if the template is fresh, false otherwise
*/
public function isTemplateFresh($name, $time)
{
if (0 === $this->lastModifiedExtension) {
foreach ($this->extensions as $extension) {
$r = new \ReflectionObject($extension);
if (file_exists($r->getFileName()) &&
($extensionTime = filemtime($r->getFileName())) >
$this->lastModifiedExtension) {
$this->lastModifiedExtension = $extensionTime;
}
}
}
return $this->lastModifiedExtension <= $time &&
$this->getLoader()->isFresh($name, $time);
}
/**
* Tries to load a template consecutively from an array.
*
* Similar to load() but it also accepts instances of \Twig\Template
and
* \Twig\TemplateWrapper, and an array of templates where each is tried
to be loaded.
*
* @param string|Template|\Twig\TemplateWrapper|array $names A template
or an array of templates to try consecutively
*
* @return TemplateWrapper|Template
*
* @throws LoaderError When none of the templates can be found
* @throws SyntaxError When an error occurred during compilation
*/
public function resolveTemplate($names)
{
if (!\is_array($names)) {
$names = [$names];
}
foreach ($names as $name) {
if ($name instanceof Template) {
return $name;
}
if ($name instanceof TemplateWrapper) {
return $name;
}
try {
return $this->loadTemplate($name);
} catch (LoaderError $e) {
if (1 === \count($names)) {
throw $e;
}
}
}
throw new LoaderError(sprintf('Unable to find one of the
following templates: "%s".', implode('",
"', $names)));
}
/**
* Clears the internal template cache.
*
* @deprecated since 1.18.3 (to be removed in 2.0)
*/
public function clearTemplateCache()
{
@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);
$this->loadedTemplates = [];
}
/**
* Clears the template cache files on the filesystem.
*
* @deprecated since 1.22 (to be removed in 2.0)
*/
public function clearCacheFiles()
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.22 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
if (\is_string($this->originalCache)) {
foreach (new \RecursiveIteratorIterator(new
\RecursiveDirectoryIterator($this->originalCache),
\RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
if ($file->isFile()) {
@unlink($file->getPathname());
}
}
}
}
/**
* Gets the Lexer instance.
*
* @return \Twig_LexerInterface
*
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getLexer()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
if (null === $this->lexer) {
$this->lexer = new Lexer($this);
}
return $this->lexer;
}
public function setLexer(\Twig_LexerInterface $lexer)
{
$this->lexer = $lexer;
}
/**
* Tokenizes a source code.
*
* @param string|Source $source The template source code
* @param string $name The template name (deprecated)
*
* @return TokenStream
*
* @throws SyntaxError When the code is syntactically wrong
*/
public function tokenize($source, $name = null)
{
if (!$source instanceof Source) {
@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);
$source = new Source($source, $name);
}
if (null === $this->lexer) {
$this->lexer = new Lexer($this);
}
return $this->lexer->tokenize($source);
}
/**
* Gets the Parser instance.
*
* @return \Twig_ParserInterface
*
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getParser()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
if (null === $this->parser) {
$this->parser = new Parser($this);
}
return $this->parser;
}
public function setParser(\Twig_ParserInterface $parser)
{
$this->parser = $parser;
}
/**
* Converts a token stream to a node tree.
*
* @return ModuleNode
*
* @throws SyntaxError When the token stream is syntactically or
semantically wrong
*/
public function parse(TokenStream $stream)
{
if (null === $this->parser) {
$this->parser = new Parser($this);
}
return $this->parser->parse($stream);
}
/**
* Gets the Compiler instance.
*
* @return \Twig_CompilerInterface
*
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getCompiler()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
if (null === $this->compiler) {
$this->compiler = new Compiler($this);
}
return $this->compiler;
}
public function setCompiler(\Twig_CompilerInterface $compiler)
{
$this->compiler = $compiler;
}
/**
* Compiles a node and returns the PHP code.
*
* @return string The compiled PHP source code
*/
public function compile(\Twig_NodeInterface $node)
{
if (null === $this->compiler) {
$this->compiler = new Compiler($this);
}
return $this->compiler->compile($node)->getSource();
}
/**
* Compiles a template source code.
*
* @param string|Source $source The template source code
* @param string $name The template name (deprecated)
*
* @return string The compiled PHP source code
*
* @throws SyntaxError When there was an error during tokenizing,
parsing or compiling
*/
public function compileSource($source, $name = null)
{
if (!$source instanceof Source) {
@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);
$source = new Source($source, $name);
}
try {
return
$this->compile($this->parse($this->tokenize($source)));
} catch (Error $e) {
$e->setSourceContext($source);
throw $e;
} catch (\Exception $e) {
throw new SyntaxError(sprintf('An exception has been
thrown during the compilation of a template ("%s").',
$e->getMessage()), -1, $source, $e);
}
}
public function setLoader(LoaderInterface $loader)
{
if (!$loader instanceof SourceContextLoaderInterface && 0
!== strpos(\get_class($loader), 'Mock_')) {
@trigger_error(sprintf('Twig loader "%s" should
implement Twig\Loader\SourceContextLoaderInterface since version
1.27.', \get_class($loader)), E_USER_DEPRECATED);
}
$this->loader = $loader;
}
/**
* Gets the Loader instance.
*
* @return LoaderInterface
*/
public function getLoader()
{
if (null === $this->loader) {
throw new \LogicException('You must set a loader
first.');
}
return $this->loader;
}
/**
* Sets the default template charset.
*
* @param string $charset The default charset
*/
public function setCharset($charset)
{
$this->charset = strtoupper($charset);
}
/**
* Gets the default template charset.
*
* @return string The default charset
*/
public function getCharset()
{
return $this->charset;
}
/**
* Initializes the runtime environment.
*
* @deprecated since 1.23 (to be removed in 2.0)
*/
public function initRuntime()
{
$this->runtimeInitialized = true;
foreach ($this->getExtensions() as $name => $extension) {
if (!$extension instanceof InitRuntimeInterface) {
$m = new \ReflectionMethod($extension,
'initRuntime');
$parentClass = $m->getDeclaringClass()->getName();
if ('Twig_Extension' !== $parentClass &&
'Twig\Extension\AbstractExtension' !== $parentClass) {
@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);
}
}
$extension->initRuntime($this);
}
}
/**
* Returns true if the given extension is registered.
*
* @param string $class The extension class name
*
* @return bool Whether the extension is registered or not
*/
public function hasExtension($class)
{
$class = ltrim($class, '\\');
if (!isset($this->extensionsByClass[$class]) &&
class_exists($class, false)) {
// For BC/FC with namespaced aliases
$class = new \ReflectionClass($class);
$class = $class->name;
}
if (isset($this->extensions[$class])) {
if ($class !== \get_class($this->extensions[$class])) {
@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);
}
return true;
}
return isset($this->extensionsByClass[$class]);
}
/**
* Adds a runtime loader.
*/
public function addRuntimeLoader(RuntimeLoaderInterface $loader)
{
$this->runtimeLoaders[] = $loader;
}
/**
* Gets an extension by class name.
*
* @param string $class The extension class name
*
* @return ExtensionInterface
*/
public function getExtension($class)
{
$class = ltrim($class, '\\');
if (!isset($this->extensionsByClass[$class]) &&
class_exists($class, false)) {
// For BC/FC with namespaced aliases
$class = new \ReflectionClass($class);
$class = $class->name;
}
if (isset($this->extensions[$class])) {
if ($class !== \get_class($this->extensions[$class])) {
@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);
}
return $this->extensions[$class];
}
if (!isset($this->extensionsByClass[$class])) {
throw new RuntimeError(sprintf('The "%s"
extension is not enabled.', $class));
}
return $this->extensionsByClass[$class];
}
/**
* Returns the runtime implementation of a Twig element
(filter/function/test).
*
* @param string $class A runtime class name
*
* @return object The runtime implementation
*
* @throws RuntimeError When the template cannot be found
*/
public function getRuntime($class)
{
if (isset($this->runtimes[$class])) {
return $this->runtimes[$class];
}
foreach ($this->runtimeLoaders as $loader) {
if (null !== $runtime = $loader->load($class)) {
return $this->runtimes[$class] = $runtime;
}
}
throw new RuntimeError(sprintf('Unable to load the
"%s" runtime.', $class));
}
public function addExtension(ExtensionInterface $extension)
{
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to register
extension "%s" as extensions have already been
initialized.', $extension->getName()));
}
$class = \get_class($extension);
if ($class !== $extension->getName()) {
if (isset($this->extensions[$extension->getName()])) {
unset($this->extensions[$extension->getName()],
$this->extensionsByClass[$class]);
@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);
}
}
$this->lastModifiedExtension = 0;
$this->extensionsByClass[$class] = $extension;
$this->extensions[$extension->getName()] = $extension;
$this->updateOptionsHash();
}
/**
* Removes an extension by name.
*
* This method is deprecated and you should not use it.
*
* @param string $name The extension name
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
public function removeExtension($name)
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.12 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to remove
extension "%s" as extensions have already been
initialized.', $name));
}
$class = ltrim($name, '\\');
if (!isset($this->extensionsByClass[$class]) &&
class_exists($class, false)) {
// For BC/FC with namespaced aliases
$class = new \ReflectionClass($class);
$class = $class->name;
}
if (isset($this->extensions[$class])) {
if ($class !== \get_class($this->extensions[$class])) {
@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);
}
unset($this->extensions[$class]);
}
unset($this->extensions[$class]);
$this->updateOptionsHash();
}
/**
* Registers an array of extensions.
*
* @param array $extensions An array of extensions
*/
public function setExtensions(array $extensions)
{
foreach ($extensions as $extension) {
$this->addExtension($extension);
}
}
/**
* Returns all registered extensions.
*
* @return ExtensionInterface[] An array of extensions (keys are for
internal usage only and should not be relied on)
*/
public function getExtensions()
{
return $this->extensions;
}
public function addTokenParser(TokenParserInterface $parser)
{
if ($this->extensionInitialized) {
throw new \LogicException('Unable to add a token parser as
extensions have already been initialized.');
}
$this->staging->addTokenParser($parser);
}
/**
* Gets the registered Token Parsers.
*
* @return \Twig_TokenParserBrokerInterface
*
* @internal
*/
public function getTokenParsers()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->parsers;
}
/**
* Gets registered tags.
*
* Be warned that this method cannot return tags defined by
\Twig_TokenParserBrokerInterface classes.
*
* @return TokenParserInterface[]
*
* @internal
*/
public function getTags()
{
$tags = [];
foreach ($this->getTokenParsers()->getParsers() as $parser) {
if ($parser instanceof TokenParserInterface) {
$tags[$parser->getTag()] = $parser;
}
}
return $tags;
}
public function addNodeVisitor(NodeVisitorInterface $visitor)
{
if ($this->extensionInitialized) {
throw new \LogicException('Unable to add a node visitor as
extensions have already been initialized.');
}
$this->staging->addNodeVisitor($visitor);
}
/**
* Gets the registered Node Visitors.
*
* @return NodeVisitorInterface[]
*
* @internal
*/
public function getNodeVisitors()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->visitors;
}
/**
* Registers a Filter.
*
* @param string|TwigFilter $name The filter name or a
\Twig_SimpleFilter instance
* @param \Twig_FilterInterface|TwigFilter $filter
*/
public function addFilter($name, $filter = null)
{
if (!$name instanceof TwigFilter && !($filter instanceof
TwigFilter || $filter instanceof \Twig_FilterInterface)) {
throw new \LogicException('A filter must be an instance of
\Twig_FilterInterface or \Twig_SimpleFilter.');
}
if ($name instanceof TwigFilter) {
$filter = $name;
$name = $filter->getName();
} else {
@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);
}
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to add filter
"%s" as extensions have already been initialized.', $name));
}
$this->staging->addFilter($name, $filter);
}
/**
* Get a filter by name.
*
* Subclasses may override this method and load filters differently;
* so no list of filters is available.
*
* @param string $name The filter name
*
* @return \Twig_Filter|false
*
* @internal
*/
public function getFilter($name)
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
if (isset($this->filters[$name])) {
return $this->filters[$name];
}
foreach ($this->filters as $pattern => $filter) {
$pattern = str_replace('\\*', '(.*?)',
preg_quote($pattern, '#'), $count);
if ($count) {
if (preg_match('#^'.$pattern.'$#',
$name, $matches)) {
array_shift($matches);
$filter->setArguments($matches);
return $filter;
}
}
}
foreach ($this->filterCallbacks as $callback) {
if (false !== $filter = \call_user_func($callback, $name)) {
return $filter;
}
}
return false;
}
public function registerUndefinedFilterCallback($callable)
{
$this->filterCallbacks[] = $callable;
}
/**
* Gets the registered Filters.
*
* Be warned that this method cannot return filters defined with
registerUndefinedFilterCallback.
*
* @return \Twig_FilterInterface[]
*
* @see registerUndefinedFilterCallback
*
* @internal
*/
public function getFilters()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->filters;
}
/**
* Registers a Test.
*
* @param string|TwigTest $name The test name or a
\Twig_SimpleTest instance
* @param \Twig_TestInterface|TwigTest $test A \Twig_TestInterface
instance or a \Twig_SimpleTest instance
*/
public function addTest($name, $test = null)
{
if (!$name instanceof TwigTest && !($test instanceof
TwigTest || $test instanceof \Twig_TestInterface)) {
throw new \LogicException('A test must be an instance of
\Twig_TestInterface or \Twig_SimpleTest.');
}
if ($name instanceof TwigTest) {
$test = $name;
$name = $test->getName();
} else {
@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);
}
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to add test
"%s" as extensions have already been initialized.', $name));
}
$this->staging->addTest($name, $test);
}
/**
* Gets the registered Tests.
*
* @return \Twig_TestInterface[]
*
* @internal
*/
public function getTests()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->tests;
}
/**
* Gets a test by name.
*
* @param string $name The test name
*
* @return \Twig_Test|false
*
* @internal
*/
public function getTest($name)
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
if (isset($this->tests[$name])) {
return $this->tests[$name];
}
foreach ($this->tests as $pattern => $test) {
$pattern = str_replace('\\*', '(.*?)',
preg_quote($pattern, '#'), $count);
if ($count) {
if (preg_match('#^'.$pattern.'$#',
$name, $matches)) {
array_shift($matches);
$test->setArguments($matches);
return $test;
}
}
}
return false;
}
/**
* Registers a Function.
*
* @param string|TwigFunction $name The function
name or a \Twig_SimpleFunction instance
* @param \Twig_FunctionInterface|TwigFunction $function
*/
public function addFunction($name, $function = null)
{
if (!$name instanceof TwigFunction && !($function
instanceof TwigFunction || $function instanceof \Twig_FunctionInterface)) {
throw new \LogicException('A function must be an instance
of \Twig_FunctionInterface or \Twig_SimpleFunction.');
}
if ($name instanceof TwigFunction) {
$function = $name;
$name = $function->getName();
} else {
@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);
}
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to add function
"%s" as extensions have already been initialized.', $name));
}
$this->staging->addFunction($name, $function);
}
/**
* Get a function by name.
*
* Subclasses may override this method and load functions differently;
* so no list of functions is available.
*
* @param string $name function name
*
* @return \Twig_Function|false
*
* @internal
*/
public function getFunction($name)
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
if (isset($this->functions[$name])) {
return $this->functions[$name];
}
foreach ($this->functions as $pattern => $function) {
$pattern = str_replace('\\*', '(.*?)',
preg_quote($pattern, '#'), $count);
if ($count) {
if (preg_match('#^'.$pattern.'$#',
$name, $matches)) {
array_shift($matches);
$function->setArguments($matches);
return $function;
}
}
}
foreach ($this->functionCallbacks as $callback) {
if (false !== $function = \call_user_func($callback, $name)) {
return $function;
}
}
return false;
}
public function registerUndefinedFunctionCallback($callable)
{
$this->functionCallbacks[] = $callable;
}
/**
* Gets registered functions.
*
* Be warned that this method cannot return functions defined with
registerUndefinedFunctionCallback.
*
* @return \Twig_FunctionInterface[]
*
* @see registerUndefinedFunctionCallback
*
* @internal
*/
public function getFunctions()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->functions;
}
/**
* Registers a Global.
*
* New globals can be added before compiling or rendering a template;
* but after, you can only update existing globals.
*
* @param string $name The global name
* @param mixed $value The global value
*/
public function addGlobal($name, $value)
{
if ($this->extensionInitialized || $this->runtimeInitialized)
{
if (null === $this->globals) {
$this->globals = $this->initGlobals();
}
if (!\array_key_exists($name, $this->globals)) {
// The deprecation notice must be turned into the following
exception in Twig 2.0
@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);
//throw new \LogicException(sprintf('Unable to add
global "%s" as the runtime or the extensions have already been
initialized.', $name));
}
}
if ($this->extensionInitialized || $this->runtimeInitialized)
{
// update the value
$this->globals[$name] = $value;
} else {
$this->staging->addGlobal($name, $value);
}
}
/**
* Gets the registered Globals.
*
* @return array An array of globals
*
* @internal
*/
public function getGlobals()
{
if (!$this->runtimeInitialized &&
!$this->extensionInitialized) {
return $this->initGlobals();
}
if (null === $this->globals) {
$this->globals = $this->initGlobals();
}
return $this->globals;
}
/**
* Merges a context with the defined globals.
*
* @param array $context An array representing the context
*
* @return array The context merged with the globals
*/
public function mergeGlobals(array $context)
{
// we don't use array_merge as the context being generally
// bigger than globals, this code is faster.
foreach ($this->getGlobals() as $key => $value) {
if (!\array_key_exists($key, $context)) {
$context[$key] = $value;
}
}
return $context;
}
/**
* Gets the registered unary Operators.
*
* @return array An array of unary operators
*
* @internal
*/
public function getUnaryOperators()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->unaryOperators;
}
/**
* Gets the registered binary Operators.
*
* @return array An array of binary operators
*
* @internal
*/
public function getBinaryOperators()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->binaryOperators;
}
/**
* @deprecated since 1.23 (to be removed in 2.0)
*/
public function computeAlternatives($name, $items)
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.23 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
return SyntaxError::computeAlternatives($name, $items);
}
/**
* @internal
*/
protected function initGlobals()
{
$globals = [];
foreach ($this->extensions as $name => $extension) {
if (!$extension instanceof GlobalsInterface) {
$m = new \ReflectionMethod($extension,
'getGlobals');
$parentClass = $m->getDeclaringClass()->getName();
if ('Twig_Extension' !== $parentClass &&
'Twig\Extension\AbstractExtension' !== $parentClass) {
@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);
}
}
$extGlob = $extension->getGlobals();
if (!\is_array($extGlob)) {
throw new
\UnexpectedValueException(sprintf('"%s::getGlobals()" must
return an array of globals.', \get_class($extension)));
}
$globals[] = $extGlob;
}
$globals[] = $this->staging->getGlobals();
return \call_user_func_array('array_merge', $globals);
}
/**
* @internal
*/
protected function initExtensions()
{
if ($this->extensionInitialized) {
return;
}
$this->parsers = new \Twig_TokenParserBroker([], [], false);
$this->filters = [];
$this->functions = [];
$this->tests = [];
$this->visitors = [];
$this->unaryOperators = [];
$this->binaryOperators = [];
foreach ($this->extensions as $extension) {
$this->initExtension($extension);
}
$this->initExtension($this->staging);
// Done at the end only, so that an exception during initialization
does not mark the environment as initialized when catching the exception
$this->extensionInitialized = true;
}
/**
* @internal
*/
protected function initExtension(ExtensionInterface $extension)
{
// filters
foreach ($extension->getFilters() as $name => $filter) {
if ($filter instanceof TwigFilter) {
$name = $filter->getName();
} else {
@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);
}
$this->filters[$name] = $filter;
}
// functions
foreach ($extension->getFunctions() as $name => $function) {
if ($function instanceof TwigFunction) {
$name = $function->getName();
} else {
@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);
}
$this->functions[$name] = $function;
}
// tests
foreach ($extension->getTests() as $name => $test) {
if ($test instanceof TwigTest) {
$name = $test->getName();
} else {
@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);
}
$this->tests[$name] = $test;
}
// token parsers
foreach ($extension->getTokenParsers() as $parser) {
if ($parser instanceof TokenParserInterface) {
$this->parsers->addTokenParser($parser);
} elseif ($parser instanceof \Twig_TokenParserBrokerInterface)
{
@trigger_error('Registering a
\Twig_TokenParserBrokerInterface instance is deprecated since version
1.21.', E_USER_DEPRECATED);
$this->parsers->addTokenParserBroker($parser);
} else {
throw new \LogicException('getTokenParsers() must
return an array of \Twig_TokenParserInterface or
\Twig_TokenParserBrokerInterface instances.');
}
}
// node visitors
foreach ($extension->getNodeVisitors() as $visitor) {
$this->visitors[] = $visitor;
}
// operators
if ($operators = $extension->getOperators()) {
if (!\is_array($operators)) {
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)));
}
if (2 !== \count($operators)) {
throw new
\InvalidArgumentException(sprintf('"%s::getOperators()" must
return an array of 2 elements, got %d.', \get_class($extension),
\count($operators)));
}
$this->unaryOperators =
array_merge($this->unaryOperators, $operators[0]);
$this->binaryOperators =
array_merge($this->binaryOperators, $operators[1]);
}
}
/**
* @deprecated since 1.22 (to be removed in 2.0)
*/
protected function writeCacheFile($file, $content)
{
$this->cache->write($file, $content);
}
private function updateOptionsHash()
{
$hashParts = array_merge(
array_keys($this->extensions),
[
(int)
\function_exists('twig_template_get_attributes'),
PHP_MAJOR_VERSION,
PHP_MINOR_VERSION,
self::VERSION,
(int) $this->debug,
$this->baseTemplateClass,
(int) $this->strictVariables,
]
);
$this->optionsHash = implode(':', $hashParts);
}
}
class_alias('Twig\Environment', 'Twig_Environment');
PK���[���&�&src/Error/Error.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
use Twig\Source;
use Twig\Template;
/**
* Twig base exception.
*
* This exception class and its children must only be used when
* an error occurs during the loading of a template, when a syntax error
* is detected in a template, or when rendering a template. Other
* errors must use regular PHP exception classes (like when the template
* cache directory is not writable for instance).
*
* To help debugging template issues, this class tracks the original
template
* name and line where the error occurred.
*
* Whenever possible, you must set these information (original template
name
* and line number) yourself by passing them to the constructor. If some or
all
* these information are not available from where you throw the exception,
then
* this class will guess them automatically (when the line number is set to
-1
* and/or the name is set to null). As this is a costly operation, this
* can be disabled by passing false for both the name and the line number
* when creating a new instance of this class.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Error extends \Exception
{
protected $lineno;
// to be renamed to name in 2.0
protected $filename;
protected $rawMessage;
private $sourcePath;
private $sourceCode;
/**
* Constructor.
*
* Set the line number to -1 to enable its automatic guessing.
* Set the name to null to enable its automatic guessing.
*
* @param string $message The error message
* @param int $lineno The template line where the
error occurred
* @param Source|string|null $source The source context where the
error occurred
* @param \Exception $previous The previous exception
*/
public function __construct($message, $lineno = -1, $source = null,
\Exception $previous = null)
{
if (null === $source) {
$name = null;
} elseif (!$source instanceof Source) {
// for compat with the Twig C ext., passing the template name
as string is accepted
$name = $source;
} else {
$name = $source->getName();
$this->sourceCode = $source->getCode();
$this->sourcePath = $source->getPath();
}
parent::__construct('', 0, $previous);
$this->lineno = $lineno;
$this->filename = $name;
$this->rawMessage = $message;
$this->updateRepr();
}
/**
* Gets the raw message.
*
* @return string The raw message
*/
public function getRawMessage()
{
return $this->rawMessage;
}
/**
* Gets the logical name where the error occurred.
*
* @return string The name
*
* @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead.
*/
public function getTemplateFile()
{
@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);
return $this->filename;
}
/**
* Sets the logical name where the error occurred.
*
* @param string $name The name
*
* @deprecated since 1.27 (to be removed in 2.0). Use
setSourceContext() instead.
*/
public function setTemplateFile($name)
{
@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);
$this->filename = $name;
$this->updateRepr();
}
/**
* Gets the logical name where the error occurred.
*
* @return string The name
*
* @deprecated since 1.29 (to be removed in 2.0). Use
getSourceContext() instead.
*/
public function getTemplateName()
{
@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);
return $this->filename;
}
/**
* Sets the logical name where the error occurred.
*
* @param string $name The name
*
* @deprecated since 1.29 (to be removed in 2.0). Use
setSourceContext() instead.
*/
public function setTemplateName($name)
{
@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);
$this->filename = $name;
$this->sourceCode = $this->sourcePath = null;
$this->updateRepr();
}
/**
* Gets the template line where the error occurred.
*
* @return int The template line
*/
public function getTemplateLine()
{
return $this->lineno;
}
/**
* Sets the template line where the error occurred.
*
* @param int $lineno The template line
*/
public function setTemplateLine($lineno)
{
$this->lineno = $lineno;
$this->updateRepr();
}
/**
* Gets the source context of the Twig template where the error
occurred.
*
* @return Source|null
*/
public function getSourceContext()
{
return $this->filename ? new Source($this->sourceCode,
$this->filename, $this->sourcePath) : null;
}
/**
* Sets the source context of the Twig template where the error
occurred.
*/
public function setSourceContext(Source $source = null)
{
if (null === $source) {
$this->sourceCode = $this->filename =
$this->sourcePath = null;
} else {
$this->sourceCode = $source->getCode();
$this->filename = $source->getName();
$this->sourcePath = $source->getPath();
}
$this->updateRepr();
}
public function guess()
{
$this->guessTemplateInfo();
$this->updateRepr();
}
public function appendMessage($rawMessage)
{
$this->rawMessage .= $rawMessage;
$this->updateRepr();
}
/**
* @internal
*/
protected function updateRepr()
{
$this->message = $this->rawMessage;
if ($this->sourcePath && $this->lineno > 0) {
$this->file = $this->sourcePath;
$this->line = $this->lineno;
return;
}
$dot = false;
if ('.' === substr($this->message, -1)) {
$this->message = substr($this->message, 0, -1);
$dot = true;
}
$questionMark = false;
if ('?' === substr($this->message, -1)) {
$this->message = substr($this->message, 0, -1);
$questionMark = true;
}
if ($this->filename) {
if (\is_string($this->filename) ||
(\is_object($this->filename) &&
method_exists($this->filename, '__toString'))) {
$name = sprintf('"%s"',
$this->filename);
} else {
$name = json_encode($this->filename);
}
$this->message .= sprintf(' in %s', $name);
}
if ($this->lineno && $this->lineno >= 0) {
$this->message .= sprintf(' at line %d',
$this->lineno);
}
if ($dot) {
$this->message .= '.';
}
if ($questionMark) {
$this->message .= '?';
}
}
/**
* @internal
*/
protected function guessTemplateInfo()
{
$template = null;
$templateClass = null;
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS |
DEBUG_BACKTRACE_PROVIDE_OBJECT);
foreach ($backtrace as $trace) {
if (isset($trace['object']) &&
$trace['object'] instanceof Template &&
'Twig_Template' !== \get_class($trace['object'])) {
$currentClass = \get_class($trace['object']);
$isEmbedContainer = 0 === strpos($templateClass,
$currentClass);
if (null === $this->filename || ($this->filename ==
$trace['object']->getTemplateName() &&
!$isEmbedContainer)) {
$template = $trace['object'];
$templateClass =
\get_class($trace['object']);
}
}
}
// update template name
if (null !== $template && null === $this->filename) {
$this->filename = $template->getTemplateName();
}
// update template path if any
if (null !== $template && null === $this->sourcePath) {
$src = $template->getSourceContext();
$this->sourceCode = $src->getCode();
$this->sourcePath = $src->getPath();
}
if (null === $template || $this->lineno > -1) {
return;
}
$r = new \ReflectionObject($template);
$file = $r->getFileName();
$exceptions = [$e = $this];
while ($e instanceof self && $e = $e->getPrevious()) {
$exceptions[] = $e;
}
while ($e = array_pop($exceptions)) {
$traces = $e->getTrace();
array_unshift($traces, ['file' =>
$e->getFile(), 'line' => $e->getLine()]);
while ($trace = array_shift($traces)) {
if (!isset($trace['file']) ||
!isset($trace['line']) || $file != $trace['file']) {
continue;
}
foreach ($template->getDebugInfo() as $codeLine =>
$templateLine) {
if ($codeLine <= $trace['line']) {
// update template line
$this->lineno = $templateLine;
return;
}
}
}
}
}
}
class_alias('Twig\Error\Error', 'Twig_Error');
PK���[��T���src/Error/LoaderError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
/**
* Exception thrown when an error occurs during template loading.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class LoaderError extends Error
{
}
class_alias('Twig\Error\LoaderError',
'Twig_Error_Loader');
PK���[3%����src/Error/RuntimeError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
/**
* Exception thrown when an error occurs at runtime.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class RuntimeError extends Error
{
}
class_alias('Twig\Error\RuntimeError',
'Twig_Error_Runtime');
PK���[ث�6��src/Error/SyntaxError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
/**
* \Exception thrown when a syntax error occurs during lexing or parsing of
a template.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SyntaxError extends Error
{
/**
* Tweaks the error message to include suggestions.
*
* @param string $name The original name of the item that does not
exist
* @param array $items An array of possible items
*/
public function addSuggestions($name, array $items)
{
if (!$alternatives = self::computeAlternatives($name, $items)) {
return;
}
$this->appendMessage(sprintf(' Did you mean
"%s"?', implode('", "',
$alternatives)));
}
/**
* @internal
*
* To be merged with the addSuggestions() method in 2.0.
*/
public static function computeAlternatives($name, $items)
{
$alternatives = [];
foreach ($items as $item) {
$lev = levenshtein($name, $item);
if ($lev <= \strlen($name) / 3 || false !== strpos($item,
$name)) {
$alternatives[$item] = $lev;
}
}
asort($alternatives);
return array_keys($alternatives);
}
}
class_alias('Twig\Error\SyntaxError',
'Twig_Error_Syntax');
PK���[��vw��src/ExpressionParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\ArrayExpression;
use Twig\Node\Expression\ArrowFunctionExpression;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\Expression\Binary\ConcatBinary;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\MethodCallExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Expression\Unary\NegUnary;
use Twig\Node\Expression\Unary\NotUnary;
use Twig\Node\Expression\Unary\PosUnary;
use Twig\Node\Node;
/**
* Parses expressions.
*
* This parser implements a "Precedence climbing" algorithm.
*
* @see https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
* @see https://en.wikipedia.org/wiki/Operator-precedence_parser
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @internal
*/
class ExpressionParser
{
const OPERATOR_LEFT = 1;
const OPERATOR_RIGHT = 2;
protected $parser;
protected $unaryOperators;
protected $binaryOperators;
private $env;
public function __construct(Parser $parser, $env = null)
{
$this->parser = $parser;
if ($env instanceof Environment) {
$this->env = $env;
$this->unaryOperators = $env->getUnaryOperators();
$this->binaryOperators = $env->getBinaryOperators();
} else {
@trigger_error('Passing the operators as constructor
arguments to '.__METHOD__.' is deprecated since version 1.27.
Pass the environment instead.', E_USER_DEPRECATED);
$this->env = $parser->getEnvironment();
$this->unaryOperators = func_get_arg(1);
$this->binaryOperators = func_get_arg(2);
}
}
public function parseExpression($precedence = 0, $allowArrow = false)
{
if ($allowArrow && $arrow = $this->parseArrow()) {
return $arrow;
}
$expr = $this->getPrimary();
$token = $this->parser->getCurrentToken();
while ($this->isBinary($token) &&
$this->binaryOperators[$token->getValue()]['precedence']
>= $precedence) {
$op = $this->binaryOperators[$token->getValue()];
$this->parser->getStream()->next();
if ('is not' === $token->getValue()) {
$expr = $this->parseNotTestExpression($expr);
} elseif ('is' === $token->getValue()) {
$expr = $this->parseTestExpression($expr);
} elseif (isset($op['callable'])) {
$expr = \call_user_func($op['callable'],
$this->parser, $expr);
} else {
$expr1 = $this->parseExpression(self::OPERATOR_LEFT ===
$op['associativity'] ? $op['precedence'] + 1 :
$op['precedence']);
$class = $op['class'];
$expr = new $class($expr, $expr1, $token->getLine());
}
$token = $this->parser->getCurrentToken();
}
if (0 === $precedence) {
return $this->parseConditionalExpression($expr);
}
return $expr;
}
/**
* @return ArrowFunctionExpression|null
*/
private function parseArrow()
{
$stream = $this->parser->getStream();
// short array syntax (one argument, no parentheses)?
if ($stream->look(1)->test(Token::ARROW_TYPE)) {
$line = $stream->getCurrent()->getLine();
$token = $stream->expect(Token::NAME_TYPE);
$names = [new AssignNameExpression($token->getValue(),
$token->getLine())];
$stream->expect(Token::ARROW_TYPE);
return new
ArrowFunctionExpression($this->parseExpression(0), new Node($names),
$line);
}
// first, determine if we are parsing an arrow function by finding
=> (long form)
$i = 0;
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE,
'(')) {
return null;
}
++$i;
while (true) {
// variable name
++$i;
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE,
',')) {
break;
}
++$i;
}
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE,
')')) {
return null;
}
++$i;
if (!$stream->look($i)->test(Token::ARROW_TYPE)) {
return null;
}
// yes, let's parse it properly
$token = $stream->expect(Token::PUNCTUATION_TYPE,
'(');
$line = $token->getLine();
$names = [];
while (true) {
$token = $stream->expect(Token::NAME_TYPE);
$names[] = new AssignNameExpression($token->getValue(),
$token->getLine());
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
}
$stream->expect(Token::PUNCTUATION_TYPE, ')');
$stream->expect(Token::ARROW_TYPE);
return new ArrowFunctionExpression($this->parseExpression(0),
new Node($names), $line);
}
protected function getPrimary()
{
$token = $this->parser->getCurrentToken();
if ($this->isUnary($token)) {
$operator = $this->unaryOperators[$token->getValue()];
$this->parser->getStream()->next();
$expr =
$this->parseExpression($operator['precedence']);
$class = $operator['class'];
return $this->parsePostfixExpression(new $class($expr,
$token->getLine()));
} elseif ($token->test(Token::PUNCTUATION_TYPE, '('))
{
$this->parser->getStream()->next();
$expr = $this->parseExpression();
$this->parser->getStream()->expect(Token::PUNCTUATION_TYPE,
')', 'An opened parenthesis is not properly closed');
return $this->parsePostfixExpression($expr);
}
return $this->parsePrimaryExpression();
}
protected function parseConditionalExpression($expr)
{
while
($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
'?')) {
if
(!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
':')) {
$expr2 = $this->parseExpression();
if
($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
':')) {
$expr3 = $this->parseExpression();
} else {
$expr3 = new ConstantExpression('',
$this->parser->getCurrentToken()->getLine());
}
} else {
$expr2 = $expr;
$expr3 = $this->parseExpression();
}
$expr = new ConditionalExpression($expr, $expr2, $expr3,
$this->parser->getCurrentToken()->getLine());
}
return $expr;
}
protected function isUnary(Token $token)
{
return $token->test(Token::OPERATOR_TYPE) &&
isset($this->unaryOperators[$token->getValue()]);
}
protected function isBinary(Token $token)
{
return $token->test(Token::OPERATOR_TYPE) &&
isset($this->binaryOperators[$token->getValue()]);
}
public function parsePrimaryExpression()
{
$token = $this->parser->getCurrentToken();
switch ($token->getType()) {
case Token::NAME_TYPE:
$this->parser->getStream()->next();
switch ($token->getValue()) {
case 'true':
case 'TRUE':
$node = new ConstantExpression(true,
$token->getLine());
break;
case 'false':
case 'FALSE':
$node = new ConstantExpression(false,
$token->getLine());
break;
case 'none':
case 'NONE':
case 'null':
case 'NULL':
$node = new ConstantExpression(null,
$token->getLine());
break;
default:
if ('(' ===
$this->parser->getCurrentToken()->getValue()) {
$node =
$this->getFunctionNode($token->getValue(), $token->getLine());
} else {
$node = new
NameExpression($token->getValue(), $token->getLine());
}
}
break;
case Token::NUMBER_TYPE:
$this->parser->getStream()->next();
$node = new ConstantExpression($token->getValue(),
$token->getLine());
break;
case Token::STRING_TYPE:
case Token::INTERPOLATION_START_TYPE:
$node = $this->parseStringExpression();
break;
case Token::OPERATOR_TYPE:
if (preg_match(Lexer::REGEX_NAME, $token->getValue(),
$matches) && $matches[0] == $token->getValue()) {
// in this context, string operators are variable names
$this->parser->getStream()->next();
$node = new NameExpression($token->getValue(),
$token->getLine());
break;
} elseif
(isset($this->unaryOperators[$token->getValue()])) {
$class =
$this->unaryOperators[$token->getValue()]['class'];
$ref = new \ReflectionClass($class);
$negClass =
'Twig\Node\Expression\Unary\NegUnary';
$posClass =
'Twig\Node\Expression\Unary\PosUnary';
if (!(\in_array($ref->getName(), [$negClass,
$posClass, 'Twig_Node_Expression_Unary_Neg',
'Twig_Node_Expression_Unary_Pos'])
|| $ref->isSubclassOf($negClass) ||
$ref->isSubclassOf($posClass)
||
$ref->isSubclassOf('Twig_Node_Expression_Unary_Neg') ||
$ref->isSubclassOf('Twig_Node_Expression_Unary_Pos'))
) {
throw new SyntaxError(sprintf('Unexpected
unary operator "%s".', $token->getValue()),
$token->getLine(),
$this->parser->getStream()->getSourceContext());
}
$this->parser->getStream()->next();
$expr = $this->parsePrimaryExpression();
$node = new $class($expr, $token->getLine());
break;
}
// no break
default:
if ($token->test(Token::PUNCTUATION_TYPE,
'[')) {
$node = $this->parseArrayExpression();
} elseif ($token->test(Token::PUNCTUATION_TYPE,
'{')) {
$node = $this->parseHashExpression();
} elseif ($token->test(Token::OPERATOR_TYPE,
'=') && ('==' ===
$this->parser->getStream()->look(-1)->getValue() ||
'!=' ===
$this->parser->getStream()->look(-1)->getValue())) {
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());
} else {
throw new SyntaxError(sprintf('Unexpected token
"%s" of value "%s".',
Token::typeToEnglish($token->getType()), $token->getValue()),
$token->getLine(),
$this->parser->getStream()->getSourceContext());
}
}
return $this->parsePostfixExpression($node);
}
public function parseStringExpression()
{
$stream = $this->parser->getStream();
$nodes = [];
// a string cannot be followed by another string in a single
expression
$nextCanBeString = true;
while (true) {
if ($nextCanBeString && $token =
$stream->nextIf(Token::STRING_TYPE)) {
$nodes[] = new ConstantExpression($token->getValue(),
$token->getLine());
$nextCanBeString = false;
} elseif ($stream->nextIf(Token::INTERPOLATION_START_TYPE))
{
$nodes[] = $this->parseExpression();
$stream->expect(Token::INTERPOLATION_END_TYPE);
$nextCanBeString = true;
} else {
break;
}
}
$expr = array_shift($nodes);
foreach ($nodes as $node) {
$expr = new ConcatBinary($expr, $node,
$node->getTemplateLine());
}
return $expr;
}
public function parseArrayExpression()
{
$stream = $this->parser->getStream();
$stream->expect(Token::PUNCTUATION_TYPE, '[', 'An
array element was expected');
$node = new ArrayExpression([],
$stream->getCurrent()->getLine());
$first = true;
while (!$stream->test(Token::PUNCTUATION_TYPE, ']')) {
if (!$first) {
$stream->expect(Token::PUNCTUATION_TYPE, ',',
'An array element must be followed by a comma');
// trailing ,?
if ($stream->test(Token::PUNCTUATION_TYPE,
']')) {
break;
}
}
$first = false;
$node->addElement($this->parseExpression());
}
$stream->expect(Token::PUNCTUATION_TYPE, ']', 'An
opened array is not properly closed');
return $node;
}
public function parseHashExpression()
{
$stream = $this->parser->getStream();
$stream->expect(Token::PUNCTUATION_TYPE, '{', 'A
hash element was expected');
$node = new ArrayExpression([],
$stream->getCurrent()->getLine());
$first = true;
while (!$stream->test(Token::PUNCTUATION_TYPE, '}')) {
if (!$first) {
$stream->expect(Token::PUNCTUATION_TYPE, ',',
'A hash value must be followed by a comma');
// trailing ,?
if ($stream->test(Token::PUNCTUATION_TYPE,
'}')) {
break;
}
}
$first = false;
// a hash key can be:
//
// * a number -- 12
// * a string -- 'a'
// * a name, which is equivalent to a string -- a
// * an expression, which must be enclosed in parentheses --
(1 + 2)
if (($token = $stream->nextIf(Token::STRING_TYPE)) ||
($token = $stream->nextIf(Token::NAME_TYPE)) || $token =
$stream->nextIf(Token::NUMBER_TYPE)) {
$key = new ConstantExpression($token->getValue(),
$token->getLine());
} elseif ($stream->test(Token::PUNCTUATION_TYPE,
'(')) {
$key = $this->parseExpression();
} else {
$current = $stream->getCurrent();
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());
}
$stream->expect(Token::PUNCTUATION_TYPE, ':',
'A hash key must be followed by a colon (:)');
$value = $this->parseExpression();
$node->addElement($value, $key);
}
$stream->expect(Token::PUNCTUATION_TYPE, '}', 'An
opened hash is not properly closed');
return $node;
}
public function parsePostfixExpression($node)
{
while (true) {
$token = $this->parser->getCurrentToken();
if (Token::PUNCTUATION_TYPE == $token->getType()) {
if ('.' == $token->getValue() || '['
== $token->getValue()) {
$node = $this->parseSubscriptExpression($node);
} elseif ('|' == $token->getValue()) {
$node = $this->parseFilterExpression($node);
} else {
break;
}
} else {
break;
}
}
return $node;
}
public function getFunctionNode($name, $line)
{
switch ($name) {
case 'parent':
$this->parseArguments();
if (!\count($this->parser->getBlockStack())) {
throw new SyntaxError('Calling "parent"
outside a block is forbidden.', $line,
$this->parser->getStream()->getSourceContext());
}
if (!$this->parser->getParent() &&
!$this->parser->hasTraits()) {
throw new SyntaxError('Calling "parent"
on a template that does not extend nor "use" another template is
forbidden.', $line,
$this->parser->getStream()->getSourceContext());
}
return new
ParentExpression($this->parser->peekBlockStack(), $line);
case 'block':
$args = $this->parseArguments();
if (\count($args) < 1) {
throw new SyntaxError('The "block"
function takes one argument (the block name).', $line,
$this->parser->getStream()->getSourceContext());
}
return new BlockReferenceExpression($args->getNode(0),
\count($args) > 1 ? $args->getNode(1) : null, $line);
case 'attribute':
$args = $this->parseArguments();
if (\count($args) < 2) {
throw new SyntaxError('The "attribute"
function takes at least two arguments (the variable and the
attributes).', $line,
$this->parser->getStream()->getSourceContext());
}
return new GetAttrExpression($args->getNode(0),
$args->getNode(1), \count($args) > 2 ? $args->getNode(2) : null,
Template::ANY_CALL, $line);
default:
if (null !== $alias =
$this->parser->getImportedSymbol('function', $name)) {
$arguments = new ArrayExpression([], $line);
foreach ($this->parseArguments() as $n) {
$arguments->addElement($n);
}
$node = new
MethodCallExpression($alias['node'], $alias['name'],
$arguments, $line);
$node->setAttribute('safe', true);
return $node;
}
$args = $this->parseArguments(true);
$class = $this->getFunctionNodeClass($name, $line);
return new $class($name, $args, $line);
}
}
public function parseSubscriptExpression($node)
{
$stream = $this->parser->getStream();
$token = $stream->next();
$lineno = $token->getLine();
$arguments = new ArrayExpression([], $lineno);
$type = Template::ANY_CALL;
if ('.' == $token->getValue()) {
$token = $stream->next();
if (
Token::NAME_TYPE == $token->getType()
||
Token::NUMBER_TYPE == $token->getType()
||
(Token::OPERATOR_TYPE == $token->getType() &&
preg_match(Lexer::REGEX_NAME, $token->getValue()))
) {
$arg = new ConstantExpression($token->getValue(),
$lineno);
if ($stream->test(Token::PUNCTUATION_TYPE,
'(')) {
$type = Template::METHOD_CALL;
foreach ($this->parseArguments() as $n) {
$arguments->addElement($n);
}
}
} else {
throw new SyntaxError('Expected name or number.',
$lineno, $stream->getSourceContext());
}
if ($node instanceof NameExpression && null !==
$this->parser->getImportedSymbol('template',
$node->getAttribute('name'))) {
if (!$arg instanceof ConstantExpression) {
throw new SyntaxError(sprintf('Dynamic macro names
are not supported (called on "%s").',
$node->getAttribute('name')), $token->getLine(),
$stream->getSourceContext());
}
$name = $arg->getAttribute('value');
if ($this->parser->isReservedMacroName($name)) {
throw new SyntaxError(sprintf('"%s"
cannot be called as macro as it is a reserved keyword.', $name),
$token->getLine(), $stream->getSourceContext());
}
$node = new MethodCallExpression($node,
'get'.$name, $arguments, $lineno);
$node->setAttribute('safe', true);
return $node;
}
} else {
$type = Template::ARRAY_CALL;
// slice?
$slice = false;
if ($stream->test(Token::PUNCTUATION_TYPE, ':')) {
$slice = true;
$arg = new ConstantExpression(0, $token->getLine());
} else {
$arg = $this->parseExpression();
}
if ($stream->nextIf(Token::PUNCTUATION_TYPE, ':'))
{
$slice = true;
}
if ($slice) {
if ($stream->test(Token::PUNCTUATION_TYPE,
']')) {
$length = new ConstantExpression(null,
$token->getLine());
} else {
$length = $this->parseExpression();
}
$class = $this->getFilterNodeClass('slice',
$token->getLine());
$arguments = new Node([$arg, $length]);
$filter = new $class($node, new
ConstantExpression('slice', $token->getLine()), $arguments,
$token->getLine());
$stream->expect(Token::PUNCTUATION_TYPE, ']');
return $filter;
}
$stream->expect(Token::PUNCTUATION_TYPE, ']');
}
return new GetAttrExpression($node, $arg, $arguments, $type,
$lineno);
}
public function parseFilterExpression($node)
{
$this->parser->getStream()->next();
return $this->parseFilterExpressionRaw($node);
}
public function parseFilterExpressionRaw($node, $tag = null)
{
while (true) {
$token =
$this->parser->getStream()->expect(Token::NAME_TYPE);
$name = new ConstantExpression($token->getValue(),
$token->getLine());
if
(!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE,
'(')) {
$arguments = new Node();
} else {
$arguments = $this->parseArguments(true, false, true);
}
$class =
$this->getFilterNodeClass($name->getAttribute('value'),
$token->getLine());
$node = new $class($node, $name, $arguments,
$token->getLine(), $tag);
if
(!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE,
'|')) {
break;
}
$this->parser->getStream()->next();
}
return $node;
}
/**
* Parses arguments.
*
* @param bool $namedArguments Whether to allow named arguments or not
* @param bool $definition Whether we are parsing arguments for a
function definition
*
* @return Node
*
* @throws SyntaxError
*/
public function parseArguments($namedArguments = false, $definition =
false, $allowArrow = false)
{
$args = [];
$stream = $this->parser->getStream();
$stream->expect(Token::PUNCTUATION_TYPE, '(', 'A
list of arguments must begin with an opening parenthesis');
while (!$stream->test(Token::PUNCTUATION_TYPE, ')')) {
if (!empty($args)) {
$stream->expect(Token::PUNCTUATION_TYPE, ',',
'Arguments must be separated by a comma');
}
if ($definition) {
$token = $stream->expect(Token::NAME_TYPE, null,
'An argument must be a name');
$value = new NameExpression($token->getValue(),
$this->parser->getCurrentToken()->getLine());
} else {
$value = $this->parseExpression(0, $allowArrow);
}
$name = null;
if ($namedArguments && $token =
$stream->nextIf(Token::OPERATOR_TYPE, '=')) {
if (!$value instanceof NameExpression) {
throw new SyntaxError(sprintf('A parameter name
must be a string, "%s" given.', \get_class($value)),
$token->getLine(), $stream->getSourceContext());
}
$name = $value->getAttribute('name');
if ($definition) {
$value = $this->parsePrimaryExpression();
if (!$this->checkConstantExpression($value)) {
throw new SyntaxError(sprintf('A default value
for an argument must be a constant (a boolean, a string, a number, or an
array).'), $token->getLine(), $stream->getSourceContext());
}
} else {
$value = $this->parseExpression(0, $allowArrow);
}
}
if ($definition) {
if (null === $name) {
$name = $value->getAttribute('name');
$value = new ConstantExpression(null,
$this->parser->getCurrentToken()->getLine());
}
$args[$name] = $value;
} else {
if (null === $name) {
$args[] = $value;
} else {
$args[$name] = $value;
}
}
}
$stream->expect(Token::PUNCTUATION_TYPE, ')', 'A
list of arguments must be closed by a parenthesis');
return new Node($args);
}
public function parseAssignmentExpression()
{
$stream = $this->parser->getStream();
$targets = [];
while (true) {
$token = $this->parser->getCurrentToken();
if ($stream->test(Token::OPERATOR_TYPE) &&
preg_match(Lexer::REGEX_NAME, $token->getValue())) {
// in this context, string operators are variable names
$this->parser->getStream()->next();
} else {
$stream->expect(Token::NAME_TYPE, null, 'Only
variables can be assigned to');
}
$value = $token->getValue();
if (\in_array(strtr($value,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz'), ['true',
'false', 'none', 'null'])) {
throw new SyntaxError(sprintf('You cannot assign a
value to "%s".', $value), $token->getLine(),
$stream->getSourceContext());
}
$targets[] = new AssignNameExpression($value,
$token->getLine());
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
}
return new Node($targets);
}
public function parseMultitargetExpression()
{
$targets = [];
while (true) {
$targets[] = $this->parseExpression();
if
(!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
}
return new Node($targets);
}
private function parseNotTestExpression(\Twig_NodeInterface $node)
{
return new NotUnary($this->parseTestExpression($node),
$this->parser->getCurrentToken()->getLine());
}
private function parseTestExpression(\Twig_NodeInterface $node)
{
$stream = $this->parser->getStream();
list($name, $test) =
$this->getTest($node->getTemplateLine());
$class = $this->getTestNodeClass($test);
$arguments = null;
if ($stream->test(Token::PUNCTUATION_TYPE, '(')) {
$arguments = $this->parseArguments(true);
}
return new $class($node, $name, $arguments,
$this->parser->getCurrentToken()->getLine());
}
private function getTest($line)
{
$stream = $this->parser->getStream();
$name = $stream->expect(Token::NAME_TYPE)->getValue();
if ($test = $this->env->getTest($name)) {
return [$name, $test];
}
if ($stream->test(Token::NAME_TYPE)) {
// try 2-words tests
$name = $name.'
'.$this->parser->getCurrentToken()->getValue();
if ($test = $this->env->getTest($name)) {
$stream->next();
return [$name, $test];
}
}
$e = new SyntaxError(sprintf('Unknown "%s"
test.', $name), $line, $stream->getSourceContext());
$e->addSuggestions($name,
array_keys($this->env->getTests()));
throw $e;
}
private function getTestNodeClass($test)
{
if ($test instanceof TwigTest && $test->isDeprecated())
{
$stream = $this->parser->getStream();
$message = sprintf('Twig Test "%s" is
deprecated', $test->getName());
if (!\is_bool($test->getDeprecatedVersion())) {
$message .= sprintf(' since version %s',
$test->getDeprecatedVersion());
}
if ($test->getAlternative()) {
$message .= sprintf('. Use "%s"
instead', $test->getAlternative());
}
$src = $stream->getSourceContext();
$message .= sprintf(' in %s at line %d.',
$src->getPath() ? $src->getPath() : $src->getName(),
$stream->getCurrent()->getLine());
@trigger_error($message, E_USER_DEPRECATED);
}
if ($test instanceof TwigTest) {
return $test->getNodeClass();
}
return $test instanceof \Twig_Test_Node ? $test->getClass() :
'Twig\Node\Expression\TestExpression';
}
protected function getFunctionNodeClass($name, $line)
{
if (false === $function = $this->env->getFunction($name)) {
$e = new SyntaxError(sprintf('Unknown "%s"
function.', $name), $line,
$this->parser->getStream()->getSourceContext());
$e->addSuggestions($name,
array_keys($this->env->getFunctions()));
throw $e;
}
if ($function instanceof TwigFunction &&
$function->isDeprecated()) {
$message = sprintf('Twig Function "%s" is
deprecated', $function->getName());
if (!\is_bool($function->getDeprecatedVersion())) {
$message .= sprintf(' since version %s',
$function->getDeprecatedVersion());
}
if ($function->getAlternative()) {
$message .= sprintf('. Use "%s"
instead', $function->getAlternative());
}
$src = $this->parser->getStream()->getSourceContext();
$message .= sprintf(' in %s at line %d.',
$src->getPath() ? $src->getPath() : $src->getName(), $line);
@trigger_error($message, E_USER_DEPRECATED);
}
if ($function instanceof TwigFunction) {
return $function->getNodeClass();
}
return $function instanceof \Twig_Function_Node ?
$function->getClass() :
'Twig\Node\Expression\FunctionExpression';
}
protected function getFilterNodeClass($name, $line)
{
if (false === $filter = $this->env->getFilter($name)) {
$e = new SyntaxError(sprintf('Unknown "%s"
filter.', $name), $line,
$this->parser->getStream()->getSourceContext());
$e->addSuggestions($name,
array_keys($this->env->getFilters()));
throw $e;
}
if ($filter instanceof TwigFilter &&
$filter->isDeprecated()) {
$message = sprintf('Twig Filter "%s" is
deprecated', $filter->getName());
if (!\is_bool($filter->getDeprecatedVersion())) {
$message .= sprintf(' since version %s',
$filter->getDeprecatedVersion());
}
if ($filter->getAlternative()) {
$message .= sprintf('. Use "%s"
instead', $filter->getAlternative());
}
$src = $this->parser->getStream()->getSourceContext();
$message .= sprintf(' in %s at line %d.',
$src->getPath() ? $src->getPath() : $src->getName(), $line);
@trigger_error($message, E_USER_DEPRECATED);
}
if ($filter instanceof TwigFilter) {
return $filter->getNodeClass();
}
return $filter instanceof \Twig_Filter_Node ?
$filter->getClass() : 'Twig\Node\Expression\FilterExpression';
}
// checks that the node only contains "constant" elements
protected function checkConstantExpression(\Twig_NodeInterface $node)
{
if (!($node instanceof ConstantExpression || $node instanceof
ArrayExpression
|| $node instanceof NegUnary || $node instanceof PosUnary
)) {
return false;
}
foreach ($node as $n) {
if (!$this->checkConstantExpression($n)) {
return false;
}
}
return true;
}
}
class_alias('Twig\ExpressionParser',
'Twig_ExpressionParser');
PK���[HAAA#src/Extension/AbstractExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\Environment;
abstract class AbstractExtension implements ExtensionInterface
{
/**
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_InitRuntimeInterface instead
*/
public function initRuntime(Environment $environment)
{
}
public function getTokenParsers()
{
return [];
}
public function getNodeVisitors()
{
return [];
}
public function getFilters()
{
return [];
}
public function getTests()
{
return [];
}
public function getFunctions()
{
return [];
}
public function getOperators()
{
return [];
}
/**
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_GlobalsInterface instead
*/
public function getGlobals()
{
return [];
}
/**
* @deprecated since 1.26 (to be removed in 2.0), not used anymore
internally
*/
public function getName()
{
return \get_class($this);
}
}
class_alias('Twig\Extension\AbstractExtension',
'Twig_Extension');
PK���[��k?�?�src/Extension/CoreExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\ExpressionParser;
use Twig\TokenParser\ApplyTokenParser;
use Twig\TokenParser\BlockTokenParser;
use Twig\TokenParser\DeprecatedTokenParser;
use Twig\TokenParser\DoTokenParser;
use Twig\TokenParser\EmbedTokenParser;
use Twig\TokenParser\ExtendsTokenParser;
use Twig\TokenParser\FilterTokenParser;
use Twig\TokenParser\FlushTokenParser;
use Twig\TokenParser\ForTokenParser;
use Twig\TokenParser\FromTokenParser;
use Twig\TokenParser\IfTokenParser;
use Twig\TokenParser\ImportTokenParser;
use Twig\TokenParser\IncludeTokenParser;
use Twig\TokenParser\MacroTokenParser;
use Twig\TokenParser\SetTokenParser;
use Twig\TokenParser\SpacelessTokenParser;
use Twig\TokenParser\UseTokenParser;
use Twig\TokenParser\WithTokenParser;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\TwigTest;
/**
* @final
*/
class CoreExtension extends AbstractExtension
{
protected $dateFormats = ['F j, Y H:i', '%d days'];
protected $numberFormat = [0, '.', ','];
protected $timezone = null;
protected $escapers = [];
/**
* Defines a new escaper to be used via the escape filter.
*
* @param string $strategy The strategy name that should be used as a
strategy in the escape call
* @param callable $callable A valid PHP callable
*/
public function setEscaper($strategy, $callable)
{
$this->escapers[$strategy] = $callable;
}
/**
* Gets all defined escapers.
*
* @return array An array of escapers
*/
public function getEscapers()
{
return $this->escapers;
}
/**
* Sets the default format to be used by the date filter.
*
* @param string $format The default date format string
* @param string $dateIntervalFormat The default date interval format
string
*/
public function setDateFormat($format = null, $dateIntervalFormat =
null)
{
if (null !== $format) {
$this->dateFormats[0] = $format;
}
if (null !== $dateIntervalFormat) {
$this->dateFormats[1] = $dateIntervalFormat;
}
}
/**
* Gets the default format to be used by the date filter.
*
* @return array The default date format string and the default date
interval format string
*/
public function getDateFormat()
{
return $this->dateFormats;
}
/**
* Sets the default timezone to be used by the date filter.
*
* @param \DateTimeZone|string $timezone The default timezone string or
a \DateTimeZone object
*/
public function setTimezone($timezone)
{
$this->timezone = $timezone instanceof \DateTimeZone ? $timezone
: new \DateTimeZone($timezone);
}
/**
* Gets the default timezone to be used by the date filter.
*
* @return \DateTimeZone The default timezone currently in use
*/
public function getTimezone()
{
if (null === $this->timezone) {
$this->timezone = new
\DateTimeZone(date_default_timezone_get());
}
return $this->timezone;
}
/**
* Sets the default format to be used by the number_format filter.
*
* @param int $decimal the number of decimal places to use
* @param string $decimalPoint the character(s) to use for the decimal
point
* @param string $thousandSep the character(s) to use for the
thousands separator
*/
public function setNumberFormat($decimal, $decimalPoint, $thousandSep)
{
$this->numberFormat = [$decimal, $decimalPoint, $thousandSep];
}
/**
* Get the default format used by the number_format filter.
*
* @return array The arguments for number_format()
*/
public function getNumberFormat()
{
return $this->numberFormat;
}
public function getTokenParsers()
{
return [
new ApplyTokenParser(),
new ForTokenParser(),
new IfTokenParser(),
new ExtendsTokenParser(),
new IncludeTokenParser(),
new BlockTokenParser(),
new UseTokenParser(),
new FilterTokenParser(),
new MacroTokenParser(),
new ImportTokenParser(),
new FromTokenParser(),
new SetTokenParser(),
new SpacelessTokenParser(),
new FlushTokenParser(),
new DoTokenParser(),
new EmbedTokenParser(),
new WithTokenParser(),
new DeprecatedTokenParser(),
];
}
public function getFilters()
{
$filters = [
// formatting filters
new TwigFilter('date',
'twig_date_format_filter', ['needs_environment' =>
true]),
new TwigFilter('date_modify',
'twig_date_modify_filter', ['needs_environment' =>
true]),
new TwigFilter('format', 'sprintf'),
new TwigFilter('replace',
'twig_replace_filter'),
new TwigFilter('number_format',
'twig_number_format_filter', ['needs_environment' =>
true]),
new TwigFilter('abs', 'abs'),
new TwigFilter('round', 'twig_round'),
// encoding
new TwigFilter('url_encode',
'twig_urlencode_filter'),
new TwigFilter('json_encode',
'twig_jsonencode_filter'),
new TwigFilter('convert_encoding',
'twig_convert_encoding'),
// string filters
new TwigFilter('title',
'twig_title_string_filter', ['needs_environment' =>
true]),
new TwigFilter('capitalize',
'twig_capitalize_string_filter', ['needs_environment'
=> true]),
new TwigFilter('upper', 'strtoupper'),
new TwigFilter('lower', 'strtolower'),
new TwigFilter('striptags', 'strip_tags'),
new TwigFilter('trim', 'twig_trim_filter'),
new TwigFilter('nl2br', 'nl2br',
['pre_escape' => 'html', 'is_safe' =>
['html']]),
new TwigFilter('spaceless',
'twig_spaceless', ['is_safe' =>
['html']]),
// array helpers
new TwigFilter('join', 'twig_join_filter'),
new TwigFilter('split',
'twig_split_filter', ['needs_environment' => true]),
new TwigFilter('sort', 'twig_sort_filter'),
new TwigFilter('merge',
'twig_array_merge'),
new TwigFilter('batch',
'twig_array_batch'),
new TwigFilter('filter',
'twig_array_filter'),
new TwigFilter('map', 'twig_array_map'),
new TwigFilter('reduce',
'twig_array_reduce'),
// string/array filters
new TwigFilter('reverse',
'twig_reverse_filter', ['needs_environment' =>
true]),
new TwigFilter('length',
'twig_length_filter', ['needs_environment' =>
true]),
new TwigFilter('slice', 'twig_slice',
['needs_environment' => true]),
new TwigFilter('first', 'twig_first',
['needs_environment' => true]),
new TwigFilter('last', 'twig_last',
['needs_environment' => true]),
// iteration and runtime
new TwigFilter('default',
'_twig_default_filter', ['node_class' =>
'\Twig\Node\Expression\Filter\DefaultFilter']),
new TwigFilter('keys',
'twig_get_array_keys_filter'),
// escaping
new TwigFilter('escape',
'twig_escape_filter', ['needs_environment' => true,
'is_safe_callback' =>
'twig_escape_filter_is_safe']),
new TwigFilter('e', 'twig_escape_filter',
['needs_environment' => true, 'is_safe_callback'
=> 'twig_escape_filter_is_safe']),
];
if (\function_exists('mb_get_info')) {
$filters[] = new TwigFilter('upper',
'twig_upper_filter', ['needs_environment' => true]);
$filters[] = new TwigFilter('lower',
'twig_lower_filter', ['needs_environment' => true]);
}
return $filters;
}
public function getFunctions()
{
return [
new TwigFunction('max', 'max'),
new TwigFunction('min', 'min'),
new TwigFunction('range', 'range'),
new TwigFunction('constant',
'twig_constant'),
new TwigFunction('cycle', 'twig_cycle'),
new TwigFunction('random', 'twig_random',
['needs_environment' => true]),
new TwigFunction('date',
'twig_date_converter', ['needs_environment' =>
true]),
new TwigFunction('include', 'twig_include',
['needs_environment' => true, 'needs_context' =>
true, 'is_safe' => ['all']]),
new TwigFunction('source', 'twig_source',
['needs_environment' => true, 'is_safe' =>
['all']]),
];
}
public function getTests()
{
return [
new TwigTest('even', null, ['node_class'
=> '\Twig\Node\Expression\Test\EvenTest']),
new TwigTest('odd', null, ['node_class'
=> '\Twig\Node\Expression\Test\OddTest']),
new TwigTest('defined', null, ['node_class'
=> '\Twig\Node\Expression\Test\DefinedTest']),
new TwigTest('sameas', null, ['node_class'
=> '\Twig\Node\Expression\Test\SameasTest',
'deprecated' => '1.21', 'alternative'
=> 'same as']),
new TwigTest('same as', null, ['node_class'
=> '\Twig\Node\Expression\Test\SameasTest']),
new TwigTest('none', null, ['node_class'
=> '\Twig\Node\Expression\Test\NullTest']),
new TwigTest('null', null, ['node_class'
=> '\Twig\Node\Expression\Test\NullTest']),
new TwigTest('divisibleby', null,
['node_class' =>
'\Twig\Node\Expression\Test\DivisiblebyTest',
'deprecated' => '1.21', 'alternative'
=> 'divisible by']),
new TwigTest('divisible by', null,
['node_class' =>
'\Twig\Node\Expression\Test\DivisiblebyTest']),
new TwigTest('constant', null,
['node_class' =>
'\Twig\Node\Expression\Test\ConstantTest']),
new TwigTest('empty', 'twig_test_empty'),
new TwigTest('iterable',
'twig_test_iterable'),
];
}
public function getOperators()
{
return [
[
'not' => ['precedence' => 50,
'class' => '\Twig\Node\Expression\Unary\NotUnary'],
'-' => ['precedence' => 500,
'class' => '\Twig\Node\Expression\Unary\NegUnary'],
'+' => ['precedence' => 500,
'class' => '\Twig\Node\Expression\Unary\PosUnary'],
],
[
'or' => ['precedence' => 10,
'class' => '\Twig\Node\Expression\Binary\OrBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'and' => ['precedence' => 15,
'class' => '\Twig\Node\Expression\Binary\AndBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'b-or' => ['precedence' => 16,
'class' =>
'\Twig\Node\Expression\Binary\BitwiseOrBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'b-xor' => ['precedence' => 17,
'class' =>
'\Twig\Node\Expression\Binary\BitwiseXorBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'b-and' => ['precedence' => 18,
'class' =>
'\Twig\Node\Expression\Binary\BitwiseAndBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'==' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\EqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'!=' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\NotEqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'<' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\LessBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'>' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\GreaterBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'>=' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\GreaterEqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'<=' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\LessEqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'not in' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\NotInBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'in' => ['precedence' => 20,
'class' => '\Twig\Node\Expression\Binary\InBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'matches' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\MatchesBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'starts with' => ['precedence' =>
20, 'class' =>
'\Twig\Node\Expression\Binary\StartsWithBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'ends with' => ['precedence' =>
20, 'class' =>
'\Twig\Node\Expression\Binary\EndsWithBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'..' => ['precedence' => 25,
'class' =>
'\Twig\Node\Expression\Binary\RangeBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'+' => ['precedence' => 30,
'class' => '\Twig\Node\Expression\Binary\AddBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'-' => ['precedence' => 30,
'class' => '\Twig\Node\Expression\Binary\SubBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'~' => ['precedence' => 40,
'class' =>
'\Twig\Node\Expression\Binary\ConcatBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'*' => ['precedence' => 60,
'class' => '\Twig\Node\Expression\Binary\MulBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'/' => ['precedence' => 60,
'class' => '\Twig\Node\Expression\Binary\DivBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'//' => ['precedence' => 60,
'class' =>
'\Twig\Node\Expression\Binary\FloorDivBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'%' => ['precedence' => 60,
'class' => '\Twig\Node\Expression\Binary\ModBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'is' => ['precedence' => 100,
'associativity' => ExpressionParser::OPERATOR_LEFT],
'is not' => ['precedence' => 100,
'associativity' => ExpressionParser::OPERATOR_LEFT],
'**' => ['precedence' => 200,
'class' =>
'\Twig\Node\Expression\Binary\PowerBinary',
'associativity' => ExpressionParser::OPERATOR_RIGHT],
'??' => ['precedence' => 300,
'class' =>
'\Twig\Node\Expression\NullCoalesceExpression',
'associativity' => ExpressionParser::OPERATOR_RIGHT],
],
];
}
public function getName()
{
return 'core';
}
}
class_alias('Twig\Extension\CoreExtension',
'Twig_Extension_Core');
}
namespace {
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\Markup;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Node;
/**
* Cycles over a value.
*
* @param \ArrayAccess|array $values
* @param int $position The cycle position
*
* @return string The next value in the cycle
*/
function twig_cycle($values, $position)
{
if (!\is_array($values) && !$values instanceof \ArrayAccess) {
return $values;
}
return $values[$position % \count($values)];
}
/**
* Returns a random value depending on the supplied parameter type:
* - a random item from a \Traversable or array
* - a random character from a string
* - a random integer between 0 and the integer parameter.
*
* @param \Traversable|array|int|float|string $values The values to pick a
random item from
* @param int|null $max Maximum value used
when $values is an int
*
* @throws RuntimeError when $values is an empty array (does not apply to
an empty string which is returned as is)
*
* @return mixed A random value from the given sequence
*/
function twig_random(Environment $env, $values = null, $max = null)
{
if (null === $values) {
return null === $max ? mt_rand() : mt_rand(0, $max);
}
if (\is_int($values) || \is_float($values)) {
if (null === $max) {
if ($values < 0) {
$max = 0;
$min = $values;
} else {
$max = $values;
$min = 0;
}
} else {
$min = $values;
$max = $max;
}
return mt_rand($min, $max);
}
if (\is_string($values)) {
if ('' === $values) {
return '';
}
if (null !== $charset = $env->getCharset()) {
if ('UTF-8' !== $charset) {
$values = twig_convert_encoding($values, 'UTF-8',
$charset);
}
// unicode version of str_split()
// split at all positions, but not after the start and not
before the end
$values = preg_split('/(?<!^)(?!$)/u', $values);
if ('UTF-8' !== $charset) {
foreach ($values as $i => $value) {
$values[$i] = twig_convert_encoding($value, $charset,
'UTF-8');
}
}
} else {
return $values[mt_rand(0, \strlen($values) - 1)];
}
}
if (!twig_test_iterable($values)) {
return $values;
}
$values = twig_to_array($values);
if (0 === \count($values)) {
throw new RuntimeError('The random function cannot pick from
an empty array.');
}
return $values[array_rand($values, 1)];
}
/**
* Converts a date to the given format.
*
* {{ post.published_at|date("m/d/Y") }}
*
* @param \DateTime|\DateTimeInterface|\DateInterval|string $date A
date
* @param string|null $format The
target format, null to use the default
* @param \DateTimeZone|string|false|null $timezone The
target timezone, null to use the default, false to leave unchanged
*
* @return string The formatted date
*/
function twig_date_format_filter(Environment $env, $date, $format = null,
$timezone = null)
{
if (null === $format) {
$formats =
$env->getExtension('\Twig\Extension\CoreExtension')->getDateFormat();
$format = $date instanceof \DateInterval ? $formats[1] :
$formats[0];
}
if ($date instanceof \DateInterval) {
return $date->format($format);
}
return twig_date_converter($env, $date, $timezone)->format($format);
}
/**
* Returns a new date object modified.
*
* {{
post.published_at|date_modify("-1day")|date("m/d/Y") }}
*
* @param \DateTime|string $date A date
* @param string $modifier A modifier string
*
* @return \DateTime
*/
function twig_date_modify_filter(Environment $env, $date, $modifier)
{
$date = twig_date_converter($env, $date, false);
$resultDate = $date->modify($modifier);
// This is a hack to ensure PHP 5.2 support and support for
\DateTimeImmutable
// \DateTime::modify does not return the modified \DateTime object <
5.3.0
// and \DateTimeImmutable does not modify $date.
return null === $resultDate ? $date : $resultDate;
}
/**
* Converts an input to a \DateTime instance.
*
* {% if date(user.created_at) < date('+2days') %}
* {# do something #}
* {% endif %}
*
* @param \DateTime|\DateTimeInterface|string|null $date A date
* @param \DateTimeZone|string|false|null $timezone The target
timezone, null to use the default, false to leave unchanged
*
* @return \DateTimeInterface
*/
function twig_date_converter(Environment $env, $date = null, $timezone =
null)
{
// determine the timezone
if (false !== $timezone) {
if (null === $timezone) {
$timezone =
$env->getExtension('\Twig\Extension\CoreExtension')->getTimezone();
} elseif (!$timezone instanceof \DateTimeZone) {
$timezone = new \DateTimeZone($timezone);
}
}
// immutable dates
if ($date instanceof \DateTimeImmutable) {
return false !== $timezone ? $date->setTimezone($timezone) :
$date;
}
if ($date instanceof \DateTime || $date instanceof \DateTimeInterface)
{
$date = clone $date;
if (false !== $timezone) {
$date->setTimezone($timezone);
}
return $date;
}
if (null === $date || 'now' === $date) {
return new \DateTime($date, false !== $timezone ? $timezone :
$env->getExtension('\Twig\Extension\CoreExtension')->getTimezone());
}
$asString = (string) $date;
if (ctype_digit($asString) || (!empty($asString) &&
'-' === $asString[0] && ctype_digit(substr($asString,
1)))) {
$date = new \DateTime('@'.$date);
} else {
$date = new \DateTime($date,
$env->getExtension('\Twig\Extension\CoreExtension')->getTimezone());
}
if (false !== $timezone) {
$date->setTimezone($timezone);
}
return $date;
}
/**
* Replaces strings within a string.
*
* @param string $str String to replace in
* @param array|\Traversable $from Replace values
* @param string|null $to Replace to, deprecated (@see
https://secure.php.net/manual/en/function.strtr.php)
*
* @return string
*/
function twig_replace_filter($str, $from, $to = null)
{
if (\is_string($from) && \is_string($to)) {
@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);
return strtr($str, $from, $to);
}
if (!twig_test_iterable($from)) {
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)));
}
return strtr($str, twig_to_array($from));
}
/**
* Rounds a number.
*
* @param int|float $value The value to round
* @param int|float $precision The rounding precision
* @param string $method The method to use for rounding
*
* @return int|float The rounded number
*/
function twig_round($value, $precision = 0, $method = 'common')
{
if ('common' == $method) {
return round($value, $precision);
}
if ('ceil' != $method && 'floor' !=
$method) {
throw new RuntimeError('The round filter only supports the
"common", "ceil", and "floor"
methods.');
}
return $method($value * pow(10, $precision)) / pow(10, $precision);
}
/**
* Number format filter.
*
* All of the formatting options can be left null, in that case the
defaults will
* be used. Supplying any of the parameters will override the defaults set
in the
* environment object.
*
* @param mixed $number A float/int/string of the number to format
* @param int $decimal the number of decimal points to display
* @param string $decimalPoint the character(s) to use for the decimal
point
* @param string $thousandSep the character(s) to use for the thousands
separator
*
* @return string The formatted number
*/
function twig_number_format_filter(Environment $env, $number, $decimal =
null, $decimalPoint = null, $thousandSep = null)
{
$defaults =
$env->getExtension('\Twig\Extension\CoreExtension')->getNumberFormat();
if (null === $decimal) {
$decimal = $defaults[0];
}
if (null === $decimalPoint) {
$decimalPoint = $defaults[1];
}
if (null === $thousandSep) {
$thousandSep = $defaults[2];
}
return number_format((float) $number, $decimal, $decimalPoint,
$thousandSep);
}
/**
* URL encodes (RFC 3986) a string as a path segment or an array as a query
string.
*
* @param string|array $url A URL or an array of query parameters
*
* @return string The URL encoded value
*/
function twig_urlencode_filter($url)
{
if (\is_array($url)) {
if (\defined('PHP_QUERY_RFC3986')) {
return http_build_query($url, '', '&',
PHP_QUERY_RFC3986);
}
return http_build_query($url, '', '&');
}
return rawurlencode($url);
}
/**
* JSON encodes a variable.
*
* @param mixed $value the value to encode
* @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
*
* @return mixed The JSON encoded value
*/
function twig_jsonencode_filter($value, $options = 0)
{
if ($value instanceof Markup) {
$value = (string) $value;
} elseif (\is_array($value)) {
array_walk_recursive($value, '_twig_markup2string');
}
return json_encode($value, $options);
}
function _twig_markup2string(&$value)
{
if ($value instanceof Markup) {
$value = (string) $value;
}
}
/**
* Merges an array with another one.
*
* {% set items = { 'apple': 'fruit',
'orange': 'fruit' } %}
*
* {% set items = items|merge({ 'peugeot': 'car' }) %}
*
* {# items now contains { 'apple': 'fruit',
'orange': 'fruit', 'peugeot': 'car'
} #}
*
* @param array|\Traversable $arr1 An array
* @param array|\Traversable $arr2 An array
*
* @return array The merged array
*/
function twig_array_merge($arr1, $arr2)
{
if (!twig_test_iterable($arr1)) {
throw new RuntimeError(sprintf('The merge filter only works
with arrays or "Traversable", got "%s" as first
argument.', \gettype($arr1)));
}
if (!twig_test_iterable($arr2)) {
throw new RuntimeError(sprintf('The merge filter only works
with arrays or "Traversable", got "%s" as second
argument.', \gettype($arr2)));
}
return array_merge(twig_to_array($arr1), twig_to_array($arr2));
}
/**
* Slices a variable.
*
* @param mixed $item A variable
* @param int $start Start of the slice
* @param int $length Size of the slice
* @param bool $preserveKeys Whether to preserve key or not (when the
input is an array)
*
* @return mixed The sliced variable
*/
function twig_slice(Environment $env, $item, $start, $length = null,
$preserveKeys = false)
{
if ($item instanceof \Traversable) {
while ($item instanceof \IteratorAggregate) {
$item = $item->getIterator();
}
if ($start >= 0 && $length >= 0 && $item
instanceof \Iterator) {
try {
return iterator_to_array(new \LimitIterator($item, $start,
null === $length ? -1 : $length), $preserveKeys);
} catch (\OutOfBoundsException $e) {
return [];
}
}
$item = iterator_to_array($item, $preserveKeys);
}
if (\is_array($item)) {
return \array_slice($item, $start, $length, $preserveKeys);
}
$item = (string) $item;
if (\function_exists('mb_get_info') && null !==
$charset = $env->getCharset()) {
return (string) mb_substr($item, $start, null === $length ?
mb_strlen($item, $charset) - $start : $length, $charset);
}
return (string) (null === $length ? substr($item, $start) :
substr($item, $start, $length));
}
/**
* Returns the first element of the item.
*
* @param mixed $item A variable
*
* @return mixed The first element of the item
*/
function twig_first(Environment $env, $item)
{
$elements = twig_slice($env, $item, 0, 1, false);
return \is_string($elements) ? $elements : current($elements);
}
/**
* Returns the last element of the item.
*
* @param mixed $item A variable
*
* @return mixed The last element of the item
*/
function twig_last(Environment $env, $item)
{
$elements = twig_slice($env, $item, -1, 1, false);
return \is_string($elements) ? $elements : current($elements);
}
/**
* Joins the values to a string.
*
* The separators between elements are empty strings per default, you can
define them with the optional parameters.
*
* {{ [1, 2, 3]|join(', ', ' and ') }}
* {# returns 1, 2 and 3 #}
*
* {{ [1, 2, 3]|join('|') }}
* {# returns 1|2|3 #}
*
* {{ [1, 2, 3]|join }}
* {# returns 123 #}
*
* @param array $value An array
* @param string $glue The separator
* @param string|null $and The separator for the last pair
*
* @return string The concatenated string
*/
function twig_join_filter($value, $glue = '', $and = null)
{
if (!twig_test_iterable($value)) {
$value = (array) $value;
}
$value = twig_to_array($value, false);
if (0 === \count($value)) {
return '';
}
if (null === $and || $and === $glue) {
return implode($glue, $value);
}
if (1 === \count($value)) {
return $value[0];
}
return implode($glue, \array_slice($value, 0,
-1)).$and.$value[\count($value) - 1];
}
/**
* Splits the string into an array.
*
* {{ "one,two,three"|split(',') }}
* {# returns [one, two, three] #}
*
* {{ "one,two,three,four,five"|split(',', 3) }}
* {# returns [one, two, "three,four,five"] #}
*
* {{ "123"|split('') }}
* {# returns [1, 2, 3] #}
*
* {{ "aabbcc"|split('', 2) }}
* {# returns [aa, bb, cc] #}
*
* @param string $value A string
* @param string $delimiter The delimiter
* @param int $limit The limit
*
* @return array The split string as an array
*/
function twig_split_filter(Environment $env, $value, $delimiter, $limit =
null)
{
if (\strlen($delimiter) > 0) {
return null === $limit ? explode($delimiter, $value) :
explode($delimiter, $value, $limit);
}
if (!\function_exists('mb_get_info') || null === $charset =
$env->getCharset()) {
return str_split($value, null === $limit ? 1 : $limit);
}
if ($limit <= 1) {
return preg_split('/(?<!^)(?!$)/u', $value);
}
$length = mb_strlen($value, $charset);
if ($length < $limit) {
return [$value];
}
$r = [];
for ($i = 0; $i < $length; $i += $limit) {
$r[] = mb_substr($value, $i, $limit, $charset);
}
return $r;
}
// The '_default' filter is used internally to avoid using the
ternary operator
// which costs a lot for big contexts (before PHP 5.4). So, on average,
// a function call is cheaper.
/**
* @internal
*/
function _twig_default_filter($value, $default = '')
{
if (twig_test_empty($value)) {
return $default;
}
return $value;
}
/**
* Returns the keys for the given array.
*
* It is useful when you want to iterate over the keys of an array:
*
* {% for key in array|keys %}
* {# ... #}
* {% endfor %}
*
* @param array $array An array
*
* @return array The keys
*/
function twig_get_array_keys_filter($array)
{
if ($array instanceof \Traversable) {
while ($array instanceof \IteratorAggregate) {
$array = $array->getIterator();
}
if ($array instanceof \Iterator) {
$keys = [];
$array->rewind();
while ($array->valid()) {
$keys[] = $array->key();
$array->next();
}
return $keys;
}
$keys = [];
foreach ($array as $key => $item) {
$keys[] = $key;
}
return $keys;
}
if (!\is_array($array)) {
return [];
}
return array_keys($array);
}
/**
* Reverses a variable.
*
* @param array|\Traversable|string $item An array, a \Traversable
instance, or a string
* @param bool $preserveKeys Whether to preserve key
or not
*
* @return mixed The reversed input
*/
function twig_reverse_filter(Environment $env, $item, $preserveKeys =
false)
{
if ($item instanceof \Traversable) {
return array_reverse(iterator_to_array($item), $preserveKeys);
}
if (\is_array($item)) {
return array_reverse($item, $preserveKeys);
}
if (null !== $charset = $env->getCharset()) {
$string = (string) $item;
if ('UTF-8' !== $charset) {
$item = twig_convert_encoding($string, 'UTF-8',
$charset);
}
preg_match_all('/./us', $item, $matches);
$string = implode('', array_reverse($matches[0]));
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
}
return strrev((string) $item);
}
/**
* Sorts an array.
*
* @param array|\Traversable $array
*
* @return array
*/
function twig_sort_filter($array)
{
if ($array instanceof \Traversable) {
$array = iterator_to_array($array);
} elseif (!\is_array($array)) {
throw new RuntimeError(sprintf('The sort filter only works
with arrays or "Traversable", got "%s".',
\gettype($array)));
}
asort($array);
return $array;
}
/**
* @internal
*/
function twig_in_filter($value, $compare)
{
if ($value instanceof Markup) {
$value = (string) $value;
}
if ($compare instanceof Markup) {
$compare = (string) $compare;
}
if (\is_array($compare)) {
return \in_array($value, $compare, \is_object($value) ||
\is_resource($value));
} elseif (\is_string($compare) && (\is_string($value) ||
\is_int($value) || \is_float($value))) {
return '' === $value || false !== strpos($compare,
(string) $value);
} elseif ($compare instanceof \Traversable) {
if (\is_object($value) || \is_resource($value)) {
foreach ($compare as $item) {
if ($item === $value) {
return true;
}
}
} else {
foreach ($compare as $item) {
if ($item == $value) {
return true;
}
}
}
return false;
}
return false;
}
/**
* Returns a trimmed string.
*
* @return string
*
* @throws RuntimeError When an invalid trimming side is used (not a string
or not 'left', 'right', or 'both')
*/
function twig_trim_filter($string, $characterMask = null, $side =
'both')
{
if (null === $characterMask) {
$characterMask = " \t\n\r\0\x0B";
}
switch ($side) {
case 'both':
return trim($string, $characterMask);
case 'left':
return ltrim($string, $characterMask);
case 'right':
return rtrim($string, $characterMask);
default:
throw new RuntimeError('Trimming side must be
"left", "right" or "both".');
}
}
/**
* Removes whitespaces between HTML tags.
*
* @return string
*/
function twig_spaceless($content)
{
return trim(preg_replace('/>\s+</',
'><', $content));
}
/**
* Escapes a string.
*
* @param mixed $string The value to be escaped
* @param string $strategy The escaping strategy
* @param string $charset The charset
* @param bool $autoescape Whether the function is called by the
auto-escaping feature (true) or by the developer (false)
*
* @return string
*/
function twig_escape_filter(Environment $env, $string, $strategy =
'html', $charset = null, $autoescape = false)
{
if ($autoescape && $string instanceof Markup) {
return $string;
}
if (!\is_string($string)) {
if (\is_object($string) && method_exists($string,
'__toString')) {
$string = (string) $string;
} elseif (\in_array($strategy, ['html', 'js',
'css', 'html_attr', 'url'])) {
return $string;
}
}
if ('' === $string) {
return '';
}
if (null === $charset) {
$charset = $env->getCharset();
}
switch ($strategy) {
case 'html':
// see https://secure.php.net/htmlspecialchars
// Using a static variable to avoid initializing the array
// each time the function is called. Moving the declaration on
the
// top of the function slow downs other escaping strategies.
static $htmlspecialcharsCharsets = [
'ISO-8859-1' => true, 'ISO8859-1'
=> true,
'ISO-8859-15' => true, 'ISO8859-15'
=> true,
'utf-8' => true, 'UTF-8' => true,
'CP866' => true, 'IBM866' =>
true, '866' => true,
'CP1251' => true, 'WINDOWS-1251'
=> true, 'WIN-1251' => true,
'1251' => true,
'CP1252' => true, 'WINDOWS-1252'
=> true, '1252' => true,
'KOI8-R' => true, 'KOI8-RU' =>
true, 'KOI8R' => true,
'BIG5' => true, '950' => true,
'GB2312' => true, '936' => true,
'BIG5-HKSCS' => true,
'SHIFT_JIS' => true, 'SJIS' =>
true, '932' => true,
'EUC-JP' => true, 'EUCJP' =>
true,
'ISO8859-5' => true, 'ISO-8859-5'
=> true, 'MACROMAN' => true,
];
if (isset($htmlspecialcharsCharsets[$charset])) {
return htmlspecialchars($string, ENT_QUOTES |
ENT_SUBSTITUTE, $charset);
}
if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) {
// cache the lowercase variant for future iterations
$htmlspecialcharsCharsets[$charset] = true;
return htmlspecialchars($string, ENT_QUOTES |
ENT_SUBSTITUTE, $charset);
}
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
$string = htmlspecialchars($string, ENT_QUOTES |
ENT_SUBSTITUTE, 'UTF-8');
return twig_convert_encoding($string, $charset,
'UTF-8');
case 'js':
// escape all non-alphanumeric characters
// into their \x or \uHHHH representations
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
}
if (!preg_match('//u', $string)) {
throw new RuntimeError('The string to escape is not a
valid UTF-8 string.');
}
$string =
preg_replace_callback('#[^a-zA-Z0-9,\._]#Su',
'_twig_escape_js_callback', $string);
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
case 'css':
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
}
if (!preg_match('//u', $string)) {
throw new RuntimeError('The string to escape is not a
valid UTF-8 string.');
}
$string = preg_replace_callback('#[^a-zA-Z0-9]#Su',
'_twig_escape_css_callback', $string);
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
case 'html_attr':
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
}
if (!preg_match('//u', $string)) {
throw new RuntimeError('The string to escape is not a
valid UTF-8 string.');
}
$string =
preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su',
'_twig_escape_html_attr_callback', $string);
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
case 'url':
return rawurlencode($string);
default:
static $escapers;
if (null === $escapers) {
$escapers =
$env->getExtension('\Twig\Extension\CoreExtension')->getEscapers();
}
if (isset($escapers[$strategy])) {
return \call_user_func($escapers[$strategy], $env, $string,
$charset);
}
$validStrategies = implode(', ',
array_merge(['html', 'js', 'url',
'css', 'html_attr'], array_keys($escapers)));
throw new RuntimeError(sprintf('Invalid escaping strategy
"%s" (valid ones: %s).', $strategy, $validStrategies));
}
}
/**
* @internal
*/
function twig_escape_filter_is_safe(Node $filterArgs)
{
foreach ($filterArgs as $arg) {
if ($arg instanceof ConstantExpression) {
return [$arg->getAttribute('value')];
}
return [];
}
return ['html'];
}
if (\function_exists('mb_convert_encoding')) {
function twig_convert_encoding($string, $to, $from)
{
return mb_convert_encoding($string, $to, $from);
}
} elseif (\function_exists('iconv')) {
function twig_convert_encoding($string, $to, $from)
{
return iconv($from, $to, $string);
}
} else {
function twig_convert_encoding($string, $to, $from)
{
throw new RuntimeError('No suitable convert encoding function
(use UTF-8 as your encoding or install the iconv or mbstring
extension).');
}
}
if (\function_exists('mb_ord')) {
function twig_ord($string)
{
return mb_ord($string, 'UTF-8');
}
} else {
function twig_ord($string)
{
$code = ($string = unpack('C*', substr($string, 0, 4))) ?
$string[1] : 0;
if (0xF0 <= $code) {
return (($code - 0xF0) << 18) + (($string[2] - 0x80)
<< 12) + (($string[3] - 0x80) << 6) + $string[4] - 0x80;
}
if (0xE0 <= $code) {
return (($code - 0xE0) << 12) + (($string[2] - 0x80)
<< 6) + $string[3] - 0x80;
}
if (0xC0 <= $code) {
return (($code - 0xC0) << 6) + $string[2] - 0x80;
}
return $code;
}
}
function _twig_escape_js_callback($matches)
{
$char = $matches[0];
/*
* A few characters have short escape sequences in JSON and JavaScript.
* Escape sequences supported only by JavaScript, not JSON, are
ommitted.
* \" is also supported but omitted, because the resulting string
is not HTML safe.
*/
static $shortMap = [
'\\' => '\\\\',
'/' => '\\/',
"\x08" => '\b',
"\x0C" => '\f',
"\x0A" => '\n',
"\x0D" => '\r',
"\x09" => '\t',
];
if (isset($shortMap[$char])) {
return $shortMap[$char];
}
// \uHHHH
$char = twig_convert_encoding($char, 'UTF-16BE',
'UTF-8');
$char = strtoupper(bin2hex($char));
if (4 >= \strlen($char)) {
return sprintf('\u%04s', $char);
}
return sprintf('\u%04s\u%04s', substr($char, 0, -4),
substr($char, -4));
}
function _twig_escape_css_callback($matches)
{
$char = $matches[0];
return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) :
twig_ord($char));
}
/**
* This function is adapted from code coming from Zend Framework.
*
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc.
(https://www.zend.com)
* @license https://framework.zend.com/license/new-bsd New BSD License
*/
function _twig_escape_html_attr_callback($matches)
{
$chr = $matches[0];
$ord = \ord($chr);
/*
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
if (($ord <= 0x1f && "\t" != $chr &&
"\n" != $chr && "\r" != $chr) || ($ord >=
0x7f && $ord <= 0x9f)) {
return '�';
}
/*
* Check if the current character to escape has a name entity we should
* replace it with while grabbing the hex value of the character.
*/
if (1 == \strlen($chr)) {
/*
* While HTML supports far more named entities, the lowest common
denominator
* has become HTML5's XML Serialisation which is restricted to
the those named
* entities that XML supports. Using HTML entities would result in
this error:
* XML Parsing Error: undefined entity
*/
static $entityMap = [
34 => '"', /* quotation mark */
38 => '&', /* ampersand */
60 => '<', /* less-than sign */
62 => '>', /* greater-than sign */
];
if (isset($entityMap[$ord])) {
return $entityMap[$ord];
}
return sprintf('&#x%02X;', $ord);
}
/*
* Per OWASP recommendations, we'll use hex entities for any other
* characters where a named entity does not exist.
*/
return sprintf('&#x%04X;', twig_ord($chr));
}
// add multibyte extensions if possible
if (\function_exists('mb_get_info')) {
/**
* Returns the length of a variable.
*
* @param mixed $thing A variable
*
* @return int The length of the value
*/
function twig_length_filter(Environment $env, $thing)
{
if (null === $thing) {
return 0;
}
if (is_scalar($thing)) {
return mb_strlen($thing, $env->getCharset());
}
if ($thing instanceof \Countable || \is_array($thing) || $thing
instanceof \SimpleXMLElement) {
return \count($thing);
}
if ($thing instanceof \Traversable) {
return iterator_count($thing);
}
if (\is_object($thing) && method_exists($thing,
'__toString')) {
return mb_strlen((string) $thing, $env->getCharset());
}
return 1;
}
/**
* Converts a string to uppercase.
*
* @param string $string A string
*
* @return string The uppercased string
*/
function twig_upper_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_strtoupper($string, $charset);
}
return strtoupper($string);
}
/**
* Converts a string to lowercase.
*
* @param string $string A string
*
* @return string The lowercased string
*/
function twig_lower_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_strtolower($string, $charset);
}
return strtolower($string);
}
/**
* Returns a titlecased string.
*
* @param string $string A string
*
* @return string The titlecased string
*/
function twig_title_string_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_convert_case($string, MB_CASE_TITLE, $charset);
}
return ucwords(strtolower($string));
}
/**
* Returns a capitalized string.
*
* @param string $string A string
*
* @return string The capitalized string
*/
function twig_capitalize_string_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_strtoupper(mb_substr($string, 0, 1, $charset),
$charset).mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset),
$charset), $charset);
}
return ucfirst(strtolower($string));
}
}
// and byte fallback
else {
/**
* Returns the length of a variable.
*
* @param mixed $thing A variable
*
* @return int The length of the value
*/
function twig_length_filter(Environment $env, $thing)
{
if (null === $thing) {
return 0;
}
if (is_scalar($thing)) {
return \strlen($thing);
}
if ($thing instanceof \SimpleXMLElement) {
return \count($thing);
}
if (\is_object($thing) && method_exists($thing,
'__toString') && !$thing instanceof \Countable) {
return \strlen((string) $thing);
}
if ($thing instanceof \Countable || \is_array($thing)) {
return \count($thing);
}
if ($thing instanceof \IteratorAggregate) {
return iterator_count($thing);
}
return 1;
}
/**
* Returns a titlecased string.
*
* @param string $string A string
*
* @return string The titlecased string
*/
function twig_title_string_filter(Environment $env, $string)
{
return ucwords(strtolower($string));
}
/**
* Returns a capitalized string.
*
* @param string $string A string
*
* @return string The capitalized string
*/
function twig_capitalize_string_filter(Environment $env, $string)
{
return ucfirst(strtolower($string));
}
}
/**
* @internal
*/
function twig_ensure_traversable($seq)
{
if ($seq instanceof \Traversable || \is_array($seq)) {
return $seq;
}
return [];
}
/**
* @internal
*/
function twig_to_array($seq, $preserveKeys = true)
{
if ($seq instanceof \Traversable) {
return iterator_to_array($seq, $preserveKeys);
}
if (!\is_array($seq)) {
return $seq;
}
return $preserveKeys ? $seq : array_values($seq);
}
/**
* Checks if a variable is empty.
*
* {# evaluates to true if the foo variable is null, false, or the empty
string #}
* {% if foo is empty %}
* {# ... #}
* {% endif %}
*
* @param mixed $value A variable
*
* @return bool true if the value is empty, false otherwise
*/
function twig_test_empty($value)
{
if ($value instanceof \Countable) {
return 0 == \count($value);
}
if ($value instanceof \Traversable) {
return !iterator_count($value);
}
if (\is_object($value) && method_exists($value,
'__toString')) {
return '' === (string) $value;
}
return '' === $value || false === $value || null === $value
|| [] === $value;
}
/**
* Checks if a variable is traversable.
*
* {# evaluates to true if the foo variable is an array or a traversable
object #}
* {% if foo is iterable %}
* {# ... #}
* {% endif %}
*
* @param mixed $value A variable
*
* @return bool true if the value is traversable
*/
function twig_test_iterable($value)
{
return $value instanceof \Traversable || \is_array($value);
}
/**
* Renders a template.
*
* @param array $context
* @param string|array $template The template to render or an array of
templates to try consecutively
* @param array $variables The variables to pass to the template
* @param bool $withContext
* @param bool $ignoreMissing Whether to ignore missing templates
or not
* @param bool $sandboxed Whether to sandbox the template or
not
*
* @return string The rendered template
*/
function twig_include(Environment $env, $context, $template, $variables =
[], $withContext = true, $ignoreMissing = false, $sandboxed = false)
{
$alreadySandboxed = false;
$sandbox = null;
if ($withContext) {
$variables = array_merge($context, $variables);
}
if ($isSandboxed = $sandboxed &&
$env->hasExtension('\Twig\Extension\SandboxExtension')) {
$sandbox =
$env->getExtension('\Twig\Extension\SandboxExtension');
if (!$alreadySandboxed = $sandbox->isSandboxed()) {
$sandbox->enableSandbox();
}
}
$loaded = null;
try {
$loaded = $env->resolveTemplate($template);
} catch (LoaderError $e) {
if (!$ignoreMissing) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
}
} catch (\Throwable $e) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
} catch (\Exception $e) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
}
try {
$ret = $loaded ? $loaded->render($variables) : '';
} catch (\Exception $e) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
}
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
return $ret;
}
/**
* Returns a template content without rendering it.
*
* @param string $name The template name
* @param bool $ignoreMissing Whether to ignore missing templates or not
*
* @return string The template source
*/
function twig_source(Environment $env, $name, $ignoreMissing = false)
{
$loader = $env->getLoader();
try {
if (!$loader instanceof SourceContextLoaderInterface) {
return $loader->getSource($name);
} else {
return $loader->getSourceContext($name)->getCode();
}
} catch (LoaderError $e) {
if (!$ignoreMissing) {
throw $e;
}
}
}
/**
* Provides the ability to get constants from instances as well as
class/global constants.
*
* @param string $constant The name of the constant
* @param object|null $object The object to get the constant from
*
* @return string
*/
function twig_constant($constant, $object = null)
{
if (null !== $object) {
$constant = \get_class($object).'::'.$constant;
}
return \constant($constant);
}
/**
* Checks if a constant exists.
*
* @param string $constant The name of the constant
* @param object|null $object The object to get the constant from
*
* @return bool
*/
function twig_constant_is_defined($constant, $object = null)
{
if (null !== $object) {
$constant = \get_class($object).'::'.$constant;
}
return \defined($constant);
}
/**
* Batches item.
*
* @param array $items An array of items
* @param int $size The size of the batch
* @param mixed $fill A value used to fill missing items
*
* @return array
*/
function twig_array_batch($items, $size, $fill = null, $preserveKeys =
true)
{
if (!twig_test_iterable($items)) {
throw new RuntimeError(sprintf('The "batch" filter
expects an array or "Traversable", got "%s".',
\is_object($items) ? \get_class($items) : \gettype($items)));
}
$size = ceil($size);
$result = array_chunk(twig_to_array($items, $preserveKeys), $size,
$preserveKeys);
if (null !== $fill && $result) {
$last = \count($result) - 1;
if ($fillCount = $size - \count($result[$last])) {
for ($i = 0; $i < $fillCount; ++$i) {
$result[$last][] = $fill;
}
}
}
return $result;
}
function twig_array_filter($array, $arrow)
{
if (\is_array($array)) {
if (\PHP_VERSION_ID >= 50600) {
return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH);
}
return array_filter($array, $arrow);
}
// the IteratorIterator wrapping is needed as some internal PHP classes
are \Traversable but do not implement \Iterator
return new \CallbackFilterIterator(new \IteratorIterator($array),
$arrow);
}
function twig_array_map($array, $arrow)
{
$r = [];
foreach ($array as $k => $v) {
$r[$k] = $arrow($v, $k);
}
return $r;
}
function twig_array_reduce($array, $arrow, $initial = null)
{
if (!\is_array($array)) {
$array = iterator_to_array($array);
}
return array_reduce($array, $arrow, $initial);
}
}
PK���[6����
src/Extension/DebugExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\TwigFunction;
/**
* @final
*/
class DebugExtension extends AbstractExtension
{
public function getFunctions()
{
// dump is safe if var_dump is overridden by xdebug
$isDumpOutputHtmlSafe = \extension_loaded('xdebug')
// false means that it was not set (and the default is on) or
it explicitly enabled
&& (false ===
ini_get('xdebug.overload_var_dump') ||
ini_get('xdebug.overload_var_dump'))
// false means that it was not set (and the default is on) or
it explicitly enabled
// xdebug.overload_var_dump produces HTML only when html_errors
is also enabled
&& (false === ini_get('html_errors') ||
ini_get('html_errors'))
|| 'cli' === \PHP_SAPI
;
return [
new TwigFunction('dump', 'twig_var_dump',
['is_safe' => $isDumpOutputHtmlSafe ? ['html'] : [],
'needs_context' => true, 'needs_environment' =>
true, 'is_variadic' => true]),
];
}
public function getName()
{
return 'debug';
}
}
class_alias('Twig\Extension\DebugExtension',
'Twig_Extension_Debug');
}
namespace {
use Twig\Environment;
use Twig\Template;
use Twig\TemplateWrapper;
function twig_var_dump(Environment $env, $context, array $vars = [])
{
if (!$env->isDebug()) {
return;
}
ob_start();
if (!$vars) {
$vars = [];
foreach ($context as $key => $value) {
if (!$value instanceof Template && !$value instanceof
TemplateWrapper) {
$vars[$key] = $value;
}
}
var_dump($vars);
} else {
foreach ($vars as $var) {
var_dump($var);
}
}
return ob_get_clean();
}
}
PK���[�%ϑ��"src/Extension/EscaperExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\NodeVisitor\EscaperNodeVisitor;
use Twig\TokenParser\AutoEscapeTokenParser;
use Twig\TwigFilter;
/**
* @final
*/
class EscaperExtension extends AbstractExtension
{
protected $defaultStrategy;
/**
* @param string|false|callable $defaultStrategy An escaping strategy
*
* @see setDefaultStrategy()
*/
public function __construct($defaultStrategy = 'html')
{
$this->setDefaultStrategy($defaultStrategy);
}
public function getTokenParsers()
{
return [new AutoEscapeTokenParser()];
}
public function getNodeVisitors()
{
return [new EscaperNodeVisitor()];
}
public function getFilters()
{
return [
new TwigFilter('raw', 'twig_raw_filter',
['is_safe' => ['all']]),
];
}
/**
* Sets the default strategy to use when not defined by the user.
*
* The strategy can be a valid PHP callback that takes the template
* name as an argument and returns the strategy to use.
*
* @param string|false|callable $defaultStrategy An escaping strategy
*/
public function setDefaultStrategy($defaultStrategy)
{
// for BC
if (true === $defaultStrategy) {
@trigger_error('Using "true" as the default
strategy is deprecated since version 1.21. Use "html"
instead.', E_USER_DEPRECATED);
$defaultStrategy = 'html';
}
if ('filename' === $defaultStrategy) {
@trigger_error('Using "filename" as the default
strategy is deprecated since version 1.27. Use "name"
instead.', E_USER_DEPRECATED);
$defaultStrategy = 'name';
}
if ('name' === $defaultStrategy) {
$defaultStrategy =
['\Twig\FileExtensionEscapingStrategy', 'guess'];
}
$this->defaultStrategy = $defaultStrategy;
}
/**
* Gets the default strategy to use when not defined by the user.
*
* @param string $name The template name
*
* @return string|false The default strategy to use for the template
*/
public function getDefaultStrategy($name)
{
// disable string callables to avoid calling a function named html
or js,
// or any other upcoming escaping strategy
if (!\is_string($this->defaultStrategy) && false !==
$this->defaultStrategy) {
return \call_user_func($this->defaultStrategy, $name);
}
return $this->defaultStrategy;
}
public function getName()
{
return 'escaper';
}
}
class_alias('Twig\Extension\EscaperExtension',
'Twig_Extension_Escaper');
}
namespace {
/**
* Marks a variable as being safe.
*
* @param string $string A PHP variable
*
* @return string
*/
function twig_raw_filter($string)
{
return $string;
}
}
PK���[Ϡ��B
B
$src/Extension/ExtensionInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\Environment;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\TokenParser\TokenParserInterface;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\TwigTest;
/**
* Interface implemented by extension classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ExtensionInterface
{
/**
* Initializes the runtime environment.
*
* This is where you can load some file that contains filter functions
for instance.
*
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_InitRuntimeInterface instead
*/
public function initRuntime(Environment $environment);
/**
* Returns the token parser instances to add to the existing list.
*
* @return TokenParserInterface[]
*/
public function getTokenParsers();
/**
* Returns the node visitor instances to add to the existing list.
*
* @return NodeVisitorInterface[]
*/
public function getNodeVisitors();
/**
* Returns a list of filters to add to the existing list.
*
* @return TwigFilter[]
*/
public function getFilters();
/**
* Returns a list of tests to add to the existing list.
*
* @return TwigTest[]
*/
public function getTests();
/**
* Returns a list of functions to add to the existing list.
*
* @return TwigFunction[]
*/
public function getFunctions();
/**
* Returns a list of operators to add to the existing list.
*
* @return array<array> First array of unary operators, second
array of binary operators
*/
public function getOperators();
/**
* Returns a list of global variables to add to the existing list.
*
* @return array An array of global variables
*
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_GlobalsInterface instead
*/
public function getGlobals();
/**
* Returns the name of the extension.
*
* @return string The extension name
*
* @deprecated since 1.26 (to be removed in 2.0), not used anymore
internally
*/
public function getName();
}
class_alias('Twig\Extension\ExtensionInterface',
'Twig_ExtensionInterface');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Environment');
PK���[{e�rr"src/Extension/GlobalsInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
/**
* Enables usage of the deprecated
Twig\Extension\AbstractExtension::getGlobals() method.
*
* Explicitly implement this interface if you really need to implement the
* deprecated getGlobals() method in your extensions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface GlobalsInterface
{
}
class_alias('Twig\Extension\GlobalsInterface',
'Twig_Extension_GlobalsInterface');
PK���[�Cˀ�&src/Extension/InitRuntimeInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
/**
* Enables usage of the deprecated
Twig\Extension\AbstractExtension::initRuntime() method.
*
* Explicitly implement this interface if you really need to implement the
* deprecated initRuntime() method in your extensions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface InitRuntimeInterface
{
}
class_alias('Twig\Extension\InitRuntimeInterface',
'Twig_Extension_InitRuntimeInterface');
PK���[yxD��$src/Extension/OptimizerExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\NodeVisitor\OptimizerNodeVisitor;
/**
* @final
*/
class OptimizerExtension extends AbstractExtension
{
protected $optimizers;
public function __construct($optimizers = -1)
{
$this->optimizers = $optimizers;
}
public function getNodeVisitors()
{
return [new OptimizerNodeVisitor($this->optimizers)];
}
public function getName()
{
return 'optimizer';
}
}
class_alias('Twig\Extension\OptimizerExtension',
'Twig_Extension_Optimizer');
PK���[Em
�__#src/Extension/ProfilerExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\Profiler\NodeVisitor\ProfilerNodeVisitor;
use Twig\Profiler\Profile;
class ProfilerExtension extends AbstractExtension
{
private $actives = [];
public function __construct(Profile $profile)
{
$this->actives[] = $profile;
}
public function enter(Profile $profile)
{
$this->actives[0]->addProfile($profile);
array_unshift($this->actives, $profile);
}
public function leave(Profile $profile)
{
$profile->leave();
array_shift($this->actives);
if (1 === \count($this->actives)) {
$this->actives[0]->leave();
}
}
public function getNodeVisitors()
{
return [new ProfilerNodeVisitor(\get_class($this))];
}
public function getName()
{
return 'profiler';
}
}
class_alias('Twig\Extension\ProfilerExtension',
'Twig_Extension_Profiler');
PK���[��FF+src/Extension/RuntimeExtensionInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
/**
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*/
interface RuntimeExtensionInterface
{
}
PK���[c ��T T "src/Extension/SandboxExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\NodeVisitor\SandboxNodeVisitor;
use Twig\Sandbox\SecurityPolicyInterface;
use Twig\TokenParser\SandboxTokenParser;
/**
* @final
*/
class SandboxExtension extends AbstractExtension
{
protected $sandboxedGlobally;
protected $sandboxed;
protected $policy;
public function __construct(SecurityPolicyInterface $policy, $sandboxed
= false)
{
$this->policy = $policy;
$this->sandboxedGlobally = $sandboxed;
}
public function getTokenParsers()
{
return [new SandboxTokenParser()];
}
public function getNodeVisitors()
{
return [new SandboxNodeVisitor()];
}
public function enableSandbox()
{
$this->sandboxed = true;
}
public function disableSandbox()
{
$this->sandboxed = false;
}
public function isSandboxed()
{
return $this->sandboxedGlobally || $this->sandboxed;
}
public function isSandboxedGlobally()
{
return $this->sandboxedGlobally;
}
public function setSecurityPolicy(SecurityPolicyInterface $policy)
{
$this->policy = $policy;
}
public function getSecurityPolicy()
{
return $this->policy;
}
public function checkSecurity($tags, $filters, $functions)
{
if ($this->isSandboxed()) {
$this->policy->checkSecurity($tags, $filters,
$functions);
}
}
public function checkMethodAllowed($obj, $method)
{
if ($this->isSandboxed()) {
$this->policy->checkMethodAllowed($obj, $method);
}
}
public function checkPropertyAllowed($obj, $method)
{
if ($this->isSandboxed()) {
$this->policy->checkPropertyAllowed($obj, $method);
}
}
public function ensureToStringAllowed($obj)
{
if ($this->isSandboxed() && \is_object($obj) &&
method_exists($obj, '__toString')) {
$this->policy->checkMethodAllowed($obj,
'__toString');
}
return $obj;
}
public function getName()
{
return 'sandbox';
}
}
class_alias('Twig\Extension\SandboxExtension',
'Twig_Extension_Sandbox');
PK���[������"src/Extension/StagingExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\TokenParser\TokenParserInterface;
/**
* Internal class.
*
* This class is used by \Twig\Environment as a staging area and must not
be used directly.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @internal
*/
class StagingExtension extends AbstractExtension
{
protected $functions = [];
protected $filters = [];
protected $visitors = [];
protected $tokenParsers = [];
protected $globals = [];
protected $tests = [];
public function addFunction($name, $function)
{
if (isset($this->functions[$name])) {
@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);
}
$this->functions[$name] = $function;
}
public function getFunctions()
{
return $this->functions;
}
public function addFilter($name, $filter)
{
if (isset($this->filters[$name])) {
@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);
}
$this->filters[$name] = $filter;
}
public function getFilters()
{
return $this->filters;
}
public function addNodeVisitor(NodeVisitorInterface $visitor)
{
$this->visitors[] = $visitor;
}
public function getNodeVisitors()
{
return $this->visitors;
}
public function addTokenParser(TokenParserInterface $parser)
{
if (isset($this->tokenParsers[$parser->getTag()])) {
@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);
}
$this->tokenParsers[$parser->getTag()] = $parser;
}
public function getTokenParsers()
{
return $this->tokenParsers;
}
public function addGlobal($name, $value)
{
$this->globals[$name] = $value;
}
public function getGlobals()
{
return $this->globals;
}
public function addTest($name, $test)
{
if (isset($this->tests[$name])) {
@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);
}
$this->tests[$name] = $test;
}
public function getTests()
{
return $this->tests;
}
public function getName()
{
return 'staging';
}
}
class_alias('Twig\Extension\StagingExtension',
'Twig_Extension_Staging');
PK���[�iy��'src/Extension/StringLoaderExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\TwigFunction;
/**
* @final
*/
class StringLoaderExtension extends AbstractExtension
{
public function getFunctions()
{
return [
new TwigFunction('template_from_string',
'twig_template_from_string', ['needs_environment' =>
true]),
];
}
public function getName()
{
return 'string_loader';
}
}
class_alias('Twig\Extension\StringLoaderExtension',
'Twig_Extension_StringLoader');
}
namespace {
use Twig\Environment;
use Twig\TemplateWrapper;
/**
* Loads a template from a string.
*
* {{ include(template_from_string("Hello {{ name }}")) }}
*
* @param string $template A template as a string or object implementing
__toString()
* @param string $name An optional name of the template to be used in
error messages
*
* @return TemplateWrapper
*/
function twig_template_from_string(Environment $env, $template, $name =
null)
{
return $env->createTemplate((string) $template, $name);
}
}
PK���[W���%src/FileExtensionEscapingStrategy.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Default autoescaping strategy based on file names.
*
* This strategy sets the HTML as the default autoescaping strategy,
* but changes it based on the template name.
*
* Note that there is no runtime performance impact as the
* default autoescaping strategy is set at compilation time.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FileExtensionEscapingStrategy
{
/**
* Guesses the best autoescaping strategy based on the file name.
*
* @param string $name The template name
*
* @return string|false The escaping strategy name to use or false to
disable
*/
public static function guess($name)
{
if (\in_array(substr($name, -1), ['/', '\\']))
{
return 'html'; // return html for directories
}
if ('.twig' === substr($name, -5)) {
$name = substr($name, 0, -5);
}
$extension = pathinfo($name, PATHINFO_EXTENSION);
switch ($extension) {
case 'js':
return 'js';
case 'css':
return 'css';
case 'txt':
return false;
default:
return 'html';
}
}
}
class_alias('Twig\FileExtensionEscapingStrategy',
'Twig_FileExtensionEscapingStrategy');
PK���[z���dPdP
src/Lexer.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
/**
* Lexes a template string.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Lexer implements \Twig_LexerInterface
{
protected $tokens;
protected $code;
protected $cursor;
protected $lineno;
protected $end;
protected $state;
protected $states;
protected $brackets;
protected $env;
// to be renamed to $name in 2.0 (where it is private)
protected $filename;
protected $options;
protected $regexes;
protected $position;
protected $positions;
protected $currentVarBlockLine;
private $source;
const STATE_DATA = 0;
const STATE_BLOCK = 1;
const STATE_VAR = 2;
const STATE_STRING = 3;
const STATE_INTERPOLATION = 4;
const REGEX_NAME =
'/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A';
const REGEX_NUMBER =
'/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A';
const REGEX_STRING =
'/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As';
const REGEX_DQ_STRING_DELIM = '/"/A';
const REGEX_DQ_STRING_PART =
'/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As';
const PUNCTUATION = '()[]{}?:.,|';
public function __construct(Environment $env, array $options = [])
{
$this->env = $env;
$this->options = array_merge([
'tag_comment' => ['{#', '#}'],
'tag_block' => ['{%', '%}'],
'tag_variable' => ['{{',
'}}'],
'whitespace_trim' => '-',
'whitespace_line_trim' => '~',
'whitespace_line_chars' => ' \t\0\x0B',
'interpolation' => ['#{',
'}'],
], $options);
// when PHP 7.3 is the min version, we will be able to remove the
'#' part in preg_quote as it's part of the default
$this->regexes = [
// }}
'lex_var' => '{
\s*
(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1],
'#').'\s*'. // -}}\s*
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~}}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_variable'][1], '#').
// }}
')
}Ax',
// %}
'lex_block' => '{
\s*
(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1],
'#').'\s*\n?'. // -%}\s*\n?
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~%}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_block'][1],
'#').'\n?'. // %}\n?
')
}Ax',
// {% endverbatim %}
'lex_raw_data' => '{'.
preg_quote($this->options['tag_block'][0],
'#'). // {%
'('.
$this->options['whitespace_trim']. // -
'|'.
$this->options['whitespace_line_trim']. //
~
')?\s*'.
'(?:end%s)'. // endraw or endverbatim
'\s*'.
'(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1],
'#').'\s*'. // -%}
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~%}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_block'][1],
'#'). // %}
')
}sx',
'operator' => $this->getOperatorRegex(),
// #}
'lex_comment' => '{
(?:'.
preg_quote($this->options['whitespace_trim']).preg_quote($this->options['tag_comment'][1],
'#').'\s*\n?'. // -#}\s*\n?
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_comment'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~#}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_comment'][1],
'#').'\n?'. // #}\n?
')
}sx',
// verbatim %}
'lex_block_raw' => '{
\s*
(raw|verbatim)
\s*
(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1],
'#').'\s*'. // -%}\s*
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~%}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_block'][1],
'#'). // %}
')
}Asx',
'lex_block_line' =>
'{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1],
'#').'}As',
// {{ or {% or {#
'lex_tokens_start' => '{
('.
preg_quote($this->options['tag_variable'][0], '#').
// {{
'|'.
preg_quote($this->options['tag_block'][0],
'#'). // {%
'|'.
preg_quote($this->options['tag_comment'][0], '#').
// {#
')('.
preg_quote($this->options['whitespace_trim'], '#').
// -
'|'.
preg_quote($this->options['whitespace_line_trim'],
'#'). // ~
')?
}sx',
'interpolation_start' =>
'{'.preg_quote($this->options['interpolation'][0],
'#').'\s*}A',
'interpolation_end' =>
'{\s*'.preg_quote($this->options['interpolation'][1],
'#').'}A',
];
}
public function tokenize($code, $name = null)
{
if (!$code instanceof Source) {
@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);
$this->source = new Source($code, $name);
} else {
$this->source = $code;
}
if (((int) ini_get('mbstring.func_overload')) & 2) {
@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);
}
if (\function_exists('mb_internal_encoding') &&
((int) ini_get('mbstring.func_overload')) & 2) {
$mbEncoding = mb_internal_encoding();
mb_internal_encoding('ASCII');
} else {
$mbEncoding = null;
}
$this->code = str_replace(["\r\n", "\r"],
"\n", $this->source->getCode());
$this->filename = $this->source->getName();
$this->cursor = 0;
$this->lineno = 1;
$this->end = \strlen($this->code);
$this->tokens = [];
$this->state = self::STATE_DATA;
$this->states = [];
$this->brackets = [];
$this->position = -1;
// find all token starts in one go
preg_match_all($this->regexes['lex_tokens_start'],
$this->code, $matches, PREG_OFFSET_CAPTURE);
$this->positions = $matches;
while ($this->cursor < $this->end) {
// dispatch to the lexing functions depending
// on the current state
switch ($this->state) {
case self::STATE_DATA:
$this->lexData();
break;
case self::STATE_BLOCK:
$this->lexBlock();
break;
case self::STATE_VAR:
$this->lexVar();
break;
case self::STATE_STRING:
$this->lexString();
break;
case self::STATE_INTERPOLATION:
$this->lexInterpolation();
break;
}
}
$this->pushToken(Token::EOF_TYPE);
if (!empty($this->brackets)) {
list($expect, $lineno) = array_pop($this->brackets);
throw new SyntaxError(sprintf('Unclosed
"%s".', $expect), $lineno, $this->source);
}
if ($mbEncoding) {
mb_internal_encoding($mbEncoding);
}
return new TokenStream($this->tokens, $this->source);
}
protected function lexData()
{
// if no matches are left we return the rest of the template as
simple text token
if ($this->position == \count($this->positions[0]) - 1) {
$this->pushToken(Token::TEXT_TYPE, substr($this->code,
$this->cursor));
$this->cursor = $this->end;
return;
}
// Find the first token after the current cursor
$position = $this->positions[0][++$this->position];
while ($position[1] < $this->cursor) {
if ($this->position == \count($this->positions[0]) - 1) {
return;
}
$position = $this->positions[0][++$this->position];
}
// push the template text first
$text = $textContent = substr($this->code, $this->cursor,
$position[1] - $this->cursor);
// trim?
if (isset($this->positions[2][$this->position][0])) {
if ($this->options['whitespace_trim'] ===
$this->positions[2][$this->position][0]) {
// whitespace_trim detected ({%-, {{- or {#-)
$text = rtrim($text);
} elseif ($this->options['whitespace_line_trim']
=== $this->positions[2][$this->position][0]) {
// whitespace_line_trim detected ({%~, {{~ or {#~)
// don't trim \r and \n
$text = rtrim($text, " \t\0\x0B");
}
}
$this->pushToken(Token::TEXT_TYPE, $text);
$this->moveCursor($textContent.$position[0]);
switch ($this->positions[1][$this->position][0]) {
case $this->options['tag_comment'][0]:
$this->lexComment();
break;
case $this->options['tag_block'][0]:
// raw data?
if
(preg_match($this->regexes['lex_block_raw'], $this->code,
$match, 0, $this->cursor)) {
$this->moveCursor($match[0]);
$this->lexRawData($match[1]);
// {% line \d+ %}
} elseif
(preg_match($this->regexes['lex_block_line'], $this->code,
$match, 0, $this->cursor)) {
$this->moveCursor($match[0]);
$this->lineno = (int) $match[1];
} else {
$this->pushToken(Token::BLOCK_START_TYPE);
$this->pushState(self::STATE_BLOCK);
$this->currentVarBlockLine = $this->lineno;
}
break;
case $this->options['tag_variable'][0]:
$this->pushToken(Token::VAR_START_TYPE);
$this->pushState(self::STATE_VAR);
$this->currentVarBlockLine = $this->lineno;
break;
}
}
protected function lexBlock()
{
if (empty($this->brackets) &&
preg_match($this->regexes['lex_block'], $this->code,
$match, 0, $this->cursor)) {
$this->pushToken(Token::BLOCK_END_TYPE);
$this->moveCursor($match[0]);
$this->popState();
} else {
$this->lexExpression();
}
}
protected function lexVar()
{
if (empty($this->brackets) &&
preg_match($this->regexes['lex_var'], $this->code, $match,
0, $this->cursor)) {
$this->pushToken(Token::VAR_END_TYPE);
$this->moveCursor($match[0]);
$this->popState();
} else {
$this->lexExpression();
}
}
protected function lexExpression()
{
// whitespace
if (preg_match('/\s+/A', $this->code, $match, 0,
$this->cursor)) {
$this->moveCursor($match[0]);
if ($this->cursor >= $this->end) {
throw new SyntaxError(sprintf('Unclosed
"%s".', self::STATE_BLOCK === $this->state ?
'block' : 'variable'), $this->currentVarBlockLine,
$this->source);
}
}
// arrow function
if ('=' === $this->code[$this->cursor] &&
'>' === $this->code[$this->cursor + 1]) {
$this->pushToken(Token::ARROW_TYPE, '=>');
$this->moveCursor('=>');
}
// operators
elseif (preg_match($this->regexes['operator'],
$this->code, $match, 0, $this->cursor)) {
$this->pushToken(Token::OPERATOR_TYPE,
preg_replace('/\s+/', ' ', $match[0]));
$this->moveCursor($match[0]);
}
// names
elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0,
$this->cursor)) {
$this->pushToken(Token::NAME_TYPE, $match[0]);
$this->moveCursor($match[0]);
}
// numbers
elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0,
$this->cursor)) {
$number = (float) $match[0]; // floats
if (ctype_digit($match[0]) && $number <=
PHP_INT_MAX) {
$number = (int) $match[0]; // integers lower than the
maximum
}
$this->pushToken(Token::NUMBER_TYPE, $number);
$this->moveCursor($match[0]);
}
// punctuation
elseif (false !== strpos(self::PUNCTUATION,
$this->code[$this->cursor])) {
// opening bracket
if (false !== strpos('([{',
$this->code[$this->cursor])) {
$this->brackets[] = [$this->code[$this->cursor],
$this->lineno];
}
// closing bracket
elseif (false !== strpos(')]}',
$this->code[$this->cursor])) {
if (empty($this->brackets)) {
throw new SyntaxError(sprintf('Unexpected
"%s".', $this->code[$this->cursor]), $this->lineno,
$this->source);
}
list($expect, $lineno) = array_pop($this->brackets);
if ($this->code[$this->cursor] != strtr($expect,
'([{', ')]}')) {
throw new SyntaxError(sprintf('Unclosed
"%s".', $expect), $lineno, $this->source);
}
}
$this->pushToken(Token::PUNCTUATION_TYPE,
$this->code[$this->cursor]);
++$this->cursor;
}
// strings
elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0,
$this->cursor)) {
$this->pushToken(Token::STRING_TYPE,
stripcslashes(substr($match[0], 1, -1)));
$this->moveCursor($match[0]);
}
// opening double quoted string
elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code,
$match, 0, $this->cursor)) {
$this->brackets[] = ['"', $this->lineno];
$this->pushState(self::STATE_STRING);
$this->moveCursor($match[0]);
}
// unlexable
else {
throw new SyntaxError(sprintf('Unexpected character
"%s".', $this->code[$this->cursor]), $this->lineno,
$this->source);
}
}
protected function lexRawData($tag)
{
if ('raw' === $tag) {
@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);
}
if (!preg_match(str_replace('%s', $tag,
$this->regexes['lex_raw_data']), $this->code, $match,
PREG_OFFSET_CAPTURE, $this->cursor)) {
throw new SyntaxError(sprintf('Unexpected end of file:
Unclosed "%s" block.', $tag), $this->lineno,
$this->source);
}
$text = substr($this->code, $this->cursor, $match[0][1] -
$this->cursor);
$this->moveCursor($text.$match[0][0]);
// trim?
if (isset($match[1][0])) {
if ($this->options['whitespace_trim'] ===
$match[1][0]) {
// whitespace_trim detected ({%-, {{- or {#-)
$text = rtrim($text);
} else {
// whitespace_line_trim detected ({%~, {{~ or {#~)
// don't trim \r and \n
$text = rtrim($text, " \t\0\x0B");
}
}
$this->pushToken(Token::TEXT_TYPE, $text);
}
protected function lexComment()
{
if (!preg_match($this->regexes['lex_comment'],
$this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
throw new SyntaxError('Unclosed comment.',
$this->lineno, $this->source);
}
$this->moveCursor(substr($this->code, $this->cursor,
$match[0][1] - $this->cursor).$match[0][0]);
}
protected function lexString()
{
if (preg_match($this->regexes['interpolation_start'],
$this->code, $match, 0, $this->cursor)) {
$this->brackets[] =
[$this->options['interpolation'][0], $this->lineno];
$this->pushToken(Token::INTERPOLATION_START_TYPE);
$this->moveCursor($match[0]);
$this->pushState(self::STATE_INTERPOLATION);
} elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code,
$match, 0, $this->cursor) && \strlen($match[0]) > 0) {
$this->pushToken(Token::STRING_TYPE,
stripcslashes($match[0]));
$this->moveCursor($match[0]);
} elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code,
$match, 0, $this->cursor)) {
list($expect, $lineno) = array_pop($this->brackets);
if ('"' != $this->code[$this->cursor]) {
throw new SyntaxError(sprintf('Unclosed
"%s".', $expect), $lineno, $this->source);
}
$this->popState();
++$this->cursor;
} else {
// unlexable
throw new SyntaxError(sprintf('Unexpected character
"%s".', $this->code[$this->cursor]), $this->lineno,
$this->source);
}
}
protected function lexInterpolation()
{
$bracket = end($this->brackets);
if ($this->options['interpolation'][0] === $bracket[0]
&& preg_match($this->regexes['interpolation_end'],
$this->code, $match, 0, $this->cursor)) {
array_pop($this->brackets);
$this->pushToken(Token::INTERPOLATION_END_TYPE);
$this->moveCursor($match[0]);
$this->popState();
} else {
$this->lexExpression();
}
}
protected function pushToken($type, $value = '')
{
// do not push empty text tokens
if (Token::TEXT_TYPE === $type && '' === $value)
{
return;
}
$this->tokens[] = new Token($type, $value, $this->lineno);
}
protected function moveCursor($text)
{
$this->cursor += \strlen($text);
$this->lineno += substr_count($text, "\n");
}
protected function getOperatorRegex()
{
$operators = array_merge(
['='],
array_keys($this->env->getUnaryOperators()),
array_keys($this->env->getBinaryOperators())
);
$operators = array_combine($operators,
array_map('strlen', $operators));
arsort($operators);
$regex = [];
foreach ($operators as $operator => $length) {
// an operator that ends with a character must be followed by
// a whitespace or a parenthesis
if (ctype_alpha($operator[$length - 1])) {
$r = preg_quote($operator,
'/').'(?=[\s()])';
} else {
$r = preg_quote($operator, '/');
}
// an operator with a space can be any amount of whitespaces
$r = preg_replace('/\s+/', '\s+', $r);
$regex[] = $r;
}
return '/'.implode('|', $regex).'/A';
}
protected function pushState($state)
{
$this->states[] = $this->state;
$this->state = $state;
}
protected function popState()
{
if (0 === \count($this->states)) {
throw new \LogicException('Cannot pop state without a
previous state.');
}
$this->state = array_pop($this->states);
}
}
class_alias('Twig\Lexer', 'Twig_Lexer');
PK���[�i��
�
src/Loader/ArrayLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Loads a template from an array.
*
* When using this loader with a cache mechanism, you should know that a
new cache
* key is generated each time a template content "changes" (the
cache key being the
* source code of the template). If you don't want to see your cache
grows out of
* control, you need to take care of clearing the old cache file by
yourself.
*
* This loader should only be used for unit testing.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ArrayLoader implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
protected $templates = [];
/**
* @param array $templates An array of templates (keys are the names,
and values are the source code)
*/
public function __construct(array $templates = [])
{
$this->templates = $templates;
}
/**
* Adds or overrides a template.
*
* @param string $name The template name
* @param string $template The template source
*/
public function setTemplate($name, $template)
{
$this->templates[(string) $name] = $template;
}
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return $this->templates[$name];
}
public function getSourceContext($name)
{
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return new Source($this->templates[$name], $name);
}
public function exists($name)
{
return isset($this->templates[(string) $name]);
}
public function getCacheKey($name)
{
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return $name.':'.$this->templates[$name];
}
public function isFresh($name, $time)
{
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return true;
}
}
class_alias('Twig\Loader\ArrayLoader',
'Twig_Loader_Array');
PK���[]�O9))src/Loader/ChainLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Loads templates from other loaders.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ChainLoader implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
private $hasSourceCache = [];
protected $loaders = [];
/**
* @param LoaderInterface[] $loaders
*/
public function __construct(array $loaders = [])
{
foreach ($loaders as $loader) {
$this->addLoader($loader);
}
}
public function addLoader(LoaderInterface $loader)
{
$this->loaders[] = $loader;
$this->hasSourceCache = [];
}
/**
* @return LoaderInterface[]
*/
public function getLoaders()
{
return $this->loaders;
}
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
return $loader->getSource($name);
} catch (LoaderError $e) {
$exceptions[] = $e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
public function getSourceContext($name)
{
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
if ($loader instanceof SourceContextLoaderInterface) {
return $loader->getSourceContext($name);
}
return new Source($loader->getSource($name), $name);
} catch (LoaderError $e) {
$exceptions[] = $e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
public function exists($name)
{
$name = (string) $name;
if (isset($this->hasSourceCache[$name])) {
return $this->hasSourceCache[$name];
}
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface) {
if ($loader->exists($name)) {
return $this->hasSourceCache[$name] = true;
}
continue;
}
try {
if ($loader instanceof SourceContextLoaderInterface) {
$loader->getSourceContext($name);
} else {
$loader->getSource($name);
}
return $this->hasSourceCache[$name] = true;
} catch (LoaderError $e) {
}
}
return $this->hasSourceCache[$name] = false;
}
public function getCacheKey($name)
{
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
return $loader->getCacheKey($name);
} catch (LoaderError $e) {
$exceptions[] = \get_class($loader).':
'.$e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
public function isFresh($name, $time)
{
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
return $loader->isFresh($name, $time);
} catch (LoaderError $e) {
$exceptions[] = \get_class($loader).':
'.$e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
}
class_alias('Twig\Loader\ChainLoader',
'Twig_Loader_Chain');
PK���[vH$src/Loader/ExistsLoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
/**
* Adds an exists() method for loaders.
*
* @author Florin Patan <florinpatan@gmail.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface ExistsLoaderInterface
{
/**
* Check if we have the source code of a template, given its name.
*
* @param string $name The name of the template to check if we can load
*
* @return bool If the template source code is handled by this loader
or not
*/
public function exists($name);
}
class_alias('Twig\Loader\ExistsLoaderInterface',
'Twig_ExistsLoaderInterface');
PK���[�(��$�$src/Loader/FilesystemLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Loads template from the filesystem.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
/** Identifier of the main namespace. */
const MAIN_NAMESPACE = '__main__';
protected $paths = [];
protected $cache = [];
protected $errorCache = [];
private $rootPath;
/**
* @param string|array $paths A path or an array of paths where to
look for templates
* @param string|null $rootPath The root path common to all relative
paths (null for getcwd())
*/
public function __construct($paths = [], $rootPath = null)
{
$this->rootPath = (null === $rootPath ? getcwd() :
$rootPath).\DIRECTORY_SEPARATOR;
if (false !== $realPath = realpath($rootPath)) {
$this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
}
if ($paths) {
$this->setPaths($paths);
}
}
/**
* Returns the paths to the templates.
*
* @param string $namespace A path namespace
*
* @return array The array of paths where to look for templates
*/
public function getPaths($namespace = self::MAIN_NAMESPACE)
{
return isset($this->paths[$namespace]) ?
$this->paths[$namespace] : [];
}
/**
* Returns the path namespaces.
*
* The main namespace is always defined.
*
* @return array The array of defined namespaces
*/
public function getNamespaces()
{
return array_keys($this->paths);
}
/**
* Sets the paths where templates are stored.
*
* @param string|array $paths A path or an array of paths where to
look for templates
* @param string $namespace A path namespace
*/
public function setPaths($paths, $namespace = self::MAIN_NAMESPACE)
{
if (!\is_array($paths)) {
$paths = [$paths];
}
$this->paths[$namespace] = [];
foreach ($paths as $path) {
$this->addPath($path, $namespace);
}
}
/**
* Adds a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace A path namespace
*
* @throws LoaderError
*/
public function addPath($path, $namespace = self::MAIN_NAMESPACE)
{
// invalidate the cache
$this->cache = $this->errorCache = [];
$checkPath = $this->isAbsolutePath($path) ? $path :
$this->rootPath.$path;
if (!is_dir($checkPath)) {
throw new LoaderError(sprintf('The "%s"
directory does not exist ("%s").', $path, $checkPath));
}
$this->paths[$namespace][] = rtrim($path, '/\\');
}
/**
* Prepends a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace A path namespace
*
* @throws LoaderError
*/
public function prependPath($path, $namespace = self::MAIN_NAMESPACE)
{
// invalidate the cache
$this->cache = $this->errorCache = [];
$checkPath = $this->isAbsolutePath($path) ? $path :
$this->rootPath.$path;
if (!is_dir($checkPath)) {
throw new LoaderError(sprintf('The "%s"
directory does not exist ("%s").', $path, $checkPath));
}
$path = rtrim($path, '/\\');
if (!isset($this->paths[$namespace])) {
$this->paths[$namespace][] = $path;
} else {
array_unshift($this->paths[$namespace], $path);
}
}
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return '';
}
return file_get_contents($path);
}
public function getSourceContext($name)
{
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return new Source('', $name, '');
}
return new Source(file_get_contents($path), $name, $path);
}
public function getCacheKey($name)
{
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return '';
}
$len = \strlen($this->rootPath);
if (0 === strncmp($this->rootPath, $path, $len)) {
return substr($path, $len);
}
return $path;
}
public function exists($name)
{
$name = $this->normalizeName($name);
if (isset($this->cache[$name])) {
return true;
}
try {
return null !== ($path = $this->findTemplate($name, false))
&& false !== $path;
} catch (LoaderError $e) {
@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.', \get_class($this)),
E_USER_DEPRECATED);
return false;
}
}
public function isFresh($name, $time)
{
// false support to be removed in 3.0
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return false;
}
return filemtime($path) < $time;
}
/**
* Checks if the template can be found.
*
* @param string $name The template name
*
* @return string|false|null The template name or false/null
*/
protected function findTemplate($name)
{
$throw = \func_num_args() > 1 ? func_get_arg(1) : true;
$name = $this->normalizeName($name);
if (isset($this->cache[$name])) {
return $this->cache[$name];
}
if (isset($this->errorCache[$name])) {
if (!$throw) {
return false;
}
throw new LoaderError($this->errorCache[$name]);
}
try {
$this->validateName($name);
list($namespace, $shortname) = $this->parseName($name);
} catch (LoaderError $e) {
if (!$throw) {
return false;
}
throw $e;
}
if (!isset($this->paths[$namespace])) {
$this->errorCache[$name] = sprintf('There are no
registered paths for namespace "%s".', $namespace);
if (!$throw) {
return false;
}
throw new LoaderError($this->errorCache[$name]);
}
foreach ($this->paths[$namespace] as $path) {
if (!$this->isAbsolutePath($path)) {
$path = $this->rootPath.$path;
}
if (is_file($path.'/'.$shortname)) {
if (false !== $realpath =
realpath($path.'/'.$shortname)) {
return $this->cache[$name] = $realpath;
}
return $this->cache[$name] =
$path.'/'.$shortname;
}
}
$this->errorCache[$name] = sprintf('Unable to find template
"%s" (looked into: %s).', $name, implode(', ',
$this->paths[$namespace]));
if (!$throw) {
return false;
}
throw new LoaderError($this->errorCache[$name]);
}
protected function parseName($name, $default = self::MAIN_NAMESPACE)
{
if (isset($name[0]) && '@' == $name[0]) {
if (false === $pos = strpos($name, '/')) {
throw new LoaderError(sprintf('Malformed namespaced
template name "%s" (expecting
"@namespace/template_name").', $name));
}
$namespace = substr($name, 1, $pos - 1);
$shortname = substr($name, $pos + 1);
return [$namespace, $shortname];
}
return [$default, $name];
}
protected function normalizeName($name)
{
return preg_replace('#/{2,}#', '/',
str_replace('\\', '/', (string) $name));
}
protected function validateName($name)
{
if (false !== strpos($name, "\0")) {
throw new LoaderError('A template name cannot contain NUL
bytes.');
}
$name = ltrim($name, '/');
$parts = explode('/', $name);
$level = 0;
foreach ($parts as $part) {
if ('..' === $part) {
--$level;
} elseif ('.' !== $part) {
++$level;
}
if ($level < 0) {
throw new LoaderError(sprintf('Looks like you try to
load a template outside configured directories (%s).', $name));
}
}
}
private function isAbsolutePath($file)
{
return strspn($file, '/\\', 0, 1)
|| (\strlen($file) > 3 && ctype_alpha($file[0])
&& ':' === substr($file, 1, 1)
&& strspn($file, '/\\', 2, 1)
)
|| null !== parse_url($file, PHP_URL_SCHEME)
;
}
}
class_alias('Twig\Loader\FilesystemLoader',
'Twig_Loader_Filesystem');
PK���[O(�##src/Loader/LoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
/**
* Interface all loaders must implement.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface LoaderInterface
{
/**
* Gets the source code of a template, given its name.
*
* @param string $name The name of the template to load
*
* @return string The template source code
*
* @throws LoaderError When $name is not found
*
* @deprecated since 1.27 (to be removed in 2.0), implement
Twig\Loader\SourceContextLoaderInterface
*/
public function getSource($name);
/**
* Gets the cache key to use for the cache for a given template name.
*
* @param string $name The name of the template to load
*
* @return string The cache key
*
* @throws LoaderError When $name is not found
*/
public function getCacheKey($name);
/**
* Returns true if the template is still fresh.
*
* @param string $name The template name
* @param int $time Timestamp of the last modification time of the
* cached template
*
* @return bool true if the template is fresh, false otherwise
*
* @throws LoaderError When $name is not found
*/
public function isFresh($name, $time);
}
class_alias('Twig\Loader\LoaderInterface',
'Twig_LoaderInterface');
PK���[0ӗPP+src/Loader/SourceContextLoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Adds a getSourceContext() method for loaders.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.27 (to be removed in 3.0)
*/
interface SourceContextLoaderInterface
{
/**
* Returns the source context for a given template logical name.
*
* @param string $name The template logical name
*
* @return Source
*
* @throws LoaderError When $name is not found
*/
public function getSourceContext($name);
}
class_alias('Twig\Loader\SourceContextLoaderInterface',
'Twig_SourceContextLoaderInterface');
PK���[��Rh22src/Markup.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Marks a content as safe.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Markup implements \Countable
{
protected $content;
protected $charset;
public function __construct($content, $charset)
{
$this->content = (string) $content;
$this->charset = $charset;
}
public function __toString()
{
return $this->content;
}
public function count()
{
return \function_exists('mb_get_info') ?
mb_strlen($this->content, $this->charset) :
\strlen($this->content);
}
}
class_alias('Twig\Markup', 'Twig_Markup');
PK���[鉅���src/Node/AutoEscapeNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents an autoescape node.
*
* The value is the escaping strategy (can be html, js, ...)
*
* The true value is equivalent to html.
*
* If autoescaping is disabled, then the value is false.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class AutoEscapeNode extends Node
{
public function __construct($value, \Twig_NodeInterface $body, $lineno,
$tag = 'autoescape')
{
parent::__construct(['body' => $body],
['value' => $value], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->subcompile($this->getNode('body'));
}
}
class_alias('Twig\Node\AutoEscapeNode',
'Twig_Node_AutoEscape');
PK���[���src/Node/BlockNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a block node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BlockNode extends Node
{
public function __construct($name, \Twig_NodeInterface $body, $lineno,
$tag = null)
{
parent::__construct(['body' => $body],
['name' => $name], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write(sprintf("public function block_%s(\$context,
array \$blocks = [])\n", $this->getAttribute('name')),
"{\n")
->indent()
;
$compiler
->subcompile($this->getNode('body'))
->outdent()
->write("}\n\n")
;
}
}
class_alias('Twig\Node\BlockNode', 'Twig_Node_Block');
PK���[���qqsrc/Node/BlockReferenceNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a block call node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BlockReferenceNode extends Node implements NodeOutputInterface
{
public function __construct($name, $lineno, $tag = null)
{
parent::__construct([], ['name' => $name], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write(sprintf("\$this->displayBlock('%s', \$context,
\$blocks);\n", $this->getAttribute('name')))
;
}
}
class_alias('Twig\Node\BlockReferenceNode',
'Twig_Node_BlockReference');
PK���[_c����src/Node/BodyNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
/**
* Represents a body node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BodyNode extends Node
{
}
class_alias('Twig\Node\BodyNode', 'Twig_Node_Body');
PK���[���src/Node/CheckSecurityNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class CheckSecurityNode extends Node
{
protected $usedFilters;
protected $usedTags;
protected $usedFunctions;
public function __construct(array $usedFilters, array $usedTags, array
$usedFunctions)
{
$this->usedFilters = $usedFilters;
$this->usedTags = $usedTags;
$this->usedFunctions = $usedFunctions;
parent::__construct();
}
public function compile(Compiler $compiler)
{
$tags = $filters = $functions = [];
foreach (['tags', 'filters',
'functions'] as $type) {
foreach ($this->{'used'.ucfirst($type)} as $name
=> $node) {
if ($node instanceof Node) {
${$type}[$name] = $node->getTemplateLine();
} else {
${$type}[$node] = null;
}
}
}
$compiler
->write("\$this->sandbox =
\$this->env->getExtension('\Twig\Extension\SandboxExtension');\n")
->write('$tags =
')->repr(array_filter($tags))->raw(";\n")
->write('$filters =
')->repr(array_filter($filters))->raw(";\n")
->write('$functions =
')->repr(array_filter($functions))->raw(";\n\n")
->write("try {\n")
->indent()
->write("\$this->sandbox->checkSecurity(\n")
->indent()
->write(!$tags ? "[],\n" :
"['".implode("', '",
array_keys($tags))."'],\n")
->write(!$filters ? "[],\n" :
"['".implode("', '",
array_keys($filters))."'],\n")
->write(!$functions ? "[]\n" :
"['".implode("', '",
array_keys($functions))."']\n")
->outdent()
->write(");\n")
->outdent()
->write("} catch (SecurityError \$e) {\n")
->indent()
->write("\$e->setSourceContext(\$this->getSourceContext());\n\n")
->write("if (\$e instanceof SecurityNotAllowedTagError
&& isset(\$tags[\$e->getTagName()])) {\n")
->indent()
->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n")
->outdent()
->write("} elseif (\$e instanceof
SecurityNotAllowedFilterError &&
isset(\$filters[\$e->getFilterName()])) {\n")
->indent()
->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n")
->outdent()
->write("} elseif (\$e instanceof
SecurityNotAllowedFunctionError &&
isset(\$functions[\$e->getFunctionName()])) {\n")
->indent()
->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n")
->outdent()
->write("}\n\n")
->write("throw \$e;\n")
->outdent()
->write("}\n\n")
;
}
}
class_alias('Twig\Node\CheckSecurityNode',
'Twig_Node_CheckSecurity');
PK���[� N�sssrc/Node/CheckToStringNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Checks if casting an expression to __toString() is allowed by the
sandbox.
*
* For instance, when there is a simple Print statement, like {{ article
}},
* and if the sandbox is enabled, we need to check that the __toString()
* method is allowed if 'article' is an object. The same goes for
{{ article|upper }}
* or {{ random(article) }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class CheckToStringNode extends AbstractExpression
{
public function __construct(AbstractExpression $expr)
{
parent::__construct(['expr' => $expr], [],
$expr->getTemplateLine(), $expr->getNodeTag());
}
public function compile(Compiler $compiler)
{
$compiler
->raw('$this->sandbox->ensureToStringAllowed(')
->subcompile($this->getNode('expr'))
->raw(')')
;
}
}
PK���[qS��src/Node/DeprecatedNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ConstantExpression;
/**
* Represents a deprecated node.
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
*/
class DeprecatedNode extends Node
{
public function __construct(AbstractExpression $expr, $lineno, $tag =
null)
{
parent::__construct(['expr' => $expr], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
$expr = $this->getNode('expr');
if ($expr instanceof ConstantExpression) {
$compiler->write('@trigger_error(')
->subcompile($expr);
} else {
$varName = $compiler->getVarName();
$compiler->write(sprintf('$%s = ', $varName))
->subcompile($expr)
->raw(";\n")
->write(sprintf('@trigger_error($%s',
$varName));
}
$compiler
->raw('.')
->string(sprintf(' ("%s" at line %d).',
$this->getTemplateName(), $this->getTemplateLine()))
->raw(", E_USER_DEPRECATED);\n")
;
}
}
class_alias('Twig\Node\DeprecatedNode',
'Twig_Node_Deprecated');
PK���[���BBsrc/Node/DoNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Represents a do node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DoNode extends Node
{
public function __construct(AbstractExpression $expr, $lineno, $tag =
null)
{
parent::__construct(['expr' => $expr], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('')
->subcompile($this->getNode('expr'))
->raw(";\n")
;
}
}
class_alias('Twig\Node\DoNode', 'Twig_Node_Do');
PK���[;�h!
src/Node/EmbedNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ConstantExpression;
/**
* Represents an embed node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EmbedNode extends IncludeNode
{
// we don't inject the module to avoid node visitors to traverse
it twice (as it will be already visited in the main module)
public function __construct($name, $index, AbstractExpression
$variables = null, $only = false, $ignoreMissing = false, $lineno, $tag =
null)
{
parent::__construct(new ConstantExpression('not_used',
$lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
$this->setAttribute('name', $name);
// to be removed in 2.0, used name instead
$this->setAttribute('filename', $name);
$this->setAttribute('index', $index);
}
protected function addGetTemplate(Compiler $compiler)
{
$compiler
->write('$this->loadTemplate(')
->string($this->getAttribute('name'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(', ')
->string($this->getAttribute('index'))
->raw(')')
;
}
}
class_alias('Twig\Node\EmbedNode', 'Twig_Node_Embed');
PK���[��*src/Node/Expression/AbstractExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Node\Node;
/**
* Abstract class for all nodes that represents an expression.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class AbstractExpression extends Node
{
}
class_alias('Twig\Node\Expression\AbstractExpression',
'Twig_Node_Expression');
PK���[�:
'src/Node/Expression/ArrayExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class ArrayExpression extends AbstractExpression
{
protected $index;
public function __construct(array $elements, $lineno)
{
parent::__construct($elements, [], $lineno);
$this->index = -1;
foreach ($this->getKeyValuePairs() as $pair) {
if ($pair['key'] instanceof ConstantExpression
&& ctype_digit((string)
$pair['key']->getAttribute('value')) &&
$pair['key']->getAttribute('value') >
$this->index) {
$this->index =
$pair['key']->getAttribute('value');
}
}
}
public function getKeyValuePairs()
{
$pairs = [];
foreach (array_chunk($this->nodes, 2) as $pair) {
$pairs[] = [
'key' => $pair[0],
'value' => $pair[1],
];
}
return $pairs;
}
public function hasElement(AbstractExpression $key)
{
foreach ($this->getKeyValuePairs() as $pair) {
// we compare the string representation of the keys
// to avoid comparing the line numbers which are not relevant
here.
if ((string) $key === (string) $pair['key']) {
return true;
}
}
return false;
}
public function addElement(AbstractExpression $value,
AbstractExpression $key = null)
{
if (null === $key) {
$key = new ConstantExpression(++$this->index,
$value->getTemplateLine());
}
array_push($this->nodes, $key, $value);
}
public function compile(Compiler $compiler)
{
$compiler->raw('[');
$first = true;
foreach ($this->getKeyValuePairs() as $pair) {
if (!$first) {
$compiler->raw(', ');
}
$first = false;
$compiler
->subcompile($pair['key'])
->raw(' => ')
->subcompile($pair['value'])
;
}
$compiler->raw(']');
}
}
class_alias('Twig\Node\Expression\ArrayExpression',
'Twig_Node_Expression_Array');
PK���[���(/src/Node/Expression/ArrowFunctionExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents an arrow function.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ArrowFunctionExpression extends AbstractExpression
{
public function __construct(AbstractExpression $expr, Node $names,
$lineno, $tag = null)
{
parent::__construct(['expr' => $expr,
'names' => $names], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->raw('function (')
;
foreach ($this->getNode('names') as $i => $name) {
if ($i) {
$compiler->raw(', ');
}
$compiler
->raw('$__')
->raw($name->getAttribute('name'))
->raw('__')
;
}
$compiler
->raw(') use ($context) { ')
;
foreach ($this->getNode('names') as $name) {
$compiler
->raw('$context["')
->raw($name->getAttribute('name'))
->raw('"] = $__')
->raw($name->getAttribute('name'))
->raw('__; ')
;
}
$compiler
->raw('return ')
->subcompile($this->getNode('expr'))
->raw('; }')
;
}
}
PK���[�07Hii,src/Node/Expression/AssignNameExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class AssignNameExpression extends NameExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('$context[')
->string($this->getAttribute('name'))
->raw(']')
;
}
}
class_alias('Twig\Node\Expression\AssignNameExpression',
'Twig_Node_Expression_AssignName');
PK���[rXe11-src/Node/Expression/Binary/AbstractBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
abstract class AbstractBinary extends AbstractExpression
{
public function __construct(\Twig_NodeInterface $left,
\Twig_NodeInterface $right, $lineno)
{
parent::__construct(['left' => $left,
'right' => $right], [], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('left'))
->raw(' ')
;
$this->operator($compiler);
$compiler
->raw(' ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
abstract public function operator(Compiler $compiler);
}
class_alias('Twig\Node\Expression\Binary\AbstractBinary',
'Twig_Node_Expression_Binary');
PK���[vr(src/Node/Expression/Binary/AddBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class AddBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('+');
}
}
class_alias('Twig\Node\Expression\Binary\AddBinary',
'Twig_Node_Expression_Binary_Add');
PK���[�r}�(src/Node/Expression/Binary/AndBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class AndBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('&&');
}
}
class_alias('Twig\Node\Expression\Binary\AndBinary',
'Twig_Node_Expression_Binary_And');
PK���[n(�/src/Node/Expression/Binary/BitwiseAndBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class BitwiseAndBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('&');
}
}
class_alias('Twig\Node\Expression\Binary\BitwiseAndBinary',
'Twig_Node_Expression_Binary_BitwiseAnd');
PK���[��.src/Node/Expression/Binary/BitwiseOrBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class BitwiseOrBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('|');
}
}
class_alias('Twig\Node\Expression\Binary\BitwiseOrBinary',
'Twig_Node_Expression_Binary_BitwiseOr');
PK���[�Y�W/src/Node/Expression/Binary/BitwiseXorBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class BitwiseXorBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('^');
}
}
class_alias('Twig\Node\Expression\Binary\BitwiseXorBinary',
'Twig_Node_Expression_Binary_BitwiseXor');
PK���[���+src/Node/Expression/Binary/ConcatBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class ConcatBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('.');
}
}
class_alias('Twig\Node\Expression\Binary\ConcatBinary',
'Twig_Node_Expression_Binary_Concat');
PK���[4ֽD(src/Node/Expression/Binary/DivBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class DivBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('/');
}
}
class_alias('Twig\Node\Expression\Binary\DivBinary',
'Twig_Node_Expression_Binary_Div');
PK���[�����-src/Node/Expression/Binary/EndsWithBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class EndsWithBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$left = $compiler->getVarName();
$right = $compiler->getVarName();
$compiler
->raw(sprintf('(is_string($%s = ', $left))
->subcompile($this->getNode('left'))
->raw(sprintf(') && is_string($%s = ',
$right))
->subcompile($this->getNode('right'))
->raw(sprintf(') && (\'\' === $%2$s
|| $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right))
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('');
}
}
class_alias('Twig\Node\Expression\Binary\EndsWithBinary',
'Twig_Node_Expression_Binary_EndsWith');
PK���[oI����*src/Node/Expression/Binary/EqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class EqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('==');
}
}
class_alias('Twig\Node\Expression\Binary\EqualBinary',
'Twig_Node_Expression_Binary_Equal');
PK���[�'�)��-src/Node/Expression/Binary/FloorDivBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class FloorDivBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler->raw('(int) floor(');
parent::compile($compiler);
$compiler->raw(')');
}
public function operator(Compiler $compiler)
{
return $compiler->raw('/');
}
}
class_alias('Twig\Node\Expression\Binary\FloorDivBinary',
'Twig_Node_Expression_Binary_FloorDiv');
PK���[���,src/Node/Expression/Binary/GreaterBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class GreaterBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('>');
}
}
class_alias('Twig\Node\Expression\Binary\GreaterBinary',
'Twig_Node_Expression_Binary_Greater');
PK���[Lt1t1src/Node/Expression/Binary/GreaterEqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class GreaterEqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('>=');
}
}
class_alias('Twig\Node\Expression\Binary\GreaterEqualBinary',
'Twig_Node_Expression_Binary_GreaterEqual');
PK���[���'��'src/Node/Expression/Binary/InBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class InBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('twig_in_filter(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('in');
}
}
class_alias('Twig\Node\Expression\Binary\InBinary',
'Twig_Node_Expression_Binary_In');
PK���[�o#��)src/Node/Expression/Binary/LessBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class LessBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('<');
}
}
class_alias('Twig\Node\Expression\Binary\LessBinary',
'Twig_Node_Expression_Binary_Less');
PK���[םz��.src/Node/Expression/Binary/LessEqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class LessEqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('<=');
}
}
class_alias('Twig\Node\Expression\Binary\LessEqualBinary',
'Twig_Node_Expression_Binary_LessEqual');
PK���[L[��,src/Node/Expression/Binary/MatchesBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class MatchesBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('preg_match(')
->subcompile($this->getNode('right'))
->raw(', ')
->subcompile($this->getNode('left'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('');
}
}
class_alias('Twig\Node\Expression\Binary\MatchesBinary',
'Twig_Node_Expression_Binary_Matches');
PK���[�>Ӗ(src/Node/Expression/Binary/ModBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class ModBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('%');
}
}
class_alias('Twig\Node\Expression\Binary\ModBinary',
'Twig_Node_Expression_Binary_Mod');
PK���[51�(src/Node/Expression/Binary/MulBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class MulBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('*');
}
}
class_alias('Twig\Node\Expression\Binary\MulBinary',
'Twig_Node_Expression_Binary_Mul');
PK���[��H���-src/Node/Expression/Binary/NotEqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class NotEqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('!=');
}
}
class_alias('Twig\Node\Expression\Binary\NotEqualBinary',
'Twig_Node_Expression_Binary_NotEqual');
PK���[>�K*src/Node/Expression/Binary/NotInBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class NotInBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('!twig_in_filter(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('not in');
}
}
class_alias('Twig\Node\Expression\Binary\NotInBinary',
'Twig_Node_Expression_Binary_NotIn');
PK���[�ך'src/Node/Expression/Binary/OrBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class OrBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('||');
}
}
class_alias('Twig\Node\Expression\Binary\OrBinary',
'Twig_Node_Expression_Binary_Or');
PK���[6�TZZ*src/Node/Expression/Binary/PowerBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class PowerBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
if (\PHP_VERSION_ID >= 50600) {
return parent::compile($compiler);
}
$compiler
->raw('pow(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('**');
}
}
class_alias('Twig\Node\Expression\Binary\PowerBinary',
'Twig_Node_Expression_Binary_Power');
PK���[��j���*src/Node/Expression/Binary/RangeBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class RangeBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('range(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('..');
}
}
class_alias('Twig\Node\Expression\Binary\RangeBinary',
'Twig_Node_Expression_Binary_Range');
PK���[f����/src/Node/Expression/Binary/StartsWithBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class StartsWithBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$left = $compiler->getVarName();
$right = $compiler->getVarName();
$compiler
->raw(sprintf('(is_string($%s = ', $left))
->subcompile($this->getNode('left'))
->raw(sprintf(') && is_string($%s = ',
$right))
->subcompile($this->getNode('right'))
->raw(sprintf(') && (\'\' === $%2$s
|| 0 === strpos($%1$s, $%2$s)))', $left, $right))
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('');
}
}
class_alias('Twig\Node\Expression\Binary\StartsWithBinary',
'Twig_Node_Expression_Binary_StartsWith');
PK���[�4�(src/Node/Expression/Binary/SubBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class SubBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('-');
}
}
class_alias('Twig\Node\Expression\Binary\SubBinary',
'Twig_Node_Expression_Binary_Sub');
PK���[�H�
�
0src/Node/Expression/BlockReferenceExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents a block call node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BlockReferenceExpression extends AbstractExpression
{
/**
* @param Node|null $template
*/
public function __construct(\Twig_NodeInterface $name, $template =
null, $lineno, $tag = null)
{
if (\is_bool($template)) {
@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);
$template = null;
}
$nodes = ['name' => $name];
if (null !== $template) {
$nodes['template'] = $template;
}
parent::__construct($nodes, ['is_defined_test' =>
false, 'output' => false], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('is_defined_test')) {
$this->compileTemplateCall($compiler, 'hasBlock');
} else {
if ($this->getAttribute('output')) {
$compiler->addDebugInfo($this);
$this
->compileTemplateCall($compiler,
'displayBlock')
->raw(";\n");
} else {
$this->compileTemplateCall($compiler,
'renderBlock');
}
}
}
private function compileTemplateCall(Compiler $compiler, $method)
{
if (!$this->hasNode('template')) {
$compiler->write('$this');
} else {
$compiler
->write('$this->loadTemplate(')
->subcompile($this->getNode('template'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(')')
;
}
$compiler->raw(sprintf('->%s', $method));
$this->compileBlockArguments($compiler);
return $compiler;
}
private function compileBlockArguments(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('name'))
->raw(', $context');
if (!$this->hasNode('template')) {
$compiler->raw(', $blocks');
}
return $compiler->raw(')');
}
}
class_alias('Twig\Node\Expression\BlockReferenceExpression',
'Twig_Node_Expression_BlockReference');
PK���[�sa��-�-&src/Node/Expression/CallExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Error\SyntaxError;
use Twig\Extension\ExtensionInterface;
use Twig\Node\Node;
abstract class CallExpression extends AbstractExpression
{
private $reflector;
protected function compileCallable(Compiler $compiler)
{
$closingParenthesis = false;
$isArray = false;
if ($this->hasAttribute('callable') &&
$callable = $this->getAttribute('callable')) {
if (\is_string($callable) && false ===
strpos($callable, '::')) {
$compiler->raw($callable);
} else {
list($r, $callable) = $this->reflectCallable($callable);
if ($r instanceof \ReflectionMethod &&
\is_string($callable[0])) {
if ($r->isStatic()) {
$compiler->raw(sprintf('%s::%s',
$callable[0], $callable[1]));
} else {
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s',
$callable[0], $callable[1]));
}
} elseif ($r instanceof \ReflectionMethod &&
$callable[0] instanceof ExtensionInterface) {
$compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($callable[0]), $callable[1]));
} else {
$type =
ucfirst($this->getAttribute('type'));
$compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(),
', $type, $this->getAttribute('name')));
$closingParenthesis = true;
$isArray = true;
}
}
} else {
$compiler->raw($this->getAttribute('thing')->compile());
}
$this->compileArguments($compiler, $isArray);
if ($closingParenthesis) {
$compiler->raw(')');
}
}
protected function compileArguments(Compiler $compiler, $isArray =
false)
{
$compiler->raw($isArray ? '[' : '(');
$first = true;
if ($this->hasAttribute('needs_environment')
&& $this->getAttribute('needs_environment')) {
$compiler->raw('$this->env');
$first = false;
}
if ($this->hasAttribute('needs_context') &&
$this->getAttribute('needs_context')) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->raw('$context');
$first = false;
}
if ($this->hasAttribute('arguments')) {
foreach ($this->getAttribute('arguments') as
$argument) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->string($argument);
$first = false;
}
}
if ($this->hasNode('node')) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->subcompile($this->getNode('node'));
$first = false;
}
if ($this->hasNode('arguments')) {
$callable = $this->hasAttribute('callable') ?
$this->getAttribute('callable') : null;
$arguments = $this->getArguments($callable,
$this->getNode('arguments'));
foreach ($arguments as $node) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->subcompile($node);
$first = false;
}
}
$compiler->raw($isArray ? ']' : ')');
}
protected function getArguments($callable, $arguments)
{
$callType = $this->getAttribute('type');
$callName = $this->getAttribute('name');
$parameters = [];
$named = false;
foreach ($arguments as $name => $node) {
if (!\is_int($name)) {
$named = true;
$name = $this->normalizeName($name);
} elseif ($named) {
throw new SyntaxError(sprintf('Positional arguments
cannot be used after named arguments for %s "%s".',
$callType, $callName), $this->getTemplateLine(),
$this->getSourceContext());
}
$parameters[$name] = $node;
}
$isVariadic = $this->hasAttribute('is_variadic')
&& $this->getAttribute('is_variadic');
if (!$named && !$isVariadic) {
return $parameters;
}
if (!$callable) {
if ($named) {
$message = sprintf('Named arguments are not supported
for %s "%s".', $callType, $callName);
} else {
$message = sprintf('Arbitrary positional arguments are
not supported for %s "%s".', $callType, $callName);
}
throw new \LogicException($message);
}
$callableParameters = $this->getCallableParameters($callable,
$isVariadic);
$arguments = [];
$names = [];
$missingArguments = [];
$optionalArguments = [];
$pos = 0;
foreach ($callableParameters as $callableParameter) {
$names[] = $name =
$this->normalizeName($callableParameter->name);
if (\array_key_exists($name, $parameters)) {
if (\array_key_exists($pos, $parameters)) {
throw new SyntaxError(sprintf('Argument
"%s" is defined twice for %s "%s".', $name,
$callType, $callName), $this->getTemplateLine(),
$this->getSourceContext());
}
if (\count($missingArguments)) {
throw new SyntaxError(sprintf(
'Argument "%s" could not be assigned
for %s "%s(%s)" because it is mapped to an internal PHP function
which cannot determine default value for optional argument%s
"%s".',
$name, $callType, $callName, implode(',
', $names), \count($missingArguments) > 1 ? 's' :
'', implode('", "', $missingArguments)
), $this->getTemplateLine(),
$this->getSourceContext());
}
$arguments = array_merge($arguments, $optionalArguments);
$arguments[] = $parameters[$name];
unset($parameters[$name]);
$optionalArguments = [];
} elseif (\array_key_exists($pos, $parameters)) {
$arguments = array_merge($arguments, $optionalArguments);
$arguments[] = $parameters[$pos];
unset($parameters[$pos]);
$optionalArguments = [];
++$pos;
} elseif ($callableParameter->isDefaultValueAvailable()) {
$optionalArguments[] = new
ConstantExpression($callableParameter->getDefaultValue(), -1);
} elseif ($callableParameter->isOptional()) {
if (empty($parameters)) {
break;
} else {
$missingArguments[] = $name;
}
} else {
throw new SyntaxError(sprintf('Value for argument
"%s" is required for %s "%s".', $name, $callType,
$callName), $this->getTemplateLine(), $this->getSourceContext());
}
}
if ($isVariadic) {
$arbitraryArguments = new ArrayExpression([], -1);
foreach ($parameters as $key => $value) {
if (\is_int($key)) {
$arbitraryArguments->addElement($value);
} else {
$arbitraryArguments->addElement($value, new
ConstantExpression($key, -1));
}
unset($parameters[$key]);
}
if ($arbitraryArguments->count()) {
$arguments = array_merge($arguments, $optionalArguments);
$arguments[] = $arbitraryArguments;
}
}
if (!empty($parameters)) {
$unknownParameter = null;
foreach ($parameters as $parameter) {
if ($parameter instanceof Node) {
$unknownParameter = $parameter;
break;
}
}
throw new SyntaxError(
sprintf(
'Unknown argument%s "%s" for %s
"%s(%s)".',
\count($parameters) > 1 ? 's' :
'', implode('", "', array_keys($parameters)),
$callType, $callName, implode(', ', $names)
),
$unknownParameter ? $unknownParameter->getTemplateLine()
: $this->getTemplateLine(),
$unknownParameter ?
$unknownParameter->getSourceContext() : $this->getSourceContext()
);
}
return $arguments;
}
protected function normalizeName($name)
{
return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/',
'/([a-z\d])([A-Z])/'], ['\\1_\\2',
'\\1_\\2'], $name));
}
private function getCallableParameters($callable, $isVariadic)
{
list($r) = $this->reflectCallable($callable);
if (null === $r) {
return [];
}
$parameters = $r->getParameters();
if ($this->hasNode('node')) {
array_shift($parameters);
}
if ($this->hasAttribute('needs_environment')
&& $this->getAttribute('needs_environment')) {
array_shift($parameters);
}
if ($this->hasAttribute('needs_context') &&
$this->getAttribute('needs_context')) {
array_shift($parameters);
}
if ($this->hasAttribute('arguments') && null
!== $this->getAttribute('arguments')) {
foreach ($this->getAttribute('arguments') as
$argument) {
array_shift($parameters);
}
}
if ($isVariadic) {
$argument = end($parameters);
if ($argument && $argument->isArray() &&
$argument->isDefaultValueAvailable() && [] ===
$argument->getDefaultValue()) {
array_pop($parameters);
} else {
$callableName = $r->name;
if ($r instanceof \ReflectionMethod) {
$callableName =
$r->getDeclaringClass()->name.'::'.$callableName;
}
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')));
}
}
return $parameters;
}
private function reflectCallable($callable)
{
if (null !== $this->reflector) {
return $this->reflector;
}
if (\is_array($callable)) {
if (!method_exists($callable[0], $callable[1])) {
// __call()
return [null, []];
}
$r = new \ReflectionMethod($callable[0], $callable[1]);
} elseif (\is_object($callable) && !$callable instanceof
\Closure) {
$r = new \ReflectionObject($callable);
$r = $r->getMethod('__invoke');
$callable = [$callable, '__invoke'];
} elseif (\is_string($callable) && false !== $pos =
strpos($callable, '::')) {
$class = substr($callable, 0, $pos);
$method = substr($callable, $pos + 2);
if (!method_exists($class, $method)) {
// __staticCall()
return [null, []];
}
$r = new \ReflectionMethod($callable);
$callable = [$class, $method];
} else {
$r = new \ReflectionFunction($callable);
}
return $this->reflector = [$r, $callable];
}
}
class_alias('Twig\Node\Expression\CallExpression',
'Twig_Node_Expression_Call');
PK���[Yz^���-src/Node/Expression/ConditionalExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class ConditionalExpression extends AbstractExpression
{
public function __construct(AbstractExpression $expr1,
AbstractExpression $expr2, AbstractExpression $expr3, $lineno)
{
parent::__construct(['expr1' => $expr1,
'expr2' => $expr2, 'expr3' => $expr3], [],
$lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('((')
->subcompile($this->getNode('expr1'))
->raw(') ? (')
->subcompile($this->getNode('expr2'))
->raw(') : (')
->subcompile($this->getNode('expr3'))
->raw('))')
;
}
}
class_alias('Twig\Node\Expression\ConditionalExpression',
'Twig_Node_Expression_Conditional');
PK���[�7�˗�*src/Node/Expression/ConstantExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class ConstantExpression extends AbstractExpression
{
public function __construct($value, $lineno)
{
parent::__construct([], ['value' => $value], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler->repr($this->getAttribute('value'));
}
}
class_alias('Twig\Node\Expression\ConstantExpression',
'Twig_Node_Expression_Constant');
PK���[��nn,src/Node/Expression/Filter/DefaultFilter.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Filter;
use Twig\Compiler;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\Test\DefinedTest;
use Twig\Node\Node;
/**
* Returns the value or the default value when it is undefined or empty.
*
* {{ var.foo|default('foo item on var is not defined') }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DefaultFilter extends FilterExpression
{
public function __construct(\Twig_NodeInterface $node,
ConstantExpression $filterName, \Twig_NodeInterface $arguments, $lineno,
$tag = null)
{
$default = new FilterExpression($node, new
ConstantExpression('default', $node->getTemplateLine()),
$arguments, $node->getTemplateLine());
if ('default' ===
$filterName->getAttribute('value') && ($node
instanceof NameExpression || $node instanceof GetAttrExpression)) {
$test = new DefinedTest(clone $node, 'defined', new
Node(), $node->getTemplateLine());
$false = \count($arguments) ? $arguments->getNode(0) : new
ConstantExpression('', $node->getTemplateLine());
$node = new ConditionalExpression($test, $default, $false,
$node->getTemplateLine());
} else {
$node = $default;
}
parent::__construct($node, $filterName, $arguments, $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->subcompile($this->getNode('node'));
}
}
class_alias('Twig\Node\Expression\Filter\DefaultFilter',
'Twig_Node_Expression_Filter_Default');
PK���[�aGCC(src/Node/Expression/FilterExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\TwigFilter;
class FilterExpression extends CallExpression
{
public function __construct(\Twig_NodeInterface $node,
ConstantExpression $filterName, \Twig_NodeInterface $arguments, $lineno,
$tag = null)
{
parent::__construct(['node' => $node,
'filter' => $filterName, 'arguments' =>
$arguments], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$name =
$this->getNode('filter')->getAttribute('value');
$filter = $compiler->getEnvironment()->getFilter($name);
$this->setAttribute('name', $name);
$this->setAttribute('type', 'filter');
$this->setAttribute('thing', $filter);
$this->setAttribute('needs_environment',
$filter->needsEnvironment());
$this->setAttribute('needs_context',
$filter->needsContext());
$this->setAttribute('arguments',
$filter->getArguments());
if ($filter instanceof \Twig_FilterCallableInterface || $filter
instanceof TwigFilter) {
$this->setAttribute('callable',
$filter->getCallable());
}
if ($filter instanceof TwigFilter) {
$this->setAttribute('is_variadic',
$filter->isVariadic());
}
$this->compileCallable($compiler);
}
}
class_alias('Twig\Node\Expression\FilterExpression',
'Twig_Node_Expression_Filter');
PK���[�Sqǵ�*src/Node/Expression/FunctionExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\TwigFunction;
class FunctionExpression extends CallExpression
{
public function __construct($name, \Twig_NodeInterface $arguments,
$lineno)
{
parent::__construct(['arguments' => $arguments],
['name' => $name, 'is_defined_test' => false],
$lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$function = $compiler->getEnvironment()->getFunction($name);
$this->setAttribute('name', $name);
$this->setAttribute('type', 'function');
$this->setAttribute('thing', $function);
$this->setAttribute('needs_environment',
$function->needsEnvironment());
$this->setAttribute('needs_context',
$function->needsContext());
$this->setAttribute('arguments',
$function->getArguments());
if ($function instanceof \Twig_FunctionCallableInterface ||
$function instanceof TwigFunction) {
$callable = $function->getCallable();
if ('constant' === $name &&
$this->getAttribute('is_defined_test')) {
$callable = 'twig_constant_is_defined';
}
$this->setAttribute('callable', $callable);
}
if ($function instanceof TwigFunction) {
$this->setAttribute('is_variadic',
$function->isVariadic());
}
$this->compileCallable($compiler);
}
}
class_alias('Twig\Node\Expression\FunctionExpression',
'Twig_Node_Expression_Function');
PK���[\a��
�
)src/Node/Expression/GetAttrExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Template;
class GetAttrExpression extends AbstractExpression
{
public function __construct(AbstractExpression $node,
AbstractExpression $attribute, AbstractExpression $arguments = null, $type,
$lineno)
{
$nodes = ['node' => $node, 'attribute' =>
$attribute];
if (null !== $arguments) {
$nodes['arguments'] = $arguments;
}
parent::__construct($nodes, ['type' => $type,
'is_defined_test' => false, 'ignore_strict_check'
=> false, 'disable_c_ext' => false], $lineno);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('disable_c_ext')) {
@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);
}
if (\function_exists('twig_template_get_attributes')
&& !$this->getAttribute('disable_c_ext')) {
$compiler->raw('twig_template_get_attributes($this,
');
} else {
$compiler->raw('$this->getAttribute(');
}
if ($this->getAttribute('ignore_strict_check')) {
$this->getNode('node')->setAttribute('ignore_strict_check',
true);
}
$compiler->subcompile($this->getNode('node'));
$compiler->raw(',
')->subcompile($this->getNode('attribute'));
// only generate optional arguments when needed (to make generated
code more readable)
$needFourth =
$this->getAttribute('ignore_strict_check');
$needThird = $needFourth ||
$this->getAttribute('is_defined_test');
$needSecond = $needThird || Template::ANY_CALL !==
$this->getAttribute('type');
$needFirst = $needSecond ||
$this->hasNode('arguments');
if ($needFirst) {
if ($this->hasNode('arguments')) {
$compiler->raw(',
')->subcompile($this->getNode('arguments'));
} else {
$compiler->raw(', []');
}
}
if ($needSecond) {
$compiler->raw(',
')->repr($this->getAttribute('type'));
}
if ($needThird) {
$compiler->raw(',
')->repr($this->getAttribute('is_defined_test'));
}
if ($needFourth) {
$compiler->raw(',
')->repr($this->getAttribute('ignore_strict_check'));
}
$compiler->raw(')');
}
}
class_alias('Twig\Node\Expression\GetAttrExpression',
'Twig_Node_Expression_GetAttr');
PK���[��jț�#src/Node/Expression/InlinePrint.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Node;
/**
* @internal
*/
final class InlinePrint extends AbstractExpression
{
public function __construct(Node $node, $lineno)
{
parent::__construct(['node' => $node], [], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('print (')
->subcompile($this->getNode('node'))
->raw(')')
;
}
}
PK���[���,src/Node/Expression/MethodCallExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class MethodCallExpression extends AbstractExpression
{
public function __construct(AbstractExpression $node, $method,
ArrayExpression $arguments, $lineno)
{
parent::__construct(['node' => $node,
'arguments' => $arguments], ['method' => $method,
'safe' => false], $lineno);
if ($node instanceof NameExpression) {
$node->setAttribute('always_defined', true);
}
}
public function compile(Compiler $compiler)
{
$compiler
->subcompile($this->getNode('node'))
->raw('->')
->raw($this->getAttribute('method'))
->raw('(')
;
$first = true;
foreach
($this->getNode('arguments')->getKeyValuePairs() as $pair)
{
if (!$first) {
$compiler->raw(', ');
}
$first = false;
$compiler->subcompile($pair['value']);
}
$compiler->raw(')');
}
}
class_alias('Twig\Node\Expression\MethodCallExpression',
'Twig_Node_Expression_MethodCall');
PK���[Q%?{{&src/Node/Expression/NameExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class NameExpression extends AbstractExpression
{
protected $specialVars = [
'_self' => '$this',
'_context' => '$context',
'_charset' =>
'$this->env->getCharset()',
];
public function __construct($name, $lineno)
{
parent::__construct([], ['name' => $name,
'is_defined_test' => false, 'ignore_strict_check'
=> false, 'always_defined' => false], $lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$compiler->addDebugInfo($this);
if ($this->getAttribute('is_defined_test')) {
if ($this->isSpecial()) {
$compiler->repr(true);
} elseif (\PHP_VERSION_ID >= 700400) {
$compiler
->raw('array_key_exists(')
->string($name)
->raw(', $context)')
;
} else {
$compiler
->raw('(isset($context[')
->string($name)
->raw(']) || array_key_exists(')
->string($name)
->raw(', $context))')
;
}
} elseif ($this->isSpecial()) {
$compiler->raw($this->specialVars[$name]);
} elseif ($this->getAttribute('always_defined')) {
$compiler
->raw('$context[')
->string($name)
->raw(']')
;
} else {
if (\PHP_VERSION_ID >= 70000) {
// use PHP 7 null coalescing operator
$compiler
->raw('($context[')
->string($name)
->raw('] ?? ')
;
if ($this->getAttribute('ignore_strict_check')
|| !$compiler->getEnvironment()->isStrictVariables()) {
$compiler->raw('null)');
} else {
$compiler->raw('$this->getContext($context,
')->string($name)->raw('))');
}
} elseif (\PHP_VERSION_ID >= 50400) {
// PHP 5.4 ternary operator performance was optimized
$compiler
->raw('(isset($context[')
->string($name)
->raw(']) ? $context[')
->string($name)
->raw('] : ')
;
if ($this->getAttribute('ignore_strict_check')
|| !$compiler->getEnvironment()->isStrictVariables()) {
$compiler->raw('null)');
} else {
$compiler->raw('$this->getContext($context,
')->string($name)->raw('))');
}
} else {
$compiler
->raw('$this->getContext($context, ')
->string($name)
;
if
($this->getAttribute('ignore_strict_check')) {
$compiler->raw(', true');
}
$compiler
->raw(')')
;
}
}
}
public function isSpecial()
{
return
isset($this->specialVars[$this->getAttribute('name')]);
}
public function isSimple()
{
return !$this->isSpecial() &&
!$this->getAttribute('is_defined_test');
}
}
class_alias('Twig\Node\Expression\NameExpression',
'Twig_Node_Expression_Name');
PK���[T��o��.src/Node/Expression/NullCoalesceExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Expression\Binary\AndBinary;
use Twig\Node\Expression\Test\DefinedTest;
use Twig\Node\Expression\Test\NullTest;
use Twig\Node\Expression\Unary\NotUnary;
use Twig\Node\Node;
class NullCoalesceExpression extends ConditionalExpression
{
public function __construct(\Twig_NodeInterface $left,
\Twig_NodeInterface $right, $lineno)
{
$test = new DefinedTest(clone $left, 'defined', new
Node(), $left->getTemplateLine());
// for "block()", we don't need the null test as the
return value is always a string
if (!$left instanceof BlockReferenceExpression) {
$test = new AndBinary(
$test,
new NotUnary(new NullTest($left, 'null', new
Node(), $left->getTemplateLine()), $left->getTemplateLine()),
$left->getTemplateLine()
);
}
parent::__construct($test, $left, $right, $lineno);
}
public function compile(Compiler $compiler)
{
/*
* This optimizes only one case. PHP 7 also supports more complex
expressions
* that can return null. So, for instance, if log is defined,
log("foo") ?? "..." works,
* but log($a["foo"]) ?? "..." does not if
$a["foo"] is not defined. More advanced
* cases might be implemented as an optimizer node visitor, but has
not been done
* as benefits are probably not worth the added complexity.
*/
if (\PHP_VERSION_ID >= 70000 &&
$this->getNode('expr2') instanceof NameExpression) {
$this->getNode('expr2')->setAttribute('always_defined',
true);
$compiler
->raw('((')
->subcompile($this->getNode('expr2'))
->raw(') ?? (')
->subcompile($this->getNode('expr3'))
->raw('))')
;
} else {
parent::compile($compiler);
}
}
}
class_alias('Twig\Node\Expression\NullCoalesceExpression',
'Twig_Node_Expression_NullCoalesce');
PK���[<O�n��(src/Node/Expression/ParentExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
/**
* Represents a parent node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ParentExpression extends AbstractExpression
{
public function __construct($name, $lineno, $tag = null)
{
parent::__construct([], ['output' => false,
'name' => $name], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('output')) {
$compiler
->addDebugInfo($this)
->write('$this->displayParentBlock(')
->string($this->getAttribute('name'))
->raw(", \$context, \$blocks);\n")
;
} else {
$compiler
->raw('$this->renderParentBlock(')
->string($this->getAttribute('name'))
->raw(', $context, $blocks)')
;
}
}
}
class_alias('Twig\Node\Expression\ParentExpression',
'Twig_Node_Expression_Parent');
PK���[�/c��*src/Node/Expression/TempNameExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class TempNameExpression extends AbstractExpression
{
public function __construct($name, $lineno)
{
parent::__construct([], ['name' => $name], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('$_')
->raw($this->getAttribute('name'))
->raw('_')
;
}
}
class_alias('Twig\Node\Expression\TempNameExpression',
'Twig_Node_Expression_TempName');
PK���[T�o��)src/Node/Expression/Test/ConstantTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is the exact same value as a constant.
*
* {% if post.status is constant('Post::PUBLISHED') %}
* the status attribute is exactly the same as Post::PUBLISHED
* {% endif %}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ConstantTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' === constant(')
;
if ($this->getNode('arguments')->hasNode(1)) {
$compiler
->raw('get_class(')
->subcompile($this->getNode('arguments')->getNode(1))
->raw(')."::".')
;
}
$compiler
->subcompile($this->getNode('arguments')->getNode(0))
->raw('))')
;
}
}
class_alias('Twig\Node\Expression\Test\ConstantTest',
'Twig_Node_Expression_Test_Constant');
PK���[Q� � (src/Node/Expression/Test/DefinedTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\ArrayExpression;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is defined in the current context.
*
* {# defined works with variable names and variable attributes #}
* {% if foo is defined %}
* {# ... #}
* {% endif %}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DefinedTest extends TestExpression
{
public function __construct(\Twig_NodeInterface $node, $name,
\Twig_NodeInterface $arguments = null, $lineno)
{
if ($node instanceof NameExpression) {
$node->setAttribute('is_defined_test', true);
} elseif ($node instanceof GetAttrExpression) {
$node->setAttribute('is_defined_test', true);
$this->changeIgnoreStrictCheck($node);
} elseif ($node instanceof BlockReferenceExpression) {
$node->setAttribute('is_defined_test', true);
} elseif ($node instanceof FunctionExpression &&
'constant' === $node->getAttribute('name')) {
$node->setAttribute('is_defined_test', true);
} elseif ($node instanceof ConstantExpression || $node instanceof
ArrayExpression) {
$node = new ConstantExpression(true,
$node->getTemplateLine());
} else {
throw new SyntaxError('The "defined" test only
works with simple variables.', $lineno);
}
parent::__construct($node, $name, $arguments, $lineno);
}
protected function changeIgnoreStrictCheck(GetAttrExpression $node)
{
$node->setAttribute('ignore_strict_check', true);
if ($node->getNode('node') instanceof
GetAttrExpression) {
$this->changeIgnoreStrictCheck($node->getNode('node'));
}
}
public function compile(Compiler $compiler)
{
$compiler->subcompile($this->getNode('node'));
}
}
class_alias('Twig\Node\Expression\Test\DefinedTest',
'Twig_Node_Expression_Test_Defined');
PK���[qC�uu,src/Node/Expression/Test/DivisiblebyTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is divisible by a number.
*
* {% if loop.index is divisible by(3) %}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DivisiblebyTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(0 == ')
->subcompile($this->getNode('node'))
->raw(' % ')
->subcompile($this->getNode('arguments')->getNode(0))
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\DivisiblebyTest',
'Twig_Node_Expression_Test_Divisibleby');
PK���[�J����%src/Node/Expression/Test/EvenTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a number is even.
*
* {{ var is even }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EvenTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' % 2 == 0')
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\EvenTest',
'Twig_Node_Expression_Test_Even');
PK���[!d����%src/Node/Expression/Test/NullTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks that a variable is null.
*
* {{ var is none }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class NullTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(null === ')
->subcompile($this->getNode('node'))
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\NullTest',
'Twig_Node_Expression_Test_Null');
PK���[ja�c��$src/Node/Expression/Test/OddTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a number is odd.
*
* {{ var is odd }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class OddTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' % 2 == 1')
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\OddTest',
'Twig_Node_Expression_Test_Odd');
PK���[���DD'src/Node/Expression/Test/SameasTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is the same as another one (=== in PHP).
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SameasTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' === ')
->subcompile($this->getNode('arguments')->getNode(0))
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\SameasTest',
'Twig_Node_Expression_Test_Sameas');
PK���[�e���&src/Node/Expression/TestExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\TwigTest;
class TestExpression extends CallExpression
{
public function __construct(\Twig_NodeInterface $node, $name,
\Twig_NodeInterface $arguments = null, $lineno)
{
$nodes = ['node' => $node];
if (null !== $arguments) {
$nodes['arguments'] = $arguments;
}
parent::__construct($nodes, ['name' => $name],
$lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$test = $compiler->getEnvironment()->getTest($name);
$this->setAttribute('name', $name);
$this->setAttribute('type', 'test');
$this->setAttribute('thing', $test);
if ($test instanceof TwigTest) {
$this->setAttribute('arguments',
$test->getArguments());
}
if ($test instanceof \Twig_TestCallableInterface || $test
instanceof TwigTest) {
$this->setAttribute('callable',
$test->getCallable());
}
if ($test instanceof TwigTest) {
$this->setAttribute('is_variadic',
$test->isVariadic());
}
$this->compileCallable($compiler);
}
}
class_alias('Twig\Node\Expression\TestExpression',
'Twig_Node_Expression_Test');
PK���[s��ZZ+src/Node/Expression/Unary/AbstractUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
abstract class AbstractUnary extends AbstractExpression
{
public function __construct(\Twig_NodeInterface $node, $lineno)
{
parent::__construct(['node' => $node], [], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler->raw(' ');
$this->operator($compiler);
$compiler->subcompile($this->getNode('node'));
}
abstract public function operator(Compiler $compiler);
}
class_alias('Twig\Node\Expression\Unary\AbstractUnary',
'Twig_Node_Expression_Unary');
PK���[�5���&src/Node/Expression/Unary/NegUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
class NegUnary extends AbstractUnary
{
public function operator(Compiler $compiler)
{
$compiler->raw('-');
}
}
class_alias('Twig\Node\Expression\Unary\NegUnary',
'Twig_Node_Expression_Unary_Neg');
PK���[���&src/Node/Expression/Unary/NotUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
class NotUnary extends AbstractUnary
{
public function operator(Compiler $compiler)
{
$compiler->raw('!');
}
}
class_alias('Twig\Node\Expression\Unary\NotUnary',
'Twig_Node_Expression_Unary_Not');
PK���['W���&src/Node/Expression/Unary/PosUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
class PosUnary extends AbstractUnary
{
public function operator(Compiler $compiler)
{
$compiler->raw('+');
}
}
class_alias('Twig\Node\Expression\Unary\PosUnary',
'Twig_Node_Expression_Unary_Pos');
PK���[��ޱ�src/Node/FlushNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a flush node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FlushNode extends Node
{
public function __construct($lineno, $tag)
{
parent::__construct([], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write("flush();\n")
;
}
}
class_alias('Twig\Node\FlushNode', 'Twig_Node_Flush');
PK���[I�j11src/Node/ForLoopNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Internal node used by the for node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ForLoopNode extends Node
{
public function __construct($lineno, $tag = null)
{
parent::__construct([], ['with_loop' => false,
'ifexpr' => false, 'else' => false], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('else')) {
$compiler->write("\$context['_iterated'] =
true;\n");
}
if ($this->getAttribute('with_loop')) {
$compiler
->write("++\$context['loop']['index0'];\n")
->write("++\$context['loop']['index'];\n")
->write("\$context['loop']['first'] =
false;\n")
;
if (!$this->getAttribute('ifexpr')) {
$compiler
->write("if
(isset(\$context['loop']['length'])) {\n")
->indent()
->write("--\$context['loop']['revindex0'];\n")
->write("--\$context['loop']['revindex'];\n")
->write("\$context['loop']['last'] = 0 ===
\$context['loop']['revindex0'];\n")
->outdent()
->write("}\n")
;
}
}
}
}
class_alias('Twig\Node\ForLoopNode',
'Twig_Node_ForLoop');
PK���[���src/Node/ForNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\AssignNameExpression;
/**
* Represents a for node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ForNode extends Node
{
protected $loop;
public function __construct(AssignNameExpression $keyTarget,
AssignNameExpression $valueTarget, AbstractExpression $seq,
AbstractExpression $ifexpr = null, \Twig_NodeInterface $body,
\Twig_NodeInterface $else = null, $lineno, $tag = null)
{
$body = new Node([$body, $this->loop = new ForLoopNode($lineno,
$tag)]);
if (null !== $ifexpr) {
$body = new IfNode(new Node([$ifexpr, $body]), null, $lineno,
$tag);
}
$nodes = ['key_target' => $keyTarget,
'value_target' => $valueTarget, 'seq' => $seq,
'body' => $body];
if (null !== $else) {
$nodes['else'] = $else;
}
parent::__construct($nodes, ['with_loop' => true,
'ifexpr' => null !== $ifexpr], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write("\$context['_parent'] =
\$context;\n")
->write("\$context['_seq'] =
twig_ensure_traversable(")
->subcompile($this->getNode('seq'))
->raw(");\n")
;
if ($this->hasNode('else')) {
$compiler->write("\$context['_iterated'] =
false;\n");
}
if ($this->getAttribute('with_loop')) {
$compiler
->write("\$context['loop'] = [\n")
->write(" 'parent' =>
\$context['_parent'],\n")
->write(" 'index0' => 0,\n")
->write(" 'index' => 1,\n")
->write(" 'first' => true,\n")
->write("];\n")
;
if (!$this->getAttribute('ifexpr')) {
$compiler
->write("if
(is_array(\$context['_seq']) ||
(is_object(\$context['_seq']) &&
\$context['_seq'] instanceof \Countable)) {\n")
->indent()
->write("\$length =
count(\$context['_seq']);\n")
->write("\$context['loop']['revindex0'] =
\$length - 1;\n")
->write("\$context['loop']['revindex'] =
\$length;\n")
->write("\$context['loop']['length'] =
\$length;\n")
->write("\$context['loop']['last'] = 1 ===
\$length;\n")
->outdent()
->write("}\n")
;
}
}
$this->loop->setAttribute('else',
$this->hasNode('else'));
$this->loop->setAttribute('with_loop',
$this->getAttribute('with_loop'));
$this->loop->setAttribute('ifexpr',
$this->getAttribute('ifexpr'));
$compiler
->write("foreach (\$context['_seq'] as
")
->subcompile($this->getNode('key_target'))
->raw(' => ')
->subcompile($this->getNode('value_target'))
->raw(") {\n")
->indent()
->subcompile($this->getNode('body'))
->outdent()
->write("}\n")
;
if ($this->hasNode('else')) {
$compiler
->write("if (!\$context['_iterated'])
{\n")
->indent()
->subcompile($this->getNode('else'))
->outdent()
->write("}\n")
;
}
$compiler->write("\$_parent =
\$context['_parent'];\n");
// remove some "private" loop variables (needed for
nested loops)
$compiler->write('unset($context[\'_seq\'],
$context[\'_iterated\'],
$context[\''.$this->getNode('key_target')->getAttribute('name').'\'],
$context[\''.$this->getNode('value_target')->getAttribute('name').'\'],
$context[\'_parent\'],
$context[\'loop\']);'."\n");
// keep the values set in the inner context for variables defined
in the outer context
$compiler->write("\$context =
array_intersect_key(\$context, \$_parent) + \$_parent;\n");
}
}
class_alias('Twig\Node\ForNode', 'Twig_Node_For');
PK���[�X�m��src/Node/IfNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents an if node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class IfNode extends Node
{
public function __construct(\Twig_NodeInterface $tests,
\Twig_NodeInterface $else = null, $lineno, $tag = null)
{
$nodes = ['tests' => $tests];
if (null !== $else) {
$nodes['else'] = $else;
}
parent::__construct($nodes, [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
for ($i = 0, $count = \count($this->getNode('tests'));
$i < $count; $i += 2) {
if ($i > 0) {
$compiler
->outdent()
->write('} elseif (')
;
} else {
$compiler
->write('if (')
;
}
$compiler
->subcompile($this->getNode('tests')->getNode($i))
->raw(") {\n")
->indent()
->subcompile($this->getNode('tests')->getNode($i + 1))
;
}
if ($this->hasNode('else')) {
$compiler
->outdent()
->write("} else {\n")
->indent()
->subcompile($this->getNode('else'))
;
}
$compiler
->outdent()
->write("}\n");
}
}
class_alias('Twig\Node\IfNode', 'Twig_Node_If');
PK���[2�x8��src/Node/ImportNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\NameExpression;
/**
* Represents an import node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ImportNode extends Node
{
public function __construct(AbstractExpression $expr,
AbstractExpression $var, $lineno, $tag = null)
{
parent::__construct(['expr' => $expr, 'var'
=> $var], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('')
->subcompile($this->getNode('var'))
->raw(' = ')
;
if ($this->getNode('expr') instanceof NameExpression
&& '_self' ===
$this->getNode('expr')->getAttribute('name')) {
$compiler->raw('$this');
} else {
$compiler
->raw('$this->loadTemplate(')
->subcompile($this->getNode('expr'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(')->unwrap()')
;
}
$compiler->raw(";\n");
}
}
class_alias('Twig\Node\ImportNode',
'Twig_Node_Import');
PK���[��||src/Node/IncludeNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Represents an include node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class IncludeNode extends Node implements NodeOutputInterface
{
public function __construct(AbstractExpression $expr,
AbstractExpression $variables = null, $only = false, $ignoreMissing =
false, $lineno, $tag = null)
{
$nodes = ['expr' => $expr];
if (null !== $variables) {
$nodes['variables'] = $variables;
}
parent::__construct($nodes, ['only' => (bool) $only,
'ignore_missing' => (bool) $ignoreMissing], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
if ($this->getAttribute('ignore_missing')) {
$template = $compiler->getVarName();
$compiler
->write(sprintf("$%s = null;\n", $template))
->write("try {\n")
->indent()
->write(sprintf('$%s = ', $template))
;
$this->addGetTemplate($compiler);
$compiler
->raw(";\n")
->outdent()
->write("} catch (LoaderError \$e) {\n")
->indent()
->write("// ignore missing template\n")
->outdent()
->write("}\n")
->write(sprintf("if ($%s) {\n", $template))
->indent()
->write(sprintf('$%s->display(',
$template))
;
$this->addTemplateArguments($compiler);
$compiler
->raw(");\n")
->outdent()
->write("}\n")
;
} else {
$this->addGetTemplate($compiler);
$compiler->raw('->display(');
$this->addTemplateArguments($compiler);
$compiler->raw(");\n");
}
}
protected function addGetTemplate(Compiler $compiler)
{
$compiler
->write('$this->loadTemplate(')
->subcompile($this->getNode('expr'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(')')
;
}
protected function addTemplateArguments(Compiler $compiler)
{
if (!$this->hasNode('variables')) {
$compiler->raw(false ===
$this->getAttribute('only') ? '$context' :
'[]');
} elseif (false === $this->getAttribute('only')) {
$compiler
->raw('twig_array_merge($context, ')
->subcompile($this->getNode('variables'))
->raw(')')
;
} else {
$compiler->raw('twig_to_array(');
$compiler->subcompile($this->getNode('variables'));
$compiler->raw(')');
}
}
}
class_alias('Twig\Node\IncludeNode',
'Twig_Node_Include');
PK���[u�isrc/Node/MacroNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Error\SyntaxError;
/**
* Represents a macro node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class MacroNode extends Node
{
const VARARGS_NAME = 'varargs';
public function __construct($name, \Twig_NodeInterface $body,
\Twig_NodeInterface $arguments, $lineno, $tag = null)
{
foreach ($arguments as $argumentName => $argument) {
if (self::VARARGS_NAME === $argumentName) {
throw new SyntaxError(sprintf('The argument
"%s" in macro "%s" cannot be defined because the
variable "%s" is reserved for arbitrary arguments.',
self::VARARGS_NAME, $name, self::VARARGS_NAME),
$argument->getTemplateLine(), $argument->getSourceContext());
}
}
parent::__construct(['body' => $body,
'arguments' => $arguments], ['name' => $name],
$lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write(sprintf('public function get%s(',
$this->getAttribute('name')))
;
$count = \count($this->getNode('arguments'));
$pos = 0;
foreach ($this->getNode('arguments') as $name =>
$default) {
$compiler
->raw('$__'.$name.'__ = ')
->subcompile($default)
;
if (++$pos < $count) {
$compiler->raw(', ');
}
}
if (\PHP_VERSION_ID >= 50600) {
if ($count) {
$compiler->raw(', ');
}
$compiler->raw('...$__varargs__');
}
$compiler
->raw(")\n")
->write("{\n")
->indent()
;
$compiler
->write("\$context =
\$this->env->mergeGlobals([\n")
->indent()
;
foreach ($this->getNode('arguments') as $name =>
$default) {
$compiler
->write('')
->string($name)
->raw(' => $__'.$name.'__')
->raw(",\n")
;
}
$compiler
->write('')
->string(self::VARARGS_NAME)
->raw(' => ')
;
if (\PHP_VERSION_ID >= 50600) {
$compiler->raw("\$__varargs__,\n");
} else {
$compiler
->raw('func_num_args() > ')
->repr($count)
->raw(' ? array_slice(func_get_args(), ')
->repr($count)
->raw(") : [],\n")
;
}
$compiler
->outdent()
->write("]);\n\n")
->write("\$blocks = [];\n\n")
;
if ($compiler->getEnvironment()->isDebug()) {
$compiler->write("ob_start();\n");
} else {
$compiler->write("ob_start(function () { return
''; });\n");
}
$compiler
->write("try {\n")
->indent()
->subcompile($this->getNode('body'))
->outdent()
->write("} catch (\Exception \$e) {\n")
->indent()
->write("ob_end_clean();\n\n")
->write("throw \$e;\n")
->outdent()
->write("} catch (\Throwable \$e) {\n")
->indent()
->write("ob_end_clean();\n\n")
->write("throw \$e;\n")
->outdent()
->write("}\n\n")
->write("return ('' === \$tmp =
ob_get_clean()) ? '' : new Markup(\$tmp,
\$this->env->getCharset());\n")
->outdent()
->write("}\n\n")
;
}
}
class_alias('Twig\Node\MacroNode', 'Twig_Node_Macro');
PK���[&J�I??src/Node/ModuleNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Source;
/**
* Represents a module node.
*
* Consider this class as being final. If you need to customize the
behavior of
* the generated class, consider adding nodes to the following nodes:
display_start,
* display_end, constructor_start, constructor_end, and class_end.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ModuleNode extends Node
{
public function __construct(\Twig_NodeInterface $body,
AbstractExpression $parent = null, \Twig_NodeInterface $blocks,
\Twig_NodeInterface $macros, \Twig_NodeInterface $traits,
$embeddedTemplates, $name, $source = '')
{
if (!$name instanceof Source) {
@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);
$source = new Source($source, $name);
} else {
$source = $name;
}
$nodes = [
'body' => $body,
'blocks' => $blocks,
'macros' => $macros,
'traits' => $traits,
'display_start' => new Node(),
'display_end' => new Node(),
'constructor_start' => new Node(),
'constructor_end' => new Node(),
'class_end' => new Node(),
];
if (null !== $parent) {
$nodes['parent'] = $parent;
}
// embedded templates are set as attributes so that they are only
visited once by the visitors
parent::__construct($nodes, [
// source to be remove in 2.0
'source' => $source->getCode(),
// filename to be remove in 2.0 (use getTemplateName() instead)
'filename' => $source->getName(),
'index' => null,
'embedded_templates' => $embeddedTemplates,
], 1);
// populate the template name of all node children
$this->setTemplateName($source->getName());
$this->setSourceContext($source);
}
public function setIndex($index)
{
$this->setAttribute('index', $index);
}
public function compile(Compiler $compiler)
{
$this->compileTemplate($compiler);
foreach ($this->getAttribute('embedded_templates') as
$template) {
$compiler->subcompile($template);
}
}
protected function compileTemplate(Compiler $compiler)
{
if (!$this->getAttribute('index')) {
$compiler->write('<?php');
}
$this->compileClassHeader($compiler);
if (
\count($this->getNode('blocks'))
|| \count($this->getNode('traits'))
|| !$this->hasNode('parent')
|| $this->getNode('parent') instanceof
ConstantExpression
|| \count($this->getNode('constructor_start'))
|| \count($this->getNode('constructor_end'))
) {
$this->compileConstructor($compiler);
}
$this->compileGetParent($compiler);
$this->compileDisplay($compiler);
$compiler->subcompile($this->getNode('blocks'));
$this->compileMacros($compiler);
$this->compileGetTemplateName($compiler);
$this->compileIsTraitable($compiler);
$this->compileDebugInfo($compiler);
$this->compileGetSource($compiler);
$this->compileGetSourceContext($compiler);
$this->compileClassFooter($compiler);
}
protected function compileGetParent(Compiler $compiler)
{
if (!$this->hasNode('parent')) {
return;
}
$parent = $this->getNode('parent');
$compiler
->write("protected function doGetParent(array
\$context)\n", "{\n")
->indent()
->addDebugInfo($parent)
->write('return ')
;
if ($parent instanceof ConstantExpression) {
$compiler->subcompile($parent);
} else {
$compiler
->raw('$this->loadTemplate(')
->subcompile($parent)
->raw(', ')
->repr($this->getSourceContext()->getName())
->raw(', ')
->repr($parent->getTemplateLine())
->raw(')')
;
}
$compiler
->raw(";\n")
->outdent()
->write("}\n\n")
;
}
protected function compileClassHeader(Compiler $compiler)
{
$compiler
->write("\n\n")
;
if (!$this->getAttribute('index')) {
$compiler
->write("use Twig\Environment;\n")
->write("use Twig\Error\LoaderError;\n")
->write("use Twig\Error\RuntimeError;\n")
->write("use Twig\Markup;\n")
->write("use Twig\Sandbox\SecurityError;\n")
->write("use
Twig\Sandbox\SecurityNotAllowedTagError;\n")
->write("use
Twig\Sandbox\SecurityNotAllowedFilterError;\n")
->write("use
Twig\Sandbox\SecurityNotAllowedFunctionError;\n")
->write("use Twig\Source;\n")
->write("use Twig\Template;\n\n")
;
}
$compiler
// if the template name contains */, add a blank to avoid a PHP
parse error
->write('/* '.str_replace('*/', '*
/', $this->getSourceContext()->getName())." */\n")
->write('class
'.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(),
$this->getAttribute('index')))
->raw(sprintf(" extends %s\n",
$compiler->getEnvironment()->getBaseTemplateClass()))
->write("{\n")
->indent()
;
}
protected function compileConstructor(Compiler $compiler)
{
$compiler
->write("public function __construct(Environment
\$env)\n", "{\n")
->indent()
->subcompile($this->getNode('constructor_start'))
->write("parent::__construct(\$env);\n\n")
;
// parent
if (!$this->hasNode('parent')) {
$compiler->write("\$this->parent =
false;\n\n");
}
$countTraits = \count($this->getNode('traits'));
if ($countTraits) {
// traits
foreach ($this->getNode('traits') as $i =>
$trait) {
$this->compileLoadTemplate($compiler,
$trait->getNode('template'), sprintf('$_trait_%s',
$i));
$node = $trait->getNode('template');
$compiler
->addDebugInfo($node)
->write(sprintf("if
(!\$_trait_%s->isTraitable()) {\n", $i))
->indent()
->write("throw new RuntimeError('Template
\"'.")
->subcompile($trait->getNode('template'))
->raw(".'\" cannot be used as a
trait.', ")
->repr($node->getTemplateLine())
->raw(",
\$this->getSourceContext());\n")
->outdent()
->write("}\n")
->write(sprintf("\$_trait_%s_blocks =
\$_trait_%s->getBlocks();\n\n", $i, $i))
;
foreach ($trait->getNode('targets') as $key
=> $value) {
$compiler
->write(sprintf('if
(!isset($_trait_%s_blocks[', $i))
->string($key)
->raw("])) {\n")
->indent()
->write("throw new
RuntimeError(sprintf('Block ")
->string($key)
->raw(' is not defined in trait ')
->subcompile($trait->getNode('template'))
->raw(".'), ")
->repr($node->getTemplateLine())
->raw(",
\$this->getSourceContext());\n")
->outdent()
->write("}\n\n")
->write(sprintf('$_trait_%s_blocks[',
$i))
->subcompile($value)
->raw(sprintf('] =
$_trait_%s_blocks[', $i))
->string($key)
->raw(sprintf('];
unset($_trait_%s_blocks[', $i))
->string($key)
->raw("]);\n\n")
;
}
}
if ($countTraits > 1) {
$compiler
->write("\$this->traits =
array_merge(\n")
->indent()
;
for ($i = 0; $i < $countTraits; ++$i) {
$compiler
->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ?
'' : ',')."\n", $i))
;
}
$compiler
->outdent()
->write(");\n\n")
;
} else {
$compiler
->write("\$this->traits =
\$_trait_0_blocks;\n\n")
;
}
$compiler
->write("\$this->blocks = array_merge(\n")
->indent()
->write("\$this->traits,\n")
->write("[\n")
;
} else {
$compiler
->write("\$this->blocks = [\n")
;
}
// blocks
$compiler
->indent()
;
foreach ($this->getNode('blocks') as $name =>
$node) {
$compiler
->write(sprintf("'%s' => [\$this,
'block_%s'],\n", $name, $name))
;
}
if ($countTraits) {
$compiler
->outdent()
->write("]\n")
->outdent()
->write(");\n")
;
} else {
$compiler
->outdent()
->write("];\n")
;
}
$compiler
->subcompile($this->getNode('constructor_end'))
->outdent()
->write("}\n\n")
;
}
protected function compileDisplay(Compiler $compiler)
{
$compiler
->write("protected function doDisplay(array \$context,
array \$blocks = [])\n", "{\n")
->indent()
->subcompile($this->getNode('display_start'))
->subcompile($this->getNode('body'))
;
if ($this->hasNode('parent')) {
$parent = $this->getNode('parent');
$compiler->addDebugInfo($parent);
if ($parent instanceof ConstantExpression) {
$compiler
->write('$this->parent =
$this->loadTemplate(')
->subcompile($parent)
->raw(', ')
->repr($this->getSourceContext()->getName())
->raw(', ')
->repr($parent->getTemplateLine())
->raw(");\n")
;
$compiler->write('$this->parent');
} else {
$compiler->write('$this->getParent($context)');
}
$compiler->raw("->display(\$context,
array_merge(\$this->blocks, \$blocks));\n");
}
$compiler
->subcompile($this->getNode('display_end'))
->outdent()
->write("}\n\n")
;
}
protected function compileClassFooter(Compiler $compiler)
{
$compiler
->subcompile($this->getNode('class_end'))
->outdent()
->write("}\n")
;
}
protected function compileMacros(Compiler $compiler)
{
$compiler->subcompile($this->getNode('macros'));
}
protected function compileGetTemplateName(Compiler $compiler)
{
$compiler
->write("public function getTemplateName()\n",
"{\n")
->indent()
->write('return ')
->repr($this->getSourceContext()->getName())
->raw(";\n")
->outdent()
->write("}\n\n")
;
}
protected function compileIsTraitable(Compiler $compiler)
{
// A template can be used as a trait if:
// * it has no parent
// * it has no macros
// * it has no body
//
// Put another way, a template can be used as a trait if it
// only contains blocks and use statements.
$traitable = !$this->hasNode('parent') && 0
=== \count($this->getNode('macros'));
if ($traitable) {
if ($this->getNode('body') instanceof BodyNode) {
$nodes =
$this->getNode('body')->getNode(0);
} else {
$nodes = $this->getNode('body');
}
if (!\count($nodes)) {
$nodes = new Node([$nodes]);
}
foreach ($nodes as $node) {
if (!\count($node)) {
continue;
}
if ($node instanceof TextNode &&
ctype_space($node->getAttribute('data'))) {
continue;
}
if ($node instanceof BlockReferenceNode) {
continue;
}
$traitable = false;
break;
}
}
if ($traitable) {
return;
}
$compiler
->write("public function isTraitable()\n",
"{\n")
->indent()
->write(sprintf("return %s;\n", $traitable ?
'true' : 'false'))
->outdent()
->write("}\n\n")
;
}
protected function compileDebugInfo(Compiler $compiler)
{
$compiler
->write("public function getDebugInfo()\n",
"{\n")
->indent()
->write(sprintf("return %s;\n",
str_replace("\n", '',
var_export(array_reverse($compiler->getDebugInfo(), true), true))))
->outdent()
->write("}\n\n")
;
}
protected function compileGetSource(Compiler $compiler)
{
$compiler
->write("/** @deprecated since 1.27 (to be removed in
2.0). Use getSourceContext() instead */\n")
->write("public function getSource()\n",
"{\n")
->indent()
->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")
->write('return
$this->getSourceContext()->getCode();')
->raw("\n")
->outdent()
->write("}\n\n")
;
}
protected function compileGetSourceContext(Compiler $compiler)
{
$compiler
->write("public function getSourceContext()\n",
"{\n")
->indent()
->write('return new Source(')
->string($compiler->getEnvironment()->isDebug() ?
$this->getSourceContext()->getCode() : '')
->raw(', ')
->string($this->getSourceContext()->getName())
->raw(', ')
->string($this->getSourceContext()->getPath())
->raw(");\n")
->outdent()
->write("}\n")
;
}
protected function compileLoadTemplate(Compiler $compiler, $node, $var)
{
if ($node instanceof ConstantExpression) {
$compiler
->write(sprintf('%s =
$this->loadTemplate(', $var))
->subcompile($node)
->raw(', ')
->repr($node->getTemplateName())
->raw(', ')
->repr($node->getTemplateLine())
->raw(");\n")
;
} else {
throw new \LogicException('Trait templates can only be
constant nodes.');
}
}
}
class_alias('Twig\Node\ModuleNode',
'Twig_Node_Module');
PK���[���eesrc/Node/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Source;
/**
* Represents a node in the AST.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Node implements \Twig_NodeInterface
{
protected $nodes;
protected $attributes;
protected $lineno;
protected $tag;
private $name;
private $sourceContext;
/**
* @param array $nodes An array of named nodes
* @param array $attributes An array of attributes (should not be
nodes)
* @param int $lineno The line number
* @param string $tag The tag name associated with the Node
*/
public function __construct(array $nodes = [], array $attributes = [],
$lineno = 0, $tag = null)
{
foreach ($nodes as $name => $node) {
if (!$node instanceof \Twig_NodeInterface) {
@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, \get_class($this)), E_USER_DEPRECATED);
}
}
$this->nodes = $nodes;
$this->attributes = $attributes;
$this->lineno = $lineno;
$this->tag = $tag;
}
public function __toString()
{
$attributes = [];
foreach ($this->attributes as $name => $value) {
$attributes[] = sprintf('%s: %s', $name,
str_replace("\n", '', var_export($value, true)));
}
$repr = [\get_class($this).'('.implode(', ',
$attributes)];
if (\count($this->nodes)) {
foreach ($this->nodes as $name => $node) {
$len = \strlen($name) + 4;
$noderepr = [];
foreach (explode("\n", (string) $node) as $line)
{
$noderepr[] = str_repeat(' ', $len).$line;
}
$repr[] = sprintf(' %s: %s', $name,
ltrim(implode("\n", $noderepr)));
}
$repr[] = ')';
} else {
$repr[0] .= ')';
}
return implode("\n", $repr);
}
/**
* @deprecated since 1.16.1 (to be removed in 2.0)
*/
public function toXml($asDom = false)
{
@trigger_error(sprintf('%s is deprecated since version 1.16.1
and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED);
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$dom->appendChild($xml =
$dom->createElement('twig'));
$xml->appendChild($node =
$dom->createElement('node'));
$node->setAttribute('class', \get_class($this));
foreach ($this->attributes as $name => $value) {
$node->appendChild($attribute =
$dom->createElement('attribute'));
$attribute->setAttribute('name', $name);
$attribute->appendChild($dom->createTextNode($value));
}
foreach ($this->nodes as $name => $n) {
if (null === $n) {
continue;
}
$child =
$n->toXml(true)->getElementsByTagName('node')->item(0);
$child = $dom->importNode($child, true);
$child->setAttribute('name', $name);
$node->appendChild($child);
}
return $asDom ? $dom : $dom->saveXML();
}
public function compile(Compiler $compiler)
{
foreach ($this->nodes as $node) {
$node->compile($compiler);
}
}
public function getTemplateLine()
{
return $this->lineno;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getLine()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getTemplateLine() instead.', E_USER_DEPRECATED);
return $this->lineno;
}
public function getNodeTag()
{
return $this->tag;
}
/**
* @return bool
*/
public function hasAttribute($name)
{
return \array_key_exists($name, $this->attributes);
}
/**
* @return mixed
*/
public function getAttribute($name)
{
if (!\array_key_exists($name, $this->attributes)) {
throw new \LogicException(sprintf('Attribute
"%s" does not exist for Node "%s".', $name,
\get_class($this)));
}
return $this->attributes[$name];
}
/**
* @param string $name
* @param mixed $value
*/
public function setAttribute($name, $value)
{
$this->attributes[$name] = $value;
}
public function removeAttribute($name)
{
unset($this->attributes[$name]);
}
/**
* @return bool
*/
public function hasNode($name)
{
return \array_key_exists($name, $this->nodes);
}
/**
* @return Node
*/
public function getNode($name)
{
if (!\array_key_exists($name, $this->nodes)) {
throw new \LogicException(sprintf('Node "%s"
does not exist for Node "%s".', $name, \get_class($this)));
}
return $this->nodes[$name];
}
public function setNode($name, $node = null)
{
if (!$node instanceof \Twig_NodeInterface) {
@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,
\get_class($this)), E_USER_DEPRECATED);
}
$this->nodes[$name] = $node;
}
public function removeNode($name)
{
unset($this->nodes[$name]);
}
public function count()
{
return \count($this->nodes);
}
public function getIterator()
{
return new \ArrayIterator($this->nodes);
}
public function setTemplateName($name)
{
$this->name = $name;
foreach ($this->nodes as $node) {
if (null !== $node) {
$node->setTemplateName($name);
}
}
}
public function getTemplateName()
{
return $this->name;
}
public function setSourceContext(Source $source)
{
$this->sourceContext = $source;
foreach ($this->nodes as $node) {
if ($node instanceof Node) {
$node->setSourceContext($source);
}
}
}
public function getSourceContext()
{
return $this->sourceContext;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function setFilename($name)
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
setTemplateName() instead.', E_USER_DEPRECATED);
$this->setTemplateName($name);
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getFilename()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getTemplateName() instead.', E_USER_DEPRECATED);
return $this->name;
}
}
class_alias('Twig\Node\Node', 'Twig_Node');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Compiler');
PK���[��m��!src/Node/NodeCaptureInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
/**
* Represents a node that captures any nested displayable nodes.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface NodeCaptureInterface
{
}
class_alias('Twig\Node\NodeCaptureInterface',
'Twig_NodeCaptureInterface');
PK���[
*����
src/Node/NodeOutputInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
/**
* Represents a displayable node in the AST.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface NodeOutputInterface
{
}
class_alias('Twig\Node\NodeOutputInterface',
'Twig_NodeOutputInterface');
PK���[�����src/Node/PrintNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Represents a node that outputs an expression.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class PrintNode extends Node implements NodeOutputInterface
{
public function __construct(AbstractExpression $expr, $lineno, $tag =
null)
{
parent::__construct(['expr' => $expr], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('echo ')
->subcompile($this->getNode('expr'))
->raw(";\n")
;
}
}
class_alias('Twig\Node\PrintNode', 'Twig_Node_Print');
PK���[;r8�//src/Node/SandboxedPrintNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
/**
* Adds a check for the __toString() method when the variable is an object
and the sandbox is activated.
*
* When there is a simple Print statement, like {{ article }},
* and if the sandbox is enabled, we need to check that the __toString()
* method is allowed if 'article' is an object.
*
* Not used anymore, to be deprecated in 2.x and removed in 3.0
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SandboxedPrintNode extends PrintNode
{
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('echo ')
;
$expr = $this->getNode('expr');
if ($expr instanceof ConstantExpression) {
$compiler
->subcompile($expr)
->raw(";\n")
;
} else {
$compiler
->write('$this->env->getExtension(\'\Twig\Extension\SandboxExtension\')->ensureToStringAllowed(')
->subcompile($expr)
->raw(");\n")
;
}
}
/**
* Removes node filters.
*
* This is mostly needed when another visitor adds filters (like the
escaper one).
*
* @return Node
*/
protected function removeNodeFilter(Node $node)
{
if ($node instanceof FilterExpression) {
return
$this->removeNodeFilter($node->getNode('node'));
}
return $node;
}
}
class_alias('Twig\Node\SandboxedPrintNode',
'Twig_Node_SandboxedPrint');
PK���[���j��src/Node/SandboxNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a sandbox node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SandboxNode extends Node
{
public function __construct(\Twig_NodeInterface $body, $lineno, $tag =
null)
{
parent::__construct(['body' => $body], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write("if (!\$alreadySandboxed =
\$this->sandbox->isSandboxed()) {\n")
->indent()
->write("\$this->sandbox->enableSandbox();\n")
->outdent()
->write("}\n")
->subcompile($this->getNode('body'))
->write("if (!\$alreadySandboxed) {\n")
->indent()
->write("\$this->sandbox->disableSandbox();\n")
->outdent()
->write("}\n")
;
}
}
class_alias('Twig\Node\SandboxNode',
'Twig_Node_Sandbox');
PK���[�(�|g
g
src/Node/SetNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\ConstantExpression;
/**
* Represents a set node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SetNode extends Node implements NodeCaptureInterface
{
public function __construct($capture, \Twig_NodeInterface $names,
\Twig_NodeInterface $values, $lineno, $tag = null)
{
parent::__construct(['names' => $names,
'values' => $values], ['capture' => $capture,
'safe' => false], $lineno, $tag);
/*
* Optimizes the node when capture is used for a large block of
text.
*
* {% set foo %}foo{% endset %} is compiled to
$context['foo'] = new Twig\Markup("foo");
*/
if ($this->getAttribute('capture')) {
$this->setAttribute('safe', true);
$values = $this->getNode('values');
if ($values instanceof TextNode) {
$this->setNode('values', new
ConstantExpression($values->getAttribute('data'),
$values->getTemplateLine()));
$this->setAttribute('capture', false);
}
}
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
if (\count($this->getNode('names')) > 1) {
$compiler->write('list(');
foreach ($this->getNode('names') as $idx =>
$node) {
if ($idx) {
$compiler->raw(', ');
}
$compiler->subcompile($node);
}
$compiler->raw(')');
} else {
if ($this->getAttribute('capture')) {
if ($compiler->getEnvironment()->isDebug()) {
$compiler->write("ob_start();\n");
} else {
$compiler->write("ob_start(function () { return
''; });\n");
}
$compiler
->subcompile($this->getNode('values'))
;
}
$compiler->subcompile($this->getNode('names'),
false);
if ($this->getAttribute('capture')) {
$compiler->raw(" = ('' === \$tmp =
ob_get_clean()) ? '' : new Markup(\$tmp,
\$this->env->getCharset())");
}
}
if (!$this->getAttribute('capture')) {
$compiler->raw(' = ');
if (\count($this->getNode('names')) > 1) {
$compiler->write('[');
foreach ($this->getNode('values') as $idx
=> $value) {
if ($idx) {
$compiler->raw(', ');
}
$compiler->subcompile($value);
}
$compiler->raw(']');
} else {
if ($this->getAttribute('safe')) {
$compiler
->raw("('' === \$tmp = ")
->subcompile($this->getNode('values'))
->raw(") ? '' : new Markup(\$tmp,
\$this->env->getCharset())")
;
} else {
$compiler->subcompile($this->getNode('values'));
}
}
}
$compiler->raw(";\n");
}
}
class_alias('Twig\Node\SetNode', 'Twig_Node_Set');
PK���[�~`-��src/Node/SetTempNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* @internal
*/
class SetTempNode extends Node
{
public function __construct($name, $lineno)
{
parent::__construct([], ['name' => $name], $lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$compiler
->addDebugInfo($this)
->write('if (isset($context[')
->string($name)
->raw('])) { $_')
->raw($name)
->raw('_ = $context[')
->repr($name)
->raw(']; } else { $_')
->raw($name)
->raw("_ = null; }\n")
;
}
}
class_alias('Twig\Node\SetTempNode',
'Twig_Node_SetTemp');
PK���[��$�kksrc/Node/SpacelessNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a spaceless node.
*
* It removes spaces between HTML tags.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SpacelessNode extends Node
{
public function __construct(\Twig_NodeInterface $body, $lineno, $tag =
'spaceless')
{
parent::__construct(['body' => $body], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
;
if ($compiler->getEnvironment()->isDebug()) {
$compiler->write("ob_start();\n");
} else {
$compiler->write("ob_start(function () { return
''; });\n");
}
$compiler
->subcompile($this->getNode('body'))
->write("echo
trim(preg_replace('/>\s+</', '><',
ob_get_clean()));\n")
;
}
}
class_alias('Twig\Node\SpacelessNode',
'Twig_Node_Spaceless');
PK���[�e:422src/Node/TextNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a text node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TextNode extends Node implements NodeOutputInterface
{
public function __construct($data, $lineno)
{
parent::__construct([], ['data' => $data], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('echo ')
->string($this->getAttribute('data'))
->raw(";\n")
;
}
}
class_alias('Twig\Node\TextNode', 'Twig_Node_Text');
PK���[�e ��src/Node/WithNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a nested "with" scope.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class WithNode extends Node
{
public function __construct(Node $body, Node $variables = null, $only =
false, $lineno, $tag = null)
{
$nodes = ['body' => $body];
if (null !== $variables) {
$nodes['variables'] = $variables;
}
parent::__construct($nodes, ['only' => (bool) $only],
$lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
if ($this->hasNode('variables')) {
$node = $this->getNode('variables');
$varsName = $compiler->getVarName();
$compiler
->write(sprintf('$%s = ', $varsName))
->subcompile($node)
->raw(";\n")
->write(sprintf("if (!twig_test_iterable(\$%s))
{\n", $varsName))
->indent()
->write("throw new RuntimeError('Variables
passed to the \"with\" tag must be a hash.', ")
->repr($node->getTemplateLine())
->raw(", \$this->getSourceContext());\n")
->outdent()
->write("}\n")
->write(sprintf("\$%s =
twig_to_array(\$%s);\n", $varsName, $varsName))
;
if ($this->getAttribute('only')) {
$compiler->write("\$context = ['_parent'
=> \$context];\n");
} else {
$compiler->write("\$context['_parent'] =
\$context;\n");
}
$compiler->write(sprintf("\$context =
\$this->env->mergeGlobals(array_merge(\$context, \$%s));\n",
$varsName));
} else {
$compiler->write("\$context['_parent'] =
\$context;\n");
}
$compiler
->subcompile($this->getNode('body'))
->write("\$context =
\$context['_parent'];\n")
;
}
}
class_alias('Twig\Node\WithNode', 'Twig_Node_With');
PK���[��v&
src/NodeTraverser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\NodeVisitor\NodeVisitorInterface;
/**
* A node traverser.
*
* It visits all nodes and their children and calls the given visitor for
each.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class NodeTraverser
{
protected $env;
protected $visitors = [];
/**
* @param NodeVisitorInterface[] $visitors
*/
public function __construct(Environment $env, array $visitors = [])
{
$this->env = $env;
foreach ($visitors as $visitor) {
$this->addVisitor($visitor);
}
}
public function addVisitor(NodeVisitorInterface $visitor)
{
$this->visitors[$visitor->getPriority()][] = $visitor;
}
/**
* Traverses a node and calls the registered visitors.
*
* @return \Twig_NodeInterface
*/
public function traverse(\Twig_NodeInterface $node)
{
ksort($this->visitors);
foreach ($this->visitors as $visitors) {
foreach ($visitors as $visitor) {
$node = $this->traverseForVisitor($visitor, $node);
}
}
return $node;
}
protected function traverseForVisitor(NodeVisitorInterface $visitor,
\Twig_NodeInterface $node = null)
{
if (null === $node) {
return;
}
$node = $visitor->enterNode($node, $this->env);
foreach ($node as $k => $n) {
if (null === $n) {
continue;
}
if (false !== ($m = $this->traverseForVisitor($visitor, $n))
&& null !== $m) {
if ($m !== $n) {
$node->setNode($k, $m);
}
} else {
$node->removeNode($k);
}
}
return $visitor->leaveNode($node, $this->env);
}
}
class_alias('Twig\NodeTraverser',
'Twig_NodeTraverser');
PK���[���#11'src/NodeVisitor/AbstractNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\Node;
/**
* Used to make node visitors compatible with Twig 1.x and 2.x.
*
* To be removed in Twig 3.1.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class AbstractNodeVisitor implements NodeVisitorInterface
{
final public function enterNode(\Twig_NodeInterface $node, Environment
$env)
{
if (!$node instanceof Node) {
throw new \LogicException(sprintf('%s only supports
\Twig\Node\Node instances.', __CLASS__));
}
return $this->doEnterNode($node, $env);
}
final public function leaveNode(\Twig_NodeInterface $node, Environment
$env)
{
if (!$node instanceof Node) {
throw new \LogicException(sprintf('%s only supports
\Twig\Node\Node instances.', __CLASS__));
}
return $this->doLeaveNode($node, $env);
}
/**
* Called before child nodes are visited.
*
* @return Node The modified node
*/
abstract protected function doEnterNode(Node $node, Environment $env);
/**
* Called after child nodes are visited.
*
* @return Node|false|null The modified node or null if the node must
be removed
*/
abstract protected function doLeaveNode(Node $node, Environment $env);
}
class_alias('Twig\NodeVisitor\AbstractNodeVisitor',
'Twig_BaseNodeVisitor');
PK���[��,,&src/NodeVisitor/EscaperNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\AutoEscapeNode;
use Twig\Node\BlockNode;
use Twig\Node\BlockReferenceNode;
use Twig\Node\DoNode;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\InlinePrint;
use Twig\Node\ImportNode;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\NodeTraverser;
/**
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EscaperNodeVisitor extends AbstractNodeVisitor
{
protected $statusStack = [];
protected $blocks = [];
protected $safeAnalysis;
protected $traverser;
protected $defaultStrategy = false;
protected $safeVars = [];
public function __construct()
{
$this->safeAnalysis = new SafeAnalysisNodeVisitor();
}
protected function doEnterNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
if
($env->hasExtension('\Twig\Extension\EscaperExtension')
&& $defaultStrategy =
$env->getExtension('\Twig\Extension\EscaperExtension')->getDefaultStrategy($node->getTemplateName()))
{
$this->defaultStrategy = $defaultStrategy;
}
$this->safeVars = [];
$this->blocks = [];
} elseif ($node instanceof AutoEscapeNode) {
$this->statusStack[] =
$node->getAttribute('value');
} elseif ($node instanceof BlockNode) {
$this->statusStack[] =
isset($this->blocks[$node->getAttribute('name')]) ?
$this->blocks[$node->getAttribute('name')] :
$this->needEscaping($env);
} elseif ($node instanceof ImportNode) {
$this->safeVars[] =
$node->getNode('var')->getAttribute('name');
}
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$this->defaultStrategy = false;
$this->safeVars = [];
$this->blocks = [];
} elseif ($node instanceof FilterExpression) {
return $this->preEscapeFilterNode($node, $env);
} elseif ($node instanceof PrintNode && false !== $type =
$this->needEscaping($env)) {
$expression = $node->getNode('expr');
if ($expression instanceof ConditionalExpression &&
$this->shouldUnwrapConditional($expression, $env, $type)) {
return new DoNode($this->unwrapConditional($expression,
$env, $type), $expression->getTemplateLine());
}
return $this->escapePrintNode($node, $env, $type);
}
if ($node instanceof AutoEscapeNode || $node instanceof BlockNode)
{
array_pop($this->statusStack);
} elseif ($node instanceof BlockReferenceNode) {
$this->blocks[$node->getAttribute('name')] =
$this->needEscaping($env);
}
return $node;
}
private function shouldUnwrapConditional(ConditionalExpression
$expression, Environment $env, $type)
{
$expr2Safe = $this->isSafeFor($type,
$expression->getNode('expr2'), $env);
$expr3Safe = $this->isSafeFor($type,
$expression->getNode('expr3'), $env);
return $expr2Safe !== $expr3Safe;
}
private function unwrapConditional(ConditionalExpression $expression,
Environment $env, $type)
{
// convert "echo a ? b : c" to "a ? echo b : echo
c" recursively
$expr2 = $expression->getNode('expr2');
if ($expr2 instanceof ConditionalExpression &&
$this->shouldUnwrapConditional($expr2, $env, $type)) {
$expr2 = $this->unwrapConditional($expr2, $env, $type);
} else {
$expr2 = $this->escapeInlinePrintNode(new
InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type);
}
$expr3 = $expression->getNode('expr3');
if ($expr3 instanceof ConditionalExpression &&
$this->shouldUnwrapConditional($expr3, $env, $type)) {
$expr3 = $this->unwrapConditional($expr3, $env, $type);
} else {
$expr3 = $this->escapeInlinePrintNode(new
InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type);
}
return new
ConditionalExpression($expression->getNode('expr1'), $expr2,
$expr3, $expression->getTemplateLine());
}
private function escapeInlinePrintNode(InlinePrint $node, Environment
$env, $type)
{
$expression = $node->getNode('node');
if ($this->isSafeFor($type, $expression, $env)) {
return $node;
}
return new InlinePrint($this->getEscaperFilter($type,
$expression), $node->getTemplateLine());
}
protected function escapePrintNode(PrintNode $node, Environment $env,
$type)
{
if (false === $type) {
return $node;
}
$expression = $node->getNode('expr');
if ($this->isSafeFor($type, $expression, $env)) {
return $node;
}
$class = \get_class($node);
return new $class($this->getEscaperFilter($type, $expression),
$node->getTemplateLine());
}
protected function preEscapeFilterNode(FilterExpression $filter,
Environment $env)
{
$name =
$filter->getNode('filter')->getAttribute('value');
$type = $env->getFilter($name)->getPreEscape();
if (null === $type) {
return $filter;
}
$node = $filter->getNode('node');
if ($this->isSafeFor($type, $node, $env)) {
return $filter;
}
$filter->setNode('node',
$this->getEscaperFilter($type, $node));
return $filter;
}
protected function isSafeFor($type, \Twig_NodeInterface $expression,
$env)
{
$safe = $this->safeAnalysis->getSafe($expression);
if (null === $safe) {
if (null === $this->traverser) {
$this->traverser = new NodeTraverser($env,
[$this->safeAnalysis]);
}
$this->safeAnalysis->setSafeVars($this->safeVars);
$this->traverser->traverse($expression);
$safe = $this->safeAnalysis->getSafe($expression);
}
return \in_array($type, $safe) || \in_array('all',
$safe);
}
protected function needEscaping(Environment $env)
{
if (\count($this->statusStack)) {
return $this->statusStack[\count($this->statusStack) -
1];
}
return $this->defaultStrategy ? $this->defaultStrategy :
false;
}
protected function getEscaperFilter($type, \Twig_NodeInterface $node)
{
$line = $node->getTemplateLine();
$name = new ConstantExpression('escape', $line);
$args = new Node([new ConstantExpression((string) $type, $line),
new ConstantExpression(null, $line), new ConstantExpression(true, $line)]);
return new FilterExpression($node, $name, $args, $line);
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\NodeVisitor\EscaperNodeVisitor',
'Twig_NodeVisitor_Escaper');
PK���[&� �(src/NodeVisitor/NodeVisitorInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
/**
* Interface for node visitor classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface NodeVisitorInterface
{
/**
* Called before child nodes are visited.
*
* @return \Twig_NodeInterface The modified node
*/
public function enterNode(\Twig_NodeInterface $node, Environment $env);
/**
* Called after child nodes are visited.
*
* @return \Twig_NodeInterface|false|null The modified node or null if
the node must be removed
*/
public function leaveNode(\Twig_NodeInterface $node, Environment $env);
/**
* Returns the priority for this visitor.
*
* Priority should be between -10 and 10 (0 is the default).
*
* @return int The priority level
*/
public function getPriority();
}
class_alias('Twig\NodeVisitor\NodeVisitorInterface',
'Twig_NodeVisitorInterface');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Environment');
PK���[6$�"�"(src/NodeVisitor/OptimizerNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\BlockReferenceNode;
use Twig\Node\BodyNode;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Expression\TempNameExpression;
use Twig\Node\ForNode;
use Twig\Node\IncludeNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Node\SetTempNode;
/**
* Tries to optimize the AST.
*
* This visitor is always the last registered one.
*
* You can configure which optimizations you want to activate via the
* optimizer mode.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class OptimizerNodeVisitor extends AbstractNodeVisitor
{
const OPTIMIZE_ALL = -1;
const OPTIMIZE_NONE = 0;
const OPTIMIZE_FOR = 2;
const OPTIMIZE_RAW_FILTER = 4;
const OPTIMIZE_VAR_ACCESS = 8;
protected $loops = [];
protected $loopsTargets = [];
protected $optimizers;
protected $prependedNodes = [];
protected $inABody = false;
/**
* @param int $optimizers The optimizer mode
*/
public function __construct($optimizers = -1)
{
if (!\is_int($optimizers) || $optimizers > (self::OPTIMIZE_FOR |
self::OPTIMIZE_RAW_FILTER | self::OPTIMIZE_VAR_ACCESS)) {
throw new \InvalidArgumentException(sprintf('Optimizer
mode "%s" is not valid.', $optimizers));
}
$this->optimizers = $optimizers;
}
protected function doEnterNode(Node $node, Environment $env)
{
if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR &
$this->optimizers)) {
$this->enterOptimizeFor($node, $env);
}
if (\PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS
=== (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) &&
!$env->isStrictVariables() &&
!$env->hasExtension('\Twig\Extension\SandboxExtension')) {
if ($this->inABody) {
if (!$node instanceof AbstractExpression) {
if ('Twig_Node' !== \get_class($node)) {
array_unshift($this->prependedNodes, []);
}
} else {
$node = $this->optimizeVariables($node, $env);
}
} elseif ($node instanceof BodyNode) {
$this->inABody = true;
}
}
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
$expression = $node instanceof AbstractExpression;
if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR &
$this->optimizers)) {
$this->leaveOptimizeFor($node, $env);
}
if (self::OPTIMIZE_RAW_FILTER === (self::OPTIMIZE_RAW_FILTER &
$this->optimizers)) {
$node = $this->optimizeRawFilter($node, $env);
}
$node = $this->optimizePrintNode($node, $env);
if (self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS &
$this->optimizers) && !$env->isStrictVariables() &&
!$env->hasExtension('\Twig\Extension\SandboxExtension')) {
if ($node instanceof BodyNode) {
$this->inABody = false;
} elseif ($this->inABody) {
if (!$expression && 'Twig_Node' !==
\get_class($node) && $prependedNodes =
array_shift($this->prependedNodes)) {
$nodes = [];
foreach (array_unique($prependedNodes) as $name) {
$nodes[] = new SetTempNode($name,
$node->getTemplateLine());
}
$nodes[] = $node;
$node = new Node($nodes);
}
}
}
return $node;
}
protected function optimizeVariables(\Twig_NodeInterface $node,
Environment $env)
{
if ('Twig_Node_Expression_Name' === \get_class($node)
&& $node->isSimple()) {
$this->prependedNodes[0][] =
$node->getAttribute('name');
return new
TempNameExpression($node->getAttribute('name'),
$node->getTemplateLine());
}
return $node;
}
/**
* Optimizes print nodes.
*
* It replaces:
*
* * "echo $this->render(Parent)Block()" with
"$this->display(Parent)Block()"
*
* @return \Twig_NodeInterface
*/
protected function optimizePrintNode(\Twig_NodeInterface $node,
Environment $env)
{
if (!$node instanceof PrintNode) {
return $node;
}
$exprNode = $node->getNode('expr');
if (
$exprNode instanceof BlockReferenceExpression ||
$exprNode instanceof ParentExpression
) {
$exprNode->setAttribute('output', true);
return $exprNode;
}
return $node;
}
/**
* Removes "raw" filters.
*
* @return \Twig_NodeInterface
*/
protected function optimizeRawFilter(\Twig_NodeInterface $node,
Environment $env)
{
if ($node instanceof FilterExpression && 'raw' ==
$node->getNode('filter')->getAttribute('value'))
{
return $node->getNode('node');
}
return $node;
}
/**
* Optimizes "for" tag by removing the "loop"
variable creation whenever possible.
*/
protected function enterOptimizeFor(\Twig_NodeInterface $node,
Environment $env)
{
if ($node instanceof ForNode) {
// disable the loop variable by default
$node->setAttribute('with_loop', false);
array_unshift($this->loops, $node);
array_unshift($this->loopsTargets,
$node->getNode('value_target')->getAttribute('name'));
array_unshift($this->loopsTargets,
$node->getNode('key_target')->getAttribute('name'));
} elseif (!$this->loops) {
// we are outside a loop
return;
}
// when do we need to add the loop variable back?
// the loop variable is referenced for the current loop
elseif ($node instanceof NameExpression && 'loop'
=== $node->getAttribute('name')) {
$node->setAttribute('always_defined', true);
$this->addLoopToCurrent();
}
// optimize access to loop targets
elseif ($node instanceof NameExpression &&
\in_array($node->getAttribute('name'),
$this->loopsTargets)) {
$node->setAttribute('always_defined', true);
}
// block reference
elseif ($node instanceof BlockReferenceNode || $node instanceof
BlockReferenceExpression) {
$this->addLoopToCurrent();
}
// include without the only attribute
elseif ($node instanceof IncludeNode &&
!$node->getAttribute('only')) {
$this->addLoopToAll();
}
// include function without the with_context=false parameter
elseif ($node instanceof FunctionExpression
&& 'include' ===
$node->getAttribute('name')
&&
(!$node->getNode('arguments')->hasNode('with_context')
|| false !==
$node->getNode('arguments')->getNode('with_context')->getAttribute('value')
)
) {
$this->addLoopToAll();
}
// the loop variable is referenced via an attribute
elseif ($node instanceof GetAttrExpression
&& (!$node->getNode('attribute')
instanceof ConstantExpression
|| 'parent' ===
$node->getNode('attribute')->getAttribute('value')
)
&& (true ===
$this->loops[0]->getAttribute('with_loop')
|| ($node->getNode('node') instanceof
NameExpression
&& 'loop' ===
$node->getNode('node')->getAttribute('name')
)
)
) {
$this->addLoopToAll();
}
}
/**
* Optimizes "for" tag by removing the "loop"
variable creation whenever possible.
*/
protected function leaveOptimizeFor(\Twig_NodeInterface $node,
Environment $env)
{
if ($node instanceof ForNode) {
array_shift($this->loops);
array_shift($this->loopsTargets);
array_shift($this->loopsTargets);
}
}
protected function addLoopToCurrent()
{
$this->loops[0]->setAttribute('with_loop', true);
}
protected function addLoopToAll()
{
foreach ($this->loops as $loop) {
$loop->setAttribute('with_loop', true);
}
}
public function getPriority()
{
return 255;
}
}
class_alias('Twig\NodeVisitor\OptimizerNodeVisitor',
'Twig_NodeVisitor_Optimizer');
PK���[p�+src/NodeVisitor/SafeAnalysisNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\MethodCallExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Node;
/**
* @final
*/
class SafeAnalysisNodeVisitor extends AbstractNodeVisitor
{
protected $data = [];
protected $safeVars = [];
public function setSafeVars($safeVars)
{
$this->safeVars = $safeVars;
}
public function getSafe(\Twig_NodeInterface $node)
{
$hash = spl_object_hash($node);
if (!isset($this->data[$hash])) {
return;
}
foreach ($this->data[$hash] as $bucket) {
if ($bucket['key'] !== $node) {
continue;
}
if (\in_array('html_attr',
$bucket['value'])) {
$bucket['value'][] = 'html';
}
return $bucket['value'];
}
}
protected function setSafe(\Twig_NodeInterface $node, array $safe)
{
$hash = spl_object_hash($node);
if (isset($this->data[$hash])) {
foreach ($this->data[$hash] as &$bucket) {
if ($bucket['key'] === $node) {
$bucket['value'] = $safe;
return;
}
}
}
$this->data[$hash][] = [
'key' => $node,
'value' => $safe,
];
}
protected function doEnterNode(Node $node, Environment $env)
{
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ConstantExpression) {
// constants are marked safe for all
$this->setSafe($node, ['all']);
} elseif ($node instanceof BlockReferenceExpression) {
// blocks are safe by definition
$this->setSafe($node, ['all']);
} elseif ($node instanceof ParentExpression) {
// parent block is safe by definition
$this->setSafe($node, ['all']);
} elseif ($node instanceof ConditionalExpression) {
// intersect safeness of both operands
$safe =
$this->intersectSafe($this->getSafe($node->getNode('expr2')),
$this->getSafe($node->getNode('expr3')));
$this->setSafe($node, $safe);
} elseif ($node instanceof FilterExpression) {
// filter expression is safe when the filter is safe
$name =
$node->getNode('filter')->getAttribute('value');
$args = $node->getNode('arguments');
if (false !== $filter = $env->getFilter($name)) {
$safe = $filter->getSafe($args);
if (null === $safe) {
$safe =
$this->intersectSafe($this->getSafe($node->getNode('node')),
$filter->getPreservesSafety());
}
$this->setSafe($node, $safe);
} else {
$this->setSafe($node, []);
}
} elseif ($node instanceof FunctionExpression) {
// function expression is safe when the function is safe
$name = $node->getAttribute('name');
$args = $node->getNode('arguments');
$function = $env->getFunction($name);
if (false !== $function) {
$this->setSafe($node, $function->getSafe($args));
} else {
$this->setSafe($node, []);
}
} elseif ($node instanceof MethodCallExpression) {
if ($node->getAttribute('safe')) {
$this->setSafe($node, ['all']);
} else {
$this->setSafe($node, []);
}
} elseif ($node instanceof GetAttrExpression &&
$node->getNode('node') instanceof NameExpression) {
$name =
$node->getNode('node')->getAttribute('name');
// attributes on template instances are safe
if ('_self' == $name || \in_array($name,
$this->safeVars)) {
$this->setSafe($node, ['all']);
} else {
$this->setSafe($node, []);
}
} else {
$this->setSafe($node, []);
}
return $node;
}
protected function intersectSafe(array $a = null, array $b = null)
{
if (null === $a || null === $b) {
return [];
}
if (\in_array('all', $a)) {
return $b;
}
if (\in_array('all', $b)) {
return $a;
}
return array_intersect($a, $b);
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\NodeVisitor\SafeAnalysisNodeVisitor',
'Twig_NodeVisitor_SafeAnalysis');
PK���[��w��&src/NodeVisitor/SandboxNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\CheckSecurityNode;
use Twig\Node\CheckToStringNode;
use Twig\Node\Expression\Binary\ConcatBinary;
use Twig\Node\Expression\Binary\RangeBinary;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Node\SetNode;
/**
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SandboxNodeVisitor extends AbstractNodeVisitor
{
protected $inAModule = false;
protected $tags;
protected $filters;
protected $functions;
private $needsToStringWrap = false;
protected function doEnterNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$this->inAModule = true;
$this->tags = [];
$this->filters = [];
$this->functions = [];
return $node;
} elseif ($this->inAModule) {
// look for tags
if ($node->getNodeTag() &&
!isset($this->tags[$node->getNodeTag()])) {
$this->tags[$node->getNodeTag()] = $node;
}
// look for filters
if ($node instanceof FilterExpression &&
!isset($this->filters[$node->getNode('filter')->getAttribute('value')]))
{
$this->filters[$node->getNode('filter')->getAttribute('value')]
= $node;
}
// look for functions
if ($node instanceof FunctionExpression &&
!isset($this->functions[$node->getAttribute('name')])) {
$this->functions[$node->getAttribute('name')] = $node;
}
// the .. operator is equivalent to the range() function
if ($node instanceof RangeBinary &&
!isset($this->functions['range'])) {
$this->functions['range'] = $node;
}
if ($node instanceof PrintNode) {
$this->needsToStringWrap = true;
$this->wrapNode($node, 'expr');
}
if ($node instanceof SetNode &&
!$node->getAttribute('capture')) {
$this->needsToStringWrap = true;
}
// wrap outer nodes that can implicitly call __toString()
if ($this->needsToStringWrap) {
if ($node instanceof ConcatBinary) {
$this->wrapNode($node, 'left');
$this->wrapNode($node, 'right');
}
if ($node instanceof FilterExpression) {
$this->wrapNode($node, 'node');
$this->wrapArrayNode($node, 'arguments');
}
if ($node instanceof FunctionExpression) {
$this->wrapArrayNode($node, 'arguments');
}
}
}
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$this->inAModule = false;
$node->getNode('constructor_end')->setNode('_security_check',
new Node([new CheckSecurityNode($this->filters, $this->tags,
$this->functions), $node->getNode('display_start')]));
} elseif ($this->inAModule) {
if ($node instanceof PrintNode || $node instanceof SetNode) {
$this->needsToStringWrap = false;
}
}
return $node;
}
private function wrapNode(Node $node, $name)
{
$expr = $node->getNode($name);
if ($expr instanceof NameExpression || $expr instanceof
GetAttrExpression) {
$node->setNode($name, new CheckToStringNode($expr));
}
}
private function wrapArrayNode(Node $node, $name)
{
$args = $node->getNode($name);
foreach ($args as $name => $_) {
$this->wrapNode($args, $name);
}
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\NodeVisitor\SandboxNodeVisitor',
'Twig_NodeVisitor_Sandbox');
PK���[(�lt�5�5src/Parser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
use Twig\Node\BlockNode;
use Twig\Node\BlockReferenceNode;
use Twig\Node\BodyNode;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\MacroNode;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\Node\NodeCaptureInterface;
use Twig\Node\NodeOutputInterface;
use Twig\Node\PrintNode;
use Twig\Node\TextNode;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\TokenParser\TokenParserInterface;
/**
* Default parser implementation.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Parser implements \Twig_ParserInterface
{
protected $stack = [];
protected $stream;
protected $parent;
protected $handlers;
protected $visitors;
protected $expressionParser;
protected $blocks;
protected $blockStack;
protected $macros;
protected $env;
protected $reservedMacroNames;
protected $importedSymbols;
protected $traits;
protected $embeddedTemplates = [];
private $varNameSalt = 0;
public function __construct(Environment $env)
{
$this->env = $env;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getEnvironment()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0.',
E_USER_DEPRECATED);
return $this->env;
}
public function getVarName()
{
return sprintf('__internal_%s', hash('sha256',
__METHOD__.$this->stream->getSourceContext()->getCode().$this->varNameSalt++));
}
/**
* @deprecated since 1.27 (to be removed in 2.0). Use
$parser->getStream()->getSourceContext()->getPath() instead.
*/
public function getFilename()
{
@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);
return $this->stream->getSourceContext()->getName();
}
public function parse(TokenStream $stream, $test = null, $dropNeedle =
false)
{
// push all variables into the stack to keep the current state of
the parser
// using get_object_vars() instead of foreach would lead to
https://bugs.php.net/71336
// This hack can be removed when min version if PHP 7.0
$vars = [];
foreach ($this as $k => $v) {
$vars[$k] = $v;
}
unset($vars['stack'], $vars['env'],
$vars['handlers'], $vars['visitors'],
$vars['expressionParser'],
$vars['reservedMacroNames']);
$this->stack[] = $vars;
// tag handlers
if (null === $this->handlers) {
$this->handlers = $this->env->getTokenParsers();
$this->handlers->setParser($this);
}
// node visitors
if (null === $this->visitors) {
$this->visitors = $this->env->getNodeVisitors();
}
if (null === $this->expressionParser) {
$this->expressionParser = new ExpressionParser($this,
$this->env);
}
$this->stream = $stream;
$this->parent = null;
$this->blocks = [];
$this->macros = [];
$this->traits = [];
$this->blockStack = [];
$this->importedSymbols = [[]];
$this->embeddedTemplates = [];
$this->varNameSalt = 0;
try {
$body = $this->subparse($test, $dropNeedle);
if (null !== $this->parent && null === $body =
$this->filterBodyNodes($body)) {
$body = new Node();
}
} catch (SyntaxError $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->stream->getSourceContext());
}
if (!$e->getTemplateLine()) {
$e->setTemplateLine($this->stream->getCurrent()->getLine());
}
throw $e;
}
$node = new ModuleNode(new BodyNode([$body]), $this->parent, new
Node($this->blocks), new Node($this->macros), new
Node($this->traits), $this->embeddedTemplates,
$stream->getSourceContext());
$traverser = new NodeTraverser($this->env, $this->visitors);
$node = $traverser->traverse($node);
// restore previous stack so previous parse() call can resume
working
foreach (array_pop($this->stack) as $key => $val) {
$this->$key = $val;
}
return $node;
}
public function subparse($test, $dropNeedle = false)
{
$lineno = $this->getCurrentToken()->getLine();
$rv = [];
while (!$this->stream->isEOF()) {
switch ($this->getCurrentToken()->getType()) {
case Token::TEXT_TYPE:
$token = $this->stream->next();
$rv[] = new TextNode($token->getValue(),
$token->getLine());
break;
case Token::VAR_START_TYPE:
$token = $this->stream->next();
$expr =
$this->expressionParser->parseExpression();
$this->stream->expect(Token::VAR_END_TYPE);
$rv[] = new PrintNode($expr, $token->getLine());
break;
case Token::BLOCK_START_TYPE:
$this->stream->next();
$token = $this->getCurrentToken();
if (Token::NAME_TYPE !== $token->getType()) {
throw new SyntaxError('A block must start with
a tag name.', $token->getLine(),
$this->stream->getSourceContext());
}
if (null !== $test && \call_user_func($test,
$token)) {
if ($dropNeedle) {
$this->stream->next();
}
if (1 === \count($rv)) {
return $rv[0];
}
return new Node($rv, [], $lineno);
}
$subparser =
$this->handlers->getTokenParser($token->getValue());
if (null === $subparser) {
if (null !== $test) {
$e = new SyntaxError(sprintf('Unexpected
"%s" tag', $token->getValue()), $token->getLine(),
$this->stream->getSourceContext());
if (\is_array($test) && isset($test[0])
&& $test[0] instanceof TokenParserInterface) {
$e->appendMessage(sprintf('
(expecting closing tag for the "%s" tag defined near line
%s).', $test[0]->getTag(), $lineno));
}
} else {
$e = new SyntaxError(sprintf('Unknown
"%s" tag.', $token->getValue()), $token->getLine(),
$this->stream->getSourceContext());
$e->addSuggestions($token->getValue(),
array_keys($this->env->getTags()));
}
throw $e;
}
$this->stream->next();
$node = $subparser->parse($token);
if (null !== $node) {
$rv[] = $node;
}
break;
default:
throw new SyntaxError('Lexer or parser ended up in
unsupported state.', $this->getCurrentToken()->getLine(),
$this->stream->getSourceContext());
}
}
if (1 === \count($rv)) {
return $rv[0];
}
return new Node($rv, [], $lineno);
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function addHandler($name, $class)
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0.',
E_USER_DEPRECATED);
$this->handlers[$name] = $class;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function addNodeVisitor(NodeVisitorInterface $visitor)
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0.',
E_USER_DEPRECATED);
$this->visitors[] = $visitor;
}
public function getBlockStack()
{
return $this->blockStack;
}
public function peekBlockStack()
{
return isset($this->blockStack[\count($this->blockStack) -
1]) ? $this->blockStack[\count($this->blockStack) - 1] : null;
}
public function popBlockStack()
{
array_pop($this->blockStack);
}
public function pushBlockStack($name)
{
$this->blockStack[] = $name;
}
public function hasBlock($name)
{
return isset($this->blocks[$name]);
}
public function getBlock($name)
{
return $this->blocks[$name];
}
public function setBlock($name, BlockNode $value)
{
$this->blocks[$name] = new BodyNode([$value], [],
$value->getTemplateLine());
}
public function hasMacro($name)
{
return isset($this->macros[$name]);
}
public function setMacro($name, MacroNode $node)
{
if ($this->isReservedMacroName($name)) {
throw new SyntaxError(sprintf('"%s" cannot be
used as a macro name as it is a reserved keyword.', $name),
$node->getTemplateLine(), $this->stream->getSourceContext());
}
$this->macros[$name] = $node;
}
public function isReservedMacroName($name)
{
if (null === $this->reservedMacroNames) {
$this->reservedMacroNames = [];
$r = new
\ReflectionClass($this->env->getBaseTemplateClass());
foreach ($r->getMethods() as $method) {
$methodName = strtr($method->getName(),
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz');
if ('get' === substr($methodName, 0, 3)
&& isset($methodName[3])) {
$this->reservedMacroNames[] = substr($methodName,
3);
}
}
}
return \in_array(strtr($name,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz'), $this->reservedMacroNames);
}
public function addTrait($trait)
{
$this->traits[] = $trait;
}
public function hasTraits()
{
return \count($this->traits) > 0;
}
public function embedTemplate(ModuleNode $template)
{
$template->setIndex(mt_rand());
$this->embeddedTemplates[] = $template;
}
public function addImportedSymbol($type, $alias, $name = null,
AbstractExpression $node = null)
{
$this->importedSymbols[0][$type][$alias] = ['name'
=> $name, 'node' => $node];
}
public function getImportedSymbol($type, $alias)
{
if (null !== $this->peekBlockStack()) {
foreach ($this->importedSymbols as $functions) {
if (isset($functions[$type][$alias])) {
if (\count($this->blockStack) > 1) {
return null;
}
return $functions[$type][$alias];
}
}
} else {
return isset($this->importedSymbols[0][$type][$alias]) ?
$this->importedSymbols[0][$type][$alias] : null;
}
}
public function isMainScope()
{
return 1 === \count($this->importedSymbols);
}
public function pushLocalScope()
{
array_unshift($this->importedSymbols, []);
}
public function popLocalScope()
{
array_shift($this->importedSymbols);
}
/**
* @return ExpressionParser
*/
public function getExpressionParser()
{
return $this->expressionParser;
}
public function getParent()
{
return $this->parent;
}
public function setParent($parent)
{
$this->parent = $parent;
}
/**
* @return TokenStream
*/
public function getStream()
{
return $this->stream;
}
/**
* @return Token
*/
public function getCurrentToken()
{
return $this->stream->getCurrent();
}
protected function filterBodyNodes(\Twig_NodeInterface $node)
{
// check that the body does not contain non-empty output nodes
if (
($node instanceof TextNode &&
!ctype_space($node->getAttribute('data')))
||
(!$node instanceof TextNode && !$node instanceof
BlockReferenceNode && $node instanceof NodeOutputInterface)
) {
if (false !== strpos((string) $node,
\chr(0xEF).\chr(0xBB).\chr(0xBF))) {
$t = substr($node->getAttribute('data'), 3);
if ('' === $t || ctype_space($t)) {
// bypass empty nodes starting with a BOM
return;
}
}
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());
}
// bypass nodes that will "capture" the output
if ($node instanceof NodeCaptureInterface) {
return $node;
}
if ($node instanceof NodeOutputInterface) {
return;
}
foreach ($node as $k => $n) {
if (null !== $n && null ===
$this->filterBodyNodes($n)) {
$node->removeNode($k);
}
}
return $node;
}
}
class_alias('Twig\Parser', 'Twig_Parser');
PK���[F�����"src/Profiler/Dumper/BaseDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class BaseDumper
{
private $root;
public function dump(Profile $profile)
{
return $this->dumpProfile($profile);
}
abstract protected function formatTemplate(Profile $profile, $prefix);
abstract protected function formatNonTemplate(Profile $profile,
$prefix);
abstract protected function formatTime(Profile $profile, $percent);
private function dumpProfile(Profile $profile, $prefix = '',
$sibling = false)
{
if ($profile->isRoot()) {
$this->root = $profile->getDuration();
$start = $profile->getName();
} else {
if ($profile->isTemplate()) {
$start = $this->formatTemplate($profile, $prefix);
} else {
$start = $this->formatNonTemplate($profile, $prefix);
}
$prefix .= $sibling ? '│ ' : ' ';
}
$percent = $this->root ? $profile->getDuration() /
$this->root * 100 : 0;
if ($profile->getDuration() * 1000 < 1) {
$str = $start."\n";
} else {
$str = sprintf("%s %s\n", $start,
$this->formatTime($profile, $percent));
}
$nCount = \count($profile->getProfiles());
foreach ($profile as $i => $p) {
$str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount);
}
return $str;
}
}
class_alias('Twig\Profiler\Dumper\BaseDumper',
'Twig_Profiler_Dumper_Base');
PK���[6)P!'src/Profiler/Dumper/BlackfireDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class BlackfireDumper
{
public function dump(Profile $profile)
{
$data = [];
$this->dumpProfile('main()', $profile, $data);
$this->dumpChildren('main()', $profile, $data);
$start = sprintf('%f', microtime(true));
$str = <<<EOF
file-format: BlackfireProbe
cost-dimensions: wt mu pmu
request-start: {$start}
EOF;
foreach ($data as $name => $values) {
$str .= "{$name}//{$values['ct']}
{$values['wt']} {$values['mu']}
{$values['pmu']}\n";
}
return $str;
}
private function dumpChildren($parent, Profile $profile, &$data)
{
foreach ($profile as $p) {
if ($p->isTemplate()) {
$name = $p->getTemplate();
} else {
$name = sprintf('%s::%s(%s)',
$p->getTemplate(), $p->getType(), $p->getName());
}
$this->dumpProfile(sprintf('%s==>%s', $parent,
$name), $p, $data);
$this->dumpChildren($name, $p, $data);
}
}
private function dumpProfile($edge, Profile $profile, &$data)
{
if (isset($data[$edge])) {
++$data[$edge]['ct'];
$data[$edge]['wt'] +=
floor($profile->getDuration() * 1000000);
$data[$edge]['mu'] += $profile->getMemoryUsage();
$data[$edge]['pmu'] +=
$profile->getPeakMemoryUsage();
} else {
$data[$edge] = [
'ct' => 1,
'wt' => floor($profile->getDuration() *
1000000),
'mu' => $profile->getMemoryUsage(),
'pmu' => $profile->getPeakMemoryUsage(),
];
}
}
}
class_alias('Twig\Profiler\Dumper\BlackfireDumper',
'Twig_Profiler_Dumper_Blackfire');
PK���[������"src/Profiler/Dumper/HtmlDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class HtmlDumper extends BaseDumper
{
private static $colors = [
'block' => '#dfd',
'macro' => '#ddf',
'template' => '#ffd',
'big' => '#d44',
];
public function dump(Profile $profile)
{
return
'<pre>'.parent::dump($profile).'</pre>';
}
protected function formatTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ <span style="background-color:
%s">%s</span>', $prefix,
self::$colors['template'], $profile->getTemplate());
}
protected function formatNonTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ %s::%s(<span
style="background-color: %s">%s</span>)', $prefix,
$profile->getTemplate(), $profile->getType(),
isset(self::$colors[$profile->getType()]) ?
self::$colors[$profile->getType()] : 'auto',
$profile->getName());
}
protected function formatTime(Profile $profile, $percent)
{
return sprintf('<span style="color:
%s">%.2fms/%.0f%%</span>', $percent > 20 ?
self::$colors['big'] : 'auto',
$profile->getDuration() * 1000, $percent);
}
}
class_alias('Twig\Profiler\Dumper\HtmlDumper',
'Twig_Profiler_Dumper_Html');
PK���[�C��"src/Profiler/Dumper/TextDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class TextDumper extends BaseDumper
{
protected function formatTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ %s', $prefix,
$profile->getTemplate());
}
protected function formatNonTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ %s::%s(%s)', $prefix,
$profile->getTemplate(), $profile->getType(),
$profile->getName());
}
protected function formatTime(Profile $profile, $percent)
{
return sprintf('%.2fms/%.0f%%',
$profile->getDuration() * 1000, $percent);
}
}
class_alias('Twig\Profiler\Dumper\TextDumper',
'Twig_Profiler_Dumper_Text');
PK���[&src/Profiler/Node/EnterProfileNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Node;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents a profile enter node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EnterProfileNode extends Node
{
public function __construct($extensionName, $type, $name, $varName)
{
parent::__construct([], ['extension_name' =>
$extensionName, 'name' => $name, 'type' => $type,
'var_name' => $varName]);
}
public function compile(Compiler $compiler)
{
$compiler
->write(sprintf('$%s =
$this->env->getExtension(',
$this->getAttribute('var_name')))
->repr($this->getAttribute('extension_name'))
->raw(");\n")
->write(sprintf('$%s->enter($%s = new
\Twig\Profiler\Profile($this->getTemplateName(), ',
$this->getAttribute('var_name'),
$this->getAttribute('var_name').'_prof'))
->repr($this->getAttribute('type'))
->raw(', ')
->repr($this->getAttribute('name'))
->raw("));\n\n")
;
}
}
class_alias('Twig\Profiler\Node\EnterProfileNode',
'Twig_Profiler_Node_EnterProfile');
PK���[QH�VV&src/Profiler/Node/LeaveProfileNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Node;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents a profile leave node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class LeaveProfileNode extends Node
{
public function __construct($varName)
{
parent::__construct([], ['var_name' => $varName]);
}
public function compile(Compiler $compiler)
{
$compiler
->write("\n")
->write(sprintf("\$%s->leave(\$%s);\n\n",
$this->getAttribute('var_name'),
$this->getAttribute('var_name').'_prof'))
;
}
}
class_alias('Twig\Profiler\Node\LeaveProfileNode',
'Twig_Profiler_Node_LeaveProfile');
PK���[6��5s s 0src/Profiler/NodeVisitor/ProfilerNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\NodeVisitor;
use Twig\Environment;
use Twig\Node\BlockNode;
use Twig\Node\BodyNode;
use Twig\Node\MacroNode;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\NodeVisitor\AbstractNodeVisitor;
use Twig\Profiler\Node\EnterProfileNode;
use Twig\Profiler\Node\LeaveProfileNode;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class ProfilerNodeVisitor extends AbstractNodeVisitor
{
private $extensionName;
public function __construct($extensionName)
{
$this->extensionName = $extensionName;
}
protected function doEnterNode(Node $node, Environment $env)
{
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$varName = $this->getVarName();
$node->setNode('display_start', new Node([new
EnterProfileNode($this->extensionName, Profile::TEMPLATE,
$node->getTemplateName(), $varName),
$node->getNode('display_start')]));
$node->setNode('display_end', new Node([new
LeaveProfileNode($varName), $node->getNode('display_end')]));
} elseif ($node instanceof BlockNode) {
$varName = $this->getVarName();
$node->setNode('body', new BodyNode([
new EnterProfileNode($this->extensionName,
Profile::BLOCK, $node->getAttribute('name'), $varName),
$node->getNode('body'),
new LeaveProfileNode($varName),
]));
} elseif ($node instanceof MacroNode) {
$varName = $this->getVarName();
$node->setNode('body', new BodyNode([
new EnterProfileNode($this->extensionName,
Profile::MACRO, $node->getAttribute('name'), $varName),
$node->getNode('body'),
new LeaveProfileNode($varName),
]));
}
return $node;
}
private function getVarName()
{
return sprintf('__internal_%s', hash('sha256',
$this->extensionName));
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\Profiler\NodeVisitor\ProfilerNodeVisitor',
'Twig_Profiler_NodeVisitor_Profiler');
PK���[����src/Profiler/Profile.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Profile implements \IteratorAggregate, \Serializable
{
const ROOT = 'ROOT';
const BLOCK = 'block';
const TEMPLATE = 'template';
const MACRO = 'macro';
private $template;
private $name;
private $type;
private $starts = [];
private $ends = [];
private $profiles = [];
public function __construct($template = 'main', $type =
self::ROOT, $name = 'main')
{
$this->template = $template;
$this->type = $type;
$this->name = 0 === strpos($name, '__internal_') ?
'INTERNAL' : $name;
$this->enter();
}
public function getTemplate()
{
return $this->template;
}
public function getType()
{
return $this->type;
}
public function getName()
{
return $this->name;
}
public function isRoot()
{
return self::ROOT === $this->type;
}
public function isTemplate()
{
return self::TEMPLATE === $this->type;
}
public function isBlock()
{
return self::BLOCK === $this->type;
}
public function isMacro()
{
return self::MACRO === $this->type;
}
public function getProfiles()
{
return $this->profiles;
}
public function addProfile(self $profile)
{
$this->profiles[] = $profile;
}
/**
* Returns the duration in microseconds.
*
* @return float
*/
public function getDuration()
{
if ($this->isRoot() && $this->profiles) {
// for the root node with children, duration is the sum of all
child durations
$duration = 0;
foreach ($this->profiles as $profile) {
$duration += $profile->getDuration();
}
return $duration;
}
return isset($this->ends['wt']) &&
isset($this->starts['wt']) ? $this->ends['wt'] -
$this->starts['wt'] : 0;
}
/**
* Returns the memory usage in bytes.
*
* @return int
*/
public function getMemoryUsage()
{
return isset($this->ends['mu']) &&
isset($this->starts['mu']) ? $this->ends['mu'] -
$this->starts['mu'] : 0;
}
/**
* Returns the peak memory usage in bytes.
*
* @return int
*/
public function getPeakMemoryUsage()
{
return isset($this->ends['pmu']) &&
isset($this->starts['pmu']) ? $this->ends['pmu']
- $this->starts['pmu'] : 0;
}
/**
* Starts the profiling.
*/
public function enter()
{
$this->starts = [
'wt' => microtime(true),
'mu' => memory_get_usage(),
'pmu' => memory_get_peak_usage(),
];
}
/**
* Stops the profiling.
*/
public function leave()
{
$this->ends = [
'wt' => microtime(true),
'mu' => memory_get_usage(),
'pmu' => memory_get_peak_usage(),
];
}
public function reset()
{
$this->starts = $this->ends = $this->profiles = [];
$this->enter();
}
public function getIterator()
{
return new \ArrayIterator($this->profiles);
}
public function serialize()
{
return serialize($this->__serialize());
}
public function unserialize($data)
{
$this->__unserialize(unserialize($data));
}
/**
* @internal
*/
public function __serialize()
{
return [$this->template, $this->name, $this->type,
$this->starts, $this->ends, $this->profiles];
}
/**
* @internal
*/
public function __unserialize(array $data)
{
list($this->template, $this->name, $this->type,
$this->starts, $this->ends, $this->profiles) = $data;
}
}
class_alias('Twig\Profiler\Profile',
'Twig_Profiler_Profile');
PK���[����,src/RuntimeLoader/ContainerRuntimeLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\RuntimeLoader;
use Psr\Container\ContainerInterface;
/**
* Lazily loads Twig runtime implementations from a PSR-11 container.
*
* Note that the runtime services MUST use their class names as
identifiers.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Robin Chalas <robin.chalas@gmail.com>
*/
class ContainerRuntimeLoader implements RuntimeLoaderInterface
{
private $container;
public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
public function load($class)
{
if ($this->container->has($class)) {
return $this->container->get($class);
}
}
}
class_alias('Twig\RuntimeLoader\ContainerRuntimeLoader',
'Twig_ContainerRuntimeLoader');
PK���[P͂���*src/RuntimeLoader/FactoryRuntimeLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\RuntimeLoader;
/**
* Lazy loads the runtime implementations for a Twig element.
*
* @author Robin Chalas <robin.chalas@gmail.com>
*/
class FactoryRuntimeLoader implements RuntimeLoaderInterface
{
private $map;
/**
* @param array $map An array where keys are class names and values
factory callables
*/
public function __construct($map = [])
{
$this->map = $map;
}
public function load($class)
{
if (isset($this->map[$class])) {
$runtimeFactory = $this->map[$class];
return $runtimeFactory();
}
}
}
class_alias('Twig\RuntimeLoader\FactoryRuntimeLoader',
'Twig_FactoryRuntimeLoader');
PK���[��ZW11,src/RuntimeLoader/RuntimeLoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\RuntimeLoader;
/**
* Creates runtime implementations for Twig elements
(filters/functions/tests).
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface RuntimeLoaderInterface
{
/**
* Creates the runtime implementation of a Twig element
(filter/function/test).
*
* @param string $class A runtime class
*
* @return object|null The runtime instance or null if the loader does
not know how to create the runtime for this class
*/
public function load($class);
}
class_alias('Twig\RuntimeLoader\RuntimeLoaderInterface',
'Twig_RuntimeLoaderInterface');
PK���[�b����src/Sandbox/SecurityError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
use Twig\Error\Error;
/**
* Exception thrown when a security error occurs at runtime.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SecurityError extends Error
{
}
class_alias('Twig\Sandbox\SecurityError',
'Twig_Sandbox_SecurityError');
PK���[��Y�mm-src/Sandbox/SecurityNotAllowedFilterError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed filter is used in a template.
*
* @author Martin Hasoň <martin.hason@gmail.com>
*/
class SecurityNotAllowedFilterError extends SecurityError
{
private $filterName;
public function __construct($message, $functionName, $lineno = -1,
$filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->filterName = $functionName;
}
public function getFilterName()
{
return $this->filterName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedFilterError',
'Twig_Sandbox_SecurityNotAllowedFilterError');
PK���[�RB�}}/src/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed function is used in a template.
*
* @author Martin Hasoň <martin.hason@gmail.com>
*/
class SecurityNotAllowedFunctionError extends SecurityError
{
private $functionName;
public function __construct($message, $functionName, $lineno = -1,
$filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->functionName = $functionName;
}
public function getFunctionName()
{
return $this->functionName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedFunctionError',
'Twig_Sandbox_SecurityNotAllowedFunctionError');
PK���[�ý�-src/Sandbox/SecurityNotAllowedMethodError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed class method is used in a template.
*
* @author Kit Burton-Senior <mail@kitbs.com>
*/
class SecurityNotAllowedMethodError extends SecurityError
{
private $className;
private $methodName;
public function __construct($message, $className, $methodName, $lineno
= -1, $filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->className = $className;
$this->methodName = $methodName;
}
public function getClassName()
{
return $this->className;
}
public function getMethodName()
{
return $this->methodName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedMethodError',
'Twig_Sandbox_SecurityNotAllowedMethodError');
PK���[X��Y/src/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed class property is used in a
template.
*
* @author Kit Burton-Senior <mail@kitbs.com>
*/
class SecurityNotAllowedPropertyError extends SecurityError
{
private $className;
private $propertyName;
public function __construct($message, $className, $propertyName,
$lineno = -1, $filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->className = $className;
$this->propertyName = $propertyName;
}
public function getClassName()
{
return $this->className;
}
public function getPropertyName()
{
return $this->propertyName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedPropertyError',
'Twig_Sandbox_SecurityNotAllowedPropertyError');
PK���[B��KK*src/Sandbox/SecurityNotAllowedTagError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed tag is used in a template.
*
* @author Martin Hasoň <martin.hason@gmail.com>
*/
class SecurityNotAllowedTagError extends SecurityError
{
private $tagName;
public function __construct($message, $tagName, $lineno = -1, $filename
= null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->tagName = $tagName;
}
public function getTagName()
{
return $this->tagName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedTagError',
'Twig_Sandbox_SecurityNotAllowedTagError');
PK���[�q�3��src/Sandbox/SecurityPolicy.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
use Twig\Markup;
/**
* Represents a security policy which need to be enforced when sandbox mode
is enabled.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SecurityPolicy implements SecurityPolicyInterface
{
protected $allowedTags;
protected $allowedFilters;
protected $allowedMethods;
protected $allowedProperties;
protected $allowedFunctions;
public function __construct(array $allowedTags = [], array
$allowedFilters = [], array $allowedMethods = [], array $allowedProperties
= [], array $allowedFunctions = [])
{
$this->allowedTags = $allowedTags;
$this->allowedFilters = $allowedFilters;
$this->setAllowedMethods($allowedMethods);
$this->allowedProperties = $allowedProperties;
$this->allowedFunctions = $allowedFunctions;
}
public function setAllowedTags(array $tags)
{
$this->allowedTags = $tags;
}
public function setAllowedFilters(array $filters)
{
$this->allowedFilters = $filters;
}
public function setAllowedMethods(array $methods)
{
$this->allowedMethods = [];
foreach ($methods as $class => $m) {
$this->allowedMethods[$class] = array_map(function ($value)
{ return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]);
}
}
public function setAllowedProperties(array $properties)
{
$this->allowedProperties = $properties;
}
public function setAllowedFunctions(array $functions)
{
$this->allowedFunctions = $functions;
}
public function checkSecurity($tags, $filters, $functions)
{
foreach ($tags as $tag) {
if (!\in_array($tag, $this->allowedTags)) {
throw new SecurityNotAllowedTagError(sprintf('Tag
"%s" is not allowed.', $tag), $tag);
}
}
foreach ($filters as $filter) {
if (!\in_array($filter, $this->allowedFilters)) {
throw new
SecurityNotAllowedFilterError(sprintf('Filter "%s" is not
allowed.', $filter), $filter);
}
}
foreach ($functions as $function) {
if (!\in_array($function, $this->allowedFunctions)) {
throw new
SecurityNotAllowedFunctionError(sprintf('Function "%s" is
not allowed.', $function), $function);
}
}
}
public function checkMethodAllowed($obj, $method)
{
if ($obj instanceof \Twig_TemplateInterface || $obj instanceof
Markup) {
return;
}
$allowed = false;
$method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz');
foreach ($this->allowedMethods as $class => $methods) {
if ($obj instanceof $class) {
$allowed = \in_array($method, $methods);
break;
}
}
if (!$allowed) {
$class = \get_class($obj);
throw new SecurityNotAllowedMethodError(sprintf('Calling
"%s" method on a "%s" object is not allowed.',
$method, $class), $class, $method);
}
}
public function checkPropertyAllowed($obj, $property)
{
$allowed = false;
foreach ($this->allowedProperties as $class => $properties) {
if ($obj instanceof $class) {
$allowed = \in_array($property, \is_array($properties) ?
$properties : [$properties]);
break;
}
}
if (!$allowed) {
$class = \get_class($obj);
throw new SecurityNotAllowedPropertyError(sprintf('Calling
"%s" property on a "%s" object is not allowed.',
$property, $class), $class, $property);
}
}
}
class_alias('Twig\Sandbox\SecurityPolicy',
'Twig_Sandbox_SecurityPolicy');
PK���[��"C��'src/Sandbox/SecurityPolicyInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Interface that all security policy classes must implements.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface SecurityPolicyInterface
{
public function checkSecurity($tags, $filters, $functions);
public function checkMethodAllowed($obj, $method);
public function checkPropertyAllowed($obj, $method);
}
class_alias('Twig\Sandbox\SecurityPolicyInterface',
'Twig_Sandbox_SecurityPolicyInterface');
PK���[���src/Source.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Holds information about a non-compiled Twig template.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Source
{
private $code;
private $name;
private $path;
/**
* @param string $code The template source code
* @param string $name The template logical name
* @param string $path The filesystem path of the template if any
*/
public function __construct($code, $name, $path = '')
{
$this->code = $code;
$this->name = $name;
$this->path = $path;
}
public function getCode()
{
return $this->code;
}
public function getName()
{
return $this->name;
}
public function getPath()
{
return $this->path;
}
}
class_alias('Twig\Source', 'Twig_Source');
PK���[q�A3sdsdsrc/Template.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\Error;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
/**
* Default base class for compiled templates.
*
* This class is an implementation detail of how template compilation
currently
* works, which might change. It should never be used directly. Use
$twig->load()
* instead, which returns an instance of \Twig\TemplateWrapper.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @internal
*/
abstract class Template implements \Twig_TemplateInterface
{
/**
* @internal
*/
protected static $cache = [];
protected $parent;
protected $parents = [];
protected $env;
protected $blocks = [];
protected $traits = [];
protected $sandbox;
public function __construct(Environment $env)
{
$this->env = $env;
}
/**
* @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
*/
public function __toString()
{
return $this->getTemplateName();
}
/**
* Returns the template name.
*
* @return string The template name
*/
abstract public function getTemplateName();
/**
* Returns debug information about the template.
*
* @return array Debug information
*/
public function getDebugInfo()
{
return [];
}
/**
* Returns the template source code.
*
* @return string The template source code
*
* @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead
*/
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return '';
}
/**
* Returns information about the original template source code.
*
* @return Source
*/
public function getSourceContext()
{
return new Source('', $this->getTemplateName());
}
/**
* @deprecated since 1.20 (to be removed in 2.0)
*/
public function getEnvironment()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.20 and will be removed in 2.0.',
E_USER_DEPRECATED);
return $this->env;
}
/**
* Returns the parent template.
*
* This method is for internal use only and should never be called
* directly.
*
* @param array $context
*
* @return \Twig_TemplateInterface|TemplateWrapper|false The parent
template or false if there is no parent
*
* @internal
*/
public function getParent(array $context)
{
if (null !== $this->parent) {
return $this->parent;
}
try {
$parent = $this->doGetParent($context);
if (false === $parent) {
return false;
}
if ($parent instanceof self || $parent instanceof
TemplateWrapper) {
return
$this->parents[$parent->getSourceContext()->getName()] = $parent;
}
if (!isset($this->parents[$parent])) {
$this->parents[$parent] =
$this->loadTemplate($parent);
}
} catch (LoaderError $e) {
$e->setSourceContext(null);
$e->guess();
throw $e;
}
return $this->parents[$parent];
}
protected function doGetParent(array $context)
{
return false;
}
public function isTraitable()
{
return true;
}
/**
* Displays a parent block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to display from the parent
* @param array $context The context
* @param array $blocks The current set of blocks
*/
public function displayParentBlock($name, array $context, array $blocks
= [])
{
$name = (string) $name;
if (isset($this->traits[$name])) {
$this->traits[$name][0]->displayBlock($name, $context,
$blocks, false);
} elseif (false !== $parent = $this->getParent($context)) {
$parent->displayBlock($name, $context, $blocks, false);
} else {
throw new RuntimeError(sprintf('The template has no parent
and no traits defining the "%s" block.', $name), -1,
$this->getSourceContext());
}
}
/**
* Displays a block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to display
* @param array $context The context
* @param array $blocks The current set of blocks
* @param bool $useBlocks Whether to use the current set of blocks
*/
public function displayBlock($name, array $context, array $blocks = [],
$useBlocks = true)
{
$name = (string) $name;
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a
\Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError
exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been
thrown during the rendering of a template ("%s").',
$e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif (false !== $parent = $this->getParent($context)) {
$parent->displayBlock($name, $context,
array_merge($this->blocks, $blocks), false);
} else {
@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);
}
}
/**
* Renders a parent block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to render from the parent
* @param array $context The context
* @param array $blocks The current set of blocks
*
* @return string The rendered block
*/
public function renderParentBlock($name, array $context, array $blocks
= [])
{
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
$this->displayParentBlock($name, $context, $blocks);
return ob_get_clean();
}
/**
* Renders a block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to render
* @param array $context The context
* @param array $blocks The current set of blocks
* @param bool $useBlocks Whether to use the current set of blocks
*
* @return string The rendered block
*/
public function renderBlock($name, array $context, array $blocks = [],
$useBlocks = true)
{
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
$this->displayBlock($name, $context, $blocks, $useBlocks);
return ob_get_clean();
}
/**
* Returns whether a block exists or not in the current context of the
template.
*
* This method checks blocks defined in the current template
* or defined in "used" traits or defined in parent
templates.
*
* @param string $name The block name
* @param array $context The context
* @param array $blocks The current set of blocks
*
* @return bool true if the block exists, false otherwise
*/
public function hasBlock($name, array $context = null, array $blocks =
[])
{
if (null === $context) {
@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);
return isset($this->blocks[(string) $name]);
}
if (isset($blocks[$name])) {
return $blocks[$name][0] instanceof self;
}
if (isset($this->blocks[$name])) {
return true;
}
if (false !== $parent = $this->getParent($context)) {
return $parent->hasBlock($name, $context);
}
return false;
}
/**
* Returns all block names in the current context of the template.
*
* This method checks blocks defined in the current template
* or defined in "used" traits or defined in parent
templates.
*
* @param array $context The context
* @param array $blocks The current set of blocks
*
* @return array An array of block names
*/
public function getBlockNames(array $context = null, array $blocks =
[])
{
if (null === $context) {
@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);
return array_keys($this->blocks);
}
$names = array_merge(array_keys($blocks),
array_keys($this->blocks));
if (false !== $parent = $this->getParent($context)) {
$names = array_merge($names,
$parent->getBlockNames($context));
}
return array_unique($names);
}
/**
* @return Template|TemplateWrapper
*/
protected function loadTemplate($template, $templateName = null, $line
= null, $index = null)
{
try {
if (\is_array($template)) {
return $this->env->resolveTemplate($template);
}
if ($template instanceof self || $template instanceof
TemplateWrapper) {
return $template;
}
if ($template === $this->getTemplateName()) {
$class = \get_class($this);
if (false !== $pos = strrpos($class, '___', -1))
{
$class = substr($class, 0, $pos);
}
return $this->env->loadClass($class, $template,
$index);
}
return $this->env->loadTemplate($template, $index);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($templateName ? new
Source('', $templateName) : $this->getSourceContext());
}
if ($e->getTemplateLine() > 0) {
throw $e;
}
if (!$line) {
$e->guess();
} else {
$e->setTemplateLine($line);
}
throw $e;
}
}
/**
* @internal
*
* @return Template
*/
protected function unwrap()
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context),
array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array
$blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been
thrown during the rendering of a template ("%s").',
$e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/**
* Auto-generated method to display the template with the given
context.
*
* @param array $context An array of parameters to pass to the template
* @param array $blocks An array of blocks to pass to the template
*/
abstract protected function doDisplay(array $context, array $blocks =
[]);
/**
* Returns a variable from the context.
*
* This method is for internal use only and should never be called
* directly.
*
* This method should not be overridden in a sub-class as this is an
* implementation detail that has been introduced to optimize variable
* access for versions of PHP before 5.4. This is not a way to override
* the way to get a variable value.
*
* @param array $context The context
* @param string $item The variable to return from the
context
* @param bool $ignoreStrictCheck Whether to ignore the strict
variable check or not
*
* @return mixed The content of the context variable
*
* @throws RuntimeError if the variable does not exist and Twig is
running in strict mode
*
* @internal
*/
final protected function getContext($context, $item, $ignoreStrictCheck
= false)
{
if (!\array_key_exists($item, $context)) {
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
throw new RuntimeError(sprintf('Variable "%s"
does not exist.', $item), -1, $this->getSourceContext());
}
return $context[$item];
}
/**
* Returns the attribute value for a given array/object.
*
* @param mixed $object The object or array from where to
get the item
* @param mixed $item The item to get from the array or
object
* @param array $arguments An array of arguments to pass if
the item is an object method
* @param string $type The type of attribute (@see
\Twig\Template constants)
* @param bool $isDefinedTest Whether this is only a defined
check
* @param bool $ignoreStrictCheck Whether to ignore the strict
attribute check or not
*
* @return mixed The attribute value, or a Boolean when $isDefinedTest
is true, or null when the attribute is not set and $ignoreStrictCheck is
true
*
* @throws RuntimeError if the attribute does not exist and Twig is
running in strict mode and $isDefinedTest is false
*
* @internal
*/
protected function getAttribute($object, $item, array $arguments = [],
$type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false)
{
// array
if (self::METHOD_CALL !== $type) {
$arrayItem = \is_bool($item) || \is_float($item) ? (int) $item
: $item;
if (((\is_array($object) || $object instanceof \ArrayObject)
&& (isset($object[$arrayItem]) || \array_key_exists($arrayItem,
(array) $object)))
|| ($object instanceof \ArrayAccess &&
isset($object[$arrayItem]))
) {
if ($isDefinedTest) {
return true;
}
return $object[$arrayItem];
}
if (self::ARRAY_CALL === $type || !\is_object($object)) {
if ($isDefinedTest) {
return false;
}
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
if ($object instanceof \ArrayAccess) {
$message = sprintf('Key "%s" in object
with ArrayAccess of class "%s" does not exist.', $arrayItem,
\get_class($object));
} elseif (\is_object($object)) {
$message = sprintf('Impossible to access a key
"%s" on an object of class "%s" that does not implement
ArrayAccess interface.', $item, \get_class($object));
} elseif (\is_array($object)) {
if (empty($object)) {
$message = sprintf('Key "%s" does
not exist as the array is empty.', $arrayItem);
} else {
$message = sprintf('Key "%s" for
array with keys "%s" does not exist.', $arrayItem,
implode(', ', array_keys($object)));
}
} elseif (self::ARRAY_CALL === $type) {
if (null === $object) {
$message = sprintf('Impossible to access a key
("%s") on a null variable.', $item);
} else {
$message = sprintf('Impossible to access a key
("%s") on a %s variable ("%s").', $item,
\gettype($object), $object);
}
} elseif (null === $object) {
$message = sprintf('Impossible to access an
attribute ("%s") on a null variable.', $item);
} else {
$message = sprintf('Impossible to access an
attribute ("%s") on a %s variable ("%s").', $item,
\gettype($object), $object);
}
throw new RuntimeError($message, -1,
$this->getSourceContext());
}
}
if (!\is_object($object)) {
if ($isDefinedTest) {
return false;
}
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
if (null === $object) {
$message = sprintf('Impossible to invoke a method
("%s") on a null variable.', $item);
} elseif (\is_array($object)) {
$message = sprintf('Impossible to invoke a method
("%s") on an array.', $item);
} else {
$message = sprintf('Impossible to invoke a method
("%s") on a %s variable ("%s").', $item,
\gettype($object), $object);
}
throw new RuntimeError($message, -1,
$this->getSourceContext());
}
// object property
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
if (isset($object->$item) || \array_key_exists((string)
$item, (array) $object)) {
if ($isDefinedTest) {
return true;
}
if
($this->env->hasExtension('\Twig\Extension\SandboxExtension'))
{
$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkPropertyAllowed($object,
$item);
}
return $object->$item;
}
}
$class = \get_class($object);
// object method
if (!isset(self::$cache[$class])) {
// get_class_methods returns all methods accessible in the
scope, but we only want public ones to be accessible in templates
if ($object instanceof self) {
$ref = new \ReflectionClass($class);
$methods = [];
foreach ($ref->getMethods(\ReflectionMethod::IS_PUBLIC)
as $refMethod) {
// Accessing the environment from templates is
forbidden to prevent untrusted changes to the environment
if ('getenvironment' !==
strtr($refMethod->name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')) {
$methods[] = $refMethod->name;
}
}
} else {
$methods = get_class_methods($object);
}
// sort values to have consistent behavior, so that
"get" methods win precedence over "is" methods
sort($methods);
$cache = [];
foreach ($methods as $method) {
$cache[$method] = $method;
$cache[$lcName = strtr($method,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')] = $method;
if ('g' === $lcName[0] && 0 ===
strpos($lcName, 'get')) {
$name = substr($method, 3);
$lcName = substr($lcName, 3);
} elseif ('i' === $lcName[0] && 0 ===
strpos($lcName, 'is')) {
$name = substr($method, 2);
$lcName = substr($lcName, 2);
} else {
continue;
}
// skip get() and is() methods (in which case, $name is
empty)
if ($name) {
if (!isset($cache[$name])) {
$cache[$name] = $method;
}
if (!isset($cache[$lcName])) {
$cache[$lcName] = $method;
}
}
}
self::$cache[$class] = $cache;
}
$call = false;
if (isset(self::$cache[$class][$item])) {
$method = self::$cache[$class][$item];
} elseif (isset(self::$cache[$class][$lcItem = strtr($item,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')])) {
$method = self::$cache[$class][$lcItem];
} elseif (isset(self::$cache[$class]['__call'])) {
$method = $item;
$call = true;
} else {
if ($isDefinedTest) {
return false;
}
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
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());
}
if ($isDefinedTest) {
return true;
}
if
($this->env->hasExtension('\Twig\Extension\SandboxExtension'))
{
$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object,
$method);
}
// Some objects throw exceptions when they have __call, and the
method we try
// to call is not supported. If ignoreStrictCheck is true, we
should return null.
try {
if (!$arguments) {
$ret = $object->$method();
} else {
$ret = \call_user_func_array([$object, $method],
$arguments);
}
} catch (\BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck ||
!$this->env->isStrictVariables())) {
return;
}
throw $e;
}
// @deprecated in 1.28
if ($object instanceof \Twig_TemplateInterface) {
$self = $object->getTemplateName() ===
$this->getTemplateName();
$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());
if ('renderBlock' === $method ||
'displayBlock' === $method) {
$message .= sprintf(' Use block("%s"%s)
instead).', $arguments[0], $self ? '' : ',
template');
} elseif ('hasBlock' === $method) {
$message .= sprintf(' Use
"block("%s"%s) is defined" instead).',
$arguments[0], $self ? '' : ', template');
} elseif ('render' === $method || 'display'
=== $method) {
$message .= sprintf(' Use include("%s")
instead).', $object->getTemplateName());
}
@trigger_error($message, E_USER_DEPRECATED);
return '' === $ret ? '' : new Markup($ret,
$this->env->getCharset());
}
return $ret;
}
}
class_alias('Twig\Template', 'Twig_Template');
PK���[�P�՞�src/TemplateWrapper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Exposes a template to userland.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
final class TemplateWrapper
{
private $env;
private $template;
/**
* This method is for internal use only and should never be called
* directly (use Twig\Environment::load() instead).
*
* @internal
*/
public function __construct(Environment $env, Template $template)
{
$this->env = $env;
$this->template = $template;
}
/**
* Renders the template.
*
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*/
public function render($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_num_args()
> 1 ? func_get_arg(1) : []);
}
/**
* Displays the template.
*
* @param array $context An array of parameters to pass to the template
*/
public function display($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_num_args() > 1 ?
func_get_arg(1) : []);
}
/**
* Checks if a block is defined.
*
* @param string $name The block name
* @param array $context An array of parameters to pass to the
template
*
* @return bool
*/
public function hasBlock($name, $context = [])
{
return $this->template->hasBlock($name, $context);
}
/**
* Returns defined block names in the template.
*
* @param array $context An array of parameters to pass to the template
*
* @return string[] An array of defined template block names
*/
public function getBlockNames($context = [])
{
return $this->template->getBlockNames($context);
}
/**
* Renders a template block.
*
* @param string $name The block name to render
* @param array $context An array of parameters to pass to the
template
*
* @return string The rendered block
*/
public function renderBlock($name, $context = [])
{
$context = $this->env->mergeGlobals($context);
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->template->displayBlock($name, $context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
/**
* Displays a template block.
*
* @param string $name The block name to render
* @param array $context An array of parameters to pass to the
template
*/
public function displayBlock($name, $context = [])
{
$this->template->displayBlock($name,
$this->env->mergeGlobals($context));
}
/**
* @return Source
*/
public function getSourceContext()
{
return $this->template->getSourceContext();
}
/**
* @return string
*/
public function getTemplateName()
{
return $this->template->getTemplateName();
}
/**
* @internal
*
* @return Template
*/
public function unwrap()
{
return $this->template;
}
}
class_alias('Twig\TemplateWrapper',
'Twig_TemplateWrapper');
PK���[?yL!!
src/Test/IntegrationTestCase.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Test;
use PHPUnit\Framework\TestCase;
use Twig\Environment;
use Twig\Error\Error;
use Twig\Extension\ExtensionInterface;
use Twig\Loader\ArrayLoader;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\RuntimeLoader\RuntimeLoaderInterface;
use Twig\Source;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\TwigTest;
/**
* Integration test helper.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Karma Dordrak <drak@zikula.org>
*/
abstract class IntegrationTestCase extends TestCase
{
/**
* @return string
*/
abstract protected function getFixturesDir();
/**
* @return RuntimeLoaderInterface[]
*/
protected function getRuntimeLoaders()
{
return [];
}
/**
* @return ExtensionInterface[]
*/
protected function getExtensions()
{
return [];
}
/**
* @return TwigFilter[]
*/
protected function getTwigFilters()
{
return [];
}
/**
* @return TwigFunction[]
*/
protected function getTwigFunctions()
{
return [];
}
/**
* @return TwigTest[]
*/
protected function getTwigTests()
{
return [];
}
/**
* @dataProvider getTests
*/
public function testIntegration($file, $message, $condition,
$templates, $exception, $outputs)
{
$this->doIntegrationTest($file, $message, $condition,
$templates, $exception, $outputs);
}
/**
* @dataProvider getLegacyTests
* @group legacy
*/
public function testLegacyIntegration($file, $message, $condition,
$templates, $exception, $outputs)
{
$this->doIntegrationTest($file, $message, $condition,
$templates, $exception, $outputs);
}
public function getTests($name, $legacyTests = false)
{
$fixturesDir = realpath($this->getFixturesDir());
$tests = [];
foreach (new \RecursiveIteratorIterator(new
\RecursiveDirectoryIterator($fixturesDir),
\RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
if (!preg_match('/\.test$/', $file)) {
continue;
}
if ($legacyTests xor false !== strpos($file->getRealpath(),
'.legacy.test')) {
continue;
}
$test = file_get_contents($file->getRealpath());
if
(preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx',
$test, $match)) {
$message = $match[1];
$condition = $match[2];
$templates = self::parseTemplates($match[3]);
$exception = $match[5];
$outputs = [[null, $match[4], null, '']];
} elseif
(preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s',
$test, $match)) {
$message = $match[1];
$condition = $match[2];
$templates = self::parseTemplates($match[3]);
$exception = false;
preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s',
$test, $outputs, PREG_SET_ORDER);
} else {
throw new \InvalidArgumentException(sprintf('Test
"%s" is not valid.', str_replace($fixturesDir.'/',
'', $file)));
}
$tests[] = [str_replace($fixturesDir.'/',
'', $file), $message, $condition, $templates, $exception,
$outputs];
}
if ($legacyTests && empty($tests)) {
// add a dummy test to avoid a PHPUnit message
return [['not', '-', '', [],
'', []]];
}
return $tests;
}
public function getLegacyTests()
{
return $this->getTests('testLegacyIntegration', true);
}
protected function doIntegrationTest($file, $message, $condition,
$templates, $exception, $outputs)
{
if (!$outputs) {
$this->markTestSkipped('no tests to run');
}
if ($condition) {
eval('$ret = '.$condition.';');
if (!$ret) {
$this->markTestSkipped($condition);
}
}
$loader = new ArrayLoader($templates);
foreach ($outputs as $i => $match) {
$config = array_merge([
'cache' => false,
'strict_variables' => true,
], $match[2] ? eval($match[2].';') : []);
$twig = new Environment($loader, $config);
$twig->addGlobal('global', 'global');
foreach ($this->getRuntimeLoaders() as $runtimeLoader) {
$twig->addRuntimeLoader($runtimeLoader);
}
foreach ($this->getExtensions() as $extension) {
$twig->addExtension($extension);
}
foreach ($this->getTwigFilters() as $filter) {
$twig->addFilter($filter);
}
foreach ($this->getTwigTests() as $test) {
$twig->addTest($test);
}
foreach ($this->getTwigFunctions() as $function) {
$twig->addFunction($function);
}
$p = new \ReflectionProperty($twig,
'templateClassPrefix');
$p->setAccessible(true);
$p->setValue($twig,
'__TwigTemplate_'.hash('sha256', uniqid(mt_rand(),
true), false).'_');
try {
$template = $twig->load('index.twig');
} catch (\Exception $e) {
if (false !== $exception) {
$message = $e->getMessage();
$this->assertSame(trim($exception),
trim(sprintf('%s: %s', \get_class($e), $message)));
$last = substr($message, \strlen($message) - 1);
$this->assertTrue('.' === $last ||
'?' === $last, 'Exception message must end with a dot or a
question mark.');
return;
}
throw new Error(sprintf('%s: %s', \get_class($e),
$e->getMessage()), -1, null, $e);
}
try {
$output =
trim($template->render(eval($match[1].';')), "\n ");
} catch (\Exception $e) {
if (false !== $exception) {
$this->assertSame(trim($exception),
trim(sprintf('%s: %s', \get_class($e), $e->getMessage())));
return;
}
$e = new Error(sprintf('%s: %s', \get_class($e),
$e->getMessage()), -1, null, $e);
$output = trim(sprintf('%s: %s', \get_class($e),
$e->getMessage()));
}
if (false !== $exception) {
list($class) = explode(':', $exception);
$constraintClass =
class_exists('PHPUnit\Framework\Constraint\Exception') ?
'PHPUnit\Framework\Constraint\Exception' :
'PHPUnit_Framework_Constraint_Exception';
$this->assertThat(null, new $constraintClass($class));
}
$expected = trim($match[3], "\n ");
if ($expected !== $output) {
printf("Compiled templates that failed on case
%d:\n", $i + 1);
foreach (array_keys($templates) as $name) {
echo "Template: $name\n";
$loader = $twig->getLoader();
if (!$loader instanceof SourceContextLoaderInterface) {
$source = new Source($loader->getSource($name),
$name);
} else {
$source = $loader->getSourceContext($name);
}
echo
$twig->compile($twig->parse($twig->tokenize($source)));
}
}
$this->assertEquals($expected, $output, $message.' (in
'.$file.')');
}
}
protected static function parseTemplates($test)
{
$templates = [];
preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s',
$test, $matches, PREG_SET_ORDER);
foreach ($matches as $match) {
$templates[($match[1] ? $match[1] : 'index.twig')] =
$match[2];
}
return $templates;
}
}
class_alias('Twig\Test\IntegrationTestCase',
'Twig_Test_IntegrationTestCase');
PK���[��N�jjsrc/Test/NodeTestCase.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Test;
use PHPUnit\Framework\TestCase;
use Twig\Compiler;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use Twig\Node\Node;
abstract class NodeTestCase extends TestCase
{
abstract public function getTests();
/**
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null,
$isPattern = false)
{
$this->assertNodeCompilation($source, $node, $environment,
$isPattern);
}
public function assertNodeCompilation($source, Node $node, Environment
$environment = null, $isPattern = false)
{
$compiler = $this->getCompiler($environment);
$compiler->compile($node);
if ($isPattern) {
$this->assertStringMatchesFormat($source,
trim($compiler->getSource()));
} else {
$this->assertEquals($source,
trim($compiler->getSource()));
}
}
protected function getCompiler(Environment $environment = null)
{
return new Compiler(null === $environment ?
$this->getEnvironment() : $environment);
}
protected function getEnvironment()
{
return new Environment(new ArrayLoader([]));
}
protected function getVariableGetter($name, $line = false)
{
$line = $line > 0 ? "// line {$line}\n" :
'';
if (\PHP_VERSION_ID >= 70000) {
return sprintf('%s($context["%s"] ??
null)', $line, $name);
}
if (\PHP_VERSION_ID >= 50400) {
return sprintf('%s(isset($context["%s"]) ?
$context["%s"] : null)', $line, $name, $name);
}
return sprintf('%s$this->getContext($context,
"%s")', $line, $name);
}
protected function getAttributeGetter()
{
if (\function_exists('twig_template_get_attributes')) {
return 'twig_template_get_attributes($this, ';
}
return '$this->getAttribute(';
}
}
class_alias('Twig\Test\NodeTestCase',
'Twig_Test_NodeTestCase');
PK���[�z�Sii
src/Token.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Represents a Token.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Token
{
protected $value;
protected $type;
protected $lineno;
const EOF_TYPE = -1;
const TEXT_TYPE = 0;
const BLOCK_START_TYPE = 1;
const VAR_START_TYPE = 2;
const BLOCK_END_TYPE = 3;
const VAR_END_TYPE = 4;
const NAME_TYPE = 5;
const NUMBER_TYPE = 6;
const STRING_TYPE = 7;
const OPERATOR_TYPE = 8;
const PUNCTUATION_TYPE = 9;
const INTERPOLATION_START_TYPE = 10;
const INTERPOLATION_END_TYPE = 11;
const ARROW_TYPE = 12;
/**
* @param int $type The type of the token
* @param string $value The token value
* @param int $lineno The line position in the source
*/
public function __construct($type, $value, $lineno)
{
$this->type = $type;
$this->value = $value;
$this->lineno = $lineno;
}
public function __toString()
{
return sprintf('%s(%s)',
self::typeToString($this->type, true), $this->value);
}
/**
* Tests the current token for a type and/or a value.
*
* Parameters may be:
* * just type
* * type and value (or array of possible values)
* * just value (or array of possible values) (NAME_TYPE is used as
type)
*
* @param array|string|int $type The type to test
* @param array|string|null $values The token value
*
* @return bool
*/
public function test($type, $values = null)
{
if (null === $values && !\is_int($type)) {
$values = $type;
$type = self::NAME_TYPE;
}
return ($this->type === $type) && (
null === $values ||
(\is_array($values) && \in_array($this->value,
$values)) ||
$this->value == $values
);
}
/**
* @return int
*/
public function getLine()
{
return $this->lineno;
}
/**
* @return int
*/
public function getType()
{
return $this->type;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* Returns the constant representation (internal) of a given type.
*
* @param int $type The type as an integer
* @param bool $short Whether to return a short representation or not
*
* @return string The string representation
*/
public static function typeToString($type, $short = false)
{
switch ($type) {
case self::EOF_TYPE:
$name = 'EOF_TYPE';
break;
case self::TEXT_TYPE:
$name = 'TEXT_TYPE';
break;
case self::BLOCK_START_TYPE:
$name = 'BLOCK_START_TYPE';
break;
case self::VAR_START_TYPE:
$name = 'VAR_START_TYPE';
break;
case self::BLOCK_END_TYPE:
$name = 'BLOCK_END_TYPE';
break;
case self::VAR_END_TYPE:
$name = 'VAR_END_TYPE';
break;
case self::NAME_TYPE:
$name = 'NAME_TYPE';
break;
case self::NUMBER_TYPE:
$name = 'NUMBER_TYPE';
break;
case self::STRING_TYPE:
$name = 'STRING_TYPE';
break;
case self::OPERATOR_TYPE:
$name = 'OPERATOR_TYPE';
break;
case self::PUNCTUATION_TYPE:
$name = 'PUNCTUATION_TYPE';
break;
case self::INTERPOLATION_START_TYPE:
$name = 'INTERPOLATION_START_TYPE';
break;
case self::INTERPOLATION_END_TYPE:
$name = 'INTERPOLATION_END_TYPE';
break;
case self::ARROW_TYPE:
$name = 'ARROW_TYPE';
break;
default:
throw new \LogicException(sprintf('Token of type
"%s" does not exist.', $type));
}
return $short ? $name : 'Twig\Token::'.$name;
}
/**
* Returns the English representation of a given type.
*
* @param int $type The type as an integer
*
* @return string The string representation
*/
public static function typeToEnglish($type)
{
switch ($type) {
case self::EOF_TYPE:
return 'end of template';
case self::TEXT_TYPE:
return 'text';
case self::BLOCK_START_TYPE:
return 'begin of statement block';
case self::VAR_START_TYPE:
return 'begin of print statement';
case self::BLOCK_END_TYPE:
return 'end of statement block';
case self::VAR_END_TYPE:
return 'end of print statement';
case self::NAME_TYPE:
return 'name';
case self::NUMBER_TYPE:
return 'number';
case self::STRING_TYPE:
return 'string';
case self::OPERATOR_TYPE:
return 'operator';
case self::PUNCTUATION_TYPE:
return 'punctuation';
case self::INTERPOLATION_START_TYPE:
return 'begin of string interpolation';
case self::INTERPOLATION_END_TYPE:
return 'end of string interpolation';
case self::ARROW_TYPE:
return 'arrow function';
default:
throw new \LogicException(sprintf('Token of type
"%s" does not exist.', $type));
}
}
}
class_alias('Twig\Token', 'Twig_Token');
PK���[L�芁�'src/TokenParser/AbstractTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Parser;
/**
* Base class for all token parsers.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class AbstractTokenParser implements TokenParserInterface
{
/**
* @var Parser
*/
protected $parser;
public function setParser(Parser $parser)
{
$this->parser = $parser;
}
}
class_alias('Twig\TokenParser\AbstractTokenParser',
'Twig_TokenParser');
PK���[�Ҕ)��$src/TokenParser/ApplyTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\Expression\TempNameExpression;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Node\SetNode;
use Twig\Token;
/**
* Applies filters on a section of a template.
*
* {% apply upper %}
* This text becomes uppercase
* {% endapplys %}
*/
final class ApplyTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$name = $this->parser->getVarName();
$ref = new TempNameExpression($name, $lineno);
$ref->setAttribute('always_defined', true);
$filter =
$this->parser->getExpressionParser()->parseFilterExpressionRaw($ref,
$this->getTag());
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideApplyEnd'], true);
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new Node([
new SetNode(true, $ref, $body, $lineno, $this->getTag()),
new PrintNode($filter, $lineno, $this->getTag()),
]);
}
public function decideApplyEnd(Token $token)
{
return $token->test('endapply');
}
public function getTag()
{
return 'apply';
}
}
PK���[�;Z
Z
)src/TokenParser/AutoEscapeTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\AutoEscapeNode;
use Twig\Node\Expression\ConstantExpression;
use Twig\Token;
/**
* Marks a section of a template to be escaped or not.
*
* {% autoescape true %}
* Everything will be automatically escaped in this block
* {% endautoescape %}
*
* {% autoescape false %}
* Everything will be outputed as is in this block
* {% endautoescape %}
*
* {% autoescape true js %}
* Everything will be automatically escaped in this block
* using the js escaping strategy
* {% endautoescape %}
*
* @final
*/
class AutoEscapeTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
if ($stream->test(Token::BLOCK_END_TYPE)) {
$value = 'html';
} else {
$expr =
$this->parser->getExpressionParser()->parseExpression();
if (!$expr instanceof ConstantExpression) {
throw new SyntaxError('An escaping strategy must be a
string or a bool.', $stream->getCurrent()->getLine(),
$stream->getSourceContext());
}
$value = $expr->getAttribute('value');
$compat = true === $value || false === $value;
if (true === $value) {
$value = 'html';
}
if ($compat && $stream->test(Token::NAME_TYPE)) {
@trigger_error('Using the autoescape tag with
"true" or "false" before the strategy name is
deprecated since version 1.21.', E_USER_DEPRECATED);
if (false === $value) {
throw new SyntaxError('Unexpected escaping
strategy as you set autoescaping to false.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$value = $stream->next()->getValue();
}
}
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
return new AutoEscapeNode($value, $body, $lineno,
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endautoescape');
}
public function getTag()
{
return 'autoescape';
}
}
class_alias('Twig\TokenParser\AutoEscapeTokenParser',
'Twig_TokenParser_AutoEscape');
PK���[�e��� � $src/TokenParser/BlockTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\BlockNode;
use Twig\Node\BlockReferenceNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Token;
/**
* Marks a section of a template as being reusable.
*
* {% block head %}
* <link rel="stylesheet" href="style.css" />
* <title>{% block title %}{% endblock %} - My
Webpage</title>
* {% endblock %}
*
* @final
*/
class BlockTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$name = $stream->expect(Token::NAME_TYPE)->getValue();
if ($this->parser->hasBlock($name)) {
throw new SyntaxError(sprintf("The block '%s'
has already been defined line %d.", $name,
$this->parser->getBlock($name)->getTemplateLine()),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$this->parser->setBlock($name, $block = new BlockNode($name,
new Node([]), $lineno));
$this->parser->pushLocalScope();
$this->parser->pushBlockStack($name);
if ($stream->nextIf(Token::BLOCK_END_TYPE)) {
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
$value = $token->getValue();
if ($value != $name) {
throw new SyntaxError(sprintf('Expected endblock
for block "%s" (but "%s" given).', $name, $value),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
}
} else {
$body = new Node([
new
PrintNode($this->parser->getExpressionParser()->parseExpression(),
$lineno),
]);
}
$stream->expect(Token::BLOCK_END_TYPE);
$block->setNode('body', $body);
$this->parser->popBlockStack();
$this->parser->popLocalScope();
return new BlockReferenceNode($name, $lineno, $this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endblock');
}
public function getTag()
{
return 'block';
}
}
class_alias('Twig\TokenParser\BlockTokenParser',
'Twig_TokenParser_Block');
PK���[�f��)src/TokenParser/DeprecatedTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\DeprecatedNode;
use Twig\Token;
/**
* Deprecates a section of a template.
*
* {% deprecated 'The "base.twig" template is deprecated,
use "layout.twig" instead.' %}
* {% extends 'layout.html.twig' %}
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
*
* @final
*/
class DeprecatedTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$expr =
$this->parser->getExpressionParser()->parseExpression();
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new DeprecatedNode($expr, $token->getLine(),
$this->getTag());
}
public function getTag()
{
return 'deprecated';
}
}
class_alias('Twig\TokenParser\DeprecatedTokenParser',
'Twig_TokenParser_Deprecated');
PK���[�yb
!src/TokenParser/DoTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\DoNode;
use Twig\Token;
/**
* Evaluates an expression, discarding the returned value.
*
* @final
*/
class DoTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$expr =
$this->parser->getExpressionParser()->parseExpression();
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new DoNode($expr, $token->getLine(), $this->getTag());
}
public function getTag()
{
return 'do';
}
}
class_alias('Twig\TokenParser\DoTokenParser',
'Twig_TokenParser_Do');
PK���[�w���$src/TokenParser/EmbedTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\EmbedNode;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Token;
/**
* Embeds a template.
*
* @final
*/
class EmbedTokenParser extends IncludeTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
$parent =
$this->parser->getExpressionParser()->parseExpression();
list($variables, $only, $ignoreMissing) =
$this->parseArguments();
$parentToken = $fakeParentToken = new Token(Token::STRING_TYPE,
'__parent__', $token->getLine());
if ($parent instanceof ConstantExpression) {
$parentToken = new Token(Token::STRING_TYPE,
$parent->getAttribute('value'), $token->getLine());
} elseif ($parent instanceof NameExpression) {
$parentToken = new Token(Token::NAME_TYPE,
$parent->getAttribute('name'), $token->getLine());
}
// inject a fake parent to make the parent() function work
$stream->injectTokens([
new Token(Token::BLOCK_START_TYPE, '',
$token->getLine()),
new Token(Token::NAME_TYPE, 'extends',
$token->getLine()),
$parentToken,
new Token(Token::BLOCK_END_TYPE, '',
$token->getLine()),
]);
$module = $this->parser->parse($stream, [$this,
'decideBlockEnd'], true);
// override the parent with the correct one
if ($fakeParentToken === $parentToken) {
$module->setNode('parent', $parent);
}
$this->parser->embedTemplate($module);
$stream->expect(Token::BLOCK_END_TYPE);
return new EmbedNode($module->getTemplateName(),
$module->getAttribute('index'), $variables, $only,
$ignoreMissing, $token->getLine(), $this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endembed');
}
public function getTag()
{
return 'embed';
}
}
class_alias('Twig\TokenParser\EmbedTokenParser',
'Twig_TokenParser_Embed');
PK���[�^���&src/TokenParser/ExtendsTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Node;
use Twig\Token;
/**
* Extends a template by another one.
*
* {% extends "base.html" %}
*
* @final
*/
class ExtendsTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
if ($this->parser->peekBlockStack()) {
throw new SyntaxError('Cannot use "extend" in a
block.', $token->getLine(), $stream->getSourceContext());
} elseif (!$this->parser->isMainScope()) {
throw new SyntaxError('Cannot use "extend" in a
macro.', $token->getLine(), $stream->getSourceContext());
}
if (null !== $this->parser->getParent()) {
throw new SyntaxError('Multiple extends tags are
forbidden.', $token->getLine(), $stream->getSourceContext());
}
$this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
$stream->expect(Token::BLOCK_END_TYPE);
return new Node();
}
public function getTag()
{
return 'extends';
}
}
class_alias('Twig\TokenParser\ExtendsTokenParser',
'Twig_TokenParser_Extends');
PK���[�@@%src/TokenParser/FilterTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\BlockNode;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\PrintNode;
use Twig\Token;
/**
* Filters a section of a template by applying filters.
*
* {% filter upper %}
* This text becomes uppercase
* {% endfilter %}
*
* @final
*/
class FilterTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$name = $this->parser->getVarName();
$ref = new BlockReferenceExpression(new ConstantExpression($name,
$token->getLine()), null, $token->getLine(), $this->getTag());
$filter =
$this->parser->getExpressionParser()->parseFilterExpressionRaw($ref,
$this->getTag());
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$block = new BlockNode($name, $body, $token->getLine());
$this->parser->setBlock($name, $block);
return new PrintNode($filter, $token->getLine(),
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endfilter');
}
public function getTag()
{
return 'filter';
}
}
class_alias('Twig\TokenParser\FilterTokenParser',
'Twig_TokenParser_Filter');
PK���[v����$src/TokenParser/FlushTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\FlushNode;
use Twig\Token;
/**
* Flushes the output to the client.
*
* @see flush()
*
* @final
*/
class FlushTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new FlushNode($token->getLine(), $this->getTag());
}
public function getTag()
{
return 'flush';
}
}
class_alias('Twig\TokenParser\FlushTokenParser',
'Twig_TokenParser_Flush');
PK���[��Vjj"src/TokenParser/ForTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\ForNode;
use Twig\Token;
use Twig\TokenStream;
/**
* Loops over each item of a sequence.
*
* <ul>
* {% for user in users %}
* <li>{{ user.username|e }}</li>
* {% endfor %}
* </ul>
*
* @final
*/
class ForTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$targets =
$this->parser->getExpressionParser()->parseAssignmentExpression();
$stream->expect(Token::OPERATOR_TYPE, 'in');
$seq =
$this->parser->getExpressionParser()->parseExpression();
$ifexpr = null;
if ($stream->nextIf(Token::NAME_TYPE, 'if')) {
$ifexpr =
$this->parser->getExpressionParser()->parseExpression();
}
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideForFork']);
if ('else' == $stream->next()->getValue()) {
$stream->expect(Token::BLOCK_END_TYPE);
$else = $this->parser->subparse([$this,
'decideForEnd'], true);
} else {
$else = null;
}
$stream->expect(Token::BLOCK_END_TYPE);
if (\count($targets) > 1) {
$keyTarget = $targets->getNode(0);
$keyTarget = new
AssignNameExpression($keyTarget->getAttribute('name'),
$keyTarget->getTemplateLine());
$valueTarget = $targets->getNode(1);
$valueTarget = new
AssignNameExpression($valueTarget->getAttribute('name'),
$valueTarget->getTemplateLine());
} else {
$keyTarget = new AssignNameExpression('_key',
$lineno);
$valueTarget = $targets->getNode(0);
$valueTarget = new
AssignNameExpression($valueTarget->getAttribute('name'),
$valueTarget->getTemplateLine());
}
if ($ifexpr) {
$this->checkLoopUsageCondition($stream, $ifexpr);
$this->checkLoopUsageBody($stream, $body);
}
return new ForNode($keyTarget, $valueTarget, $seq, $ifexpr, $body,
$else, $lineno, $this->getTag());
}
public function decideForFork(Token $token)
{
return $token->test(['else', 'endfor']);
}
public function decideForEnd(Token $token)
{
return $token->test('endfor');
}
// the loop variable cannot be used in the condition
protected function checkLoopUsageCondition(TokenStream $stream,
\Twig_NodeInterface $node)
{
if ($node instanceof GetAttrExpression &&
$node->getNode('node') instanceof NameExpression &&
'loop' ==
$node->getNode('node')->getAttribute('name')) {
throw new SyntaxError('The "loop" variable
cannot be used in a looping condition.', $node->getTemplateLine(),
$stream->getSourceContext());
}
foreach ($node as $n) {
if (!$n) {
continue;
}
$this->checkLoopUsageCondition($stream, $n);
}
}
// check usage of non-defined loop-items
// it does not catch all problems (for instance when a for is included
into another or when the variable is used in an include)
protected function checkLoopUsageBody(TokenStream $stream,
\Twig_NodeInterface $node)
{
if ($node instanceof GetAttrExpression &&
$node->getNode('node') instanceof NameExpression &&
'loop' ==
$node->getNode('node')->getAttribute('name')) {
$attribute = $node->getNode('attribute');
if ($attribute instanceof ConstantExpression &&
\in_array($attribute->getAttribute('value'),
['length', 'revindex0', 'revindex',
'last'])) {
throw new SyntaxError(sprintf('The "loop.%s"
variable is not defined when looping with a condition.',
$attribute->getAttribute('value')),
$node->getTemplateLine(), $stream->getSourceContext());
}
}
// should check for parent.loop.XXX usage
if ($node instanceof ForNode) {
return;
}
foreach ($node as $n) {
if (!$n) {
continue;
}
$this->checkLoopUsageBody($stream, $n);
}
}
public function getTag()
{
return 'for';
}
}
class_alias('Twig\TokenParser\ForTokenParser',
'Twig_TokenParser_For');
PK���[��xx#src/TokenParser/FromTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\ImportNode;
use Twig\Token;
/**
* Imports macros.
*
* {% from 'forms.html' import forms %}
*
* @final
*/
class FromTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$macro =
$this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
$stream->expect(Token::NAME_TYPE, 'import');
$targets = [];
do {
$name = $stream->expect(Token::NAME_TYPE)->getValue();
$alias = $name;
if ($stream->nextIf('as')) {
$alias =
$stream->expect(Token::NAME_TYPE)->getValue();
}
$targets[$name] = $alias;
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
} while (true);
$stream->expect(Token::BLOCK_END_TYPE);
$var = new AssignNameExpression($this->parser->getVarName(),
$token->getLine());
$node = new ImportNode($macro, $var, $token->getLine(),
$this->getTag());
foreach ($targets as $name => $alias) {
if ($this->parser->isReservedMacroName($name)) {
throw new SyntaxError(sprintf('"%s" cannot
be an imported macro as it is a reserved keyword.', $name),
$token->getLine(), $stream->getSourceContext());
}
$this->parser->addImportedSymbol('function',
$alias, 'get'.$name, $var);
}
return $node;
}
public function getTag()
{
return 'from';
}
}
class_alias('Twig\TokenParser\FromTokenParser',
'Twig_TokenParser_From');
PK���[
B�� � !src/TokenParser/IfTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\IfNode;
use Twig\Node\Node;
use Twig\Token;
/**
* Tests a condition.
*
* {% if users %}
* <ul>
* {% for user in users %}
* <li>{{ user.username|e }}</li>
* {% endfor %}
* </ul>
* {% endif %}
*
* @final
*/
class IfTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$expr =
$this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideIfFork']);
$tests = [$expr, $body];
$else = null;
$end = false;
while (!$end) {
switch ($stream->next()->getValue()) {
case 'else':
$stream->expect(Token::BLOCK_END_TYPE);
$else = $this->parser->subparse([$this,
'decideIfEnd']);
break;
case 'elseif':
$expr =
$this->parser->getExpressionParser()->parseExpression();
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideIfFork']);
$tests[] = $expr;
$tests[] = $body;
break;
case 'endif':
$end = true;
break;
default:
throw new SyntaxError(sprintf('Unexpected end of
template. Twig was looking for the following tags "else",
"elseif", or "endif" to close the "if" block
started at line %d).', $lineno),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
}
$stream->expect(Token::BLOCK_END_TYPE);
return new IfNode(new Node($tests), $else, $lineno,
$this->getTag());
}
public function decideIfFork(Token $token)
{
return $token->test(['elseif', 'else',
'endif']);
}
public function decideIfEnd(Token $token)
{
return $token->test(['endif']);
}
public function getTag()
{
return 'if';
}
}
class_alias('Twig\TokenParser\IfTokenParser',
'Twig_TokenParser_If');
PK���[mO/J��%src/TokenParser/ImportTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\ImportNode;
use Twig\Token;
/**
* Imports macros.
*
* {% import 'forms.html' as forms %}
*
* @final
*/
class ImportTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$macro =
$this->parser->getExpressionParser()->parseExpression();
$this->parser->getStream()->expect(Token::NAME_TYPE,
'as');
$var = new
AssignNameExpression($this->parser->getStream()->expect(Token::NAME_TYPE)->getValue(),
$token->getLine());
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$this->parser->addImportedSymbol('template',
$var->getAttribute('name'));
return new ImportNode($macro, $var, $token->getLine(),
$this->getTag());
}
public function getTag()
{
return 'import';
}
}
class_alias('Twig\TokenParser\ImportTokenParser',
'Twig_TokenParser_Import');
PK���[r� �SS&src/TokenParser/IncludeTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\IncludeNode;
use Twig\Token;
/**
* Includes a template.
*
* {% include 'header.html' %}
* Body
* {% include 'footer.html' %}
*/
class IncludeTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$expr =
$this->parser->getExpressionParser()->parseExpression();
list($variables, $only, $ignoreMissing) =
$this->parseArguments();
return new IncludeNode($expr, $variables, $only, $ignoreMissing,
$token->getLine(), $this->getTag());
}
protected function parseArguments()
{
$stream = $this->parser->getStream();
$ignoreMissing = false;
if ($stream->nextIf(Token::NAME_TYPE, 'ignore')) {
$stream->expect(Token::NAME_TYPE, 'missing');
$ignoreMissing = true;
}
$variables = null;
if ($stream->nextIf(Token::NAME_TYPE, 'with')) {
$variables =
$this->parser->getExpressionParser()->parseExpression();
}
$only = false;
if ($stream->nextIf(Token::NAME_TYPE, 'only')) {
$only = true;
}
$stream->expect(Token::BLOCK_END_TYPE);
return [$variables, $only, $ignoreMissing];
}
public function getTag()
{
return 'include';
}
}
class_alias('Twig\TokenParser\IncludeTokenParser',
'Twig_TokenParser_Include');
PK���[&nq�uu$src/TokenParser/MacroTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\BodyNode;
use Twig\Node\MacroNode;
use Twig\Node\Node;
use Twig\Token;
/**
* Defines a macro.
*
* {% macro input(name, value, type, size) %}
* <input type="{{ type|default('text') }}"
name="{{ name }}" value="{{ value|e }}" size="{{
size|default(20) }}" />
* {% endmacro %}
*
* @final
*/
class MacroTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$name = $stream->expect(Token::NAME_TYPE)->getValue();
$arguments =
$this->parser->getExpressionParser()->parseArguments(true, true);
$stream->expect(Token::BLOCK_END_TYPE);
$this->parser->pushLocalScope();
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
$value = $token->getValue();
if ($value != $name) {
throw new SyntaxError(sprintf('Expected endmacro for
macro "%s" (but "%s" given).', $name, $value),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
}
$this->parser->popLocalScope();
$stream->expect(Token::BLOCK_END_TYPE);
$this->parser->setMacro($name, new MacroNode($name, new
BodyNode([$body]), $arguments, $lineno, $this->getTag()));
return new Node();
}
public function decideBlockEnd(Token $token)
{
return $token->test('endmacro');
}
public function getTag()
{
return 'macro';
}
}
class_alias('Twig\TokenParser\MacroTokenParser',
'Twig_TokenParser_Macro');
PK���[���$$&src/TokenParser/SandboxTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\IncludeNode;
use Twig\Node\SandboxNode;
use Twig\Node\TextNode;
use Twig\Token;
/**
* Marks a section of a template as untrusted code that must be evaluated
in the sandbox mode.
*
* {% sandbox %}
* {% include 'user.html' %}
* {% endsandbox %}
*
* @see https://twig.symfony.com/doc/api.html#sandbox-extension for details
*
* @final
*/
class SandboxTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
// in a sandbox tag, only include tags are allowed
if (!$body instanceof IncludeNode) {
foreach ($body as $node) {
if ($node instanceof TextNode &&
ctype_space($node->getAttribute('data'))) {
continue;
}
if (!$node instanceof IncludeNode) {
throw new SyntaxError('Only "include"
tags are allowed within a "sandbox" section.',
$node->getTemplateLine(), $stream->getSourceContext());
}
}
}
return new SandboxNode($body, $token->getLine(),
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endsandbox');
}
public function getTag()
{
return 'sandbox';
}
}
class_alias('Twig\TokenParser\SandboxTokenParser',
'Twig_TokenParser_Sandbox');
PK���["��"src/TokenParser/SetTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\SetNode;
use Twig\Token;
/**
* Defines a variable.
*
* {% set foo = 'foo' %}
* {% set foo = [1, 2] %}
* {% set foo = {'foo': 'bar'} %}
* {% set foo = 'foo' ~ 'bar' %}
* {% set foo, bar = 'foo', 'bar' %}
* {% set foo %}Some content{% endset %}
*
* @final
*/
class SetTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$names =
$this->parser->getExpressionParser()->parseAssignmentExpression();
$capture = false;
if ($stream->nextIf(Token::OPERATOR_TYPE, '=')) {
$values =
$this->parser->getExpressionParser()->parseMultitargetExpression();
$stream->expect(Token::BLOCK_END_TYPE);
if (\count($names) !== \count($values)) {
throw new SyntaxError('When using set, you must have
the same number of variables and assignments.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
} else {
$capture = true;
if (\count($names) > 1) {
throw new SyntaxError('When using set with a block,
you cannot have a multi-target.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$stream->expect(Token::BLOCK_END_TYPE);
$values = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
}
return new SetNode($capture, $names, $values, $lineno,
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endset');
}
public function getTag()
{
return 'set';
}
}
class_alias('Twig\TokenParser\SetTokenParser',
'Twig_TokenParser_Set');
PK���[�6�(src/TokenParser/SpacelessTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\SpacelessNode;
use Twig\Token;
/**
* Remove whitespaces between HTML tags.
*
* {% spaceless %}
* <div>
* <strong>foo</strong>
* </div>
* {% endspaceless %}
* {# output will be
<div><strong>foo</strong></div> #}
*
* @final
*/
class SpacelessTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideSpacelessEnd'], true);
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new SpacelessNode($body, $lineno, $this->getTag());
}
public function decideSpacelessEnd(Token $token)
{
return $token->test('endspaceless');
}
public function getTag()
{
return 'spaceless';
}
}
class_alias('Twig\TokenParser\SpacelessTokenParser',
'Twig_TokenParser_Spaceless');
PK���[&�{Aqq(src/TokenParser/TokenParserInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Parser;
use Twig\Token;
/**
* Interface implemented by token parsers.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface TokenParserInterface
{
/**
* Sets the parser associated with this token parser.
*/
public function setParser(Parser $parser);
/**
* Parses a token and returns a node.
*
* @return \Twig_NodeInterface
*
* @throws SyntaxError
*/
public function parse(Token $token);
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag();
}
class_alias('Twig\TokenParser\TokenParserInterface',
'Twig_TokenParserInterface');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Token');
class_exists('Twig\Parser');
PK���[}����"src/TokenParser/UseTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Node;
use Twig\Token;
/**
* Imports blocks defined in another template into the current template.
*
* {% extends "base.html" %}
*
* {% use "blocks.html" %}
*
* {% block title %}{% endblock %}
* {% block content %}{% endblock %}
*
* @see https://twig.symfony.com/doc/templates.html#horizontal-reuse for
details.
*
* @final
*/
class UseTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$template =
$this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
if (!$template instanceof ConstantExpression) {
throw new SyntaxError('The template references in a
"use" statement must be a string.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$targets = [];
if ($stream->nextIf('with')) {
do {
$name =
$stream->expect(Token::NAME_TYPE)->getValue();
$alias = $name;
if ($stream->nextIf('as')) {
$alias =
$stream->expect(Token::NAME_TYPE)->getValue();
}
$targets[$name] = new ConstantExpression($alias, -1);
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
} while (true);
}
$stream->expect(Token::BLOCK_END_TYPE);
$this->parser->addTrait(new Node(['template' =>
$template, 'targets' => new Node($targets)]));
return new Node();
}
public function getTag()
{
return 'use';
}
}
class_alias('Twig\TokenParser\UseTokenParser',
'Twig_TokenParser_Use');
PK���[
O`#src/TokenParser/WithTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\WithNode;
use Twig\Token;
/**
* Creates a nested scope.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class WithTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
$variables = null;
$only = false;
if (!$stream->test(Token::BLOCK_END_TYPE)) {
$variables =
$this->parser->getExpressionParser()->parseExpression();
$only = $stream->nextIf(Token::NAME_TYPE, 'only');
}
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideWithEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
return new WithNode($body, $variables, $only, $token->getLine(),
$this->getTag());
}
public function decideWithEnd(Token $token)
{
return $token->test('endwith');
}
public function getTag()
{
return 'with';
}
}
class_alias('Twig\TokenParser\WithTokenParser',
'Twig_TokenParser_With');
PK���[�N:ottsrc/TokenStream.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
/**
* Represents a token stream.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TokenStream
{
protected $tokens;
protected $current = 0;
protected $filename;
private $source;
/**
* @param array $tokens An array of tokens
* @param string|null $name The name of the template which tokens are
associated with
* @param string|null $source The source code associated with the
tokens
*/
public function __construct(array $tokens, $name = null, $source =
null)
{
if (!$name instanceof Source) {
if (null !== $name || null !== $source) {
@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);
}
$this->source = new Source($source, $name);
} else {
$this->source = $name;
}
$this->tokens = $tokens;
// deprecated, not used anymore, to be removed in 2.0
$this->filename = $this->source->getName();
}
public function __toString()
{
return implode("\n", $this->tokens);
}
public function injectTokens(array $tokens)
{
$this->tokens = array_merge(\array_slice($this->tokens, 0,
$this->current), $tokens, \array_slice($this->tokens,
$this->current));
}
/**
* Sets the pointer to the next token and returns the old one.
*
* @return Token
*/
public function next()
{
if (!isset($this->tokens[++$this->current])) {
throw new SyntaxError('Unexpected end of template.',
$this->tokens[$this->current - 1]->getLine(), $this->source);
}
return $this->tokens[$this->current - 1];
}
/**
* Tests a token, sets the pointer to the next one and returns it or
throws a syntax error.
*
* @return Token|null The next token if the condition is true, null
otherwise
*/
public function nextIf($primary, $secondary = null)
{
if ($this->tokens[$this->current]->test($primary,
$secondary)) {
return $this->next();
}
}
/**
* Tests a token and returns it or throws a syntax error.
*
* @return Token
*/
public function expect($type, $value = null, $message = null)
{
$token = $this->tokens[$this->current];
if (!$token->test($type, $value)) {
$line = $token->getLine();
throw new SyntaxError(sprintf('%sUnexpected token
"%s"%s ("%s" expected%s).',
$message ? $message.'. ' : '',
Token::typeToEnglish($token->getType()),
$token->getValue() ? sprintf(' of value
"%s"', $token->getValue()) : '',
Token::typeToEnglish($type), $value ? sprintf(' with
value "%s"', $value) : ''),
$line,
$this->source
);
}
$this->next();
return $token;
}
/**
* Looks at the next token.
*
* @param int $number
*
* @return Token
*/
public function look($number = 1)
{
if (!isset($this->tokens[$this->current + $number])) {
throw new SyntaxError('Unexpected end of template.',
$this->tokens[$this->current + $number - 1]->getLine(),
$this->source);
}
return $this->tokens[$this->current + $number];
}
/**
* Tests the current token.
*
* @return bool
*/
public function test($primary, $secondary = null)
{
return $this->tokens[$this->current]->test($primary,
$secondary);
}
/**
* Checks if end of stream was reached.
*
* @return bool
*/
public function isEOF()
{
return Token::EOF_TYPE ===
$this->tokens[$this->current]->getType();
}
/**
* @return Token
*/
public function getCurrent()
{
return $this->tokens[$this->current];
}
/**
* Gets the name associated with this stream (null if not defined).
*
* @return string|null
*
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getFilename()
{
@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);
return $this->source->getName();
}
/**
* Gets the source code associated with this stream.
*
* @return string
*
* @internal Don't use this as it might be empty depending on the
environment configuration
*
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getSource()
{
@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);
return $this->source->getCode();
}
/**
* Gets the source associated with this stream.
*
* @return Source
*
* @internal
*/
public function getSourceContext()
{
return $this->source;
}
}
class_alias('Twig\TokenStream', 'Twig_TokenStream');
PK���[ӉX��
�
src/TwigFilter.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Node\Node;
/**
* Represents a template filter.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TwigFilter
{
protected $name;
protected $callable;
protected $options;
protected $arguments = [];
public function __construct($name, $callable, array $options = [])
{
$this->name = $name;
$this->callable = $callable;
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'is_variadic' => false,
'is_safe' => null,
'is_safe_callback' => null,
'pre_escape' => null,
'preserves_safety' => null,
'node_class' =>
'\Twig\Node\Expression\FilterExpression',
'deprecated' => false,
'alternative' => null,
], $options);
}
public function getName()
{
return $this->name;
}
public function getCallable()
{
return $this->callable;
}
public function getNodeClass()
{
return $this->options['node_class'];
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $filterArgs)
{
if (null !== $this->options['is_safe']) {
return $this->options['is_safe'];
}
if (null !== $this->options['is_safe_callback']) {
return
\call_user_func($this->options['is_safe_callback'],
$filterArgs);
}
}
public function getPreservesSafety()
{
return $this->options['preserves_safety'];
}
public function getPreEscape()
{
return $this->options['pre_escape'];
}
public function isVariadic()
{
return $this->options['is_variadic'];
}
public function isDeprecated()
{
return (bool) $this->options['deprecated'];
}
public function getDeprecatedVersion()
{
return $this->options['deprecated'];
}
public function getAlternative()
{
return $this->options['alternative'];
}
}
class_alias('Twig\TwigFilter', 'Twig_SimpleFilter');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Node\Node');
PK���[����
src/TwigFunction.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Node\Node;
/**
* Represents a template function.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TwigFunction
{
protected $name;
protected $callable;
protected $options;
protected $arguments = [];
public function __construct($name, $callable, array $options = [])
{
$this->name = $name;
$this->callable = $callable;
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'is_variadic' => false,
'is_safe' => null,
'is_safe_callback' => null,
'node_class' =>
'\Twig\Node\Expression\FunctionExpression',
'deprecated' => false,
'alternative' => null,
], $options);
}
public function getName()
{
return $this->name;
}
public function getCallable()
{
return $this->callable;
}
public function getNodeClass()
{
return $this->options['node_class'];
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $functionArgs)
{
if (null !== $this->options['is_safe']) {
return $this->options['is_safe'];
}
if (null !== $this->options['is_safe_callback']) {
return
\call_user_func($this->options['is_safe_callback'],
$functionArgs);
}
return [];
}
public function isVariadic()
{
return $this->options['is_variadic'];
}
public function isDeprecated()
{
return (bool) $this->options['deprecated'];
}
public function getDeprecatedVersion()
{
return $this->options['deprecated'];
}
public function getAlternative()
{
return $this->options['alternative'];
}
}
class_alias('Twig\TwigFunction',
'Twig_SimpleFunction');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Node\Node');
PK���[�EVZ��src/TwigTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Represents a template test.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TwigTest
{
protected $name;
protected $callable;
protected $options;
private $arguments = [];
public function __construct($name, $callable, array $options = [])
{
$this->name = $name;
$this->callable = $callable;
$this->options = array_merge([
'is_variadic' => false,
'node_class' =>
'\Twig\Node\Expression\TestExpression',
'deprecated' => false,
'alternative' => null,
], $options);
}
public function getName()
{
return $this->name;
}
public function getCallable()
{
return $this->callable;
}
public function getNodeClass()
{
return $this->options['node_class'];
}
public function isVariadic()
{
return $this->options['is_variadic'];
}
public function isDeprecated()
{
return (bool) $this->options['deprecated'];
}
public function getDeprecatedVersion()
{
return $this->options['deprecated'];
}
public function getAlternative()
{
return $this->options['alternative'];
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
}
class_alias('Twig\TwigTest', 'Twig_SimpleTest');
PK���[+�=��!src/Util/DeprecationCollector.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Util;
use Twig\Environment;
use Twig\Error\SyntaxError;
use Twig\Source;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class DeprecationCollector
{
private $twig;
private $deprecations;
public function __construct(Environment $twig)
{
$this->twig = $twig;
}
/**
* Returns deprecations for templates contained in a directory.
*
* @param string $dir A directory where templates are stored
* @param string $ext Limit the loaded templates by extension
*
* @return array An array of deprecations
*/
public function collectDir($dir, $ext = '.twig')
{
$iterator = new \RegexIterator(
new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($dir),
\RecursiveIteratorIterator::LEAVES_ONLY
), '{'.preg_quote($ext).'$}'
);
return $this->collect(new TemplateDirIterator($iterator));
}
/**
* Returns deprecations for passed templates.
*
* @param \Traversable $iterator An iterator of templates (where keys
are template names and values the contents of the template)
*
* @return array An array of deprecations
*/
public function collect(\Traversable $iterator)
{
$this->deprecations = [];
set_error_handler([$this, 'errorHandler']);
foreach ($iterator as $name => $contents) {
try {
$this->twig->parse($this->twig->tokenize(new
Source($contents, $name)));
} catch (SyntaxError $e) {
// ignore templates containing syntax errors
}
}
restore_error_handler();
$deprecations = $this->deprecations;
$this->deprecations = [];
return $deprecations;
}
/**
* @internal
*/
public function errorHandler($type, $msg)
{
if (E_USER_DEPRECATED === $type) {
$this->deprecations[] = $msg;
}
}
}
class_alias('Twig\Util\DeprecationCollector',
'Twig_Util_DeprecationCollector');
PK���[�~�NN
src/Util/TemplateDirIterator.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Util;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class TemplateDirIterator extends \IteratorIterator
{
public function current()
{
return file_get_contents(parent::current());
}
public function key()
{
return (string) parent::key();
}
}
class_alias('Twig\Util\TemplateDirIterator',
'Twig_Util_TemplateDirIterator');
PK��[ڷ�hSSG0e/0ef561281ac8395b06643c2e01eb32fde86ef3066db7f9dab34ea5b4f71fd669.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/partials/particle.html.twig */
class
__TwigTemplate_aec8402b5836838da70c10f3615ab5ef66e9418d9fc1a05e4d5e5406d9faa68d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'stylesheets' => [$this,
'block_stylesheets'],
'javascript' => [$this,
'block_javascript'],
'javascript_footer' => [$this,
'block_javascript_footer'],
'particle' => [$this, 'block_particle'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 2
echo " ";
$this->displayBlock('stylesheets', $context, $blocks);
// line 4
echo "
";
// line 5
$this->displayBlock('javascript', $context, $blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 9
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "footer";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 10
echo " ";
$this->displayBlock('javascript_footer', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 14
$this->displayBlock('particle', $context, $blocks);
}
// line 2
public function block_stylesheets($context, array $blocks = [])
{
// line 3
echo " ";
}
// line 5
public function block_javascript($context, array $blocks = [])
{
// line 6
echo " ";
}
// line 10
public function block_javascript_footer($context, array $blocks = [])
{
// line 11
echo " ";
}
// line 14
public function block_particle($context, array $blocks = [])
{
}
public function getTemplateName()
{
return "@nucleus/partials/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 14, 94 => 11, 91 => 10, 87 =>
6, 84 => 5, 80 => 3, 77 => 2, 73 => 14, 68 => 10, 56
=> 9, 52 => 5, 49 => 4, 46 => 2, 34 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/partials/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/partials/particle.html.twig");
}
}
PK��[���z*z*G10/104915164c059efbbe2c091a499e5c27c419059e93ee00b24c37b02699fe39ad.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/assets.html.twig */
class
__TwigTemplate_33384a5b99673587ea921bcefb48cd7ce5c13230e7620b3a580ee8a15790d824
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
ob_start(function () { return ''; });
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "enabled", [])) {
// line 3
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "css", []));
foreach ($context['_seq'] as
$context["_key"] => $context["css"]) {
// line 4
echo " ";
$context["params"] = [];
// line 5
echo " ";
if ($this->getAttribute($context["css"],
"extra", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["css"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 7
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 8
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 9
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 10
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
if ($this->getAttribute($context["css"],
"location", [])) {
// line 14
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["href" => $this->getAttribute($context["css"],
"location", [])]), 1 =>
$this->getAttribute($context["css"], "priority",
[])], "method");
// line 15
echo " ";
}
// line 16
echo "
";
// line 17
if ($this->getAttribute($context["css"],
"inline", [])) {
// line 18
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["css"], "inline",
[])]), 1 => $this->getAttribute($context["css"],
"priority", [])], "method");
// line 19
echo " ";
}
// line 20
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['css'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo "
";
// line 22
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "javascript", []));
foreach ($context['_seq'] as
$context["_key"] => $context["script"]) {
// line 23
echo " ";
$context["params"] = [];
// line 24
echo " ";
if ($this->getAttribute($context["script"],
"extra", [])) {
// line 25
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["script"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 27
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 28
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 29
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 30
echo " ";
}
// line 31
echo "
";
// line 32
if ($this->getAttribute($context["script"],
"location", [])) {
// line 33
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["src" => $this->getAttribute($context["script"],
"location", [])]), 1 =>
$this->getAttribute($context["script"], "priority",
[]), 2 => ((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 34
echo " ";
}
// line 35
echo "
";
// line 36
if ($this->getAttribute($context["script"],
"inline", [])) {
// line 37
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["script"], "inline",
[])]), 1 => $this->getAttribute($context["script"],
"priority", []), 2 =>
((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 38
echo " ";
}
// line 39
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['script'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
echo trim(preg_replace('/>\s+</',
'><', ob_get_clean()));
}
public function getTemplateName()
{
return "@particles/assets.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 164 => 39, 161 => 38, 158 => 37, 156
=> 36, 153 => 35, 150 => 34, 147 => 33, 145 => 32, 142
=> 31, 139 => 30, 133 => 29, 127 => 28, 124 => 27, 119
=> 26, 114 => 25, 111 => 24, 108 => 23, 104 => 22, 101
=> 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 =>
16, 81 => 15, 78 => 14, 76 => 13, 73 => 12, 70 => 11,
64 => 10, 58 => 9, 55 => 8, 50 => 7, 45 => 6, 42 =>
5, 39 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/assets.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/assets.html.twig");
}
}
PK��[;��� � G1a/1a064cbcf8150ae9fc3931f88e12793408d6db8cabea91f3cdb3cf1fcea8e284.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/module.html.twig */
class
__TwigTemplate_9008a316aa2f91728fa07d16125eab4c6047e8c7ffcfcc16fdc30c33abc985fb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/module.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModule", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"module_id", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry")), "position" => "particle"]],
"method");
echo "
";
}
public function getTemplateName()
{
return "@particles/module.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/module.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/module.html.twig");
}
}
PK��[1H�(�
�
G21/21fec46a98d0bc3f82a64b7cf12c1a4584517721999080f674ebda09c5c26491.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/custom.html.twig */
class
__TwigTemplate_25e8678198d25c99098c86747089ec7e07dff436dd40cdaa393ca714aa9f4b9a
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/custom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["html"] =
(($this->getAttribute(($context["particle"] ?? null),
"twig", [])) ?
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "compile", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"html", [])], "method")) :
($this->getAttribute(($context["particle"] ?? null),
"html", [])));
// line 5
echo " ";
echo
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->htmlFilter((($this->getAttribute(($context["particle"]
?? null), "filter", [])) ?
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "filter", [0 =>
($context["html"] ?? null)], "method")) :
(($context["html"] ?? null))));
echo "
";
}
public function getTemplateName()
{
return "@particles/custom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 45 => 5, 42 => 4, 39 => 3, 29 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/custom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/custom.html.twig");
}
}
PK��[l��~�~�G2d/2db216535923aef9afb21cce83f7c36bbb6a4ffc307c5d55113ad1c374c54efc.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu.html.twig */
class
__TwigTemplate_fbcd6847df006fa1791650bf83f7af7e8207f985041cc0588f77efafcf5b5609
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 4
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 6
echo "
";
// line 14
echo "
";
// line 23
echo "
";
// line 32
echo "
";
// line 117
echo "
";
// line 134
echo "
";
// line 142
echo "
";
// line 155
echo "
";
// line 156
$context["macro"] = $this;
// line 157
echo "
";
// line 158
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 159
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 161
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 7
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 8
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 9
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 10
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 15
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 16
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 17
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 18
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 19
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu.html.twig", 19);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 20
($context["context"] ?? null)));
}
// line 21
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 24
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 25
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 26
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 27
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 28
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 30
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 33
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 34
echo " ";
$context["self"] = $this;
// line 35
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 36
echo " ";
$context["enabled"] = 0;
// line 37
echo " ";
}
// line 38
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 39
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 40
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 41
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 42
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 43
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 44
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 45
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 46
echo "
";
// line 47
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 48
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 49
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 50
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 51
echo " ";
}
// line 52
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 53
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 54
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 55
echo " ";
}
// line 56
echo " ";
}
// line 57
echo "
";
// line 58
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 59
echo " ";
$context["linkAttributes"] = "";
// line 60
echo "
";
// line 61
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 62
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 63
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 64
echo " ";
if (($context["key"] ==
"rel")) {
// line 65
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 66
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 67
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 68
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 69
echo "
";
}
// line 70
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 71
echo " ";
} else {
// line 72
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 73
echo " ";
}
// line 74
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 76
echo " ";
}
// line 77
echo "
";
// line 78
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 79
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 80
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 81
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 82
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 83
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 84
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 85
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 86
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 87
($context["item"] ?? null), "icon", [])) {
// line 88
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 90
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 91
echo " <span
class=\"g-menu-item-content\">
";
// line 92
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 94
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 95
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 97
echo " ";
} else {
// line 98
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 99
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 100
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 101
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 103
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 105
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 106
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 108
echo " ";
}
// line 109
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 110
echo "</div>";
}
// line 111
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 112
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 114
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 118
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 119
echo " ";
$context["self"] = $this;
// line 120
echo " <div class=\"g-grid\">
";
// line 121
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 122
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 123
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 125
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 128
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 132
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 135
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 136
echo " ";
$context["self"] = $this;
// line 137
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 138
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 139
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 143
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 144
echo " ";
$context["self"] = $this;
// line 145
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 146
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 147
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 148
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 150
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 700 => 150, 690 => 148, 685 => 147, 682
=> 146, 679 => 145, 676 => 144, 661 => 143, 639 => 139,
634 => 138, 629 => 137, 626 => 136, 611 => 135, 595 =>
132, 585 => 128, 579 => 125, 573 => 123, 568 => 122, 566
=> 121, 563 => 120, 560 => 119, 545 => 118, 528 => 114,
525 => 112, 522 => 111, 519 => 110, 513 => 109, 510 =>
108, 507 => 106, 504 => 105, 496 => 103, 488 => 101, 486
=> 100, 481 => 99, 478 => 98, 475 => 97, 472 => 95, 470
=> 94, 465 => 92, 462 => 91, 459 => 90, 453 => 88, 451
=> 87, 444 => 86, 441 => 85, 434 => 84, 422 => 83, 413
=> 82, 411 => 81, 393 => 80, 390 => 79, 388 => 78, 385
=> 77, 382 => 76, 376 => 75, 370 => 74, 367 => 73, 364
=> 72, 361 => 71, 355 => 70, 352 => 69, 349 => 68, 346
=> 67, 343 => 66, 338 => 65, 335 => 64, 330 => 63, 325
=> 62, 323 => 61, 320 => 60, 317 => 59, 315 => 58, 312
=> 57, 309 => 56, 306 => 55, 303 => 54, 300 => 53, 297
=> 52, 294 => 51, 291 => 50, 288 => 49, 285 => 48, 283
=> 47, 280 => 46, 277 => 45, 274 => 44, 271 => 43, 268
=> 42, 265 => 41, 262 => 40, 259 => 39, 256 => 38, 253
=> 37, 250 => 36, 247 => 35, 244 => 34, 229 => 33, 213
=> 30, 207 => 28, 205 => 27, 200 => 26, 197 => 25, 185
=> 24, 169 => 21, 166 => 20, 158 => 19, 153 => 18, 150
=> 17, 147 => 16, 134 => 15, 112 => 10, 109 => 9, 107
=> 8, 92 => 7, 83 => 161, 75 => 159, 73 => 158, 70
=> 157, 68 => 156, 65 => 155, 62 => 142, 59 => 134, 56
=> 117, 53 => 32, 50 => 23, 47 => 14, 44 => 6, 38 =>
4, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/menu.html.twig");
}
}
PK��[ ��x||G30/303300669fef08c5309ee815f8346b4594ca82e99e49156d55f5935db59fb1be.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/logo.html.twig */
class
__TwigTemplate_6c9565775c030eeedf3de0c29c73043191a0c43be52dfa0d09008ce48e0be0a6
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/logo.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["url"] =
_twig_default_filter($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "url", [])),
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"));
// line 5
echo " ";
if ((($context["url"] ?? null) ==
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"))) {
$context["rel"] = "rel=\"home\"";
}
// line 6
echo " ";
$context["class"] =
(($this->getAttribute(($context["particle"] ?? null),
"class", [])) ? ((("class=\"" .
$this->getAttribute(($context["particle"] ?? null),
"class", [])) . "\"")) : (""));
// line 7
echo " ";
$context["image"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", []));
// line 8
echo " ";
$context["height"] =
(($this->getAttribute(($context["particle"] ?? null),
"height", [])) ? ((("style=\"max-height: " .
$this->getAttribute(($context["particle"] ?? null),
"height", [])) . "\"")) : (""));
// line 9
echo "
";
// line 10
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
// line 11
echo " <a href=\"";
echo twig_escape_filter($this->env,
($context["url"] ?? null), "html", null, true);
echo "\" target=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"target", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "target", []), "_self")) :
("_self")), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" aria-label=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" ";
echo (((isset($context["rel"]) ||
array_key_exists("rel", $context))) ?
(_twig_default_filter(($context["rel"] ?? null), "")) :
(""));
echo " ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">
";
} else {
// line 12
echo "<div ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">";
}
// line 13
echo " ";
if (
!twig_test_empty($this->getAttribute(($context["particle"] ??
null), "svg", []))) {
// line 14
echo " ";
echo $this->getAttribute(($context["particle"] ??
null), "svg", []);
echo "
";
} elseif ( // line 15
($context["image"] ?? null)) {
// line 16
echo " <img src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", [])), "html", null, true);
echo "\" ";
echo (((isset($context["height"]) ||
array_key_exists("height", $context))) ?
(_twig_default_filter(($context["height"] ?? null),
"")) : (""));
echo " alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" />
";
} else {
// line 18
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"text", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "text", []), "Logo")) : ("Logo")),
"html", null, true);
echo "
";
}
// line 20
echo " ";
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
echo "</a>";
} else {
echo "</div>";
}
}
public function getTemplateName()
{
return "@particles/logo.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 111 => 20, 105 => 18, 95 => 16, 93
=> 15, 88 => 14, 85 => 13, 80 => 12, 64 => 11, 62 =>
10, 59 => 9, 56 => 8, 53 => 7, 50 => 6, 45 => 5, 42
=> 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/logo.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/logo.html.twig");
}
}
PK��[y|�+� � G3d/3daff3cbc367d4e38a747778eed6573c102ef32c8eb995746928e528e03cbf42.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/position.html.twig */
class
__TwigTemplate_bfa179933b79921654788f36257a03da732ccba8d072a449e1d4b75cfe655140
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/position.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModules", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"key", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry"))]], "method");
echo "
";
}
public function getTemplateName()
{
return "@particles/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/position.html.twig");
}
}
PK��[�u5���G3e/3ebf2485f976fa552110e652daee1bc4ed8cf13da75fe6660d91314386630c50.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/grid.html.twig */
class
__TwigTemplate_a2adfa4e6d784016eb36f55f97ee7ff5d2dcf7115e87b24f67e18fd9a6c3fe03
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
$context["class"] = ("g-grid" .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 7
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/layout/grid.html.twig",
7)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 8
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 9
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 12
if (twig_trim_filter(($context["html"] ?? null))) {
// line 13
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []));
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">";
// line 14
echo ($context["html"] ?? null);
// line 15
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/grid.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 94 => 15, 92 => 14, 80 => 13, 78 =>
12, 74 => 9, 60 => 8, 57 => 7, 39 => 6, 36 => 5, 34
=> 4, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/grid.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/grid.html.twig");
}
}
PK��[aK��RRG41/41535bf8829067b7ec19b42e6bc86427ade264644e6d7fae7b8c2f220c340123.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page.html.twig */
class
__TwigTemplate_16289fc7ebe4d8801bd7411d8aa751c1e479f103aecc07489b409842ad71e565
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_footer' => [$this,
'block_page_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page.html.twig",
"partials/page.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_footer($context, array $blocks = [])
{
// line 4
echo " ";
$this->displayParentBlock("page_footer", $context,
$blocks);
echo "
<jdoc:include type=\"modules\" name=\"debug\"
/>
";
}
public function getTemplateName()
{
return "partials/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page.html.twig");
}
}
PK��[lM���G62/620d844eeea56e7d6ebf655f7cc9d057cd72995254dad7aa9595c05345ede236.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page_head.html.twig */
class
__TwigTemplate_ab11fd53070ceaaed756ac8b0b0ea41e137042ba63ebab541737473674887ed6
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_platform' => [$this,
'block_head_platform'],
'head' => [$this, 'block_head'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page_head.html.twig",
"partials/page_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_title($context, array $blocks = [])
{
}
// line 6
public function block_head_application($context, array $blocks = [])
{
// line 7
echo "<jdoc:include type=\"head\" />";
}
// line 10
public function block_head_platform($context, array $blocks = [])
{
// line 11
$this->displayParentBlock("head_platform", $context,
$blocks);
echo "
";
// line 12
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "joomla", [])) {
// line 13
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://css/bootstrap-gantry.css"),
"html", null, true);
echo "\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"";
// line 14
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css-compiled/joomla.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
// line 15
if
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "direction", []) ==
"rtl")) {
// line 16
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/bootstrap-rtl.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 18
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/icomoon.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 20
echo " ";
if ($this->getAttribute(($context["gantry"] ?? null),
"debug", [])) {
// line 21
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/cms/css/debug.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
}
// line 25
public function block_head($context, array $blocks = [])
{
// line 26
$this->displayParentBlock("head", $context, $blocks);
}
public function getTemplateName()
{
return "partials/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 100 => 26, 97 => 25, 89 => 21, 86 =>
20, 80 => 18, 74 => 16, 72 => 15, 68 => 14, 63 => 13,
61 => 12, 57 => 11, 54 => 10, 50 => 7, 47 => 6, 42
=> 3, 32 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page_head.html.twig");
}
}
PK��[1G��G62/62b6ca1742cce97bcc6dc3dd4d9953b5879bd55cfee7e704d5c1f2a961cb65a8.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/block.html.twig */
class
__TwigTemplate_dfe9fb9481f48b3e119bfeb7c758f2b338b9026883f156bab4c549cbe39177be
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
echo "
";
// line 3
$context["class"] = ((("g-block " .
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "size", [])])) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : (""))) .
(($this->getAttribute($this->getAttribute( // line 5
($context["segment"] ?? null), "attributes", []),
"class", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 9
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 10
echo " ";
if ($this->getAttribute($context["segment"],
"content", [])) {
// line 11
echo " ";
echo
$this->getAttribute($context["segment"], "content",
[]);
echo "
";
} else {
// line 13
echo " ";
$this->loadTemplate([0 =>
(("@nucleus/content/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), 1 => (("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig")],
"@nucleus/layout/block.html.twig",
13)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 14
echo " ";
}
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if (twig_trim_filter(($context["html"] ?? null))) {
// line 20
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []),
"html", null, true);
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 21
echo twig_trim_filter(($context["html"] ?? null));
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/block.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 113 => 21, 100 => 20, 98 => 19, 94
=> 16, 80 => 15, 77 => 14, 74 => 13, 68 => 11, 65 =>
10, 47 => 9, 44 => 8, 42 => 7, 39 => 6, 37 => 5, 36
=> 4, 35 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/block.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/block.html.twig");
}
}
PK��[�L�--G6e/6e63d514beace2a3b0db5df53c7a38fe9e9ead673d778b80c0f2d19af667ae7b.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/atom.html.twig */
class
__TwigTemplate_64f614a17ee4be7f418f568d44477341e8842b1fd693f1d36fcabbaa3a35f2a2
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/content/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/content/particle.html.twig",
"@nucleus/content/atom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
public function getTemplateName()
{
return "@nucleus/content/atom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 28 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/atom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/atom.html.twig");
}
}
PK��[;�ӕ� � G6e/6e422f821a039687a3ba6620670dce9b8fd373072eff52f5f69e9998499c7b5c.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/position.html.twig */
class
__TwigTemplate_5f36e7f0c6ff4032c155aa82e686a10720b4838d6117e0b68bfcd2de2b611297
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/position.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModules", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"key", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry"))]], "method");
echo "
";
}
public function getTemplateName()
{
return "@particles/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/position.html.twig");
}
}
PK��[�?To�<�<G6e/6ea8f10a91928ba862b628884405de1da28ac66858cbe247885d9a601cdf0e66.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page.html.twig */
class
__TwigTemplate_d14edc2d1197952d1c16a1e65721764e2f8cac9c08634c4a9124b66842f3340a
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'content' => [$this, 'block_content'],
'page_offcanvas' => [$this,
'block_page_offcanvas'],
'page_layout' => [$this,
'block_page_layout'],
'page_top' => [$this, 'block_page_top'],
'page_bottom' => [$this,
'block_page_bottom'],
'body_top' => [$this, 'block_body_top'],
'body_bottom' => [$this,
'block_body_bottom'],
'page_head' => [$this,
'block_page_head'],
'page_footer' => [$this,
'block_page_footer'],
'page' => [$this, 'block_page'],
'page_body' => [$this,
'block_page_body'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "startTimer", [0 =>
"render", 1 => "Rendering page"],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "setLayout", [],
"method");
// line 3
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$context["segments"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "segments", [],
"method");
// line 6
ob_start(function () { return ''; });
// line 7
echo " ";
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "hasContent", [],
"method")) {
// line 8
echo " ";
$this->displayBlock('content', $context, $blocks);
// line 10
echo " ";
}
$context["content"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 13
$context["offcanvas"] = null;
// line 14
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) == "offcanvas")) {
// line 15
$context["offcanvas"] =
$context["segment"];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
ob_start(function () { return ''; });
// line 19
echo " ";
$this->displayBlock('page_offcanvas', $context,
$blocks);
$context["page_offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 26
$context["page_offcanvas"] =
((twig_trim_filter(($context["page_offcanvas"] ?? null))) ?
(twig_trim_filter(($context["page_offcanvas"] ?? null))) :
(""));
// line 27
$context["offcanvas_position"] =
((($context["page_offcanvas"] ?? null)) ?
((($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", []), "g-offcanvas-left")) :
("g-offcanvas-left"))) : (""));
// line 29
ob_start(function () { return ''; });
// line 30
echo " ";
$this->displayBlock('page_layout', $context, $blocks);
$context["page_layout"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 37
ob_start(function () { return ''; });
// line 38
echo " ";
$this->displayBlock('page_top', $context, $blocks);
// line 40
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"top"], "method"), "
");
echo "
";
$context["page_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 43
ob_start(function () { return ''; });
// line 44
echo " ";
$this->displayBlock('page_bottom', $context, $blocks);
// line 46
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"bottom"], "method"), "
");
echo "
";
$context["page_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 49
ob_start(function () { return ''; });
// line 50
echo " ";
$this->displayBlock('body_top', $context, $blocks);
// line 52
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_top"], "method"), "
");
echo "
";
$context["body_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 55
ob_start(function () { return ''; });
// line 56
echo " ";
$this->displayBlock('body_bottom', $context, $blocks);
// line 58
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_bottom"], "method"), "
");
echo "
";
$context["body_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 61
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/main.js"),
1 => 11, 2 => "footer"], "method");
// line 65
ob_start(function () { return ''; });
// line 66
echo " ";
$this->displayBlock('page_head', $context, $blocks);
$context["page_head"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 71
ob_start(function () { return ''; });
// line 72
echo " ";
$this->displayBlock('page_footer', $context, $blocks);
// line 76
echo "
";
// line 77
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "render", [],
"method");
echo "
";
$context["page_footer"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 80
$this->displayBlock('page', $context, $blocks);
}
// line 8
public function block_content($context, array $blocks = [])
{
// line 9
echo " ";
}
// line 19
public function block_page_offcanvas($context, array $blocks = [])
{
// line 20
echo " ";
if (($context["offcanvas"] ?? null)) {
// line 21
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute(($context["offcanvas"] ?? null),
"type", [])) . ".html.twig"),
"@nucleus/page.html.twig",
21)->display(twig_array_merge($context, ["segment" =>
($context["offcanvas"] ?? null)]));
}
// line 23
echo " ";
}
// line 30
public function block_page_layout($context, array $blocks = [])
{
// line 31
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) != "offcanvas")) {
// line 32
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/page.html.twig",
32)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 33
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 38
public function block_page_top($context, array $blocks = [])
{
// line 39
echo " ";
}
// line 44
public function block_page_bottom($context, array $blocks = [])
{
// line 45
echo " ";
}
// line 50
public function block_body_top($context, array $blocks = [])
{
// line 51
echo " ";
}
// line 56
public function block_body_bottom($context, array $blocks = [])
{
// line 57
echo " ";
}
// line 66
public function block_page_head($context, array $blocks = [])
{
// line 67
$this->loadTemplate("partials/page_head.html.twig",
"@nucleus/page.html.twig", 67)->display($context);
}
// line 72
public function block_page_footer($context, array $blocks = [])
{
// line 73
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 74
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "footer"],
"method"), "
");
}
// line 80
public function block_page($context, array $blocks = [])
{
// line 81
echo "<!DOCTYPE ";
echo
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[]), "html")) : ("html"));
echo ">
<html";
// line 82
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "htmlAttributes", []);
echo ">
";
// line 83
echo ($context["page_head"] ?? null);
echo "
";
// line 84
$this->displayBlock('page_body', $context, $blocks);
// line 102
echo "
</html>
";
}
// line 84
public function block_page_body($context, array $blocks = [])
{
// line 85
echo "<body";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "bodyAttributes", [0 =>
["class" => [0 => ($context["offcanvas_position"]
?? null), 1 =>
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "preset", []), 2 =>
("g-style-" .
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "preset", []))]]],
"method");
echo ">
";
// line 86
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_top", []);
echo "
";
// line 87
echo ($context["body_top"] ?? null);
echo "
";
// line 88
echo ($context["page_offcanvas"] ?? null);
echo "
<div id=\"g-page-surround\">
";
// line 90
if (twig_trim_filter(($context["page_offcanvas"] ??
null))) {
// line 91
echo "<div class=\"g-offcanvas-hide
g-offcanvas-toggle\" role=\"navigation\"
data-offcanvas-toggle aria-controls=\"g-offcanvas\"
aria-expanded=\"false\"><i class=\"fa fa-fw
fa-bars\"></i></div>";
}
// line 93
echo " ";
echo ($context["page_top"] ?? null);
echo "
";
// line 94
echo ($context["page_layout"] ?? null);
echo "
";
// line 95
echo ($context["page_bottom"] ?? null);
echo "
</div>
";
// line 97
echo ($context["body_bottom"] ?? null);
echo "
";
// line 98
echo ($context["page_footer"] ?? null);
echo "
";
// line 99
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_bottom", []);
echo "
</body>";
}
public function getTemplateName()
{
return "@nucleus/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 335 => 99, 331 => 98, 327 => 97, 322
=> 95, 318 => 94, 313 => 93, 310 => 91, 308 => 90, 303
=> 88, 299 => 87, 295 => 86, 290 => 85, 287 => 84, 281
=> 102, 279 => 84, 275 => 83, 271 => 82, 266 => 81, 263
=> 80, 258 => 74, 255 => 73, 252 => 72, 248 => 67, 245
=> 66, 241 => 57, 238 => 56, 234 => 51, 231 => 50, 227
=> 45, 224 => 44, 220 => 39, 217 => 38, 213 => 34, 203
=> 33, 200 => 32, 188 => 31, 185 => 30, 181 => 23, 177
=> 21, 174 => 20, 171 => 19, 167 => 9, 164 => 8, 160
=> 80, 155 => 77, 152 => 76, 149 => 72, 147 => 71, 143
=> 66, 141 => 65, 139 => 61, 132 => 58, 129 => 56, 127
=> 55, 120 => 52, 117 => 50, 115 => 49, 108 => 46, 105
=> 44, 103 => 43, 96 => 40, 93 => 38, 91 => 37, 87
=> 30, 85 => 29, 83 => 27, 81 => 26, 77 => 19, 75 =>
18, 68 => 15, 63 => 14, 61 => 13, 57 => 10, 54 => 8,
51 => 7, 49 => 6, 47 => 4, 45 => 3, 43 => 2, 41 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page.html.twig");
}
}
PK��[T�yQ�<�<G72/72ddd909dab036cf05b1b13f61139464d6811979681f81be3447af0a4537d41b.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page.html.twig */
class
__TwigTemplate_e3d7146aeb401c0eb2e23e900809a3f499ef792f1582d232e415d88303423a0c
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'content' => [$this, 'block_content'],
'page_offcanvas' => [$this,
'block_page_offcanvas'],
'page_layout' => [$this,
'block_page_layout'],
'page_top' => [$this, 'block_page_top'],
'page_bottom' => [$this,
'block_page_bottom'],
'body_top' => [$this, 'block_body_top'],
'body_bottom' => [$this,
'block_body_bottom'],
'page_head' => [$this,
'block_page_head'],
'page_footer' => [$this,
'block_page_footer'],
'page' => [$this, 'block_page'],
'page_body' => [$this,
'block_page_body'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "startTimer", [0 =>
"render", 1 => "Rendering page"],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "setLayout", [],
"method");
// line 3
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$context["segments"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "segments", [],
"method");
// line 6
ob_start(function () { return ''; });
// line 7
echo " ";
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "hasContent", [],
"method")) {
// line 8
echo " ";
$this->displayBlock('content', $context, $blocks);
// line 10
echo " ";
}
$context["content"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 13
$context["offcanvas"] = null;
// line 14
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) == "offcanvas")) {
// line 15
$context["offcanvas"] =
$context["segment"];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
ob_start(function () { return ''; });
// line 19
echo " ";
$this->displayBlock('page_offcanvas', $context,
$blocks);
$context["page_offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 26
$context["page_offcanvas"] =
((twig_trim_filter(($context["page_offcanvas"] ?? null))) ?
(twig_trim_filter(($context["page_offcanvas"] ?? null))) :
(""));
// line 27
$context["offcanvas_position"] =
((($context["page_offcanvas"] ?? null)) ?
((($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", []), "g-offcanvas-left")) :
("g-offcanvas-left"))) : (""));
// line 29
ob_start(function () { return ''; });
// line 30
echo " ";
$this->displayBlock('page_layout', $context, $blocks);
$context["page_layout"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 37
ob_start(function () { return ''; });
// line 38
echo " ";
$this->displayBlock('page_top', $context, $blocks);
// line 40
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"top"], "method"), "
");
echo "
";
$context["page_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 43
ob_start(function () { return ''; });
// line 44
echo " ";
$this->displayBlock('page_bottom', $context, $blocks);
// line 46
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"bottom"], "method"), "
");
echo "
";
$context["page_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 49
ob_start(function () { return ''; });
// line 50
echo " ";
$this->displayBlock('body_top', $context, $blocks);
// line 52
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_top"], "method"), "
");
echo "
";
$context["body_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 55
ob_start(function () { return ''; });
// line 56
echo " ";
$this->displayBlock('body_bottom', $context, $blocks);
// line 58
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_bottom"], "method"), "
");
echo "
";
$context["body_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 61
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/main.js"),
1 => 11, 2 => "footer"], "method");
// line 65
ob_start(function () { return ''; });
// line 66
echo " ";
$this->displayBlock('page_head', $context, $blocks);
$context["page_head"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 71
ob_start(function () { return ''; });
// line 72
echo " ";
$this->displayBlock('page_footer', $context, $blocks);
// line 76
echo "
";
// line 77
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "render", [],
"method");
echo "
";
$context["page_footer"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 80
$this->displayBlock('page', $context, $blocks);
}
// line 8
public function block_content($context, array $blocks = [])
{
// line 9
echo " ";
}
// line 19
public function block_page_offcanvas($context, array $blocks = [])
{
// line 20
echo " ";
if (($context["offcanvas"] ?? null)) {
// line 21
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute(($context["offcanvas"] ?? null),
"type", [])) . ".html.twig"),
"@nucleus/page.html.twig",
21)->display(twig_array_merge($context, ["segment" =>
($context["offcanvas"] ?? null)]));
}
// line 23
echo " ";
}
// line 30
public function block_page_layout($context, array $blocks = [])
{
// line 31
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) != "offcanvas")) {
// line 32
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/page.html.twig",
32)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 33
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 38
public function block_page_top($context, array $blocks = [])
{
// line 39
echo " ";
}
// line 44
public function block_page_bottom($context, array $blocks = [])
{
// line 45
echo " ";
}
// line 50
public function block_body_top($context, array $blocks = [])
{
// line 51
echo " ";
}
// line 56
public function block_body_bottom($context, array $blocks = [])
{
// line 57
echo " ";
}
// line 66
public function block_page_head($context, array $blocks = [])
{
// line 67
$this->loadTemplate("partials/page_head.html.twig",
"@nucleus/page.html.twig", 67)->display($context);
}
// line 72
public function block_page_footer($context, array $blocks = [])
{
// line 73
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 74
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "footer"],
"method"), "
");
}
// line 80
public function block_page($context, array $blocks = [])
{
// line 81
echo "<!DOCTYPE ";
echo
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[]), "html")) : ("html"));
echo ">
<html";
// line 82
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "htmlAttributes", []);
echo ">
";
// line 83
echo ($context["page_head"] ?? null);
echo "
";
// line 84
$this->displayBlock('page_body', $context, $blocks);
// line 102
echo "
</html>
";
}
// line 84
public function block_page_body($context, array $blocks = [])
{
// line 85
echo "<body";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "bodyAttributes", [0 =>
["class" => [0 => ($context["offcanvas_position"]
?? null), 1 =>
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "preset", []), 2 =>
("g-style-" .
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "preset", []))]]],
"method");
echo ">
";
// line 86
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_top", []);
echo "
";
// line 87
echo ($context["body_top"] ?? null);
echo "
";
// line 88
echo ($context["page_offcanvas"] ?? null);
echo "
<div id=\"g-page-surround\">
";
// line 90
if (twig_trim_filter(($context["page_offcanvas"] ??
null))) {
// line 91
echo "<div class=\"g-offcanvas-hide
g-offcanvas-toggle\" role=\"navigation\"
data-offcanvas-toggle aria-controls=\"g-offcanvas\"
aria-expanded=\"false\"><i class=\"fa fa-fw
fa-bars\"></i></div>";
}
// line 93
echo " ";
echo ($context["page_top"] ?? null);
echo "
";
// line 94
echo ($context["page_layout"] ?? null);
echo "
";
// line 95
echo ($context["page_bottom"] ?? null);
echo "
</div>
";
// line 97
echo ($context["body_bottom"] ?? null);
echo "
";
// line 98
echo ($context["page_footer"] ?? null);
echo "
";
// line 99
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_bottom", []);
echo "
</body>";
}
public function getTemplateName()
{
return "@nucleus/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 335 => 99, 331 => 98, 327 => 97, 322
=> 95, 318 => 94, 313 => 93, 310 => 91, 308 => 90, 303
=> 88, 299 => 87, 295 => 86, 290 => 85, 287 => 84, 281
=> 102, 279 => 84, 275 => 83, 271 => 82, 266 => 81, 263
=> 80, 258 => 74, 255 => 73, 252 => 72, 248 => 67, 245
=> 66, 241 => 57, 238 => 56, 234 => 51, 231 => 50, 227
=> 45, 224 => 44, 220 => 39, 217 => 38, 213 => 34, 203
=> 33, 200 => 32, 188 => 31, 185 => 30, 181 => 23, 177
=> 21, 174 => 20, 171 => 19, 167 => 9, 164 => 8, 160
=> 80, 155 => 77, 152 => 76, 149 => 72, 147 => 71, 143
=> 66, 141 => 65, 139 => 61, 132 => 58, 129 => 56, 127
=> 55, 120 => 52, 117 => 50, 115 => 49, 108 => 46, 105
=> 44, 103 => 43, 96 => 40, 93 => 38, 91 => 37, 87
=> 30, 85 => 29, 83 => 27, 81 => 26, 77 => 19, 75 =>
18, 68 => 15, 63 => 14, 61 => 13, 57 => 10, 54 => 8,
51 => 7, 49 => 6, 47 => 4, 45 => 3, 43 => 2, 41 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page.html.twig");
}
}
PK��[�ɫk[�[�G72/727242122d506802cf7a5ee7a9007bc413f15fa7b56b6a6f85df9e2ef6438a1e.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu-title.html.twig */
class
__TwigTemplate_7a49114172285fc91254e83755d43dada1d2ca3188059cb43be612ba688830b7
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
echo "
";
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "title", [])) {
// line 3
echo " <h3 class=\"g-title
title-pack-menu\">";
echo $this->getAttribute(($context["particle"] ??
null), "title", []);
echo "</h3>
";
}
// line 5
echo "
";
// line 7
try { // line 8
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 10
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 12
echo "
";
// line 20
echo "
";
// line 29
echo "
";
// line 38
echo "
";
// line 123
echo "
";
// line 140
echo "
";
// line 148
echo "
";
// line 161
echo "
";
// line 162
$context["macro"] = $this;
// line 163
echo "
";
// line 164
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 165
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 167
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 13
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 14
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 15
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 16
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 21
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 22
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 23
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 24
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 25
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu-title.html.twig", 25);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 26
($context["context"] ?? null)));
}
// line 27
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 30
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 31
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 32
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 33
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 34
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 36
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 39
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 40
echo " ";
$context["self"] = $this;
// line 41
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 42
echo " ";
$context["enabled"] = 0;
// line 43
echo " ";
}
// line 44
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 45
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 46
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 47
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 48
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 49
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 50
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 51
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 52
echo "
";
// line 53
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 54
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 55
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 56
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 57
echo " ";
}
// line 58
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 59
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 60
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 61
echo " ";
}
// line 62
echo " ";
}
// line 63
echo "
";
// line 64
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 65
echo " ";
$context["linkAttributes"] = "";
// line 66
echo "
";
// line 67
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 68
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 69
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 70
echo " ";
if (($context["key"] ==
"rel")) {
// line 71
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 72
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 73
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 74
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 75
echo "
";
}
// line 76
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 77
echo " ";
} else {
// line 78
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 79
echo " ";
}
// line 80
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 81
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 82
echo " ";
}
// line 83
echo "
";
// line 84
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 85
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 86
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 87
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 88
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 89
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 90
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 91
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 92
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 93
($context["item"] ?? null), "icon", [])) {
// line 94
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 96
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 97
echo " <span
class=\"g-menu-item-content\">
";
// line 98
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 100
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 101
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 103
echo " ";
} else {
// line 104
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 105
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 106
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 107
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 109
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 111
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 112
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 114
echo " ";
}
// line 115
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 116
echo "</div>";
}
// line 117
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 118
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 120
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 124
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 125
echo " ";
$context["self"] = $this;
// line 126
echo " <div class=\"g-grid\">
";
// line 127
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 128
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 129
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 131
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 134
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 138
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 141
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 142
echo " ";
$context["self"] = $this;
// line 143
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 144
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 145
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 149
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 150
echo " ";
$context["self"] = $this;
// line 151
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 152
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 153
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 154
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 156
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu-title.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 715 => 156, 705 => 154, 700 => 153, 697
=> 152, 694 => 151, 691 => 150, 676 => 149, 654 => 145,
649 => 144, 644 => 143, 641 => 142, 626 => 141, 610 =>
138, 600 => 134, 594 => 131, 588 => 129, 583 => 128, 581
=> 127, 578 => 126, 575 => 125, 560 => 124, 543 => 120,
540 => 118, 537 => 117, 534 => 116, 528 => 115, 525 =>
114, 522 => 112, 519 => 111, 511 => 109, 503 => 107, 501
=> 106, 496 => 105, 493 => 104, 490 => 103, 487 => 101,
485 => 100, 480 => 98, 477 => 97, 474 => 96, 468 => 94,
466 => 93, 459 => 92, 456 => 91, 449 => 90, 437 => 89,
428 => 88, 426 => 87, 408 => 86, 405 => 85, 403 => 84,
400 => 83, 397 => 82, 391 => 81, 385 => 80, 382 => 79,
379 => 78, 376 => 77, 370 => 76, 367 => 75, 364 => 74,
361 => 73, 358 => 72, 353 => 71, 350 => 70, 345 => 69,
340 => 68, 338 => 67, 335 => 66, 332 => 65, 330 => 64,
327 => 63, 324 => 62, 321 => 61, 318 => 60, 315 => 59,
312 => 58, 309 => 57, 306 => 56, 303 => 55, 300 => 54,
298 => 53, 295 => 52, 292 => 51, 289 => 50, 286 => 49,
283 => 48, 280 => 47, 277 => 46, 274 => 45, 271 => 44,
268 => 43, 265 => 42, 262 => 41, 259 => 40, 244 => 39,
228 => 36, 222 => 34, 220 => 33, 215 => 32, 212 => 31,
200 => 30, 184 => 27, 181 => 26, 173 => 25, 168 => 24,
165 => 23, 162 => 22, 149 => 21, 127 => 16, 124 => 15,
122 => 14, 107 => 13, 98 => 167, 90 => 165, 88 => 164,
85 => 163, 83 => 162, 80 => 161, 77 => 148, 74 => 140,
71 => 123, 68 => 38, 65 => 29, 62 => 20, 59 => 12, 53
=> 10, 46 => 8, 45 => 7, 41 => 5, 35 => 3, 33 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("
{% if particle.title %}
<h3 class=\"g-title title-pack-menu\">{{
particle.title|raw }}</h3>
{% endif %}
{% try %}
{% set menu = gantry.menu.instance(particle) %}
{% catch %}
<div class=\"alert alert-error\">{{ e.getMessage
}}</div>
{% endtry %}
{% macro getCustomWidth(item, menu, mode, dropdown_type) -%}
{%- if (item.width|default('auto') != 'auto') and
not (dropdown_type == 'fullwidth' and item.level > 1) -%}
{%- if mode == 'item' %} style=\"position:
relative;\"
{%- elseif mode == 'submenu' %} style=\"width:{{
item.width }};\" data-g-item-width=\"{{ item.width }}\"
{%- endif %}
{%- endif %}
{%- endmacro %}
{% macro displayParticle(item, context) %}
{% set context = context|merge({ particle: item.options.particle }) %}
{% set classes = item.options.block.class %}
<div class=\"menu-item-particle{{ classes ? ' ' ~
classes }}\">
{% include ['particles/' ~ item.particle ~
'.html.twig', '@particles/' ~ item.particle ~
'.html.twig']
ignore missing with context only %}
</div>
{% endmacro %}
{% macro displayTitle(item) %}
{% if not item.icon_only or not (item.image or item.icon) %}
<span class=\"g-menu-item-title\">{{ item.title
}}</span>
{% if item.subtitle %}
<span class=\"g-menu-item-subtitle\">{{
item.subtitle }}</span>
{% endif %}
{% endif %}
{% endmacro %}
{% macro displayItem(item, menu, context, dropdown_type) %}
{% import _self as self %}
{% if item.type == 'particle' and not
item.options.particle.enabled %}
{% set enabled = 0 %}
{% endif %}
{% if item.visible and item.enabled and enabled|default(1) %}
{% set title = item.icon_only or item.link_title ? '
title=\"' ~ item.link_title|default(item.title)|e ~
'\"' %}
{% set label = item.icon_only and (item.image or item.icon) ?
' aria-label=\"' ~ item.title|e ~'\"' %}
{% set active = menu.isActive(item) ? ' active' %}
{% set dropdown = item.level == 1 ? ' g-' ~
item.getDropdown() %}
{% set parent = item.children ? ' g-parent' %}
{% set target = (item.target != '_self' or
context.particle.forceTarget) ? ' target=\"' ~ item.target|e
~ '\"' %}
{% set rel = item.rel %}
{% if item.target == '_blank' %}
{% if 'noopener' not in rel %}
{% set rel = rel ? rel ~ ' ' : rel %}
{% set rel = rel ~ 'noopener' %}
{% endif %}
{% if 'noreferrer' not in rel %}
{% set rel = rel ? rel ~ ' ' : rel %}
{% set rel = rel ~ 'noreferrer' %}
{% endif %}
{% endif %}
{% set listAttributes = item.attributes|attribute_array %}
{% set linkAttributes = '' %}
{% if item.link_attributes %}
{% for attribute in item.link_attributes %}
{% for key, value in attribute %}
{% if key == 'rel' %}
{% for hVal in value|split(' ') %}
{% if hVal not in rel %}
{% set rel = rel ? rel ~ ' ' :
rel %}
{% set rel = rel ~ hVal %}
{% endif %}
{% endfor %}
{% else %}
{% set linkAttributes = linkAttributes ~ '
' ~ key|e ~ '=\"' ~ value|e('html_attr') ~
'\"' %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% set rel = rel ? ' rel=\"' ~
rel|e('html_attr') ~ '\"' %}
<li class=\"g-menu-item g-menu-item-type-{{ item.type }}
g-menu-item-{{ item.id }}{% if not item.dropdown_hide %}{{ parent }}{%
endif %}{{ active }}{{ dropdown }} {% if item.url and item.children %}{% if
not item.dropdown_hide %}g-menu-item-link-parent{% endif %}{% endif %} {{
item.class|default('') }}\"
{{- self.getCustomWidth(item, menu, 'item',
dropdown) }}
{%- if context.particle.renderTitles|default(0) %}
title=\"{{ item.title }}\"{% endif %}{{listAttributes|raw}}>
{% if item.url %}<a class=\"g-menu-item-container{{
item.anchor_class ? ' ' ~ item.anchor_class }}\"
href=\"{{ item.url }}{{ item.hash }}\"{{ (title ~ label ~ target
~ rel ~ linkAttributes)|raw }}>
{% else %}<div class=\"g-menu-item-container{{
item.anchor_class ? ' ' ~ item.anchor_class }}\"
data-g-menuparent=\"\"{{ label|raw }}>{% endif %}
{% if item.image %}
<img src=\"{{ url(item.image) }}\"
alt=\"{{ item.title }}\" />
{% elseif item.icon %}
<i class=\"{{ item.icon }}\"
aria-hidden=\"true\"></i>
{% endif %}
{% if item.url %}
<span class=\"g-menu-item-content\">
{{ self.displayTitle(item) }}
</span>
{% if (item.children) and not item.dropdown_hide -%}
<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>
{%- endif %}
{% else %}
{% if item.type == 'particle' %}
{{ self.displayParticle(item, context) }}
{% elseif item.type == 'heading' %}
<span class=\"g-nav-header
g-menu-item-content\"{{ title|raw }}>{{ self.displayTitle(item)
}}</span>
{% else %}
<span class=\"g-separator
g-menu-item-content\"{{ title|raw }}>{{ self.displayTitle(item)
}}</span>
{% endif %}
{% if (item.children) and not item.dropdown_hide
-%}
<span
class=\"g-menu-parent-indicator\"></span>
{%- endif %}
{% endif %}
{% if item.url %}</a>
{% else %}</div>{% endif %}
{% if (item.children) -%}
{{ self.displaySubmenu(item, menu, context, dropdown_type)
}}
{%- endif %}
</li>
{% endif %}
{% endmacro %}
{% macro displayContainers(item, menu, context, dropdown_type) %}
{% import _self as self %}
<div class=\"g-grid\">
{% set groups = item.getDropdown() == 'standard' ? [item]
: item.groups %}
{% for column, items in groups %}
<div class=\"g-block {{ item.columnWidth(column)|toGrid
}}\">
<ul class=\"g-sublevel\">
<li class=\"g-level-{{ item.level }}
g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
{{ self.displayItems(items, menu, context, dropdown_type)
}}
</ul>
</div>
{% endfor %}
</div>
{% endmacro %}
{% macro displayItems(items, menu, context, dropdown_type) %}
{% import _self as self %}
{% for item in items %}
{% if item.level == 1 %}{% set dropdown_type = item.dropdown %}{%
endif %}
{{ self.displayItem(item, menu, context, dropdown_type) }}
{% endfor %}
{% endmacro %}
{% macro displaySubmenu(item, menu, context, dropdown_type) %}
{% import _self as self %}
{% if not item.dropdown_hide %}
{% set animation =
context.gantry.config.get('styles.menu.animation')|default('g-fade')
%}
{% if ((item.groups|length == 1 and not dropdown_type ==
'fullwidth') or dropdown_type == 'standard') or
(item.width|default('auto') != 'auto' and dropdown_type
== 'fullwidth')%}{% set dropdown_dir = 'g-dropdown-' ~
item.dropdown_dir|default('right') %}{% endif %}
<ul class=\"g-dropdown g-inactive {{ animation }} {{
dropdown_dir }}\"{{ self.getCustomWidth(item, menu,
'submenu', dropdown_type) }}>
<li class=\"g-dropdown-column\">
{{ self.displayContainers(item, menu, context,
dropdown_type) }}
</li>
</ul>
{% endif %}
{% endmacro %}
{% import _self as macro %}
{% if menu.root.count() %}
<nav class=\"g-main-nav\"{{ particle.mobileTarget ? '
data-g-mobile-target' : '' }} data-g-hover-expand=\"{{
particle.hoverExpand|default('true') ? 'true':
'false' }}\">
<ul class=\"g-toplevel\">
{{ macro.displayItems(menu.root, menu, _context) }}
</ul>
</nav>
{% endif %}
", "@particles/menu-title.html.twig",
"/home/lmsyaran/public_html/templates/g5_hydrogen/custom/particles/menu-title.html.twig");
}
}
PK��[�����G8d/8d1e2e27b363c062bc68f59984997e4cc205334645fad9b305dfd66df69af559.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/spacer.html.twig */
class
__TwigTemplate_35f8f7aa72e1c90fff8f4cb56ec5db42ad3cff4cbd45585a5a7f1996c0558097
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
if ( !($context["particle"] ?? null)) {
// line 2
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 3
echo " ";
$context["spacer"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
}
// line 5
echo "
";
// line 6
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 7
echo " <div class=\"spacer";
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\"></div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/spacer.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 44 => 7, 42 => 6, 39 => 5, 35 => 3,
32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/spacer.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/spacer.html.twig");
}
}
PK��[�:�KKGab/ab04c6c6ad2f223d9486d2049e1c9d887a781c40367f218613eaf787f64a6ce5.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* index.html.twig */
class
__TwigTemplate_e0e98bac728b733b5bcbf506513c7012df91b2150a84999a29f74b01b434caab
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"index.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_content($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayContent", [0 =>
($context["content"] ?? null)], "method");
echo "
";
}
public function getTemplateName()
{
return "index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "index.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/index.html.twig");
}
}
PK��[GUGab/ab6861ce7e2d71e6e5dfc9055c0b4ed943358cd08a41bfc538be396ea6ab04d5.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/offcanvas.html.twig */
class
__TwigTemplate_a8e65a2dd6a639f238936f425398aeb33225be10edafa65840963475fb13e572
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_class"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? ((("
class=\"" . twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []))) .
"\"")) : (""));
// line 2
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["segment"]
?? null), "children", []));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length -
1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"]
=> $context["child"]) {
// line 6
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["child"], "type", []))
. ".html.twig"), "@nucleus/layout/offcanvas.html.twig",
6)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["child"], "children",
[])]));
// line 7
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['child'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$context["offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 10
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["offcanvas"] ?? null)))) {
// line 11
echo "<div id=\"g-offcanvas\" ";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo " data-g-offcanvas-swipe=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", []), "1")) : ("1")),
"html", null, true);
echo "\" data-g-offcanvas-css3=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", []), "1")) : ("1")),
"html", null, true);
echo "\">
";
// line 12
echo ($context["offcanvas"] ?? null);
// line 13
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/offcanvas.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 89 => 13, 87 => 12, 77 => 11, 75 =>
10, 60 => 7, 57 => 6, 39 => 5, 37 => 4, 34 => 3, 32
=> 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/offcanvas.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/offcanvas.html.twig");
}
}
PK��[�P�e�!�!Gb5/b5a59e7da43c3b2b60cbc7ea67f8143b79dfeb857d2982b67b70d3b339d52704.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/section.html.twig */
class
__TwigTemplate_640eb8f70d802b1664c53195c7fe4528ccb807879182fdd218d090f42aac4c30
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["tag_type"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "section")) :
("section"));
// line 2
$context["attr_id"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) ?
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) :
(("g-" . $this->getAttribute(($context["segment"] ??
null), "id", []))));
// line 3
$context["attr_class"] =
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : ("")));
// line 5
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 6
$context["boxed"] =
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "boxed", []);
// line 7
if ( !(null === ($context["boxed"] ?? null))) {
// line 8
echo " ";
$context["boxed"] =
(((twig_trim_filter(($context["boxed"] ?? null)) ==
"")) ?
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "layout", []), "sections", [])) :
(($context["boxed"] ?? null)));
}
// line 11
ob_start(function () { return ''; });
// line 12
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 13
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 14
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"),
"@nucleus/layout/section.html.twig",
14)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["html"] ?? null)))) {
// line 20
if (( !(null === ($context["boxed"] ?? null))
&& ((($context["boxed"] ?? null) == 0) ||
(($context["boxed"] ?? null) == 2)))) {
// line 21
echo " ";
ob_start(function () { return ''; });
// line 22
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 24
echo " ";
}
// line 25
echo "
";
// line 26
ob_start(function () { return ''; });
// line 27
echo " ";
if ((($context["boxed"] ?? null) == 2)) {
$context["attr_class"] =
(($context["attr_class"] ?? null) . " g-flushed");
}
// line 28
echo " ";
$context["attr_class"] =
((($context["attr_class"] ?? null)) ? ((("
class=\"" . twig_trim_filter(($context["attr_class"] ??
null))) . "\"")) : (""));
// line 29
echo "<";
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo " id=\"";
echo twig_escape_filter($this->env,
($context["attr_id"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 30
echo ($context["html"] ?? null);
echo "
</";
// line 31
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo ">";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 34
if ((($context["boxed"] ?? null) == 1)) {
// line 35
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
} else {
// line 37
echo " ";
echo ($context["html"] ?? null);
echo "
";
}
}
}
public function getTemplateName()
{
return "@nucleus/layout/section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 146 => 37, 140 => 35, 138 => 34, 134
=> 31, 130 => 30, 120 => 29, 117 => 28, 112 => 27, 110
=> 26, 107 => 25, 104 => 24, 98 => 22, 95 => 21, 93
=> 20, 91 => 19, 87 => 16, 73 => 15, 70 => 14, 52 =>
13, 49 => 12, 47 => 11, 43 => 8, 41 => 7, 39 => 6, 37
=> 5, 35 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/section.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/section.html.twig");
}
}
PK��[�����Gb5/b572db06c6b2f5a249eb7e8aec92fd8349303fabc4e12c1562f5c342c71f3fca.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/logo.html.twig */
class
__TwigTemplate_7717a583817baa6262236e51121a2a69d631c366ba547f2ac5f77733512477b6
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/logo.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["url"] =
_twig_default_filter($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "url", [])),
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"));
// line 5
echo " ";
if ((($context["url"] ?? null) ==
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"))) {
$context["rel"] = "rel=\"home\"";
}
// line 6
echo " ";
$context["class"] =
(($this->getAttribute(($context["particle"] ?? null),
"class", [])) ? ((("class=\"" .
$this->getAttribute(($context["particle"] ?? null),
"class", [])) . "\"")) : (""));
// line 7
echo " ";
$context["image"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", []));
// line 8
echo " ";
$context["height"] =
(($this->getAttribute(($context["particle"] ?? null),
"height", [])) ? ((("style=\"max-height: " .
$this->getAttribute(($context["particle"] ?? null),
"height", [])) . "\"")) : (""));
// line 9
echo "
";
// line 10
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
// line 11
echo " <a href=\"";
echo twig_escape_filter($this->env,
($context["url"] ?? null), "html", null, true);
echo "\" target=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"target", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "target", []), "_self")) :
("_self")), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" aria-label=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" ";
echo (((isset($context["rel"]) ||
array_key_exists("rel", $context))) ?
(_twig_default_filter(($context["rel"] ?? null), "")) :
(""));
echo " ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">
";
} else {
// line 12
echo "<div ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">";
}
// line 13
echo " ";
if (
!twig_test_empty($this->getAttribute(($context["particle"] ??
null), "svg", []))) {
// line 14
echo " ";
echo $this->getAttribute(($context["particle"] ??
null), "svg", []);
echo "
";
} elseif ( // line 15
($context["image"] ?? null)) {
// line 16
echo " <img src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", [])), "html", null, true);
echo "\" ";
echo (((isset($context["height"]) ||
array_key_exists("height", $context))) ?
(_twig_default_filter(($context["height"] ?? null),
"")) : (""));
echo " alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" />
";
} else {
// line 18
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"text", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "text", []), "Logo")) : ("Logo")),
"html", null, true);
echo "
";
}
// line 20
echo " ";
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
echo "</a>";
} else {
echo "</div>";
}
}
public function getTemplateName()
{
return "@particles/logo.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 111 => 20, 105 => 18, 95 => 16, 93
=> 15, 88 => 14, 85 => 13, 80 => 12, 64 => 11, 62 =>
10, 59 => 9, 56 => 8, 53 => 7, 50 => 6, 45 => 5, 42
=> 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/partials/particle.html.twig' %}
{% block particle %}
{% set url = url(particle.url)|default(gantry.siteUrl()) %}
{% if (url == gantry.siteUrl()) %}{% set
rel='rel=\"home\"' %}{% endif %}
{% set class=(particle.class ? 'class=\"'~
particle.class ~'\"') %}
{% set image = url(particle.image) %}
{% set height = particle.height ? 'style=\"max-height: '
~ particle.height ~ '\"' %}
{% if particle.link == true %}
<a href=\"{{ url }}\" target=\"{{
particle.target|default('_self') }}\" title=\"{{
particle.text }}\" aria-label=\"{{ particle.text }}\" {{
rel|default('')|raw }} {{ class|default('')|raw }}>
{% else %}<div {{ class|default('')|raw }}>{% endif %}
{% if particle.svg is not empty %}
{{ particle.svg|raw }}
{% elseif image %}
<img src=\"{{ url(particle.image) }}\" {{
height|default('')|raw }} alt=\"{{ particle.text }}\"
/>
{% else %}
{{ particle.text|default('Logo') }}
{% endif %}
{% if particle.link == true %}</a>{% else %}</div>{% endif
%}
{% endblock %}
", "@particles/logo.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/logo.html.twig");
}
}
PK��[-TR�Gb5/b5f5eb7d1b32b4772ad16d1914b1ba282fa6e35d6643b4bdfb0962922cc22ace.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* component.html.twig */
class
__TwigTemplate_2371ab643ccc5d961bd518e9d719b82fc5ed9965e45b01af07825c7da6237969
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_body' => [$this,
'block_page_body'],
'page_layout' => [$this,
'block_page_layout'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"component.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_body($context, array $blocks = [])
{
// line 4
echo "<body";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "bodyAttributes", [0 =>
["class" => [0 => ($context["offcanvas_position"]
?? null), 1 =>
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "preset", []), 2 =>
("g-style-" .
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "preset", []))]]],
"method");
echo ">
";
// line 5
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_top", []);
echo "
";
// line 6
echo ($context["page_top"] ?? null);
echo "
";
// line 7
echo ($context["page_layout"] ?? null);
echo "
";
// line 8
echo ($context["page_bottom"] ?? null);
echo "
";
// line 9
echo ($context["page_footer"] ?? null);
echo "
";
// line 10
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_bottom", []);
echo "
</body>";
}
// line 14
public function block_page_layout($context, array $blocks = [])
{
// line 15
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "joomla", [0 => true],
"method");
// line 16
echo " <div class=\"platform-content
row-fluid\">
<div class=\"span12\">
<jdoc:include type=\"message\" />
<jdoc:include type=\"component\" />
</div>
</div>
";
}
public function getTemplateName()
{
return "component.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 80 => 16, 77 => 15, 74 => 14, 68 =>
10, 64 => 9, 60 => 8, 56 => 7, 52 => 6, 48 => 5, 43
=> 4, 40 => 3, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "component.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/component.html.twig");
}
}
PK��[l7�1++Gbb/bb65dda83a0b36274a29d3aeaed0ac2b568b111e48b016a7efa3da240d7c66dd.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/particle.html.twig */
class
__TwigTemplate_e34a4697f1f729ac8c1b112b9a3140ecbe70dd548a0729f6161729681d781514
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["id"] =
$this->getAttribute(($context["segment"] ?? null),
"id", []);
// line 3
echo " ";
if ( !($context["particle"] ?? null)) {
// line 4
echo " ";
if (($context["noConfig"] ?? null)) {
// line 5
echo " ";
$context["enabled"] = true;
// line 6
echo " ";
$context["particle"] =
$this->getAttribute(($context["segment"] ?? null),
"attributes", []);
// line 7
echo " ";
} else {
// line 8
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".enabled"), 1 => 1],
"method");
// line 9
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 10
echo " ";
}
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
ob_start(function () { return ''; });
// line 14
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 15
echo " ";
$this->loadTemplate([0 => (("particles/" .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".html.twig"), 1 =>
(("@particles/" . $this->getAttribute( // line
16
($context["segment"] ?? null), "subtype", [])) .
".html.twig"), 2 =>
"@nucleus/content/missing.html.twig"],
"@nucleus/content/particle.html.twig", 15)->display($context);
// line 18
echo " ";
}
// line 19
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 20
echo " ";
$context["html"] =
twig_trim_filter(($context["html"] ?? null));
// line 21
echo "
";
// line 22
$context["classes"] = twig_trim_filter((((
!($context["inContent"] ?? null)) ? ("g-content g-particle
") : ("g-particle ")) .
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " ")));
// line 23
if (($context["html"] ?? null)) {
// line 24
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- START PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
// line 25
echo "
";
// line 26
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "<div id=\"";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo "-particle\" class=\"";
echo twig_escape_filter($this->env,
($context["classes"] ?? null), "html", null, true);
echo "\">";
}
// line 27
echo " ";
echo ($context["html"] ?? null);
echo "
";
// line 28
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "</div>";
}
// line 29
echo " ";
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- END PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
}
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 33
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["segment"] ?? null),
"subtype", []), "html", null, true);
echo " particle.</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 33, 115 => 29, 111 => 28, 106
=> 27, 98 => 26, 95 => 25, 89 => 24, 87 => 23, 85 =>
22, 82 => 21, 79 => 20, 76 => 19, 73 => 18, 71 => 16,
69 => 15, 66 => 14, 64 => 13, 61 => 12, 58 => 11, 55
=> 10, 52 => 9, 49 => 8, 46 => 7, 43 => 6, 40 => 5,
37 => 4, 34 => 3, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/particle.html.twig");
}
}
PK��[�'�++Gbb/bb384bb14c936a91c9b04faa8a430951ab964557e9f1e9d2328384db5bc1e049.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/particle.html.twig */
class
__TwigTemplate_f89f1ea992a4b12fff4c6f4a19233abf4bcce1b993f97849ba15b99639f0db0d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["id"] =
$this->getAttribute(($context["segment"] ?? null),
"id", []);
// line 3
echo " ";
if ( !($context["particle"] ?? null)) {
// line 4
echo " ";
if (($context["noConfig"] ?? null)) {
// line 5
echo " ";
$context["enabled"] = true;
// line 6
echo " ";
$context["particle"] =
$this->getAttribute(($context["segment"] ?? null),
"attributes", []);
// line 7
echo " ";
} else {
// line 8
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".enabled"), 1 => 1],
"method");
// line 9
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 10
echo " ";
}
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
ob_start(function () { return ''; });
// line 14
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 15
echo " ";
$this->loadTemplate([0 => (("particles/" .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".html.twig"), 1 =>
(("@particles/" . $this->getAttribute( // line
16
($context["segment"] ?? null), "subtype", [])) .
".html.twig"), 2 =>
"@nucleus/content/missing.html.twig"],
"@nucleus/content/particle.html.twig", 15)->display($context);
// line 18
echo " ";
}
// line 19
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 20
echo " ";
$context["html"] =
twig_trim_filter(($context["html"] ?? null));
// line 21
echo "
";
// line 22
$context["classes"] = twig_trim_filter((((
!($context["inContent"] ?? null)) ? ("g-content g-particle
") : ("g-particle ")) .
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " ")));
// line 23
if (($context["html"] ?? null)) {
// line 24
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- START PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
// line 25
echo "
";
// line 26
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "<div id=\"";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo "-particle\" class=\"";
echo twig_escape_filter($this->env,
($context["classes"] ?? null), "html", null, true);
echo "\">";
}
// line 27
echo " ";
echo ($context["html"] ?? null);
echo "
";
// line 28
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "</div>";
}
// line 29
echo " ";
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- END PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
}
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 33
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["segment"] ?? null),
"subtype", []), "html", null, true);
echo " particle.</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 33, 115 => 29, 111 => 28, 106
=> 27, 98 => 26, 95 => 25, 89 => 24, 87 => 23, 85 =>
22, 82 => 21, 79 => 20, 76 => 19, 73 => 18, 71 => 16,
69 => 15, 66 => 14, 64 => 13, 61 => 12, 58 => 11, 55
=> 10, 52 => 9, 49 => 8, 46 => 7, 43 => 6, 40 => 5,
37 => 4, 34 => 3, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/particle.html.twig");
}
}
PK��[.
�C**Gc7/c7aa92411c9e3c9cee6e87f91d51e9844c70307748b258d1acef99f6ef7f7c77.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/system.html.twig */
class
__TwigTemplate_59da18e265b409d92fdbae6a1de393b53128ef4befd92fbd32996a36e85dbe8d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["subtype"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []),
$this->getAttribute(($context["segment"] ?? null),
"type", []))) :
($this->getAttribute(($context["segment"] ?? null),
"type", [])));
// line 2
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." . ($context["subtype"] ?? null)) .
".enabled"), 1 => 1], "method");
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 6
echo " ";
if ((($context["subtype"] ?? null) ==
"content")) {
// line 7
echo " ";
$context["class"] = "g-content";
// line 8
echo " ";
echo ($context["content"] ?? null);
echo "
";
} elseif (( // line 9
($context["subtype"] ?? null) == "messages")) {
// line 10
echo " ";
$context["class"] =
"g-system-messages";
// line 11
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displaySystemMessages", [],
"method");
echo "
";
}
// line 13
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 15
echo "
";
// line 16
if (twig_trim_filter(($context["html"] ?? null))) {
// line 17
echo " <div class=\"";
echo twig_escape_filter($this->env,
(($context["class"] ?? null) .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : (""))), "html", null, true);
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/system.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 78 => 18, 73 => 17, 71 => 16, 68 =>
15, 64 => 13, 58 => 11, 55 => 10, 53 => 9, 48 => 8, 45
=> 7, 42 => 6, 39 => 5, 37 => 4, 34 => 3, 32 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/system.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/system.html.twig");
}
}
PK��[:w�ޮ�Gc9/c9253f9bfb0ea4b41296f41d3735d758eb761b286ab75379b11e34aef8a9eeff.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/block.html.twig */
class
__TwigTemplate_9ea6d14b6ab40490fd75361bd64713259f51c46ce97d2d0ec2b5d009d29af0c9
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
echo "
";
// line 3
$context["class"] = ((("g-block " .
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "size", [])])) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : (""))) .
(($this->getAttribute($this->getAttribute( // line 5
($context["segment"] ?? null), "attributes", []),
"class", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 9
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 10
echo " ";
if ($this->getAttribute($context["segment"],
"content", [])) {
// line 11
echo " ";
echo
$this->getAttribute($context["segment"], "content",
[]);
echo "
";
} else {
// line 13
echo " ";
$this->loadTemplate([0 =>
(("@nucleus/content/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), 1 => (("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig")],
"@nucleus/layout/block.html.twig",
13)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 14
echo " ";
}
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if (twig_trim_filter(($context["html"] ?? null))) {
// line 20
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []),
"html", null, true);
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 21
echo twig_trim_filter(($context["html"] ?? null));
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/block.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 113 => 21, 100 => 20, 98 => 19, 94
=> 16, 80 => 15, 77 => 14, 74 => 13, 68 => 11, 65 =>
10, 47 => 9, 44 => 8, 42 => 7, 39 => 6, 37 => 5, 36
=> 4, 35 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/block.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/block.html.twig");
}
}
PK��[
����?�?Gc9/c9d2b3f1eebc47c177d8161770ba8a71ba9a6cf16dfe4b89ab226be67194700e.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page_head.html.twig */
class
__TwigTemplate_9f1f88b9206c83548e947015a6e166bb5d32f800c8fd58a8b8770968754b1fd2
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'head_stylesheets' => [$this,
'block_head_stylesheets'],
'head_platform' => [$this,
'block_head_platform'],
'head_overrides' => [$this,
'block_head_overrides'],
'head_meta' => [$this,
'block_head_meta'],
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_ie_stylesheets' => [$this,
'block_head_ie_stylesheets'],
'head' => [$this, 'block_head'],
'head_custom' => [$this,
'block_head_custom'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "assets", [],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = ["priority" => 10];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 5
echo " ";
$this->displayBlock('head_stylesheets', $context,
$blocks);
// line 15
$this->displayBlock('head_platform', $context,
$blocks);
// line 16
echo "
";
// line 17
$this->displayBlock('head_overrides', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 24
echo "<head>
";
// line 25
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_top"], "method"), "
");
echo "
";
// line 26
$this->displayBlock('head_meta', $context, $blocks);
// line 52
$this->displayBlock('head_title', $context, $blocks);
// line 56
echo "
";
// line 57
$this->displayBlock('head_application', $context,
$blocks);
// line 61
echo "
";
// line 62
$this->displayBlock('head_ie_stylesheets', $context,
$blocks);
// line 70
$this->displayBlock('head', $context, $blocks);
// line 71
echo " ";
$this->displayBlock('head_custom', $context, $blocks);
// line 76
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_bottom"], "method"), "
");
echo "
</head>
";
}
// line 5
public function block_head_stylesheets($context, array $blocks = [])
{
// line 6
if
((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", []), 1)) : (1))) {
// line 7
echo " <link rel=\"stylesheet\"
href=\"gantry-assets://css/font-awesome.min.css\"
type=\"text/css\"/>
";
}
// line 9
echo " <link rel=\"stylesheet\"
href=\"gantry-engine://css-compiled/nucleus.css\"
type=\"text/css\"/>
";
// line 10
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[]),
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))) :
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 11
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo " ";
}
// line 15
public function block_head_platform($context, array $blocks = [])
{
}
// line 17
public function block_head_overrides($context, array $blocks = [])
{
// line 18
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "overrides", []));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 19
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " ";
}
// line 26
public function block_head_meta($context, array $blocks = [])
{
// line 27
echo " <meta name=\"viewport\"
content=\"width=device-width, initial-scale=1.0\">
<meta http-equiv=\"X-UA-Compatible\"
content=\"IE=edge\" />
";
// line 29
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", [])) {
// line 30
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 31
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 32
echo " ";
if
((is_string($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $context["key"]) &&
is_string($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
= "og:") && ('' ===
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
|| 0 ===
strpos($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4,
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144))))
{
// line 33
echo " <meta
property=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
} else {
// line 35
echo " <meta
name=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
}
// line 37
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 40
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_meta"], "method"), "
");
echo "
";
// line 42
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])) {
// line 43
echo " <link rel=\"icon\"
type=\"image/x-icon\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])), "html", null,
true);
echo "\" />
";
}
// line 45
echo "
";
// line 46
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])) {
// line 47
echo " <link rel=\"apple-touch-icon\"
sizes=\"180x180\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
<link rel=\"icon\" sizes=\"192x192\"
href=\"";
// line 48
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
";
}
// line 50
echo " ";
}
// line 52
public function block_head_title($context, array $blocks = [])
{
// line 53
echo "<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\" />
<title>Title</title>";
}
// line 57
public function block_head_application($context, array $blocks = [])
{
// line 58
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head"], "method"),
"
");
echo "
";
// line 59
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head"],
"method"), "
");
}
// line 62
public function block_head_ie_stylesheets($context, array $blocks = [])
{
// line 63
echo "<!--[if (gte IE 8)&(lte IE 9)]>
<script type=\"text/javascript\" src=\"";
// line 64
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/html5shiv-printshiv.min.js"),
"html", null, true);
echo "\"></script>
<link rel=\"stylesheet\" href=\"";
// line 65
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css/nucleus-ie9.css"),
"html", null, true);
echo "\" type=\"text/css\"/>
<script type=\"text/javascript\" src=\"";
// line 66
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/matchmedia.polyfill.js"),
"html", null, true);
echo "\"></script>
<![endif]-->
";
}
// line 70
public function block_head($context, array $blocks = [])
{
}
// line 71
public function block_head_custom($context, array $blocks = [])
{
// line 72
echo " ";
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", [])) {
// line 73
echo " ";
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", []);
echo "
";
}
// line 75
echo " ";
}
public function getTemplateName()
{
return "@nucleus/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 294 => 75, 288 => 73, 285 => 72, 282
=> 71, 277 => 70, 270 => 66, 266 => 65, 262 => 64, 259
=> 63, 256 => 62, 251 => 59, 246 => 58, 243 => 57, 238
=> 53, 235 => 52, 231 => 50, 226 => 48, 221 => 47, 219
=> 46, 216 => 45, 210 => 43, 208 => 42, 202 => 40, 191
=> 37, 183 => 35, 175 => 33, 172 => 32, 168 => 31, 164
=> 30, 162 => 29, 158 => 27, 155 => 26, 151 => 21, 143
=> 19, 139 => 18, 136 => 17, 131 => 15, 127 => 13, 119
=> 11, 115 => 10, 112 => 9, 108 => 7, 106 => 6, 103
=> 5, 94 => 76, 91 => 71, 89 => 70, 87 => 62, 84 =>
61, 82 => 57, 79 => 56, 77 => 52, 75 => 26, 70 => 25,
67 => 24, 63 => 17, 60 => 16, 58 => 15, 55 => 5, 43
=> 4, 41 => 2, 39 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page_head.html.twig");
}
}
PK��[�.�{e�e�Gca/ca4d127337303702ab5be71c00cf1d5a733cb1635da2dea4e6efc706821e269e.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu-title.html.twig */
class
__TwigTemplate_6d154ca2ab70fbc81ef7c0a475cde5d823d55dbcd924b59d17e02848ff55c02a
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
echo "
";
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "title", [])) {
// line 3
echo " <h3 class=\"g-title
title-pack-menu\">";
echo $this->getAttribute(($context["particle"] ??
null), "title", []);
echo "</h3>
";
}
// line 5
echo "
";
// line 7
try { // line 8
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 10
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 12
echo "
";
// line 20
echo "
";
// line 29
echo "
";
// line 38
echo "
";
// line 123
echo "
";
// line 140
echo "
";
// line 148
echo "
";
// line 161
echo "
";
// line 162
$context["macro"] = $this;
// line 163
echo "
";
// line 164
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 165
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 167
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 13
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 14
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 15
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 16
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 21
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 22
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 23
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 24
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 25
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu-title.html.twig", 25);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 26
($context["context"] ?? null)));
}
// line 27
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 30
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 31
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 32
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 33
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 34
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 36
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 39
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 40
echo " ";
$context["self"] = $this;
// line 41
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 42
echo " ";
$context["enabled"] = 0;
// line 43
echo " ";
}
// line 44
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 45
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 46
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 47
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 48
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 49
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 50
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 51
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 52
echo "
";
// line 53
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 54
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 55
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 56
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 57
echo " ";
}
// line 58
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 59
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 60
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 61
echo " ";
}
// line 62
echo " ";
}
// line 63
echo "
";
// line 64
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 65
echo " ";
$context["linkAttributes"] = "";
// line 66
echo "
";
// line 67
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 68
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 69
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 70
echo " ";
if (($context["key"] ==
"rel")) {
// line 71
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 72
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 73
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 74
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 75
echo "
";
}
// line 76
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 77
echo " ";
} else {
// line 78
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 79
echo " ";
}
// line 80
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 81
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 82
echo " ";
}
// line 83
echo "
";
// line 84
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 85
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 86
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 87
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 88
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 89
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 90
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 91
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 92
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 93
($context["item"] ?? null), "icon", [])) {
// line 94
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 96
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 97
echo " <span
class=\"g-menu-item-content\">
";
// line 98
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 100
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 101
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 103
echo " ";
} else {
// line 104
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 105
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 106
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 107
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 109
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 111
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 112
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 114
echo " ";
}
// line 115
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 116
echo "</div>";
}
// line 117
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 118
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 120
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 124
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 125
echo " ";
$context["self"] = $this;
// line 126
echo " <div class=\"g-grid\">
";
// line 127
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 128
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 129
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 131
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 134
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 138
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 141
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 142
echo " ";
$context["self"] = $this;
// line 143
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 144
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 145
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 149
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 150
echo " ";
$context["self"] = $this;
// line 151
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 152
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 153
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 154
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 156
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu-title.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 715 => 156, 705 => 154, 700 => 153, 697
=> 152, 694 => 151, 691 => 150, 676 => 149, 654 => 145,
649 => 144, 644 => 143, 641 => 142, 626 => 141, 610 =>
138, 600 => 134, 594 => 131, 588 => 129, 583 => 128, 581
=> 127, 578 => 126, 575 => 125, 560 => 124, 543 => 120,
540 => 118, 537 => 117, 534 => 116, 528 => 115, 525 =>
114, 522 => 112, 519 => 111, 511 => 109, 503 => 107, 501
=> 106, 496 => 105, 493 => 104, 490 => 103, 487 => 101,
485 => 100, 480 => 98, 477 => 97, 474 => 96, 468 => 94,
466 => 93, 459 => 92, 456 => 91, 449 => 90, 437 => 89,
428 => 88, 426 => 87, 408 => 86, 405 => 85, 403 => 84,
400 => 83, 397 => 82, 391 => 81, 385 => 80, 382 => 79,
379 => 78, 376 => 77, 370 => 76, 367 => 75, 364 => 74,
361 => 73, 358 => 72, 353 => 71, 350 => 70, 345 => 69,
340 => 68, 338 => 67, 335 => 66, 332 => 65, 330 => 64,
327 => 63, 324 => 62, 321 => 61, 318 => 60, 315 => 59,
312 => 58, 309 => 57, 306 => 56, 303 => 55, 300 => 54,
298 => 53, 295 => 52, 292 => 51, 289 => 50, 286 => 49,
283 => 48, 280 => 47, 277 => 46, 274 => 45, 271 => 44,
268 => 43, 265 => 42, 262 => 41, 259 => 40, 244 => 39,
228 => 36, 222 => 34, 220 => 33, 215 => 32, 212 => 31,
200 => 30, 184 => 27, 181 => 26, 173 => 25, 168 => 24,
165 => 23, 162 => 22, 149 => 21, 127 => 16, 124 => 15,
122 => 14, 107 => 13, 98 => 167, 90 => 165, 88 => 164,
85 => 163, 83 => 162, 80 => 161, 77 => 148, 74 => 140,
71 => 123, 68 => 38, 65 => 29, 62 => 20, 59 => 12, 53
=> 10, 46 => 8, 45 => 7, 41 => 5, 35 => 3, 33 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/menu-title.html.twig",
"/home/lmsyaran/public_html/templates/g5_hydrogen/custom/particles/menu-title.html.twig");
}
}
PK��[q����Gca/caefb1c9b754c421d6972c3b0611f34abe7e81a7168a5da51008edfbf4bb24cf.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/spacer.html.twig */
class
__TwigTemplate_d9bd14dd1f789dc6965ea4a000d81a1237197aebefb8ce8965be61804b3f59b3
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
if ( !($context["particle"] ?? null)) {
// line 2
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 3
echo " ";
$context["spacer"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
}
// line 5
echo "
";
// line 6
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 7
echo " <div class=\"spacer";
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\"></div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/spacer.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 44 => 7, 42 => 6, 39 => 5, 35 => 3,
32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/spacer.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/templates/content/spacer.html.twig");
}
}
PK��[�B�
�
Ge6/e665a8e590e8c3e47352f22706dbfddeecc71394fe6dd64fac2dcb57118d2dde.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* error.html.twig */
class
__TwigTemplate_c0ab3e63cf4fecf6c35eae030dc7705bfa2111def4b80550cb6f5c49a37f129d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_head' => [$this,
'block_page_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"error.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_head($context, array $blocks = [])
{
// line 4
$this->loadTemplate("partials/error_head.html.twig",
"error.html.twig", 4)->display($context);
}
// line 7
public function block_content($context, array $blocks = [])
{
// line 8
echo " <h1>";
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null), "Unknown
Error")) : ("Unknown Error")), "html", null,
true);
echo "</h1>
";
// line 9
echo ($context["backtrace"] ?? null);
echo "
";
}
public function getTemplateName()
{
return "error.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 57 => 9, 50 => 8, 47 => 7, 43 => 4,
40 => 3, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "error.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/error.html.twig");
}
}
PK��[�AjZZGf3/f3ecb0bd78930ab08eb0698ded282cac0f5115b29eaf81bd19460f73e6fc2301.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/position.html.twig */
class
__TwigTemplate_5885f4e9374f8afea46344683d7a4658c99476086a12d8d3d78dc34aa3c30992
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
if ( !($context["particle"] ?? null)) {
// line 3
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 4
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 5
echo " ";
}
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 9
echo " ";
$this->loadTemplate([0 => (("particles/" .
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig"), 1 =>
(("@particles/" . (($this->getAttribute( //
line 10
($context["segment"] ?? null), "subtype", [],
"any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig")],
"@nucleus/content/position.html.twig", 9)->display($context);
// line 11
echo " ";
}
// line 12
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 14
if (twig_trim_filter(($context["html"] ?? null))) {
// line 15
echo " ";
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- START POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 16
echo "
<div class=\"g-content";
// line 17
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
// line 20
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- END POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 21
echo " ";
}
// line 22
echo "
";
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 24
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position")), "html", null, true);
echo ".</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 24, 91 => 22, 88 => 21, 82 =>
20, 77 => 18, 73 => 17, 70 => 16, 63 => 15, 61 => 14,
58 => 12, 55 => 11, 53 => 10, 51 => 9, 48 => 8, 46
=> 7, 43 => 6, 40 => 5, 37 => 4, 34 => 3, 31 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/position.html.twig");
}
}
PK��[ק.tKKG3b/3bdadf1f2169e866a53dd03abdd6d3dfe35adce8bf36a59ffb4080ecd65a9a07.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* index.html.twig */
class
__TwigTemplate_b607af6e4597abe98197128a4c617d89ecb86f3b50e7b01bcf7002d7e8085247
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"index.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_content($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayContent", [0 =>
($context["content"] ?? null)], "method");
echo "
";
}
public function getTemplateName()
{
return "index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "index.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/index.html.twig");
}
}
PK��[�]t�RRG95/9528477540a8ac1360a1cb0aa4918347b6d1edc3d58c1769f2df14ea424bf966.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page.html.twig */
class
__TwigTemplate_7678feff44887a9e0f2466e3d7ff07be08cfbd5961c9e847333fbb685644bd80
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_footer' => [$this,
'block_page_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page.html.twig",
"partials/page.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_footer($context, array $blocks = [])
{
// line 4
echo " ";
$this->displayParentBlock("page_footer", $context,
$blocks);
echo "
<jdoc:include type=\"modules\" name=\"debug\"
/>
";
}
public function getTemplateName()
{
return "partials/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page.html.twig");
}
}
PK��[�@���<�<Gdf/dfcf5384620afc7817a3d02a810ad5a67ba0e74dc6eb545ddf4d3d436ff71294.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page.html.twig */
class
__TwigTemplate_de7391d56c351f65d9a4752b57975312e159581c5c89402fb24cc5c1b7ec143a
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'content' => [$this, 'block_content'],
'page_offcanvas' => [$this,
'block_page_offcanvas'],
'page_layout' => [$this,
'block_page_layout'],
'page_top' => [$this, 'block_page_top'],
'page_bottom' => [$this,
'block_page_bottom'],
'body_top' => [$this, 'block_body_top'],
'body_bottom' => [$this,
'block_body_bottom'],
'page_head' => [$this,
'block_page_head'],
'page_footer' => [$this,
'block_page_footer'],
'page' => [$this, 'block_page'],
'page_body' => [$this,
'block_page_body'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "startTimer", [0 =>
"render", 1 => "Rendering page"],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "setLayout", [],
"method");
// line 3
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$context["segments"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "segments", [],
"method");
// line 6
ob_start(function () { return ''; });
// line 7
echo " ";
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "hasContent", [],
"method")) {
// line 8
echo " ";
$this->displayBlock('content', $context, $blocks);
// line 10
echo " ";
}
$context["content"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 13
$context["offcanvas"] = null;
// line 14
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) == "offcanvas")) {
// line 15
$context["offcanvas"] =
$context["segment"];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
ob_start(function () { return ''; });
// line 19
echo " ";
$this->displayBlock('page_offcanvas', $context,
$blocks);
$context["page_offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 26
$context["page_offcanvas"] =
((twig_trim_filter(($context["page_offcanvas"] ?? null))) ?
(twig_trim_filter(($context["page_offcanvas"] ?? null))) :
(""));
// line 27
$context["offcanvas_position"] =
((($context["page_offcanvas"] ?? null)) ?
((($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", []), "g-offcanvas-left")) :
("g-offcanvas-left"))) : (""));
// line 29
ob_start(function () { return ''; });
// line 30
echo " ";
$this->displayBlock('page_layout', $context, $blocks);
$context["page_layout"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 37
ob_start(function () { return ''; });
// line 38
echo " ";
$this->displayBlock('page_top', $context, $blocks);
// line 40
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"top"], "method"), "
");
echo "
";
$context["page_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 43
ob_start(function () { return ''; });
// line 44
echo " ";
$this->displayBlock('page_bottom', $context, $blocks);
// line 46
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"bottom"], "method"), "
");
echo "
";
$context["page_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 49
ob_start(function () { return ''; });
// line 50
echo " ";
$this->displayBlock('body_top', $context, $blocks);
// line 52
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_top"], "method"), "
");
echo "
";
$context["body_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 55
ob_start(function () { return ''; });
// line 56
echo " ";
$this->displayBlock('body_bottom', $context, $blocks);
// line 58
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_bottom"], "method"), "
");
echo "
";
$context["body_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 61
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/main.js"),
1 => 11, 2 => "footer"], "method");
// line 65
ob_start(function () { return ''; });
// line 66
echo " ";
$this->displayBlock('page_head', $context, $blocks);
$context["page_head"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 71
ob_start(function () { return ''; });
// line 72
echo " ";
$this->displayBlock('page_footer', $context, $blocks);
// line 76
echo "
";
// line 77
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "render", [],
"method");
echo "
";
$context["page_footer"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 80
$this->displayBlock('page', $context, $blocks);
}
// line 8
public function block_content($context, array $blocks = [])
{
// line 9
echo " ";
}
// line 19
public function block_page_offcanvas($context, array $blocks = [])
{
// line 20
echo " ";
if (($context["offcanvas"] ?? null)) {
// line 21
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute(($context["offcanvas"] ?? null),
"type", [])) . ".html.twig"),
"@nucleus/page.html.twig",
21)->display(twig_array_merge($context, ["segment" =>
($context["offcanvas"] ?? null)]));
}
// line 23
echo " ";
}
// line 30
public function block_page_layout($context, array $blocks = [])
{
// line 31
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) != "offcanvas")) {
// line 32
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/page.html.twig",
32)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 33
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 38
public function block_page_top($context, array $blocks = [])
{
// line 39
echo " ";
}
// line 44
public function block_page_bottom($context, array $blocks = [])
{
// line 45
echo " ";
}
// line 50
public function block_body_top($context, array $blocks = [])
{
// line 51
echo " ";
}
// line 56
public function block_body_bottom($context, array $blocks = [])
{
// line 57
echo " ";
}
// line 66
public function block_page_head($context, array $blocks = [])
{
// line 67
$this->loadTemplate("partials/page_head.html.twig",
"@nucleus/page.html.twig", 67)->display($context);
}
// line 72
public function block_page_footer($context, array $blocks = [])
{
// line 73
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 74
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "footer"],
"method"), "
");
}
// line 80
public function block_page($context, array $blocks = [])
{
// line 81
echo "<!DOCTYPE ";
echo
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[]), "html")) : ("html"));
echo ">
<html";
// line 82
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "htmlAttributes", []);
echo ">
";
// line 83
echo ($context["page_head"] ?? null);
echo "
";
// line 84
$this->displayBlock('page_body', $context, $blocks);
// line 102
echo "
</html>
";
}
// line 84
public function block_page_body($context, array $blocks = [])
{
// line 85
echo "<body";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "bodyAttributes", [0 =>
["class" => [0 => ($context["offcanvas_position"]
?? null), 1 =>
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "preset", []), 2 =>
("g-style-" .
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "preset", []))]]],
"method");
echo ">
";
// line 86
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_top", []);
echo "
";
// line 87
echo ($context["body_top"] ?? null);
echo "
";
// line 88
echo ($context["page_offcanvas"] ?? null);
echo "
<div id=\"g-page-surround\">
";
// line 90
if (twig_trim_filter(($context["page_offcanvas"] ??
null))) {
// line 91
echo "<div class=\"g-offcanvas-hide
g-offcanvas-toggle\" role=\"navigation\"
data-offcanvas-toggle aria-controls=\"g-offcanvas\"
aria-expanded=\"false\"><i class=\"fa fa-fw
fa-bars\"></i></div>";
}
// line 93
echo " ";
echo ($context["page_top"] ?? null);
echo "
";
// line 94
echo ($context["page_layout"] ?? null);
echo "
";
// line 95
echo ($context["page_bottom"] ?? null);
echo "
</div>
";
// line 97
echo ($context["body_bottom"] ?? null);
echo "
";
// line 98
echo ($context["page_footer"] ?? null);
echo "
";
// line 99
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_bottom", []);
echo "
</body>";
}
public function getTemplateName()
{
return "@nucleus/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 335 => 99, 331 => 98, 327 => 97, 322
=> 95, 318 => 94, 313 => 93, 310 => 91, 308 => 90, 303
=> 88, 299 => 87, 295 => 86, 290 => 85, 287 => 84, 281
=> 102, 279 => 84, 275 => 83, 271 => 82, 266 => 81, 263
=> 80, 258 => 74, 255 => 73, 252 => 72, 248 => 67, 245
=> 66, 241 => 57, 238 => 56, 234 => 51, 231 => 50, 227
=> 45, 224 => 44, 220 => 39, 217 => 38, 213 => 34, 203
=> 33, 200 => 32, 188 => 31, 185 => 30, 181 => 23, 177
=> 21, 174 => 20, 171 => 19, 167 => 9, 164 => 8, 160
=> 80, 155 => 77, 152 => 76, 149 => 72, 147 => 71, 143
=> 66, 141 => 65, 139 => 61, 132 => 58, 129 => 56, 127
=> 55, 120 => 52, 117 => 50, 115 => 49, 108 => 46, 105
=> 44, 103 => 43, 96 => 40, 93 => 38, 91 => 37, 87
=> 30, 85 => 29, 83 => 27, 81 => 26, 77 => 19, 75 =>
18, 68 => 15, 63 => 14, 61 => 13, 57 => 10, 54 => 8,
51 => 7, 49 => 6, 47 => 4, 45 => 3, 43 => 2, 41 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page.html.twig");
}
}
PK��[�\�_��Gdf/df3965345750a11df92022d8555ed37abebfda572c40e8c40e47d1c93b94b86d.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/grid.html.twig */
class
__TwigTemplate_5eccb8013152e7d492572708d5273a0fc82b9cdda2d16d36fde2d2e3462c3edd
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
$context["class"] = ("g-grid" .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 7
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/layout/grid.html.twig",
7)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 8
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 9
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 12
if (twig_trim_filter(($context["html"] ?? null))) {
// line 13
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []));
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">";
// line 14
echo ($context["html"] ?? null);
// line 15
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/grid.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 94 => 15, 92 => 14, 80 => 13, 78 =>
12, 74 => 9, 60 => 8, 57 => 7, 39 => 6, 36 => 5, 34
=> 4, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/grid.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/grid.html.twig");
}
}
PK��[8�--G46/4635e48fdc879ef4dc54d51ff176a8f6fbc05e8701afcaf3411ba335892b98c8.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/atom.html.twig */
class
__TwigTemplate_f7780f5292f7ba270f5faf8617879a937466d65e1f295dd00a977498ff695bcc
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/content/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/content/particle.html.twig",
"@nucleus/content/atom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
public function getTemplateName()
{
return "@nucleus/content/atom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 28 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/atom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/atom.html.twig");
}
}
PK��[VY8%++G0d/0dfa433fa67424e5684e22c4a3db4a7edffc14f58fe32691a1a3393afdca3f29.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/particle.html.twig */
class
__TwigTemplate_33d00139f86f81a9a771a9460999a03253bd20cba2856a785b0b4c15e8c38474
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["id"] =
$this->getAttribute(($context["segment"] ?? null),
"id", []);
// line 3
echo " ";
if ( !($context["particle"] ?? null)) {
// line 4
echo " ";
if (($context["noConfig"] ?? null)) {
// line 5
echo " ";
$context["enabled"] = true;
// line 6
echo " ";
$context["particle"] =
$this->getAttribute(($context["segment"] ?? null),
"attributes", []);
// line 7
echo " ";
} else {
// line 8
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".enabled"), 1 => 1],
"method");
// line 9
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 10
echo " ";
}
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
ob_start(function () { return ''; });
// line 14
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 15
echo " ";
$this->loadTemplate([0 => (("particles/" .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".html.twig"), 1 =>
(("@particles/" . $this->getAttribute( // line
16
($context["segment"] ?? null), "subtype", [])) .
".html.twig"), 2 =>
"@nucleus/content/missing.html.twig"],
"@nucleus/content/particle.html.twig", 15)->display($context);
// line 18
echo " ";
}
// line 19
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 20
echo " ";
$context["html"] =
twig_trim_filter(($context["html"] ?? null));
// line 21
echo "
";
// line 22
$context["classes"] = twig_trim_filter((((
!($context["inContent"] ?? null)) ? ("g-content g-particle
") : ("g-particle ")) .
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " ")));
// line 23
if (($context["html"] ?? null)) {
// line 24
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- START PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
// line 25
echo "
";
// line 26
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "<div id=\"";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo "-particle\" class=\"";
echo twig_escape_filter($this->env,
($context["classes"] ?? null), "html", null, true);
echo "\">";
}
// line 27
echo " ";
echo ($context["html"] ?? null);
echo "
";
// line 28
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "</div>";
}
// line 29
echo " ";
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- END PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
}
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 33
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["segment"] ?? null),
"subtype", []), "html", null, true);
echo " particle.</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 33, 115 => 29, 111 => 28, 106
=> 27, 98 => 26, 95 => 25, 89 => 24, 87 => 23, 85 =>
22, 82 => 21, 79 => 20, 76 => 19, 73 => 18, 71 => 16,
69 => 15, 66 => 14, 64 => 13, 61 => 12, 58 => 11, 55
=> 10, 52 => 9, 49 => 8, 46 => 7, 43 => 6, 40 => 5,
37 => 4, 34 => 3, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/particle.html.twig");
}
}
PK��[�]�Mz*z*G5e/5e55b3e3c807ca3ec7ca3f0bc8799a36eb3713561abe8e27a600f30926a19cac.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/assets.html.twig */
class
__TwigTemplate_1accebb7bdf49cc0496eda1cddc53a731ad9e22a6c103893f3a0cc01eea95ff2
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
ob_start(function () { return ''; });
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "enabled", [])) {
// line 3
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "css", []));
foreach ($context['_seq'] as
$context["_key"] => $context["css"]) {
// line 4
echo " ";
$context["params"] = [];
// line 5
echo " ";
if ($this->getAttribute($context["css"],
"extra", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["css"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 7
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 8
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 9
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 10
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
if ($this->getAttribute($context["css"],
"location", [])) {
// line 14
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["href" => $this->getAttribute($context["css"],
"location", [])]), 1 =>
$this->getAttribute($context["css"], "priority",
[])], "method");
// line 15
echo " ";
}
// line 16
echo "
";
// line 17
if ($this->getAttribute($context["css"],
"inline", [])) {
// line 18
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["css"], "inline",
[])]), 1 => $this->getAttribute($context["css"],
"priority", [])], "method");
// line 19
echo " ";
}
// line 20
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['css'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo "
";
// line 22
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "javascript", []));
foreach ($context['_seq'] as
$context["_key"] => $context["script"]) {
// line 23
echo " ";
$context["params"] = [];
// line 24
echo " ";
if ($this->getAttribute($context["script"],
"extra", [])) {
// line 25
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["script"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 27
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 28
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 29
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 30
echo " ";
}
// line 31
echo "
";
// line 32
if ($this->getAttribute($context["script"],
"location", [])) {
// line 33
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["src" => $this->getAttribute($context["script"],
"location", [])]), 1 =>
$this->getAttribute($context["script"], "priority",
[]), 2 => ((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 34
echo " ";
}
// line 35
echo "
";
// line 36
if ($this->getAttribute($context["script"],
"inline", [])) {
// line 37
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["script"], "inline",
[])]), 1 => $this->getAttribute($context["script"],
"priority", []), 2 =>
((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 38
echo " ";
}
// line 39
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['script'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
echo trim(preg_replace('/>\s+</',
'><', ob_get_clean()));
}
public function getTemplateName()
{
return "@particles/assets.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 164 => 39, 161 => 38, 158 => 37, 156
=> 36, 153 => 35, 150 => 34, 147 => 33, 145 => 32, 142
=> 31, 139 => 30, 133 => 29, 127 => 28, 124 => 27, 119
=> 26, 114 => 25, 111 => 24, 108 => 23, 104 => 22, 101
=> 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 =>
16, 81 => 15, 78 => 14, 76 => 13, 73 => 12, 70 => 11,
64 => 10, 58 => 9, 55 => 8, 50 => 7, 45 => 6, 42 =>
5, 39 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/assets.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/assets.html.twig");
}
}
PK��[l���G5e/5effd6f2d422ab060391646fb6b2bd1860cb7715f14ef34d9506fd72fe215290.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/spacer.html.twig */
class
__TwigTemplate_f87ca878b93f64f059fea17222b32dac7236405a594400e7de8c84ea8cb1f017
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
if ( !($context["particle"] ?? null)) {
// line 2
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 3
echo " ";
$context["spacer"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
}
// line 5
echo "
";
// line 6
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 7
echo " <div class=\"spacer";
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\"></div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/spacer.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 44 => 7, 42 => 6, 39 => 5, 35 => 3,
32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/spacer.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/spacer.html.twig");
}
}
PK��[τ�ZZGdd/dda012abb7a94bab81315f28fbc258fca2848243c8e9439f724a1a82c4bbf2a8.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/position.html.twig */
class
__TwigTemplate_1ea553357c6207c41efbfba02aab705510edbd9a6b2752f2010a0a8f900db26d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
if ( !($context["particle"] ?? null)) {
// line 3
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 4
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 5
echo " ";
}
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 9
echo " ";
$this->loadTemplate([0 => (("particles/" .
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig"), 1 =>
(("@particles/" . (($this->getAttribute( //
line 10
($context["segment"] ?? null), "subtype", [],
"any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig")],
"@nucleus/content/position.html.twig", 9)->display($context);
// line 11
echo " ";
}
// line 12
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 14
if (twig_trim_filter(($context["html"] ?? null))) {
// line 15
echo " ";
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- START POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 16
echo "
<div class=\"g-content";
// line 17
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
// line 20
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- END POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 21
echo " ";
}
// line 22
echo "
";
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 24
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position")), "html", null, true);
echo ".</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 24, 91 => 22, 88 => 21, 82 =>
20, 77 => 18, 73 => 17, 70 => 16, 63 => 15, 61 => 14,
58 => 12, 55 => 11, 53 => 10, 51 => 9, 48 => 8, 46
=> 7, 43 => 6, 40 => 5, 37 => 4, 34 => 3, 31 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/position.html.twig");
}
}
PK��[��+ISSG1e/1e21767c2acdbe272cbdff71613d2550e6432944e923f8373436a155d8fe5d2b.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/partials/particle.html.twig */
class
__TwigTemplate_403df842df950ad1469040caa16b566ff26ab1660ad47ed4c436bfbbf1192d81
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'stylesheets' => [$this,
'block_stylesheets'],
'javascript' => [$this,
'block_javascript'],
'javascript_footer' => [$this,
'block_javascript_footer'],
'particle' => [$this, 'block_particle'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 2
echo " ";
$this->displayBlock('stylesheets', $context, $blocks);
// line 4
echo "
";
// line 5
$this->displayBlock('javascript', $context, $blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 9
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "footer";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 10
echo " ";
$this->displayBlock('javascript_footer', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 14
$this->displayBlock('particle', $context, $blocks);
}
// line 2
public function block_stylesheets($context, array $blocks = [])
{
// line 3
echo " ";
}
// line 5
public function block_javascript($context, array $blocks = [])
{
// line 6
echo " ";
}
// line 10
public function block_javascript_footer($context, array $blocks = [])
{
// line 11
echo " ";
}
// line 14
public function block_particle($context, array $blocks = [])
{
}
public function getTemplateName()
{
return "@nucleus/partials/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 14, 94 => 11, 91 => 10, 87 =>
6, 84 => 5, 80 => 3, 77 => 2, 73 => 14, 68 => 10, 56
=> 9, 52 => 5, 49 => 4, 46 => 2, 34 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/partials/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/partials/particle.html.twig");
}
}
PK��[и}�||Ga4/a419775fcaba4b9cbccea99a77e78ab233e7aab21cb7ce3f5df30964c221cfcc.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/logo.html.twig */
class
__TwigTemplate_629cf8efe9cc452874aee5957d1cbb7fe07d8cf844350f7e3f0660542c04d92d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/logo.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["url"] =
_twig_default_filter($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "url", [])),
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"));
// line 5
echo " ";
if ((($context["url"] ?? null) ==
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"))) {
$context["rel"] = "rel=\"home\"";
}
// line 6
echo " ";
$context["class"] =
(($this->getAttribute(($context["particle"] ?? null),
"class", [])) ? ((("class=\"" .
$this->getAttribute(($context["particle"] ?? null),
"class", [])) . "\"")) : (""));
// line 7
echo " ";
$context["image"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", []));
// line 8
echo " ";
$context["height"] =
(($this->getAttribute(($context["particle"] ?? null),
"height", [])) ? ((("style=\"max-height: " .
$this->getAttribute(($context["particle"] ?? null),
"height", [])) . "\"")) : (""));
// line 9
echo "
";
// line 10
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
// line 11
echo " <a href=\"";
echo twig_escape_filter($this->env,
($context["url"] ?? null), "html", null, true);
echo "\" target=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"target", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "target", []), "_self")) :
("_self")), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" aria-label=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" ";
echo (((isset($context["rel"]) ||
array_key_exists("rel", $context))) ?
(_twig_default_filter(($context["rel"] ?? null), "")) :
(""));
echo " ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">
";
} else {
// line 12
echo "<div ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">";
}
// line 13
echo " ";
if (
!twig_test_empty($this->getAttribute(($context["particle"] ??
null), "svg", []))) {
// line 14
echo " ";
echo $this->getAttribute(($context["particle"] ??
null), "svg", []);
echo "
";
} elseif ( // line 15
($context["image"] ?? null)) {
// line 16
echo " <img src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", [])), "html", null, true);
echo "\" ";
echo (((isset($context["height"]) ||
array_key_exists("height", $context))) ?
(_twig_default_filter(($context["height"] ?? null),
"")) : (""));
echo " alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" />
";
} else {
// line 18
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"text", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "text", []), "Logo")) : ("Logo")),
"html", null, true);
echo "
";
}
// line 20
echo " ";
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
echo "</a>";
} else {
echo "</div>";
}
}
public function getTemplateName()
{
return "@particles/logo.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 111 => 20, 105 => 18, 95 => 16, 93
=> 15, 88 => 14, 85 => 13, 80 => 12, 64 => 11, 62 =>
10, 59 => 9, 56 => 8, 53 => 7, 50 => 6, 45 => 5, 42
=> 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/logo.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/logo.html.twig");
}
}
PK��[��j~�~�G8a/8a12351abc93acd5f7bdb8d01290543756b0a4801ec58d392eef0c6f9ebca535.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu.html.twig */
class
__TwigTemplate_edf3ad05eeb3d9735c8226b4d3143f19d95f896a99c7e64801a27bf65635e0bb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 4
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 6
echo "
";
// line 14
echo "
";
// line 23
echo "
";
// line 32
echo "
";
// line 117
echo "
";
// line 134
echo "
";
// line 142
echo "
";
// line 155
echo "
";
// line 156
$context["macro"] = $this;
// line 157
echo "
";
// line 158
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 159
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 161
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 7
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 8
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 9
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 10
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 15
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 16
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 17
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 18
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 19
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu.html.twig", 19);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 20
($context["context"] ?? null)));
}
// line 21
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 24
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 25
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 26
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 27
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 28
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 30
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 33
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 34
echo " ";
$context["self"] = $this;
// line 35
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 36
echo " ";
$context["enabled"] = 0;
// line 37
echo " ";
}
// line 38
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 39
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 40
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 41
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 42
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 43
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 44
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 45
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 46
echo "
";
// line 47
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 48
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 49
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 50
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 51
echo " ";
}
// line 52
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 53
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 54
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 55
echo " ";
}
// line 56
echo " ";
}
// line 57
echo "
";
// line 58
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 59
echo " ";
$context["linkAttributes"] = "";
// line 60
echo "
";
// line 61
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 62
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 63
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 64
echo " ";
if (($context["key"] ==
"rel")) {
// line 65
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 66
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 67
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 68
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 69
echo "
";
}
// line 70
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 71
echo " ";
} else {
// line 72
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 73
echo " ";
}
// line 74
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 76
echo " ";
}
// line 77
echo "
";
// line 78
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 79
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 80
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 81
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 82
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 83
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 84
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 85
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 86
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 87
($context["item"] ?? null), "icon", [])) {
// line 88
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 90
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 91
echo " <span
class=\"g-menu-item-content\">
";
// line 92
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 94
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 95
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 97
echo " ";
} else {
// line 98
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 99
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 100
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 101
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 103
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 105
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 106
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 108
echo " ";
}
// line 109
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 110
echo "</div>";
}
// line 111
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 112
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 114
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 118
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 119
echo " ";
$context["self"] = $this;
// line 120
echo " <div class=\"g-grid\">
";
// line 121
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 122
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 123
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 125
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 128
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 132
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 135
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 136
echo " ";
$context["self"] = $this;
// line 137
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 138
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 139
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 143
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 144
echo " ";
$context["self"] = $this;
// line 145
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 146
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 147
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 148
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 150
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 700 => 150, 690 => 148, 685 => 147, 682
=> 146, 679 => 145, 676 => 144, 661 => 143, 639 => 139,
634 => 138, 629 => 137, 626 => 136, 611 => 135, 595 =>
132, 585 => 128, 579 => 125, 573 => 123, 568 => 122, 566
=> 121, 563 => 120, 560 => 119, 545 => 118, 528 => 114,
525 => 112, 522 => 111, 519 => 110, 513 => 109, 510 =>
108, 507 => 106, 504 => 105, 496 => 103, 488 => 101, 486
=> 100, 481 => 99, 478 => 98, 475 => 97, 472 => 95, 470
=> 94, 465 => 92, 462 => 91, 459 => 90, 453 => 88, 451
=> 87, 444 => 86, 441 => 85, 434 => 84, 422 => 83, 413
=> 82, 411 => 81, 393 => 80, 390 => 79, 388 => 78, 385
=> 77, 382 => 76, 376 => 75, 370 => 74, 367 => 73, 364
=> 72, 361 => 71, 355 => 70, 352 => 69, 349 => 68, 346
=> 67, 343 => 66, 338 => 65, 335 => 64, 330 => 63, 325
=> 62, 323 => 61, 320 => 60, 317 => 59, 315 => 58, 312
=> 57, 309 => 56, 306 => 55, 303 => 54, 300 => 53, 297
=> 52, 294 => 51, 291 => 50, 288 => 49, 285 => 48, 283
=> 47, 280 => 46, 277 => 45, 274 => 44, 271 => 43, 268
=> 42, 265 => 41, 262 => 40, 259 => 39, 256 => 38, 253
=> 37, 250 => 36, 247 => 35, 244 => 34, 229 => 33, 213
=> 30, 207 => 28, 205 => 27, 200 => 26, 197 => 25, 185
=> 24, 169 => 21, 166 => 20, 158 => 19, 153 => 18, 150
=> 17, 147 => 16, 134 => 15, 112 => 10, 109 => 9, 107
=> 8, 92 => 7, 83 => 161, 75 => 159, 73 => 158, 70
=> 157, 68 => 156, 65 => 155, 62 => 142, 59 => 134, 56
=> 117, 53 => 32, 50 => 23, 47 => 14, 44 => 6, 38 =>
4, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/menu.html.twig");
}
}
PK��[|NZ�� � G32/329a5314289cc7cfe0f062960968c380231dd3a21b4089485f68380d647135f6.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/module.html.twig */
class
__TwigTemplate_77af6afdbf9c747572292eef861562560e7fe762ab290d9e343c05de57f814a5
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/module.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModule", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"module_id", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry")), "position" => "particle"]],
"method");
echo "
";
}
public function getTemplateName()
{
return "@particles/module.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/module.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/module.html.twig");
}
}
PK��[c�6E�
�
Ge0/e000359b54d4cbf1fc38f6b3a7f141d0480147e17a2fbc6cf6fb7cde871a90a4.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/custom.html.twig */
class
__TwigTemplate_9af82fd2dfe64859b08e97b51257d3694fb52ebd97a4f9921ef4c0642fa75948
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/custom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["html"] =
(($this->getAttribute(($context["particle"] ?? null),
"twig", [])) ?
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "compile", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"html", [])], "method")) :
($this->getAttribute(($context["particle"] ?? null),
"html", [])));
// line 5
echo " ";
echo
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->htmlFilter((($this->getAttribute(($context["particle"]
?? null), "filter", [])) ?
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "filter", [0 =>
($context["html"] ?? null)], "method")) :
(($context["html"] ?? null))));
echo "
";
}
public function getTemplateName()
{
return "@particles/custom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 45 => 5, 42 => 4, 39 => 3, 29 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/custom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/custom.html.twig");
}
}
PK��[I���
�
G9d/9d717f779b9ed4051069eca472d5a18e81b23726ea23ed379abf59821479f195.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* error.html.twig */
class
__TwigTemplate_a3d762267848f6039ef9ed011d9af039a0a62df277bd53e864f6306aff3c1ccc
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_head' => [$this,
'block_page_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"error.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_head($context, array $blocks = [])
{
// line 4
$this->loadTemplate("partials/error_head.html.twig",
"error.html.twig", 4)->display($context);
}
// line 7
public function block_content($context, array $blocks = [])
{
// line 8
echo " <h1>";
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null), "Unknown
Error")) : ("Unknown Error")), "html", null,
true);
echo "</h1>
";
// line 9
echo ($context["backtrace"] ?? null);
echo "
";
}
public function getTemplateName()
{
return "error.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 57 => 9, 50 => 8, 47 => 7, 43 => 4,
40 => 3, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "error.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/error.html.twig");
}
}
PK��[�9�G04/048dea81b11b99d884e31f3bc5b20eb759a4bc05d0cb04ce21ef95bca2c9f198.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/offcanvas.html.twig */
class
__TwigTemplate_4a55685d9046a1d23fa848d70c56ced4af8d38533a4ade6fb98c418d19505541
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_class"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? ((("
class=\"" . twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []))) .
"\"")) : (""));
// line 2
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["segment"]
?? null), "children", []));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length -
1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"]
=> $context["child"]) {
// line 6
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["child"], "type", []))
. ".html.twig"), "@nucleus/layout/offcanvas.html.twig",
6)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["child"], "children",
[])]));
// line 7
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['child'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$context["offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 10
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["offcanvas"] ?? null)))) {
// line 11
echo "<div id=\"g-offcanvas\" ";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo " data-g-offcanvas-swipe=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", []), "1")) : ("1")),
"html", null, true);
echo "\" data-g-offcanvas-css3=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", []), "1")) : ("1")),
"html", null, true);
echo "\">
";
// line 12
echo ($context["offcanvas"] ?? null);
// line 13
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/offcanvas.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 89 => 13, 87 => 12, 77 => 11, 75 =>
10, 60 => 7, 57 => 6, 39 => 5, 37 => 4, 34 => 3, 32
=> 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/offcanvas.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/offcanvas.html.twig");
}
}
PK��[��X���Gd3/d3a1f4059fc256c8ec94f356a8fb56b0c90bedaa4f252773e49b15c7ad4b4cfd.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/grid.html.twig */
class
__TwigTemplate_e3935ad5c649e4e9ffcecf9bf857134227a8ba5e711e73aa22b6782cfd0e52eb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
$context["class"] = ("g-grid" .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 7
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/layout/grid.html.twig",
7)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 8
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 9
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 12
if (twig_trim_filter(($context["html"] ?? null))) {
// line 13
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []));
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">";
// line 14
echo ($context["html"] ?? null);
// line 15
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/grid.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 94 => 15, 92 => 14, 80 => 13, 78 =>
12, 74 => 9, 60 => 8, 57 => 7, 39 => 6, 36 => 5, 34
=> 4, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/grid.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/grid.html.twig");
}
}
PK��[��UUGd3/d38ef5923e3193d8cbfd7aa8c155f18e8f8ee45c209dec9b1d84cdd4b4e60bfe.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page.html.twig */
class
__TwigTemplate_1add5b8116edd066e59352a202af2c53131c6f37cb73617bb2bc60e6a76c01f5
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_footer' => [$this,
'block_page_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page.html.twig",
"partials/page.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_footer($context, array $blocks = [])
{
// line 4
echo " ";
$this->displayParentBlock("page_footer", $context,
$blocks);
echo "
<jdoc:include type=\"modules\" name=\"debug\"
/>
";
}
public function getTemplateName()
{
return "partials/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/twig/partials/page.html.twig");
}
}
PK��[/5B�!�!G0c/0c653fa1a50c05f26907ffd3b617779c099ee34ad7dbfb609342426561d18dd1.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/section.html.twig */
class
__TwigTemplate_19fc75e1eab92dc374c579e397c306eda0ea3c803c67bf8afe370d7b9f8e4a65
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["tag_type"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "section")) :
("section"));
// line 2
$context["attr_id"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) ?
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) :
(("g-" . $this->getAttribute(($context["segment"] ??
null), "id", []))));
// line 3
$context["attr_class"] =
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : ("")));
// line 5
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 6
$context["boxed"] =
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "boxed", []);
// line 7
if ( !(null === ($context["boxed"] ?? null))) {
// line 8
echo " ";
$context["boxed"] =
(((twig_trim_filter(($context["boxed"] ?? null)) ==
"")) ?
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "layout", []), "sections", [])) :
(($context["boxed"] ?? null)));
}
// line 11
ob_start(function () { return ''; });
// line 12
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 13
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 14
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"),
"@nucleus/layout/section.html.twig",
14)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["html"] ?? null)))) {
// line 20
if (( !(null === ($context["boxed"] ?? null))
&& ((($context["boxed"] ?? null) == 0) ||
(($context["boxed"] ?? null) == 2)))) {
// line 21
echo " ";
ob_start(function () { return ''; });
// line 22
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 24
echo " ";
}
// line 25
echo "
";
// line 26
ob_start(function () { return ''; });
// line 27
echo " ";
if ((($context["boxed"] ?? null) == 2)) {
$context["attr_class"] =
(($context["attr_class"] ?? null) . " g-flushed");
}
// line 28
echo " ";
$context["attr_class"] =
((($context["attr_class"] ?? null)) ? ((("
class=\"" . twig_trim_filter(($context["attr_class"] ??
null))) . "\"")) : (""));
// line 29
echo "<";
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo " id=\"";
echo twig_escape_filter($this->env,
($context["attr_id"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 30
echo ($context["html"] ?? null);
echo "
</";
// line 31
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo ">";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 34
if ((($context["boxed"] ?? null) == 1)) {
// line 35
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
} else {
// line 37
echo " ";
echo ($context["html"] ?? null);
echo "
";
}
}
}
public function getTemplateName()
{
return "@nucleus/layout/section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 146 => 37, 140 => 35, 138 => 34, 134
=> 31, 130 => 30, 120 => 29, 117 => 28, 112 => 27, 110
=> 26, 107 => 25, 104 => 24, 98 => 22, 95 => 21, 93
=> 20, 91 => 19, 87 => 16, 73 => 15, 70 => 14, 52 =>
13, 49 => 12, 47 => 11, 43 => 8, 41 => 7, 39 => 6, 37
=> 5, 35 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/section.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/section.html.twig");
}
}
PK��[�G�**G8b/8bd4c47fc72b774df13ff44255dc05a88c2cf4b2ecf63abaaab27f7957f17238.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/system.html.twig */
class
__TwigTemplate_8363a658037c1f83f07ae37c756b5b3b56fe946e79b555cc8b6f493352b8b28a
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["subtype"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []),
$this->getAttribute(($context["segment"] ?? null),
"type", []))) :
($this->getAttribute(($context["segment"] ?? null),
"type", [])));
// line 2
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." . ($context["subtype"] ?? null)) .
".enabled"), 1 => 1], "method");
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 6
echo " ";
if ((($context["subtype"] ?? null) ==
"content")) {
// line 7
echo " ";
$context["class"] = "g-content";
// line 8
echo " ";
echo ($context["content"] ?? null);
echo "
";
} elseif (( // line 9
($context["subtype"] ?? null) == "messages")) {
// line 10
echo " ";
$context["class"] =
"g-system-messages";
// line 11
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displaySystemMessages", [],
"method");
echo "
";
}
// line 13
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 15
echo "
";
// line 16
if (twig_trim_filter(($context["html"] ?? null))) {
// line 17
echo " <div class=\"";
echo twig_escape_filter($this->env,
(($context["class"] ?? null) .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : (""))), "html", null, true);
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/system.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 78 => 18, 73 => 17, 71 => 16, 68 =>
15, 64 => 13, 58 => 11, 55 => 10, 53 => 9, 48 => 8, 45
=> 7, 42 => 6, 39 => 5, 37 => 4, 34 => 3, 32 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/system.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/system.html.twig");
}
}
PK��[�����G8b/8b5870b278108c0950a5aa61cb03a7cda21e5f3ffb8f04ec57d0781faa9843cf.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page_head.html.twig */
class
__TwigTemplate_8b28a1adfe1a56a68ae179b02536295f65e9110bd2ca91e76558b75cab51585b
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_platform' => [$this,
'block_head_platform'],
'head' => [$this, 'block_head'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page_head.html.twig",
"partials/page_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_title($context, array $blocks = [])
{
}
// line 6
public function block_head_application($context, array $blocks = [])
{
// line 7
echo "<jdoc:include type=\"head\" />";
}
// line 10
public function block_head_platform($context, array $blocks = [])
{
// line 11
$this->displayParentBlock("head_platform", $context,
$blocks);
echo "
";
// line 12
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "joomla", [])) {
// line 13
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://css/bootstrap-gantry.css"),
"html", null, true);
echo "\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"";
// line 14
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css-compiled/joomla.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
// line 15
if
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "direction", []) ==
"rtl")) {
// line 16
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/bootstrap-rtl.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 18
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/icomoon.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 20
echo " ";
if ($this->getAttribute(($context["gantry"] ?? null),
"debug", [])) {
// line 21
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/cms/css/debug.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
}
// line 25
public function block_head($context, array $blocks = [])
{
// line 26
$this->displayParentBlock("head", $context, $blocks);
}
public function getTemplateName()
{
return "partials/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 100 => 26, 97 => 25, 89 => 21, 86 =>
20, 80 => 18, 74 => 16, 72 => 15, 68 => 14, 63 => 13,
61 => 12, 57 => 11, 54 => 10, 50 => 7, 47 => 6, 42
=> 3, 32 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
\"@nucleus/page_head.html.twig\" %}
{% block head_title -%}
{%- endblock %}
{% block head_application -%}
<jdoc:include type=\"head\" />
{%- endblock %}
{% block head_platform -%}
{{ parent() }}
{% if gantry.theme.joomla %}
<link rel=\"stylesheet\" href=\"{{
url('gantry-assets://css/bootstrap-gantry.css') }}\"
type=\"text/css\" />
<link rel=\"stylesheet\" href=\"{{
url('gantry-engine://css-compiled/joomla.css') }}\"
type=\"text/css\" />
{% if gantry.page.direction == 'rtl' %}
<link rel=\"stylesheet\" href=\"{{
url('media/jui/css/bootstrap-rtl.css') }}\"
type=\"text/css\" />
{% endif %}
<link rel=\"stylesheet\" href=\"{{
url('media/jui/css/icomoon.css') }}\"
type=\"text/css\" />
{% endif %}
{% if gantry.debug %}
<link rel=\"stylesheet\" href=\"{{
url('media/cms/css/debug.css') }}\"
type=\"text/css\" />
{% endif %}
{%- endblock %}
{% block head -%}
{{ parent() }}
{%- endblock %}
", "partials/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page_head.html.twig");
}
}
PK��[x%ZK��Gd5/d55c4a49a2f3f763198d5b14efa1581ae2ee0553ccde718b35a13e59aeace43b.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* index.html.twig */
class
__TwigTemplate_2ba2c77140e28b1129c1d5a6767680fa4b06de0d3946fe3db4a614420d5eb58f
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"index.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_content($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayContent", [0 =>
($context["content"] ?? null)], "method");
echo "
";
}
public function getTemplateName()
{
return "index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
\"partials/page.html.twig\" %}
{% block content %}
{{ gantry.platform.displayContent(content)|raw }}
{% endblock %}
", "index.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/index.html.twig");
}
}
PK��[1`��z*z*Gd5/d59dd56ec4483cd6b8e31ceea1b0510fdf3834409ad1f4bd94f4f642d50a0805.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/assets.html.twig */
class
__TwigTemplate_1a53827d63dde63d20a51c72f6f86a5cb8341c3e92c5ae82c7a103e964f06fa5
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
ob_start(function () { return ''; });
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "enabled", [])) {
// line 3
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "css", []));
foreach ($context['_seq'] as
$context["_key"] => $context["css"]) {
// line 4
echo " ";
$context["params"] = [];
// line 5
echo " ";
if ($this->getAttribute($context["css"],
"extra", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["css"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 7
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 8
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 9
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 10
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
if ($this->getAttribute($context["css"],
"location", [])) {
// line 14
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["href" => $this->getAttribute($context["css"],
"location", [])]), 1 =>
$this->getAttribute($context["css"], "priority",
[])], "method");
// line 15
echo " ";
}
// line 16
echo "
";
// line 17
if ($this->getAttribute($context["css"],
"inline", [])) {
// line 18
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["css"], "inline",
[])]), 1 => $this->getAttribute($context["css"],
"priority", [])], "method");
// line 19
echo " ";
}
// line 20
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['css'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo "
";
// line 22
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "javascript", []));
foreach ($context['_seq'] as
$context["_key"] => $context["script"]) {
// line 23
echo " ";
$context["params"] = [];
// line 24
echo " ";
if ($this->getAttribute($context["script"],
"extra", [])) {
// line 25
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["script"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 27
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 28
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 29
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 30
echo " ";
}
// line 31
echo "
";
// line 32
if ($this->getAttribute($context["script"],
"location", [])) {
// line 33
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["src" => $this->getAttribute($context["script"],
"location", [])]), 1 =>
$this->getAttribute($context["script"], "priority",
[]), 2 => ((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 34
echo " ";
}
// line 35
echo "
";
// line 36
if ($this->getAttribute($context["script"],
"inline", [])) {
// line 37
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["script"], "inline",
[])]), 1 => $this->getAttribute($context["script"],
"priority", []), 2 =>
((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 38
echo " ";
}
// line 39
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['script'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
echo trim(preg_replace('/>\s+</',
'><', ob_get_clean()));
}
public function getTemplateName()
{
return "@particles/assets.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 164 => 39, 161 => 38, 158 => 37, 156
=> 36, 153 => 35, 150 => 34, 147 => 33, 145 => 32, 142
=> 31, 139 => 30, 133 => 29, 127 => 28, 124 => 27, 119
=> 26, 114 => 25, 111 => 24, 108 => 23, 104 => 22, 101
=> 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 =>
16, 81 => 15, 78 => 14, 76 => 13, 73 => 12, 70 => 11,
64 => 10, 58 => 9, 55 => 8, 50 => 7, 45 => 6, 42 =>
5, 39 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/assets.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/assets.html.twig");
}
}
PK��[�'a��G65/65dc801652613681c0ecc10cadc2ef6db35f2c8cc2195344f06e86e2eb158720.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page.html.twig */
class
__TwigTemplate_3a63f4548a7900ac174368bd49d3cd73df9ebb678522ddd5ad81a0af80de828e
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_footer' => [$this,
'block_page_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page.html.twig",
"partials/page.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_footer($context, array $blocks = [])
{
// line 4
echo " ";
$this->displayParentBlock("page_footer", $context,
$blocks);
echo "
<jdoc:include type=\"modules\" name=\"debug\"
/>
";
}
public function getTemplateName()
{
return "partials/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
\"@nucleus/page.html.twig\" %}
{% block page_footer %}
{{ parent() }}
<jdoc:include type=\"modules\" name=\"debug\"
/>
{% endblock %}
", "partials/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page.html.twig");
}
}
PK��[3�R� I IG82/8210214024b6af062dc67ddd8bf47c299d7807664949fa758ff36eaed971c760.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page.html.twig */
class
__TwigTemplate_52a57671baddda6deea84a20982b6d086472f6110e5494ea3101c48dd5eb9a29
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'content' => [$this, 'block_content'],
'page_offcanvas' => [$this,
'block_page_offcanvas'],
'page_layout' => [$this,
'block_page_layout'],
'page_top' => [$this, 'block_page_top'],
'page_bottom' => [$this,
'block_page_bottom'],
'body_top' => [$this, 'block_body_top'],
'body_bottom' => [$this,
'block_body_bottom'],
'page_head' => [$this,
'block_page_head'],
'page_footer' => [$this,
'block_page_footer'],
'page' => [$this, 'block_page'],
'page_body' => [$this,
'block_page_body'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "startTimer", [0 =>
"render", 1 => "Rendering page"],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "setLayout", [],
"method");
// line 3
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$context["segments"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "segments", [],
"method");
// line 6
ob_start();
// line 7
echo " ";
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "hasContent", [],
"method")) {
// line 8
echo " ";
$this->displayBlock('content', $context, $blocks);
// line 10
echo " ";
}
$context["content"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 13
$context["offcanvas"] = null;
// line 14
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) == "offcanvas")) {
// line 15
$context["offcanvas"] =
$context["segment"];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
ob_start();
// line 19
echo " ";
$this->displayBlock('page_offcanvas', $context,
$blocks);
$context["page_offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 26
$context["page_offcanvas"] =
((twig_trim_filter(($context["page_offcanvas"] ?? null))) ?
(twig_trim_filter(($context["page_offcanvas"] ?? null))) :
(""));
// line 27
$context["offcanvas_position"] =
((($context["page_offcanvas"] ?? null)) ?
((($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", []), "g-offcanvas-left")) :
("g-offcanvas-left"))) : (""));
// line 29
ob_start();
// line 30
echo " ";
$this->displayBlock('page_layout', $context, $blocks);
$context["page_layout"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 37
ob_start();
// line 38
echo " ";
$this->displayBlock('page_top', $context, $blocks);
// line 40
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"top"], "method"), "
");
echo "
";
$context["page_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 43
ob_start();
// line 44
echo " ";
$this->displayBlock('page_bottom', $context, $blocks);
// line 46
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"bottom"], "method"), "
");
echo "
";
$context["page_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 49
ob_start();
// line 50
echo " ";
$this->displayBlock('body_top', $context, $blocks);
// line 52
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_top"], "method"), "
");
echo "
";
$context["body_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 55
ob_start();
// line 56
echo " ";
$this->displayBlock('body_bottom', $context, $blocks);
// line 58
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_bottom"], "method"), "
");
echo "
";
$context["body_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 61
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/main.js"),
1 => 11, 2 => "footer"], "method");
// line 65
ob_start();
// line 66
echo " ";
$this->displayBlock('page_head', $context, $blocks);
$context["page_head"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 71
ob_start();
// line 72
echo " ";
$this->displayBlock('page_footer', $context, $blocks);
// line 76
echo "
";
// line 77
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "render", [],
"method");
echo "
";
$context["page_footer"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 80
$this->displayBlock('page', $context, $blocks);
}
// line 8
public function block_content($context, array $blocks = [])
{
// line 9
echo " ";
}
// line 19
public function block_page_offcanvas($context, array $blocks = [])
{
// line 20
echo " ";
if (($context["offcanvas"] ?? null)) {
// line 21
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute(($context["offcanvas"] ?? null),
"type", [])) . ".html.twig"),
"@nucleus/page.html.twig",
21)->display(twig_array_merge($context, ["segment" =>
($context["offcanvas"] ?? null)]));
}
// line 23
echo " ";
}
// line 30
public function block_page_layout($context, array $blocks = [])
{
// line 31
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) != "offcanvas")) {
// line 32
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/page.html.twig",
32)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 33
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 38
public function block_page_top($context, array $blocks = [])
{
// line 39
echo " ";
}
// line 44
public function block_page_bottom($context, array $blocks = [])
{
// line 45
echo " ";
}
// line 50
public function block_body_top($context, array $blocks = [])
{
// line 51
echo " ";
}
// line 56
public function block_body_bottom($context, array $blocks = [])
{
// line 57
echo " ";
}
// line 66
public function block_page_head($context, array $blocks = [])
{
// line 67
$this->loadTemplate("partials/page_head.html.twig",
"@nucleus/page.html.twig", 67)->display($context);
}
// line 72
public function block_page_footer($context, array $blocks = [])
{
// line 73
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 74
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "footer"],
"method"), "
");
}
// line 80
public function block_page($context, array $blocks = [])
{
// line 81
echo "<!DOCTYPE ";
echo
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[]), "html")) : ("html"));
echo ">
<html";
// line 82
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "htmlAttributes", []);
echo ">
";
// line 83
echo ($context["page_head"] ?? null);
echo "
";
// line 84
$this->displayBlock('page_body', $context, $blocks);
// line 102
echo "
</html>
";
}
// line 84
public function block_page_body($context, array $blocks = [])
{
// line 85
echo "<body";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "bodyAttributes", [0 =>
["class" => [0 => ($context["offcanvas_position"]
?? null), 1 =>
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "preset", []), 2 =>
("g-style-" .
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "preset", []))]]],
"method");
echo ">
";
// line 86
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_top", []);
echo "
";
// line 87
echo ($context["body_top"] ?? null);
echo "
";
// line 88
echo ($context["page_offcanvas"] ?? null);
echo "
<div id=\"g-page-surround\">
";
// line 90
if (twig_trim_filter(($context["page_offcanvas"] ??
null))) {
// line 91
echo "<div class=\"g-offcanvas-hide
g-offcanvas-toggle\" role=\"navigation\"
data-offcanvas-toggle aria-controls=\"g-offcanvas\"
aria-expanded=\"false\"><i class=\"fa fa-fw
fa-bars\"></i></div>";
}
// line 93
echo " ";
echo ($context["page_top"] ?? null);
echo "
";
// line 94
echo ($context["page_layout"] ?? null);
echo "
";
// line 95
echo ($context["page_bottom"] ?? null);
echo "
</div>
";
// line 97
echo ($context["body_bottom"] ?? null);
echo "
";
// line 98
echo ($context["page_footer"] ?? null);
echo "
";
// line 99
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_bottom", []);
echo "
</body>";
}
public function getTemplateName()
{
return "@nucleus/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 335 => 99, 331 => 98, 327 => 97, 322
=> 95, 318 => 94, 313 => 93, 310 => 91, 308 => 90, 303
=> 88, 299 => 87, 295 => 86, 290 => 85, 287 => 84, 281
=> 102, 279 => 84, 275 => 83, 271 => 82, 266 => 81, 263
=> 80, 258 => 74, 255 => 73, 252 => 72, 248 => 67, 245
=> 66, 241 => 57, 238 => 56, 234 => 51, 231 => 50, 227
=> 45, 224 => 44, 220 => 39, 217 => 38, 213 => 34, 203
=> 33, 200 => 32, 188 => 31, 185 => 30, 181 => 23, 177
=> 21, 174 => 20, 171 => 19, 167 => 9, 164 => 8, 160
=> 80, 155 => 77, 152 => 76, 149 => 72, 147 => 71, 143
=> 66, 141 => 65, 139 => 61, 132 => 58, 129 => 56, 127
=> 55, 120 => 52, 117 => 50, 115 => 49, 108 => 46, 105
=> 44, 103 => 43, 96 => 40, 93 => 38, 91 => 37, 87
=> 30, 85 => 29, 83 => 27, 81 => 26, 77 => 19, 75 =>
18, 68 => 15, 63 => 14, 61 => 13, 57 => 10, 54 => 8,
51 => 7, 49 => 6, 47 => 4, 45 => 3, 43 => 2, 41 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{%- do
gantry.debugger.startTimer('render', 'Rendering page')
%}
{%- do gantry.theme.setLayout() -%}
{%- do gantry.theme.loadAtoms() -%}
{%- set segments = gantry.theme.segments() -%}
{%- set content %}
{% if gantry.theme.hasContent() %}
{% block content %}
{% endblock %}
{% endif %}
{% endset -%}
{%- set offcanvas = null -%}
{%- for segment in segments if segment.type == 'offcanvas' %}
{%- set offcanvas = segment -%}
{% endfor -%}
{%- set page_offcanvas %}
{% block page_offcanvas %}
{% if offcanvas %}
{% include '@nucleus/layout/' ~ offcanvas.type ~
'.html.twig' with { 'segment': offcanvas } -%}
{% endif %}
{% endblock %}
{% endset -%}
{%- set page_offcanvas = page_offcanvas|trim ?: '' %}
{%- set offcanvas_position = page_offcanvas ?
offcanvas.attributes.position|default('g-offcanvas-left') :
'' -%}
{%- set page_layout %}
{% block page_layout %}
{% for segment in segments if segment.type != 'offcanvas' %}
{% include '@nucleus/layout/' ~ segment.type ~
'.html.twig' with { 'segments': segment.children } %}
{% endfor %}
{% endblock %}
{% endset -%}
{%- set page_top %}
{% block page_top %}
{% endblock %}
{{ gantry.document.getHtml('top')|join(\"\\n
\")|raw }}
{% endset -%}
{%- set page_bottom %}
{% block page_bottom %}
{% endblock %}
{{ gantry.document.getHtml('bottom')|join(\"\\n
\")|raw }}
{% endset -%}
{%- set body_top %}
{% block body_top %}
{% endblock %}
{{ gantry.document.getHtml('body_top')|join(\"\\n
\")|raw }}
{% endset -%}
{%- set body_bottom %}
{% block body_bottom %}
{% endblock %}
{{ gantry.document.getHtml('body_bottom')|join(\"\\n
\")|raw }}
{% endset -%}
{%- do
gantry.document.addScript(url('gantry-assets://js/main.js'), 11,
'footer') -%}
{# Head and footer needs to come last because of any of the above blocks
may have CSS or JavaScript in them #}
{%- set page_head %}
{% block page_head -%}
{% include 'partials/page_head.html.twig' %}
{%- endblock %}
{% endset -%}
{%- set page_footer %}
{% block page_footer %}
{% do gantry.platform.finalize() -%}
{{ gantry.scripts('footer')|join(\"\\n
\")|raw -}}
{% endblock %}
{{ gantry.debugger.render()|raw }}
{% endset -%}
{%- block page -%}
<!DOCTYPE {{ gantry.config.page.doctype|default('html')|raw
}}>
<html{{ gantry.page.htmlAttributes|raw }}>
{{ page_head|raw }}
{% block page_body -%}
<body{{ gantry.page.bodyAttributes({'class':
[offcanvas_position, gantry.page.preset, 'g-style-' ~
gantry.theme.preset]})|raw }}>
{{ gantry.config.page.body.body_top|raw }}
{{ body_top|raw }}
{{ page_offcanvas|raw }}
<div id=\"g-page-surround\">
{% if page_offcanvas|trim -%}
<div class=\"g-offcanvas-hide g-offcanvas-toggle\"
role=\"navigation\" data-offcanvas-toggle
aria-controls=\"g-offcanvas\"
aria-expanded=\"false\"><i class=\"fa fa-fw
fa-bars\"></i></div>
{%- endif %}
{{ page_top|raw }}
{{ page_layout|raw }}
{{ page_bottom|raw }}
</div>
{{ body_bottom|raw }}
{{ page_footer|raw }}
{{ gantry.config.page.body.body_bottom|raw }}
</body>
{%- endblock %}
</html>
{% endblock -%}
", "@nucleus/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page.html.twig");
}
}
PK��[�����G82/8212841ef8206b44f0efaa7c2f9288d1a621d90787efe093cb4d04de707a3a05.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/position.html.twig */
class
__TwigTemplate_4a9ef84fb13569ea9adbf5b5a38d8c89b0c6be86ad0ad007d3b4c9b998054ebd
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
if ( !($context["particle"] ?? null)) {
// line 3
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 4
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 5
echo " ";
}
// line 6
echo "
";
// line 7
ob_start();
// line 8
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 9
echo " ";
$this->loadTemplate([0 => (("particles/" .
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig"), 1 =>
(("@particles/" . (($this->getAttribute( //
line 10
($context["segment"] ?? null), "subtype", [],
"any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig")],
"@nucleus/content/position.html.twig", 9)->display($context);
// line 11
echo " ";
}
// line 12
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 14
if (twig_trim_filter(($context["html"] ?? null))) {
// line 15
echo " ";
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- START POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 16
echo "
<div class=\"g-content";
// line 17
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
// line 20
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- END POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 21
echo " ";
}
// line 22
echo "
";
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 24
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position")), "html", null, true);
echo ".</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 24, 91 => 22, 88 => 21, 82 =>
20, 77 => 18, 73 => 17, 70 => 16, 63 => 15, 61 => 14,
58 => 12, 55 => 11, 53 => 10, 51 => 9, 48 => 8, 46
=> 7, 43 => 6, 40 => 5, 37 => 4, 34 => 3, 31 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% try %}
{% if not particle %}
{% set enabled = gantry.config.get('particles.' ~
segment.type ~ '.enabled', 1) %}
{% set particle = gantry.config.getJoined('particles.' ~
segment.type, segment.attributes) %}
{% endif %}
{% set html %}
{% if enabled and (segment.attributes.enabled is null or
segment.attributes.enabled) %}
{% include ['particles/' ~
segment.subtype|default('position') ~ '.html.twig',
'@particles/' ~
segment.subtype|default('position') ~ '.html.twig'] %}
{% endif %}
{% endset %}
{%- if html|trim %}
{% if gantry.debug and segment.attributes.key %}<!-- START
POSITION {{ segment.attributes.key }} -->{% endif %}
<div class=\"g-content{{ segment.classes ? ' ' ~
segment.classes|join(' ')|e }}\">
{{ html|raw }}
</div>
{% if gantry.debug and segment.attributes.key %}<!-- END
POSITION {{ segment.attributes.key }} -->{% endif %}
{% endif %}
{% catch %}
<div class=\"alert
alert-error\"><strong>Error</strong> while rendering {{
segment.subtype|default('position') }}.</div>
{% endtry %}
", "@nucleus/content/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/position.html.twig");
}
}
PK��[��5��Gba/ba2a7bfe9fda8155b9ebabbab30080bcf014aa3d4f7e2d45be3449d7fbad829a.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/atom.html.twig */
class
__TwigTemplate_9d0bcf1da3cc460aefe9c8ab315e33c77524badc98c59e10136157a9326c8813
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/content/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/content/particle.html.twig",
"@nucleus/content/atom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
public function getTemplateName()
{
return "@nucleus/content/atom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 28 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/content/particle.html.twig' %}
{# Handle atoms, which are special case of particles #}
", "@nucleus/content/atom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/atom.html.twig");
}
}
PK��[&W�m�!�!G19/197fba050253da6965fb4a984f2c55edf97173bdbbd171147e7d6ccbe4f13f12.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/particle.html.twig */
class
__TwigTemplate_5d70c9c7364954f90409c2546e3a830afb6db6f0fc7fc1c1563175ba79802f8e
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["id"] =
$this->getAttribute(($context["segment"] ?? null),
"id", []);
// line 3
echo " ";
if ( !($context["particle"] ?? null)) {
// line 4
echo " ";
if (($context["noConfig"] ?? null)) {
// line 5
echo " ";
$context["enabled"] = true;
// line 6
echo " ";
$context["particle"] =
$this->getAttribute(($context["segment"] ?? null),
"attributes", []);
// line 7
echo " ";
} else {
// line 8
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".enabled"), 1 => 1],
"method");
// line 9
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 10
echo " ";
}
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
ob_start();
// line 14
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 15
echo " ";
$this->loadTemplate([0 => (("particles/" .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".html.twig"), 1 =>
(("@particles/" . $this->getAttribute( // line
16
($context["segment"] ?? null), "subtype", [])) .
".html.twig"), 2 =>
"@nucleus/content/missing.html.twig"],
"@nucleus/content/particle.html.twig", 15)->display($context);
// line 18
echo " ";
}
// line 19
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 20
echo " ";
$context["html"] =
twig_trim_filter(($context["html"] ?? null));
// line 21
echo "
";
// line 22
$context["classes"] = twig_trim_filter((((
!($context["inContent"] ?? null)) ? ("g-content g-particle
") : ("g-particle ")) .
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " ")));
// line 23
if (($context["html"] ?? null)) {
// line 24
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- START PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
// line 25
echo "
";
// line 26
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "<div id=\"";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo "-particle\" class=\"";
echo twig_escape_filter($this->env,
($context["classes"] ?? null), "html", null, true);
echo "\">";
}
// line 27
echo " ";
echo ($context["html"] ?? null);
echo "
";
// line 28
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "</div>";
}
// line 29
echo " ";
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- END PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
}
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 33
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["segment"] ?? null),
"subtype", []), "html", null, true);
echo " particle.</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 33, 115 => 29, 111 => 28, 106
=> 27, 98 => 26, 95 => 25, 89 => 24, 87 => 23, 85 =>
22, 82 => 21, 79 => 20, 76 => 19, 73 => 18, 71 => 16,
69 => 15, 66 => 14, 64 => 13, 61 => 12, 58 => 11, 55
=> 10, 52 => 9, 49 => 8, 46 => 7, 43 => 6, 40 => 5,
37 => 4, 34 => 3, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% try %}
{% set id = segment.id %}
{% if not particle %}
{% if noConfig %}
{% set enabled = true %}
{% set particle = segment.attributes %}
{% else %}
{% set enabled = gantry.config.get('particles.' ~
segment.subtype ~ '.enabled', 1) %}
{% set particle =
gantry.config.getJoined('particles.' ~ segment.subtype,
segment.attributes) %}
{% endif %}
{% endif %}
{% set html %}
{% if enabled and (segment.attributes.enabled is null or
segment.attributes.enabled) %}
{% include ['particles/' ~ segment.subtype ~
'.html.twig',
'@particles/' ~ segment.subtype ~
'.html.twig',
'@nucleus/content/missing.html.twig'] %}
{% endif %}
{% endset %}
{% set html = html|trim %}
{% set classes = ((not inContent ? 'g-content g-particle ' :
'g-particle ') ~ segment.classes|join(' '))|trim %}
{%- if html -%}
{% if gantry.debug %}<!-- START PARTICLE {{ id }} -->{%
endif %}
{% if ajax is not defined %}<div id=\"{{ id
}}-particle\" class=\"{{ classes }}\">{% endif %}
{{ html|raw }}
{% if ajax is not defined %}</div>{% endif %}
{% if gantry.debug %}<!-- END PARTICLE {{ id }} -->{%
endif %}
{%- endif -%}
{% catch %}
<div class=\"alert
alert-error\"><strong>Error</strong> while rendering {{
segment.subtype }} particle.</div>
{% endtry %}
", "@nucleus/content/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/particle.html.twig");
}
}
PK��[)�00G48/48be3769bb9c3b1fee5e81ca8633d2c0ec2ff2a053149e7291df8da8b39e9103.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/assets.html.twig */
class
__TwigTemplate_8a6606dba1aab8b2f3169f2666f53d11925de6833f44068202bbe111d1dc8945
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
ob_start();
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "enabled", [])) {
// line 3
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "css", []));
foreach ($context['_seq'] as
$context["_key"] => $context["css"]) {
// line 4
echo " ";
$context["params"] = [];
// line 5
echo " ";
if ($this->getAttribute($context["css"],
"extra", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["css"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 7
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 8
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 9
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 10
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
if ($this->getAttribute($context["css"],
"location", [])) {
// line 14
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["href" => $this->getAttribute($context["css"],
"location", [])]), 1 =>
$this->getAttribute($context["css"], "priority",
[])], "method");
// line 15
echo " ";
}
// line 16
echo "
";
// line 17
if ($this->getAttribute($context["css"],
"inline", [])) {
// line 18
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["css"], "inline",
[])]), 1 => $this->getAttribute($context["css"],
"priority", [])], "method");
// line 19
echo " ";
}
// line 20
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['css'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo "
";
// line 22
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "javascript", []));
foreach ($context['_seq'] as
$context["_key"] => $context["script"]) {
// line 23
echo " ";
$context["params"] = [];
// line 24
echo " ";
if ($this->getAttribute($context["script"],
"extra", [])) {
// line 25
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["script"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 27
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 28
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 29
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 30
echo " ";
}
// line 31
echo "
";
// line 32
if ($this->getAttribute($context["script"],
"location", [])) {
// line 33
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["src" => $this->getAttribute($context["script"],
"location", [])]), 1 =>
$this->getAttribute($context["script"], "priority",
[]), 2 => ((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 34
echo " ";
}
// line 35
echo "
";
// line 36
if ($this->getAttribute($context["script"],
"inline", [])) {
// line 37
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["script"], "inline",
[])]), 1 => $this->getAttribute($context["script"],
"priority", []), 2 =>
((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 38
echo " ";
}
// line 39
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['script'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
echo trim(preg_replace('/>\s+</',
'><', ob_get_clean()));
}
public function getTemplateName()
{
return "@particles/assets.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 164 => 39, 161 => 38, 158 => 37, 156
=> 36, 153 => 35, 150 => 34, 147 => 33, 145 => 32, 142
=> 31, 139 => 30, 133 => 29, 127 => 28, 124 => 27, 119
=> 26, 114 => 25, 111 => 24, 108 => 23, 104 => 22, 101
=> 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 =>
16, 81 => 15, 78 => 14, 76 => 13, 73 => 12, 70 => 11,
64 => 10, 58 => 9, 55 => 8, 50 => 7, 45 => 6, 42 =>
5, 39 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% spaceless %}
{% if (particle.enabled) %}
{% for css in particle.css %}
{% set params = {} %}
{% if css.extra %}
{% for attributes in css.extra %}
{% for key, value in attributes %}
{% set params = params|default({})|merge({(key):
value}) %}
{% endfor %}
{% endfor %}
{% endif %}
{% if css.location %}
{% do gantry.document.addStyle(params|default({})|merge({href:
css.location}), css.priority) %}
{% endif %}
{% if css.inline %}
{% do
gantry.document.addInlineStyle(params|default({})|merge({content:
css.inline}), css.priority) %}
{% endif %}
{% endfor %}
{% for script in particle.javascript %}
{% set params = {} %}
{% if script.extra %}
{% for attributes in script.extra %}
{% for key, value in attributes %}
{% set params = params|default({})|merge({(key):
value}) %}
{% endfor %}
{% endfor %}
{% endif %}
{% if script.location %}
{% do gantry.document.addScript(params|default({})|merge({src:
script.location}), script.priority, script.in_footer == true ?
'footer' : 'head') %}
{% endif %}
{% if script.inline %}
{% do
gantry.document.addInlineScript(params|default({})|merge({content:
script.inline}), script.priority, script.in_footer == true ?
'footer' : 'head') %}
{% endif %}
{% endfor %}
{% endif %}
{% endspaceless %}
", "@particles/assets.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/assets.html.twig");
}
}
PK��[�(S�k
k
G1b/1b0a9664cf85979a94a0c905b7c269638fe57a766097cd94aa4f648359436f81.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/position.html.twig */
class
__TwigTemplate_4c7d534f92e8d0f1b174f3539d567e14c18d33ecc6541e11c9cdaf48de2165fb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/position.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModules", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"key", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry"))]], "method");
echo "
";
}
public function getTemplateName()
{
return "@particles/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/partials/particle.html.twig' %}
{% block particle %}
{{ gantry.platform.displayModules(particle.key, {'style':
particle.chrome|default('gantry')})|raw }}
{% endblock %}
", "@particles/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/position.html.twig");
}
}
PK��[��}TTG9f/9f2a8e05bed25129d43185f02de0793a54c99ac281d01327e07cee5bd3d20c72.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/partials/particle.html.twig */
class
__TwigTemplate_8b6d8f513b7521bacfb9defb49ac81917c2eb11ec182b061e7290e1967c6c5de
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'stylesheets' => [$this,
'block_stylesheets'],
'javascript' => [$this,
'block_javascript'],
'javascript_footer' => [$this,
'block_javascript_footer'],
'particle' => [$this, 'block_particle'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 2
echo " ";
$this->displayBlock('stylesheets', $context, $blocks);
// line 4
echo "
";
// line 5
$this->displayBlock('javascript', $context, $blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 9
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "footer";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 10
echo " ";
$this->displayBlock('javascript_footer', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 14
$this->displayBlock('particle', $context, $blocks);
}
// line 2
public function block_stylesheets($context, array $blocks = [])
{
// line 3
echo " ";
}
// line 5
public function block_javascript($context, array $blocks = [])
{
// line 6
echo " ";
}
// line 10
public function block_javascript_footer($context, array $blocks = [])
{
// line 11
echo " ";
}
// line 14
public function block_particle($context, array $blocks = [])
{
}
public function getTemplateName()
{
return "@nucleus/partials/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 14, 94 => 11, 91 => 10, 87 =>
6, 84 => 5, 80 => 3, 77 => 2, 73 => 14, 68 => 10, 56
=> 9, 52 => 5, 49 => 4, 46 => 2, 34 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% assets %}
{% block stylesheets %}
{% endblock %}
{% block javascript %}
{% endblock %}
{% endassets -%}
{% assets in 'footer' %}
{% block javascript_footer %}
{% endblock %}
{% endassets -%}
{% block particle %}
{% endblock %}
", "@nucleus/partials/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/partials/particle.html.twig");
}
}
PK��[�\�_��G9f/9f942c664018f7610e720ccca20430f7244c2f3272b8f395aee9793d1e2ab972.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/grid.html.twig */
class
__TwigTemplate_5eccb8013152e7d492572708d5273a0fc82b9cdda2d16d36fde2d2e3462c3edd
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
$context["class"] = ("g-grid" .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 7
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/layout/grid.html.twig",
7)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 8
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 9
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 12
if (twig_trim_filter(($context["html"] ?? null))) {
// line 13
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []));
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">";
// line 14
echo ($context["html"] ?? null);
// line 15
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/grid.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 94 => 15, 92 => 14, 80 => 13, 78 =>
12, 74 => 9, 60 => 8, 57 => 7, 39 => 6, 36 => 5, 34
=> 4, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/grid.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/grid.html.twig");
}
}
PK��[뎜4y
y
Gfa/fa3329c64975d29fdec41cf42087a8cc369489529b33ca8da362f48965d9bc2c.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/spacer.html.twig */
class
__TwigTemplate_37614b73704e4c8eaf148f53bf736942663526feb1949abdb93732ee6ca636df
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
if ( !($context["particle"] ?? null)) {
// line 2
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 3
echo " ";
$context["spacer"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
}
// line 5
echo "
";
// line 6
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 7
echo " <div class=\"spacer";
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\"></div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/spacer.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 44 => 7, 42 => 6, 39 => 5, 35 => 3,
32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% if not particle %}
{% set enabled = gantry.config.get('particles.' ~
segment.type ~ '.enabled', 1) %}
{% set spacer = gantry.config.getJoined('particles.' ~
segment.type, segment.attributes) %}
{% endif %}
{% if enabled and (segment.attributes.enabled is null or
segment.attributes.enabled) %}
<div class=\"spacer{{ segment.classes ? ' ' ~
segment.classes|join(' ')|e }}\"></div>
{% endif %}
", "@nucleus/content/spacer.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/spacer.html.twig");
}
}
PK��[3$>���G3c/3c6e07a11e32ecadc617954602a47254cc343887357975ee8f1930ea014cfc2d.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu.html.twig */
class
__TwigTemplate_7f2ccbd91798b5e6911224d7fcdffef34d28b4e8215e00cca435268eef218e44
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 4
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 6
echo "
";
// line 14
echo "
";
// line 23
echo "
";
// line 32
echo "
";
// line 117
echo "
";
// line 134
echo "
";
// line 142
echo "
";
// line 155
echo "
";
// line 156
$context["macro"] = $this;
// line 157
echo "
";
// line 158
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 159
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 161
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 7
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 8
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 9
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 10
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 15
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 16
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 17
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 18
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 19
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu.html.twig", 19);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 20
($context["context"] ?? null)));
}
// line 21
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 24
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 25
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 26
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 27
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 28
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 30
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 33
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 34
echo " ";
$context["self"] = $this;
// line 35
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 36
echo " ";
$context["enabled"] = 0;
// line 37
echo " ";
}
// line 38
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 39
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 40
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 41
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 42
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 43
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 44
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 45
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 46
echo "
";
// line 47
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 48
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 49
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 50
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 51
echo " ";
}
// line 52
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 53
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 54
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 55
echo " ";
}
// line 56
echo " ";
}
// line 57
echo "
";
// line 58
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 59
echo " ";
$context["linkAttributes"] = "";
// line 60
echo "
";
// line 61
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 62
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 63
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 64
echo " ";
if (($context["key"] ==
"rel")) {
// line 65
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 66
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 67
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 68
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 69
echo "
";
}
// line 70
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 71
echo " ";
} else {
// line 72
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 73
echo " ";
}
// line 74
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 76
echo " ";
}
// line 77
echo "
";
// line 78
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 79
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 80
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 81
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 82
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 83
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 84
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 85
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 86
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 87
($context["item"] ?? null), "icon", [])) {
// line 88
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 90
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 91
echo " <span
class=\"g-menu-item-content\">
";
// line 92
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 94
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 95
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 97
echo " ";
} else {
// line 98
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 99
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 100
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 101
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 103
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 105
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 106
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 108
echo " ";
}
// line 109
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 110
echo "</div>";
}
// line 111
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 112
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 114
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 118
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 119
echo " ";
$context["self"] = $this;
// line 120
echo " <div class=\"g-grid\">
";
// line 121
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 122
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 123
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 125
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 128
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 132
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 135
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 136
echo " ";
$context["self"] = $this;
// line 137
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 138
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 139
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 143
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
// line 144
echo " ";
$context["self"] = $this;
// line 145
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 146
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 147
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 148
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 150
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 700 => 150, 690 => 148, 685 => 147, 682
=> 146, 679 => 145, 676 => 144, 661 => 143, 639 => 139,
634 => 138, 629 => 137, 626 => 136, 611 => 135, 595 =>
132, 585 => 128, 579 => 125, 573 => 123, 568 => 122, 566
=> 121, 563 => 120, 560 => 119, 545 => 118, 528 => 114,
525 => 112, 522 => 111, 519 => 110, 513 => 109, 510 =>
108, 507 => 106, 504 => 105, 496 => 103, 488 => 101, 486
=> 100, 481 => 99, 478 => 98, 475 => 97, 472 => 95, 470
=> 94, 465 => 92, 462 => 91, 459 => 90, 453 => 88, 451
=> 87, 444 => 86, 441 => 85, 434 => 84, 422 => 83, 413
=> 82, 411 => 81, 393 => 80, 390 => 79, 388 => 78, 385
=> 77, 382 => 76, 376 => 75, 370 => 74, 367 => 73, 364
=> 72, 361 => 71, 355 => 70, 352 => 69, 349 => 68, 346
=> 67, 343 => 66, 338 => 65, 335 => 64, 330 => 63, 325
=> 62, 323 => 61, 320 => 60, 317 => 59, 315 => 58, 312
=> 57, 309 => 56, 306 => 55, 303 => 54, 300 => 53, 297
=> 52, 294 => 51, 291 => 50, 288 => 49, 285 => 48, 283
=> 47, 280 => 46, 277 => 45, 274 => 44, 271 => 43, 268
=> 42, 265 => 41, 262 => 40, 259 => 39, 256 => 38, 253
=> 37, 250 => 36, 247 => 35, 244 => 34, 229 => 33, 213
=> 30, 207 => 28, 205 => 27, 200 => 26, 197 => 25, 185
=> 24, 169 => 21, 166 => 20, 158 => 19, 153 => 18, 150
=> 17, 147 => 16, 134 => 15, 112 => 10, 109 => 9, 107
=> 8, 92 => 7, 83 => 161, 75 => 159, 73 => 158, 70
=> 157, 68 => 156, 65 => 155, 62 => 142, 59 => 134, 56
=> 117, 53 => 32, 50 => 23, 47 => 14, 44 => 6, 38 =>
4, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% try %}
{% set menu = gantry.menu.instance(particle) %}
{% catch %}
<div class=\"alert alert-error\">{{ e.getMessage
}}</div>
{% endtry %}
{% macro getCustomWidth(item, menu, mode, dropdown_type) -%}
{%- if (item.width|default('auto') != 'auto') and
not (dropdown_type == 'fullwidth' and item.level > 1) -%}
{%- if mode == 'item' %} style=\"position:
relative;\"
{%- elseif mode == 'submenu' %} style=\"width:{{
item.width }};\" data-g-item-width=\"{{ item.width }}\"
{%- endif %}
{%- endif %}
{%- endmacro %}
{% macro displayParticle(item, context) %}
{% set context = context|merge({ particle: item.options.particle }) %}
{% set classes = item.options.block.class %}
<div class=\"menu-item-particle{{ classes ? ' ' ~
classes }}\">
{% include ['particles/' ~ item.particle ~
'.html.twig', '@particles/' ~ item.particle ~
'.html.twig']
ignore missing with context only %}
</div>
{% endmacro %}
{% macro displayTitle(item) %}
{% if not item.icon_only or not (item.image or item.icon) %}
<span class=\"g-menu-item-title\">{{ item.title
}}</span>
{% if item.subtitle %}
<span class=\"g-menu-item-subtitle\">{{
item.subtitle }}</span>
{% endif %}
{% endif %}
{% endmacro %}
{% macro displayItem(item, menu, context, dropdown_type) %}
{% import _self as self %}
{% if item.type == 'particle' and not
item.options.particle.enabled %}
{% set enabled = 0 %}
{% endif %}
{% if item.visible and item.enabled and enabled|default(1) %}
{% set title = item.icon_only or item.link_title ? '
title=\"' ~ item.link_title|default(item.title)|e ~
'\"' %}
{% set label = item.icon_only and (item.image or item.icon) ?
' aria-label=\"' ~ item.title|e ~'\"' %}
{% set active = menu.isActive(item) ? ' active' %}
{% set dropdown = item.level == 1 ? ' g-' ~
item.getDropdown() %}
{% set parent = item.children ? ' g-parent' %}
{% set target = (item.target != '_self' or
context.particle.forceTarget) ? ' target=\"' ~ item.target|e
~ '\"' %}
{% set rel = item.rel %}
{% if item.target == '_blank' %}
{% if 'noopener' not in rel %}
{% set rel = rel ? rel ~ ' ' : rel %}
{% set rel = rel ~ 'noopener' %}
{% endif %}
{% if 'noreferrer' not in rel %}
{% set rel = rel ? rel ~ ' ' : rel %}
{% set rel = rel ~ 'noreferrer' %}
{% endif %}
{% endif %}
{% set listAttributes = item.attributes|attribute_array %}
{% set linkAttributes = '' %}
{% if item.link_attributes %}
{% for attribute in item.link_attributes %}
{% for key, value in attribute %}
{% if key == 'rel' %}
{% for hVal in value|split(' ') %}
{% if hVal not in rel %}
{% set rel = rel ? rel ~ ' ' :
rel %}
{% set rel = rel ~ hVal %}
{% endif %}
{% endfor %}
{% else %}
{% set linkAttributes = linkAttributes ~ '
' ~ key|e ~ '=\"' ~ value|e('html_attr') ~
'\"' %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% set rel = rel ? ' rel=\"' ~
rel|e('html_attr') ~ '\"' %}
<li class=\"g-menu-item g-menu-item-type-{{ item.type }}
g-menu-item-{{ item.id }}{% if not item.dropdown_hide %}{{ parent }}{%
endif %}{{ active }}{{ dropdown }} {% if item.url and item.children %}{% if
not item.dropdown_hide %}g-menu-item-link-parent{% endif %}{% endif %} {{
item.class|default('') }}\"
{{- self.getCustomWidth(item, menu, 'item',
dropdown) }}
{%- if context.particle.renderTitles|default(0) %}
title=\"{{ item.title }}\"{% endif %}{{listAttributes|raw}}>
{% if item.url %}<a class=\"g-menu-item-container{{
item.anchor_class ? ' ' ~ item.anchor_class }}\"
href=\"{{ item.url }}{{ item.hash }}\"{{ (title ~ label ~ target
~ rel ~ linkAttributes)|raw }}>
{% else %}<div class=\"g-menu-item-container{{
item.anchor_class ? ' ' ~ item.anchor_class }}\"
data-g-menuparent=\"\"{{ label|raw }}>{% endif %}
{% if item.image %}
<img src=\"{{ url(item.image) }}\"
alt=\"{{ item.title }}\" />
{% elseif item.icon %}
<i class=\"{{ item.icon }}\"
aria-hidden=\"true\"></i>
{% endif %}
{% if item.url %}
<span class=\"g-menu-item-content\">
{{ self.displayTitle(item) }}
</span>
{% if (item.children) and not item.dropdown_hide -%}
<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>
{%- endif %}
{% else %}
{% if item.type == 'particle' %}
{{ self.displayParticle(item, context) }}
{% elseif item.type == 'heading' %}
<span class=\"g-nav-header
g-menu-item-content\"{{ title|raw }}>{{ self.displayTitle(item)
}}</span>
{% else %}
<span class=\"g-separator
g-menu-item-content\"{{ title|raw }}>{{ self.displayTitle(item)
}}</span>
{% endif %}
{% if (item.children) and not item.dropdown_hide
-%}
<span
class=\"g-menu-parent-indicator\"></span>
{%- endif %}
{% endif %}
{% if item.url %}</a>
{% else %}</div>{% endif %}
{% if (item.children) -%}
{{ self.displaySubmenu(item, menu, context, dropdown_type)
}}
{%- endif %}
</li>
{% endif %}
{% endmacro %}
{% macro displayContainers(item, menu, context, dropdown_type) %}
{% import _self as self %}
<div class=\"g-grid\">
{% set groups = item.getDropdown() == 'standard' ? [item]
: item.groups %}
{% for column, items in groups %}
<div class=\"g-block {{ item.columnWidth(column)|toGrid
}}\">
<ul class=\"g-sublevel\">
<li class=\"g-level-{{ item.level }}
g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
{{ self.displayItems(items, menu, context, dropdown_type)
}}
</ul>
</div>
{% endfor %}
</div>
{% endmacro %}
{% macro displayItems(items, menu, context, dropdown_type) %}
{% import _self as self %}
{% for item in items %}
{% if item.level == 1 %}{% set dropdown_type = item.dropdown %}{%
endif %}
{{ self.displayItem(item, menu, context, dropdown_type) }}
{% endfor %}
{% endmacro %}
{% macro displaySubmenu(item, menu, context, dropdown_type) %}
{% import _self as self %}
{% if not item.dropdown_hide %}
{% set animation =
context.gantry.config.get('styles.menu.animation')|default('g-fade')
%}
{% if ((item.groups|length == 1 and not dropdown_type ==
'fullwidth') or dropdown_type == 'standard') or
(item.width|default('auto') != 'auto' and dropdown_type
== 'fullwidth')%}{% set dropdown_dir = 'g-dropdown-' ~
item.dropdown_dir|default('right') %}{% endif %}
<ul class=\"g-dropdown g-inactive {{ animation }} {{
dropdown_dir }}\"{{ self.getCustomWidth(item, menu,
'submenu', dropdown_type) }}>
<li class=\"g-dropdown-column\">
{{ self.displayContainers(item, menu, context,
dropdown_type) }}
</li>
</ul>
{% endif %}
{% endmacro %}
{% import _self as macro %}
{% if menu.root.count() %}
<nav class=\"g-main-nav\"{{ particle.mobileTarget ? '
data-g-mobile-target' : '' }} data-g-hover-expand=\"{{
particle.hoverExpand|default('true') ? 'true':
'false' }}\">
<ul class=\"g-toplevel\">
{{ macro.displayItems(menu.root, menu, _context) }}
</ul>
</nav>
{% endif %}
", "@particles/menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/menu.html.twig");
}
}
PK��[{_W�
�
Ge5/e54e5df792a589c9d7008994dd6e9cdae7829c6fa8d04ce12f3bf5d0f5d9b8f1.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/module.html.twig */
class
__TwigTemplate_6adc2f9f2cebabe749c419d348c5a80624f555a27f2155b6765a6b951856ee0d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/module.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModule", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"module_id", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry")), "position" => "particle"]],
"method");
echo "
";
}
public function getTemplateName()
{
return "@particles/module.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/partials/particle.html.twig' %}
{% block particle %}
{{ gantry.platform.displayModule(particle.module_id,
{'style': particle.chrome|default('gantry'),
'position': 'particle'})|raw }}
{% endblock %}
", "@particles/module.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/module.html.twig");
}
}
PK��[QH#u Gad/ad5f6f1298ab395a8d4bfc67c53695c2382e434f02818f777f791f02ace846a9.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* error.html.twig */
class
__TwigTemplate_de7f9d7bc69708b78e4909644621520f43eb756bc5bcf9cceccd738a80b38874
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_head' => [$this,
'block_page_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"error.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_head($context, array $blocks = [])
{
// line 4
$this->loadTemplate("partials/error_head.html.twig",
"error.html.twig", 4)->display($context);
}
// line 7
public function block_content($context, array $blocks = [])
{
// line 8
echo " <h1>";
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null), "Unknown
Error")) : ("Unknown Error")), "html", null,
true);
echo "</h1>
";
// line 9
echo ($context["backtrace"] ?? null);
echo "
";
}
public function getTemplateName()
{
return "error.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 57 => 9, 50 => 8, 47 => 7, 43 => 4,
40 => 3, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
\"partials/page.html.twig\" %}
{% block page_head -%}
{% include 'partials/error_head.html.twig' %}
{%- endblock %}
{% block content %}
<h1>{{ errorcode|default(500) }} {{ error|default('Unknown
Error') }}</h1>
{{ backtrace|raw }}
{% endblock %}
", "error.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/error.html.twig");
}
}
PK��[sG�k��G7e/7ee72e62bd8dee3bc73b3dd4cf4f85d3dd2605cc45579675a9b45a9be5fa3c3f.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/offcanvas.html.twig */
class
__TwigTemplate_cfc8ea983ac1869d3da8c795024ec94dc3b8c15acd21fbb427a1fab04d3ef395
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_class"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? ((("
class=\"" . twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []))) .
"\"")) : (""));
// line 2
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 3
echo "
";
// line 4
ob_start();
// line 5
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["segment"]
?? null), "children", []));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length -
1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"]
=> $context["child"]) {
// line 6
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["child"], "type", []))
. ".html.twig"), "@nucleus/layout/offcanvas.html.twig",
6)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["child"], "children",
[])]));
// line 7
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['child'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$context["offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 10
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["offcanvas"] ?? null)))) {
// line 11
echo "<div id=\"g-offcanvas\" ";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo " data-g-offcanvas-swipe=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", []), "1")) : ("1")),
"html", null, true);
echo "\" data-g-offcanvas-css3=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", []), "1")) : ("1")),
"html", null, true);
echo "\">
";
// line 12
echo ($context["offcanvas"] ?? null);
// line 13
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/offcanvas.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 89 => 13, 87 => 12, 77 => 11, 75 =>
10, 60 => 7, 57 => 6, 39 => 5, 37 => 4, 34 => 3, 32
=> 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% set attr_class =
segment.attributes.class ? ' class=\"' ~
segment.attributes.class|e ~ '\"' %}
{% set attr_extra = segment.attributes.extra|attribute_array %}
{% set offcanvas %}
{% for child in segment.children %}
{% include '@nucleus/layout/' ~ child.type ~
'.html.twig' with { 'segments': child.children } %}
{% endfor %}
{% endset %}
{%- if segment.attributes.sticky or offcanvas|trim -%}
<div id=\"g-offcanvas\" {{ attr_class|raw }} {{-
attr_extra|raw }} data-g-offcanvas-swipe=\"{{
segment.attributes.swipe|default('1') }}\"
data-g-offcanvas-css3=\"{{
segment.attributes.css3animation|default('1') }}\">
{{ offcanvas|raw -}}
</div>
{% endif %}
", "@nucleus/layout/offcanvas.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/offcanvas.html.twig");
}
}
PK��[j�y
G81/81add79269728220ece7bf856eb26aa51efbaf28022eb5eb5da2a29eaf24a449.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/grid.html.twig */
class
__TwigTemplate_9fed34ff1416afaf2761b0a6ac54aaff714d25643527e21d650c27a4617d9d00
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
$context["class"] = ("g-grid" .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 4
ob_start();
// line 5
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 7
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/layout/grid.html.twig",
7)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 8
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 9
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 12
if (twig_trim_filter(($context["html"] ?? null))) {
// line 13
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []));
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">";
// line 14
echo ($context["html"] ?? null);
// line 15
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/grid.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 94 => 15, 92 => 14, 80 => 13, 78 =>
12, 74 => 9, 60 => 8, 57 => 7, 39 => 6, 36 => 5, 34
=> 4, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% set attr_extra =
segment.attributes.extra|attribute_array %}
{% set class = 'g-grid' ~ (segment.attributes.class ? '
' ~ segment.attributes.class|join(' ')) %}
{%- set html %}
{% if segment.children %}
{% for segment in segments %}
{% include '@nucleus/layout/' ~ segment.type ~
'.html.twig' with { 'segments':segment.children } %}
{% endfor %}
{% endif %}
{% endset %}
{%- if html|trim %}
<div {% if segment.attributes.id %}id=\"{{
segment.attributes.id|e }}\" {% endif %}class=\"{{ class
}}\" {{- attr_extra|raw }}>
{{- html|raw -}}
</div>
{% endif %}
", "@nucleus/layout/grid.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/grid.html.twig");
}
}
PK��[����;;G52/52fdc7f13ab019077c35a3cdf941e572b29f31ded364ad53ff4ee3ddf3b78363.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/block.html.twig */
class
__TwigTemplate_be020fdae975549f32c0b3a28a9e1834ec8f8d5f2923e8d1c53fe3b1f41c7744
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
echo "
";
// line 3
$context["class"] = ((("g-block " .
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "size", [])])) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : (""))) .
(($this->getAttribute($this->getAttribute( // line 5
($context["segment"] ?? null), "attributes", []),
"class", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 6
echo "
";
// line 7
ob_start();
// line 8
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 9
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 10
echo " ";
if ($this->getAttribute($context["segment"],
"content", [])) {
// line 11
echo " ";
echo
$this->getAttribute($context["segment"], "content",
[]);
echo "
";
} else {
// line 13
echo " ";
$this->loadTemplate([0 =>
(("@nucleus/content/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), 1 => (("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig")],
"@nucleus/layout/block.html.twig",
13)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 14
echo " ";
}
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if (twig_trim_filter(($context["html"] ?? null))) {
// line 20
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []),
"html", null, true);
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 21
echo twig_trim_filter(($context["html"] ?? null));
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/block.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 113 => 21, 100 => 20, 98 => 19, 94
=> 16, 80 => 15, 77 => 14, 74 => 13, 68 => 11, 65 =>
10, 47 => 9, 44 => 8, 42 => 7, 39 => 6, 37 => 5, 36
=> 4, 35 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% set attr_extra =
segment.attributes.extra|attribute_array %}
{% set class = 'g-block ' ~ segment.attributes.size|toGrid
~ (segment.attributes.variations ? ' ' ~
segment.attributes.variations|join(' '))
~ (segment.attributes.class ? ' ' ~
segment.attributes.class|join(' ')) %}
{% set html %}
{% if segment.children %}
{% for segment in segments %}
{% if segment.content %}
{{ segment.content|raw }}
{% else %}
{% include ['@nucleus/content/' ~ segment.type ~
'.html.twig', '@nucleus/layout/' ~ segment.type ~
'.html.twig'] with { 'segments': segment.children } %}
{% endif %}
{% endfor %}
{% endif %}
{% endset %}
{%- if html|trim %}
<div {% if segment.attributes.id %}id=\"{{
segment.attributes.id }}\" {% endif %}class=\"{{ class }}\"
{{- attr_extra|raw }}>
{{ html|trim|raw }}
</div>
{% endif -%}
", "@nucleus/layout/block.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/block.html.twig");
}
}
PK��[+�?�L�LG52/52068858242f0911b11c3a6c5081761778f2655e15fbc7ce1de05801e8f52f4a.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page_head.html.twig */
class
__TwigTemplate_186c4d808997088e2addc749d1aeb91ae492d3b422dd296ce3ba7f16ea3688dc
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'head_stylesheets' => [$this,
'block_head_stylesheets'],
'head_platform' => [$this,
'block_head_platform'],
'head_overrides' => [$this,
'block_head_overrides'],
'head_meta' => [$this,
'block_head_meta'],
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_ie_stylesheets' => [$this,
'block_head_ie_stylesheets'],
'head' => [$this, 'block_head'],
'head_custom' => [$this,
'block_head_custom'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "assets", [],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = ["priority" => 10];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 5
echo " ";
$this->displayBlock('head_stylesheets', $context,
$blocks);
// line 15
$this->displayBlock('head_platform', $context,
$blocks);
// line 16
echo "
";
// line 17
$this->displayBlock('head_overrides', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 24
echo "<head>
";
// line 25
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_top"], "method"), "
");
echo "
";
// line 26
$this->displayBlock('head_meta', $context, $blocks);
// line 52
$this->displayBlock('head_title', $context, $blocks);
// line 56
echo "
";
// line 57
$this->displayBlock('head_application', $context,
$blocks);
// line 61
echo "
";
// line 62
$this->displayBlock('head_ie_stylesheets', $context,
$blocks);
// line 70
$this->displayBlock('head', $context, $blocks);
// line 71
echo " ";
$this->displayBlock('head_custom', $context, $blocks);
// line 76
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_bottom"], "method"), "
");
echo "
</head>
";
}
// line 5
public function block_head_stylesheets($context, array $blocks = [])
{
// line 6
if
((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", []), 1)) : (1))) {
// line 7
echo " <link rel=\"stylesheet\"
href=\"gantry-assets://css/font-awesome.min.css\"
type=\"text/css\"/>
";
}
// line 9
echo " <link rel=\"stylesheet\"
href=\"gantry-engine://css-compiled/nucleus.css\"
type=\"text/css\"/>
";
// line 10
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[]),
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))) :
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 11
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo " ";
}
// line 15
public function block_head_platform($context, array $blocks = [])
{
}
// line 17
public function block_head_overrides($context, array $blocks = [])
{
// line 18
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "overrides", []));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 19
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " ";
}
// line 26
public function block_head_meta($context, array $blocks = [])
{
// line 27
echo " <meta name=\"viewport\"
content=\"width=device-width, initial-scale=1.0\">
<meta http-equiv=\"X-UA-Compatible\"
content=\"IE=edge\" />
";
// line 29
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", [])) {
// line 30
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 31
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 32
echo " ";
if
((is_string($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $context["key"]) &&
is_string($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
= "og:") && ('' ===
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
|| 0 ===
strpos($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4,
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144))))
{
// line 33
echo " <meta
property=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
} else {
// line 35
echo " <meta
name=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
}
// line 37
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 40
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_meta"], "method"), "
");
echo "
";
// line 42
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])) {
// line 43
echo " <link rel=\"icon\"
type=\"image/x-icon\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])), "html", null,
true);
echo "\" />
";
}
// line 45
echo "
";
// line 46
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])) {
// line 47
echo " <link rel=\"apple-touch-icon\"
sizes=\"180x180\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
<link rel=\"icon\" sizes=\"192x192\"
href=\"";
// line 48
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
";
}
// line 50
echo " ";
}
// line 52
public function block_head_title($context, array $blocks = [])
{
// line 53
echo "<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\" />
<title>Title</title>";
}
// line 57
public function block_head_application($context, array $blocks = [])
{
// line 58
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head"], "method"),
"
");
echo "
";
// line 59
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head"],
"method"), "
");
}
// line 62
public function block_head_ie_stylesheets($context, array $blocks = [])
{
// line 63
echo "<!--[if (gte IE 8)&(lte IE 9)]>
<script type=\"text/javascript\" src=\"";
// line 64
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/html5shiv-printshiv.min.js"),
"html", null, true);
echo "\"></script>
<link rel=\"stylesheet\" href=\"";
// line 65
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css/nucleus-ie9.css"),
"html", null, true);
echo "\" type=\"text/css\"/>
<script type=\"text/javascript\" src=\"";
// line 66
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/matchmedia.polyfill.js"),
"html", null, true);
echo "\"></script>
<![endif]-->
";
}
// line 70
public function block_head($context, array $blocks = [])
{
}
// line 71
public function block_head_custom($context, array $blocks = [])
{
// line 72
echo " ";
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", [])) {
// line 73
echo " ";
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", []);
echo "
";
}
// line 75
echo " ";
}
public function getTemplateName()
{
return "@nucleus/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 294 => 75, 288 => 73, 285 => 72, 282
=> 71, 277 => 70, 270 => 66, 266 => 65, 262 => 64, 259
=> 63, 256 => 62, 251 => 59, 246 => 58, 243 => 57, 238
=> 53, 235 => 52, 231 => 50, 226 => 48, 221 => 47, 219
=> 46, 216 => 45, 210 => 43, 208 => 42, 202 => 40, 191
=> 37, 183 => 35, 175 => 33, 172 => 32, 168 => 31, 164
=> 30, 162 => 29, 158 => 27, 155 => 26, 151 => 21, 143
=> 19, 139 => 18, 136 => 17, 131 => 15, 127 => 13, 119
=> 11, 115 => 10, 112 => 9, 108 => 7, 106 => 6, 103
=> 5, 94 => 76, 91 => 71, 89 => 70, 87 => 62, 84 =>
61, 82 => 57, 79 => 56, 77 => 52, 75 => 26, 70 => 25,
67 => 24, 63 => 17, 60 => 16, 58 => 15, 55 => 5, 43
=> 4, 41 => 2, 39 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{%- do gantry.debugger.assets() -%}
{%- do gantry.theme.loadAtoms() -%}
{% assets with { priority: 10 } %}
{% block head_stylesheets -%}
{% if gantry.config.page.fontawesome.enable|default(1) %}
<link rel=\"stylesheet\"
href=\"gantry-assets://css/font-awesome.min.css\"
type=\"text/css\"/>
{% endif %}
<link rel=\"stylesheet\"
href=\"gantry-engine://css-compiled/nucleus.css\"
type=\"text/css\"/>
{% for scss in
gantry.theme.configuration.css.persistent|default(gantry.theme.configuration.css.files)
%}
<link rel=\"stylesheet\" href=\"{{ scss
}}.scss\" type=\"text/css\"/>
{%- endfor %}
{% endblock -%}
{% block head_platform %}{% endblock %}
{% block head_overrides -%}
{% for scss in gantry.theme.configuration.css.overrides %}
<link rel=\"stylesheet\" href=\"{{ scss
}}.scss\" type=\"text/css\"/>
{%- endfor %}
{% endblock -%}
{% endassets -%}
<head>
{{ gantry.document.getHtml('head_top')|join(\"\\n
\")|raw }}
{% block head_meta %}
<meta name=\"viewport\"
content=\"width=device-width, initial-scale=1.0\">
<meta http-equiv=\"X-UA-Compatible\"
content=\"IE=edge\" />
{% if gantry.config.page.head.meta -%}
{% for attributes in gantry.config.page.head.meta -%}
{%- for key, value in attributes %}
{% if key starts with 'og:' %}
<meta property=\"{{ key|e }}\"
content=\"{{ value|e }}\" />
{% else %}
<meta name=\"{{ key|e }}\"
content=\"{{ value|e }}\" />
{% endif %}
{% endfor -%}
{%- endfor -%}
{%- endif -%}
{{ gantry.document.getHtml('head_meta')|join(\"\\n
\")|raw }}
{% if gantry.config.page.assets.favicon %}
<link rel=\"icon\" type=\"image/x-icon\"
href=\"{{ url(gantry.config.page.assets.favicon) }}\" />
{% endif %}
{% if gantry.config.page.assets.touchicon %}
<link rel=\"apple-touch-icon\"
sizes=\"180x180\" href=\"{{
url(gantry.config.page.assets.touchicon) }}\">
<link rel=\"icon\" sizes=\"192x192\"
href=\"{{ url(gantry.config.page.assets.touchicon) }}\">
{% endif %}
{% endblock %}
{%- block head_title -%}
<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\" />
<title>Title</title>
{%- endblock %}
{% block head_application -%}
{{ gantry.styles('head')|join(\"\\n\")|raw }}
{{ gantry.scripts('head')|join(\"\\n\")|raw }}
{%- endblock %}
{% block head_ie_stylesheets -%}
<!--[if (gte IE 8)&(lte IE 9)]>
<script type=\"text/javascript\" src=\"{{
url('gantry-assets://js/html5shiv-printshiv.min.js')
}}\"></script>
<link rel=\"stylesheet\" href=\"{{
url('gantry-engine://css/nucleus-ie9.css') }}\"
type=\"text/css\"/>
<script type=\"text/javascript\" src=\"{{
url('gantry-assets://js/matchmedia.polyfill.js')
}}\"></script>
<![endif]-->
{% endblock -%}
{% block head %}{% endblock %}
{% block head_custom %}
{% if gantry.config.page.head.head_bottom %}
{{ gantry.config.page.head.head_bottom|raw }}
{% endif %}
{% endblock %}
{{ gantry.document.getHtml('head_bottom')|join(\"\\n
\")|raw }}
</head>
", "@nucleus/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page_head.html.twig");
}
}
PK��[\�'�**G52/527663362d14b9f8c97f186ac2970a7568b0a4b13ae2c5c5c3f7edf45a4b232c.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/system.html.twig */
class
__TwigTemplate_91d276f41781ce729bcdcb14d00ad356ba7b672946bc02fa77ec1a808d9d62f6
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["subtype"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []),
$this->getAttribute(($context["segment"] ?? null),
"type", []))) :
($this->getAttribute(($context["segment"] ?? null),
"type", [])));
// line 2
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." . ($context["subtype"] ?? null)) .
".enabled"), 1 => 1], "method");
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 6
echo " ";
if ((($context["subtype"] ?? null) ==
"content")) {
// line 7
echo " ";
$context["class"] = "g-content";
// line 8
echo " ";
echo ($context["content"] ?? null);
echo "
";
} elseif (( // line 9
($context["subtype"] ?? null) == "messages")) {
// line 10
echo " ";
$context["class"] =
"g-system-messages";
// line 11
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displaySystemMessages", [],
"method");
echo "
";
}
// line 13
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 15
echo "
";
// line 16
if (twig_trim_filter(($context["html"] ?? null))) {
// line 17
echo " <div class=\"";
echo twig_escape_filter($this->env,
(($context["class"] ?? null) .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : (""))), "html", null, true);
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/system.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 78 => 18, 73 => 17, 71 => 16, 68 =>
15, 64 => 13, 58 => 11, 55 => 10, 53 => 9, 48 => 8, 45
=> 7, 42 => 6, 39 => 5, 37 => 4, 34 => 3, 32 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/system.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/system.html.twig");
}
}
PK��[�]��2
2
G52/5295898b25f4d379b52a555c02a843cf7a7e30cc4616178980646de4bd7dc343.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/mobile-menu.html.twig */
class
__TwigTemplate_0cc52e95647b5bb158f87ee35acb81e3e09f7b51d2a9bf69e20a8c0e7ca355c6
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/mobile-menu.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " <div id=\"g-mobilemenu-container\"
data-g-menu-breakpoint=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"], "method",
true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"],
"method"), "48rem")) : ("48rem")),
"html", null, true);
echo "\"></div>
";
}
public function getTemplateName()
{
return "@particles/mobile-menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/mobile-menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/mobile-menu.html.twig");
}
}
PK��[K�%��&�&G97/97f60424b593c7ebbf2f385ccd3d19830a849c8880dac8851afcd1ea104de93d.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/section.html.twig */
class
__TwigTemplate_b98eb907f948c40de00cf117fe8081d55f4e7ab59d76b1c73d0bb97102272137
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["tag_type"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "section")) :
("section"));
// line 2
$context["attr_id"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) ?
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) :
(("g-" . $this->getAttribute(($context["segment"] ??
null), "id", []))));
// line 3
$context["attr_class"] =
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : ("")));
// line 5
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 6
$context["boxed"] =
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "boxed", []);
// line 7
if ( !(null === ($context["boxed"] ?? null))) {
// line 8
echo " ";
$context["boxed"] =
(((twig_trim_filter(($context["boxed"] ?? null)) ==
"")) ?
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "layout", []), "sections", [])) :
(($context["boxed"] ?? null)));
}
// line 11
ob_start();
// line 12
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 13
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 14
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"),
"@nucleus/layout/section.html.twig",
14)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["html"] ?? null)))) {
// line 20
if (( !(null === ($context["boxed"] ?? null))
&& ((($context["boxed"] ?? null) == 0) ||
(($context["boxed"] ?? null) == 2)))) {
// line 21
echo " ";
ob_start();
// line 22
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 24
echo " ";
}
// line 25
echo "
";
// line 26
ob_start();
// line 27
echo " ";
if ((($context["boxed"] ?? null) == 2)) {
$context["attr_class"] =
(($context["attr_class"] ?? null) . " g-flushed");
}
// line 28
echo " ";
$context["attr_class"] =
((($context["attr_class"] ?? null)) ? ((("
class=\"" . twig_trim_filter(($context["attr_class"] ??
null))) . "\"")) : (""));
// line 29
echo "<";
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo " id=\"";
echo twig_escape_filter($this->env,
($context["attr_id"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 30
echo ($context["html"] ?? null);
echo "
</";
// line 31
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo ">";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 34
if ((($context["boxed"] ?? null) == 1)) {
// line 35
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
} else {
// line 37
echo " ";
echo ($context["html"] ?? null);
echo "
";
}
}
}
public function getTemplateName()
{
return "@nucleus/layout/section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 146 => 37, 140 => 35, 138 => 34, 134
=> 31, 130 => 30, 120 => 29, 117 => 28, 112 => 27, 110
=> 26, 107 => 25, 104 => 24, 98 => 22, 95 => 21, 93
=> 20, 91 => 19, 87 => 16, 73 => 15, 70 => 14, 52 =>
13, 49 => 12, 47 => 11, 43 => 8, 41 => 7, 39 => 6, 37
=> 5, 35 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% set tag_type =
segment.subtype|default('section') %}
{% set attr_id = segment.attributes.id ?: 'g-' ~ segment.id %}
{% set attr_class = segment.attributes.class
~ (segment.attributes.variations ? ' ' ~
segment.attributes.variations|join(' ')) %}
{% set attr_extra = segment.attributes.extra|attribute_array %}
{% set boxed = segment.attributes.boxed %}
{% if boxed is not null %}
{% set boxed = boxed|trim == '' ?
gantry.config.page.body.layout.sections : boxed %}
{% endif %}
{%- set html %}
{% if segment.children %}
{% for segment in segments %}
{% include '@nucleus/layout/' ~ segment.type ~
'.html.twig' with { 'segments':segment.children } %}
{% endfor %}
{% endif %}
{% endset %}
{%- if segment.attributes.sticky or html|trim %}
{%- if boxed is not null and (boxed == 0 or boxed == 2) %}
{% set html %}
<div class=\"g-container\">{{ html|raw
}}</div>
{% endset %}
{% endif %}
{% set html %}
{% if boxed == 2 %}{% set attr_class = attr_class ~ '
g-flushed' %}{% endif %}
{% set attr_class = attr_class ? ' class=\"' ~
attr_class|trim ~ '\"' -%}
<{{ tag_type }} id=\"{{ attr_id }}\"{{ attr_class|raw }}
{{- attr_extra|raw }}>
{{ html|raw }}
</{{ tag_type }}>
{%- endset %}
{%- if boxed == 1 %}
<div class=\"g-container\">{{ html|raw }}</div>
{% else %}
{{ html|raw }}
{% endif %}
{% endif %}
", "@nucleus/layout/section.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/section.html.twig");
}
}
PK��[1�
��G7d/7dac5917f08bee97ce6611da19d56e19c695064aaf9e998a8025959df5db72f4.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/system.html.twig */
class
__TwigTemplate_8885d2ff4f288082a1fca6d58a27b3154f62067d491ef3e90ceeaf9a4d74bb3b
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["subtype"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []),
$this->getAttribute(($context["segment"] ?? null),
"type", []))) :
($this->getAttribute(($context["segment"] ?? null),
"type", [])));
// line 2
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." . ($context["subtype"] ?? null)) .
".enabled"), 1 => 1], "method");
// line 3
echo "
";
// line 4
ob_start();
// line 5
echo " ";
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 6
echo " ";
if ((($context["subtype"] ?? null) ==
"content")) {
// line 7
echo " ";
$context["class"] = "g-content";
// line 8
echo " ";
echo ($context["content"] ?? null);
echo "
";
} elseif (( // line 9
($context["subtype"] ?? null) == "messages")) {
// line 10
echo " ";
$context["class"] =
"g-system-messages";
// line 11
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displaySystemMessages", [],
"method");
echo "
";
}
// line 13
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 15
echo "
";
// line 16
if (twig_trim_filter(($context["html"] ?? null))) {
// line 17
echo " <div class=\"";
echo twig_escape_filter($this->env,
(($context["class"] ?? null) .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : (""))), "html", null, true);
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/system.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 78 => 18, 73 => 17, 71 => 16, 68 =>
15, 64 => 13, 58 => 11, 55 => 10, 53 => 9, 48 => 8, 45
=> 7, 42 => 6, 39 => 5, 37 => 4, 34 => 3, 32 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% set subtype =
segment.subtype|default(segment.type) %}
{% set enabled = gantry.config.get('particles.' ~ subtype ~
'.enabled', 1) %}
{% set html %}
{% if enabled and (segment.attributes.enabled is null or
segment.attributes.enabled) %}
{% if subtype == 'content' %}
{% set class = 'g-content' %}
{{ content|raw }}
{% elseif subtype == 'messages' %}
{% set class = 'g-system-messages' %}
{{ gantry.platform.displaySystemMessages()|raw }}
{% endif %}
{% endif %}
{% endset %}
{% if html|trim %}
<div class=\"{{ class ~ (segment.attributes.class ? '
' ~ segment.attributes.class|join(' ')) }}\">
{{ html|raw }}
</div>
{% endif %}
", "@nucleus/content/system.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/system.html.twig");
}
}
PK��[��P���G0a/0a602671d552891b6dcabe648224a01913e5bdcebb9ac1b7904c7b151ded58b7.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/custom.html.twig */
class
__TwigTemplate_a1171085aa174aa0e07c9a02bc6c2267a55287985c327f07490c897c61d9876a
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/custom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["html"] =
(($this->getAttribute(($context["particle"] ?? null),
"twig", [])) ?
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "compile", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"html", [])], "method")) :
($this->getAttribute(($context["particle"] ?? null),
"html", [])));
// line 5
echo " ";
echo
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->htmlFilter((($this->getAttribute(($context["particle"]
?? null), "filter", [])) ?
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "filter", [0 =>
($context["html"] ?? null)], "method")) :
(($context["html"] ?? null))));
echo "
";
}
public function getTemplateName()
{
return "@particles/custom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 45 => 5, 42 => 4, 39 => 3, 29 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/partials/particle.html.twig' %}
{% block particle %}
{% set html = particle.twig ? gantry.theme.compile(particle.html) :
particle.html %}
{{ (particle.filter ? gantry.platform.filter(html) : html)|html|raw }}
{% endblock %}
", "@particles/custom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/custom.html.twig");
}
}
PK��[Q���e�e�G8c/8c1e7e1867368624ff33e1a15ddc672ed186797ee90582d84dddbdc26bec8ed9.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu-title.html.twig */
class
__TwigTemplate_fc7d1b9d15aa0503c7e254329ebbd666ae34103364e15076a485d72063643d42
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
echo "
";
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "title", [])) {
// line 3
echo " <h3 class=\"g-title
title-pack-menu\">";
echo $this->getAttribute(($context["particle"] ??
null), "title", []);
echo "</h3>
";
}
// line 5
echo "
";
// line 7
try { // line 8
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 10
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 12
echo "
";
// line 20
echo "
";
// line 29
echo "
";
// line 38
echo "
";
// line 123
echo "
";
// line 140
echo "
";
// line 148
echo "
";
// line 161
echo "
";
// line 162
$context["macro"] = $this;
// line 163
echo "
";
// line 164
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 165
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 167
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 13
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 14
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 15
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 16
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 21
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 22
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 23
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 24
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 25
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu-title.html.twig", 25);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 26
($context["context"] ?? null)));
}
// line 27
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 30
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 31
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 32
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 33
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 34
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 36
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 39
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 40
echo " ";
$context["self"] = $this;
// line 41
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 42
echo " ";
$context["enabled"] = 0;
// line 43
echo " ";
}
// line 44
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 45
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 46
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 47
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 48
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 49
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 50
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 51
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 52
echo "
";
// line 53
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 54
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 55
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 56
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 57
echo " ";
}
// line 58
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 59
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 60
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 61
echo " ";
}
// line 62
echo " ";
}
// line 63
echo "
";
// line 64
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 65
echo " ";
$context["linkAttributes"] = "";
// line 66
echo "
";
// line 67
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 68
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 69
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 70
echo " ";
if (($context["key"] ==
"rel")) {
// line 71
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 72
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 73
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 74
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 75
echo "
";
}
// line 76
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 77
echo " ";
} else {
// line 78
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 79
echo " ";
}
// line 80
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 81
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 82
echo " ";
}
// line 83
echo "
";
// line 84
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 85
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 86
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 87
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 88
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 89
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 90
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 91
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 92
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 93
($context["item"] ?? null), "icon", [])) {
// line 94
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 96
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 97
echo " <span
class=\"g-menu-item-content\">
";
// line 98
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 100
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 101
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 103
echo " ";
} else {
// line 104
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 105
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 106
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 107
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 109
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 111
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 112
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 114
echo " ";
}
// line 115
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 116
echo "</div>";
}
// line 117
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 118
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 120
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 124
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 125
echo " ";
$context["self"] = $this;
// line 126
echo " <div class=\"g-grid\">
";
// line 127
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 128
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 129
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 131
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 134
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 138
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 141
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 142
echo " ";
$context["self"] = $this;
// line 143
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 144
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 145
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 149
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 150
echo " ";
$context["self"] = $this;
// line 151
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 152
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 153
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 154
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 156
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu-title.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 715 => 156, 705 => 154, 700 => 153, 697
=> 152, 694 => 151, 691 => 150, 676 => 149, 654 => 145,
649 => 144, 644 => 143, 641 => 142, 626 => 141, 610 =>
138, 600 => 134, 594 => 131, 588 => 129, 583 => 128, 581
=> 127, 578 => 126, 575 => 125, 560 => 124, 543 => 120,
540 => 118, 537 => 117, 534 => 116, 528 => 115, 525 =>
114, 522 => 112, 519 => 111, 511 => 109, 503 => 107, 501
=> 106, 496 => 105, 493 => 104, 490 => 103, 487 => 101,
485 => 100, 480 => 98, 477 => 97, 474 => 96, 468 => 94,
466 => 93, 459 => 92, 456 => 91, 449 => 90, 437 => 89,
428 => 88, 426 => 87, 408 => 86, 405 => 85, 403 => 84,
400 => 83, 397 => 82, 391 => 81, 385 => 80, 382 => 79,
379 => 78, 376 => 77, 370 => 76, 367 => 75, 364 => 74,
361 => 73, 358 => 72, 353 => 71, 350 => 70, 345 => 69,
340 => 68, 338 => 67, 335 => 66, 332 => 65, 330 => 64,
327 => 63, 324 => 62, 321 => 61, 318 => 60, 315 => 59,
312 => 58, 309 => 57, 306 => 56, 303 => 55, 300 => 54,
298 => 53, 295 => 52, 292 => 51, 289 => 50, 286 => 49,
283 => 48, 280 => 47, 277 => 46, 274 => 45, 271 => 44,
268 => 43, 265 => 42, 262 => 41, 259 => 40, 244 => 39,
228 => 36, 222 => 34, 220 => 33, 215 => 32, 212 => 31,
200 => 30, 184 => 27, 181 => 26, 173 => 25, 168 => 24,
165 => 23, 162 => 22, 149 => 21, 127 => 16, 124 => 15,
122 => 14, 107 => 13, 98 => 167, 90 => 165, 88 => 164,
85 => 163, 83 => 162, 80 => 161, 77 => 148, 74 => 140,
71 => 123, 68 => 38, 65 => 29, 62 => 20, 59 => 12, 53
=> 10, 46 => 8, 45 => 7, 41 => 5, 35 => 3, 33 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/menu-title.html.twig",
"/home/lmsyaran/public_html/templates/g5_hydrogen/custom/particles/menu-title.html.twig");
}
}
PK��[/����Gcc/ccf987f534eeeb320947004cb3e4620321de7e80e2add0c449ba64675381d697.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page_head.html.twig */
class
__TwigTemplate_f1bf9f19a1fa792a77921b792dee67eefed7bf7de8db76f749293009b0a8b1e4
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_platform' => [$this,
'block_head_platform'],
'head' => [$this, 'block_head'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page_head.html.twig",
"partials/page_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_title($context, array $blocks = [])
{
}
// line 6
public function block_head_application($context, array $blocks = [])
{
// line 7
echo "<jdoc:include type=\"head\" />";
}
// line 10
public function block_head_platform($context, array $blocks = [])
{
// line 11
$this->displayParentBlock("head_platform", $context,
$blocks);
echo "
";
// line 12
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "joomla", [])) {
// line 13
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://css/bootstrap-gantry.css"),
"html", null, true);
echo "\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"";
// line 14
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css-compiled/joomla.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
// line 15
if
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "direction", []) ==
"rtl")) {
// line 16
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/bootstrap-rtl.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 18
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/icomoon.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 20
echo " ";
if ($this->getAttribute(($context["gantry"] ?? null),
"debug", [])) {
// line 21
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/cms/css/debug.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
}
// line 25
public function block_head($context, array $blocks = [])
{
// line 26
$this->displayParentBlock("head", $context, $blocks);
}
public function getTemplateName()
{
return "partials/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 100 => 26, 97 => 25, 89 => 21, 86 =>
20, 80 => 18, 74 => 16, 72 => 15, 68 => 14, 63 => 13,
61 => 12, 57 => 11, 54 => 10, 50 => 7, 47 => 6, 42
=> 3, 32 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page_head.html.twig");
}
}
PK��[NW ��
�
Gcc/cc38de9d68675bd0a0fde21c07a3f881ad59d52c5500dd6871f5ad7e15eedab2.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/copyright.html.twig */
class
__TwigTemplate_e7a137d5a280fd1ae3a7929e6849356e95b27498efb431d3697ca5e07bb0e252
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 3
$context["start_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", []))));
// line 4
$context["end_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", []))));
// line 1
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/copyright.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 6
public function block_particle($context, array $blocks = [])
{
// line 7
echo " ©
";
// line 8
if ((($context["start_date"] ?? null) !=
($context["end_date"] ?? null))) {
echo twig_escape_filter($this->env,
($context["start_date"] ?? null));
echo " - ";
}
// line 9
echo " ";
echo twig_escape_filter($this->env,
($context["end_date"] ?? null));
echo "
";
// line 10
echo $this->getAttribute(($context["particle"] ??
null), "owner", []);
echo "
";
}
public function getTemplateName()
{
return "@particles/copyright.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 60 => 10, 55 => 9, 50 => 8, 47 => 7,
44 => 6, 39 => 1, 37 => 4, 35 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/copyright.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/copyright.html.twig");
}
}
PK��[�j��?�?G13/13a4c282e70c479bc170622525cf48bdd917f84398ad22ba0e40a7c2c8ed9437.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page_head.html.twig */
class
__TwigTemplate_b8fdba1cb40597367281a071ab24ad1606030dec6c4543fb7d81f4641fcccb82
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'head_stylesheets' => [$this,
'block_head_stylesheets'],
'head_platform' => [$this,
'block_head_platform'],
'head_overrides' => [$this,
'block_head_overrides'],
'head_meta' => [$this,
'block_head_meta'],
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_ie_stylesheets' => [$this,
'block_head_ie_stylesheets'],
'head' => [$this, 'block_head'],
'head_custom' => [$this,
'block_head_custom'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "assets", [],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = ["priority" => 10];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 5
echo " ";
$this->displayBlock('head_stylesheets', $context,
$blocks);
// line 15
$this->displayBlock('head_platform', $context,
$blocks);
// line 16
echo "
";
// line 17
$this->displayBlock('head_overrides', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 24
echo "<head>
";
// line 25
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_top"], "method"), "
");
echo "
";
// line 26
$this->displayBlock('head_meta', $context, $blocks);
// line 52
$this->displayBlock('head_title', $context, $blocks);
// line 56
echo "
";
// line 57
$this->displayBlock('head_application', $context,
$blocks);
// line 61
echo "
";
// line 62
$this->displayBlock('head_ie_stylesheets', $context,
$blocks);
// line 70
$this->displayBlock('head', $context, $blocks);
// line 71
echo " ";
$this->displayBlock('head_custom', $context, $blocks);
// line 76
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_bottom"], "method"), "
");
echo "
</head>
";
}
// line 5
public function block_head_stylesheets($context, array $blocks = [])
{
// line 6
if
((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", []), 1)) : (1))) {
// line 7
echo " <link rel=\"stylesheet\"
href=\"gantry-assets://css/font-awesome.min.css\"
type=\"text/css\"/>
";
}
// line 9
echo " <link rel=\"stylesheet\"
href=\"gantry-engine://css-compiled/nucleus.css\"
type=\"text/css\"/>
";
// line 10
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[]),
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))) :
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 11
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo " ";
}
// line 15
public function block_head_platform($context, array $blocks = [])
{
}
// line 17
public function block_head_overrides($context, array $blocks = [])
{
// line 18
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "overrides", []));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 19
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " ";
}
// line 26
public function block_head_meta($context, array $blocks = [])
{
// line 27
echo " <meta name=\"viewport\"
content=\"width=device-width, initial-scale=1.0\">
<meta http-equiv=\"X-UA-Compatible\"
content=\"IE=edge\" />
";
// line 29
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", [])) {
// line 30
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 31
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 32
echo " ";
if
((is_string($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $context["key"]) &&
is_string($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
= "og:") && ('' ===
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
|| 0 ===
strpos($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4,
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144))))
{
// line 33
echo " <meta
property=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
} else {
// line 35
echo " <meta
name=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
}
// line 37
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 40
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_meta"], "method"), "
");
echo "
";
// line 42
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])) {
// line 43
echo " <link rel=\"icon\"
type=\"image/x-icon\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])), "html", null,
true);
echo "\" />
";
}
// line 45
echo "
";
// line 46
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])) {
// line 47
echo " <link rel=\"apple-touch-icon\"
sizes=\"180x180\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
<link rel=\"icon\" sizes=\"192x192\"
href=\"";
// line 48
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
";
}
// line 50
echo " ";
}
// line 52
public function block_head_title($context, array $blocks = [])
{
// line 53
echo "<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\" />
<title>Title</title>";
}
// line 57
public function block_head_application($context, array $blocks = [])
{
// line 58
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head"], "method"),
"
");
echo "
";
// line 59
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head"],
"method"), "
");
}
// line 62
public function block_head_ie_stylesheets($context, array $blocks = [])
{
// line 63
echo "<!--[if (gte IE 8)&(lte IE 9)]>
<script type=\"text/javascript\" src=\"";
// line 64
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/html5shiv-printshiv.min.js"),
"html", null, true);
echo "\"></script>
<link rel=\"stylesheet\" href=\"";
// line 65
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css/nucleus-ie9.css"),
"html", null, true);
echo "\" type=\"text/css\"/>
<script type=\"text/javascript\" src=\"";
// line 66
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/matchmedia.polyfill.js"),
"html", null, true);
echo "\"></script>
<![endif]-->
";
}
// line 70
public function block_head($context, array $blocks = [])
{
}
// line 71
public function block_head_custom($context, array $blocks = [])
{
// line 72
echo " ";
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", [])) {
// line 73
echo " ";
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", []);
echo "
";
}
// line 75
echo " ";
}
public function getTemplateName()
{
return "@nucleus/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 294 => 75, 288 => 73, 285 => 72, 282
=> 71, 277 => 70, 270 => 66, 266 => 65, 262 => 64, 259
=> 63, 256 => 62, 251 => 59, 246 => 58, 243 => 57, 238
=> 53, 235 => 52, 231 => 50, 226 => 48, 221 => 47, 219
=> 46, 216 => 45, 210 => 43, 208 => 42, 202 => 40, 191
=> 37, 183 => 35, 175 => 33, 172 => 32, 168 => 31, 164
=> 30, 162 => 29, 158 => 27, 155 => 26, 151 => 21, 143
=> 19, 139 => 18, 136 => 17, 131 => 15, 127 => 13, 119
=> 11, 115 => 10, 112 => 9, 108 => 7, 106 => 6, 103
=> 5, 94 => 76, 91 => 71, 89 => 70, 87 => 62, 84 =>
61, 82 => 57, 79 => 56, 77 => 52, 75 => 26, 70 => 25,
67 => 24, 63 => 17, 60 => 16, 58 => 15, 55 => 5, 43
=> 4, 41 => 2, 39 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page_head.html.twig");
}
}
PK��[Y�vgz*z*G13/13786c88ba4a9df36125013430f1c137702666e21644e0024221c82dbe0d8815.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/assets.html.twig */
class
__TwigTemplate_f44385e5730c5e48293f6bf32341a06993c2ee05ac43c1d476e2874e0738cfd8
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
ob_start(function () { return ''; });
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "enabled", [])) {
// line 3
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "css", []));
foreach ($context['_seq'] as
$context["_key"] => $context["css"]) {
// line 4
echo " ";
$context["params"] = [];
// line 5
echo " ";
if ($this->getAttribute($context["css"],
"extra", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["css"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 7
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 8
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 9
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 10
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
if ($this->getAttribute($context["css"],
"location", [])) {
// line 14
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["href" => $this->getAttribute($context["css"],
"location", [])]), 1 =>
$this->getAttribute($context["css"], "priority",
[])], "method");
// line 15
echo " ";
}
// line 16
echo "
";
// line 17
if ($this->getAttribute($context["css"],
"inline", [])) {
// line 18
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["css"], "inline",
[])]), 1 => $this->getAttribute($context["css"],
"priority", [])], "method");
// line 19
echo " ";
}
// line 20
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['css'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo "
";
// line 22
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "javascript", []));
foreach ($context['_seq'] as
$context["_key"] => $context["script"]) {
// line 23
echo " ";
$context["params"] = [];
// line 24
echo " ";
if ($this->getAttribute($context["script"],
"extra", [])) {
// line 25
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["script"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 27
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 28
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 29
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 30
echo " ";
}
// line 31
echo "
";
// line 32
if ($this->getAttribute($context["script"],
"location", [])) {
// line 33
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["src" => $this->getAttribute($context["script"],
"location", [])]), 1 =>
$this->getAttribute($context["script"], "priority",
[]), 2 => ((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 34
echo " ";
}
// line 35
echo "
";
// line 36
if ($this->getAttribute($context["script"],
"inline", [])) {
// line 37
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["script"], "inline",
[])]), 1 => $this->getAttribute($context["script"],
"priority", []), 2 =>
((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 38
echo " ";
}
// line 39
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['script'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
echo trim(preg_replace('/>\s+</',
'><', ob_get_clean()));
}
public function getTemplateName()
{
return "@particles/assets.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 164 => 39, 161 => 38, 158 => 37, 156
=> 36, 153 => 35, 150 => 34, 147 => 33, 145 => 32, 142
=> 31, 139 => 30, 133 => 29, 127 => 28, 124 => 27, 119
=> 26, 114 => 25, 111 => 24, 108 => 23, 104 => 22, 101
=> 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 =>
16, 81 => 15, 78 => 14, 76 => 13, 73 => 12, 70 => 11,
64 => 10, 58 => 9, 55 => 8, 50 => 7, 45 => 6, 42 =>
5, 39 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/assets.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/assets.html.twig");
}
}
PK��[���E E G89/8956e7738893168bda68445ee1e0190c1722ffe32880687ed9c9d0c7857238be.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/branding.html.twig */
class
__TwigTemplate_584ff2d012d80874118e3a963c6f4d51bd35e403f0fadac85df481a59baeb6eb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/branding.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo "<div class=\"g-branding ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "css", []), "class", []), "html",
null, true);
echo "\">
";
// line 5
echo $this->getAttribute(($context["particle"] ??
null), "content", []);
echo "
</div>
";
}
public function getTemplateName()
{
return "@particles/branding.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 47 => 5, 42 => 4, 39 => 3, 29 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/branding.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/branding.html.twig");
}
}
PK��[�"
�2
2
G7f/7f1781a3f1e3d99a22c0f8947864231c2fd948d23ee61edb37b2f2c8c49d4e41.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/mobile-menu.html.twig */
class
__TwigTemplate_355261936f7263ef9f4ff5b635e5d04b2a5fd1f3f8311922b6ce80534775a1a1
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/mobile-menu.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " <div id=\"g-mobilemenu-container\"
data-g-menu-breakpoint=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"], "method",
true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"],
"method"), "48rem")) : ("48rem")),
"html", null, true);
echo "\"></div>
";
}
public function getTemplateName()
{
return "@particles/mobile-menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/mobile-menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/mobile-menu.html.twig");
}
}
PK��[�^,2�
�
G71/71b01c47d74012abe393a30f30c1df395c83502821fbb399e10fba48ddf65e25.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/error_head.html.twig */
class
__TwigTemplate_ced18e8690ce03ca5f46563ae158268e5c474db9acf8e0419bca19fd0a87db69
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_application' => [$this,
'block_head_application'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page_head.html.twig",
"partials/error_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_application($context, array $blocks = [])
{
// line 4
echo "<meta charset=\"utf-8\" />
<meta http-equiv=\"content-type\"
content=\"text/html; charset=utf-8\" />
<title>";
// line 6
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null),
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR")))
:
($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR"))),
"html", null, true);
echo "</title>
";
// line 7
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "errorPage", [0 => true],
"method");
// line 8
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 9
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head", 1 => true],
"method"), "
");
echo "
";
// line 10
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head", 1 => true],
"method"), "
");
}
public function getTemplateName()
{
return "partials/error_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 61 => 10, 56 => 9, 54 => 8, 52 => 7,
46 => 6, 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/error_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/error_head.html.twig");
}
}
PK��[&˯%�
�
G71/71fb8bdc8c1fe036bc7724c7988ae4147fb365b0687502e53af19e5ae649ef50.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* error.html.twig */
class
__TwigTemplate_af13167e5635e5a97e991fead09ad10ecf6f2461b488b0be1b072b5b22904f38
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_head' => [$this,
'block_page_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"error.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_head($context, array $blocks = [])
{
// line 4
$this->loadTemplate("partials/error_head.html.twig",
"error.html.twig", 4)->display($context);
}
// line 7
public function block_content($context, array $blocks = [])
{
// line 8
echo " <h1>";
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null), "Unknown
Error")) : ("Unknown Error")), "html", null,
true);
echo "</h1>
";
// line 9
echo ($context["backtrace"] ?? null);
echo "
";
}
public function getTemplateName()
{
return "error.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 57 => 9, 50 => 8, 47 => 7, 43 => 4,
40 => 3, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "error.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/twig/error.html.twig");
}
}
PK��[\�'�**G71/71aa50c5b75f72793da5bf076634e579268b13c292505256d6a016673f9b0e6e.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/system.html.twig */
class
__TwigTemplate_91d276f41781ce729bcdcb14d00ad356ba7b672946bc02fa77ec1a808d9d62f6
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["subtype"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []),
$this->getAttribute(($context["segment"] ?? null),
"type", []))) :
($this->getAttribute(($context["segment"] ?? null),
"type", [])));
// line 2
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." . ($context["subtype"] ?? null)) .
".enabled"), 1 => 1], "method");
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 6
echo " ";
if ((($context["subtype"] ?? null) ==
"content")) {
// line 7
echo " ";
$context["class"] = "g-content";
// line 8
echo " ";
echo ($context["content"] ?? null);
echo "
";
} elseif (( // line 9
($context["subtype"] ?? null) == "messages")) {
// line 10
echo " ";
$context["class"] =
"g-system-messages";
// line 11
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displaySystemMessages", [],
"method");
echo "
";
}
// line 13
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 15
echo "
";
// line 16
if (twig_trim_filter(($context["html"] ?? null))) {
// line 17
echo " <div class=\"";
echo twig_escape_filter($this->env,
(($context["class"] ?? null) .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : (""))), "html", null, true);
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/system.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 78 => 18, 73 => 17, 71 => 16, 68 =>
15, 64 => 13, 58 => 11, 55 => 10, 53 => 9, 48 => 8, 45
=> 7, 42 => 6, 39 => 5, 37 => 4, 34 => 3, 32 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/system.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/system.html.twig");
}
}
PK��[B0ۚ�?�?G84/84dafdd409b9ded5cbfb6f661ee52a328aa4569fc8cde8731dbcc1af9daeea26.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/jlparticlejs.html.twig */
class
__TwigTemplate_7771f87c8c5bd4462960ae7da194a05ed16daa8cf0a75f183cf4c73100a1aa97
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'javascript_footer' => [$this,
'block_javascript_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/jlparticlejs.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_javascript_footer($context, array $blocks = [])
{
// line 4
$this->getAttribute(($context["gantry"] ?? null),
"load", [0 => "jquery"], "method");
// line 5
echo "<script src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-theme://js/particles.min.js"),
"html", null, true);
echo "\"></script>
<script>
var \$ = jQuery;
var interact = {
\"resize\": true
};
</script>
";
// line 12
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "items", []));
foreach ($context['_seq'] as $context["_key"]
=> $context["item"]) {
// line 13
if (($this->getAttribute($context["item"],
"style", []) == 1)) {
// line 14
echo "<script>
particlesJS('";
// line 15
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "', {
\"particles\": {
\"number\": {
\"value\": ";
// line 18
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "number", []),
"html", null, true);
echo ",
\"density\": {
\"enable\": true,
\"value_area\": 490
}
},
\"color\": {
\"value\": \"#ffffff\"
},
\"shape\": {
\"type\": \"circle\"
},
\"opacity\": {
\"value\": 0.5,
\"random\": false,
\"anim\": {
\"enable\": false,
\"speed\": 1,
\"opacity_min\": 0.1,
\"sync\": false
}
},
\"size\": {
\"value\": 3,
\"random\": true,
\"anim\": {
\"enable\": false,
\"speed\": 40,
\"size_min\": 0.1,
\"sync\": false
}
},
\"line_linked\": {
\"enable\": true,
\"distance\": 150,
\"color\": \"#ffffff\",
\"opacity\": 0.4,
\"width\": 1
},
\"move\": {
\"enable\": true,
\"speed\": ";
// line 59
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "speed", []),
"html", null, true);
echo ",
\"direction\": \"none\",
\"random\": false,
\"straight\": false,
\"out_mode\": \"";
// line 63
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "outmode",
[]), "html", null, true);
echo "\",
\"attract\": {
\"enable\": false,
\"rotateX\": 600,
\"rotateY\": 1200
}
}
},
\"interactivity\": {
\"detect_on\": \"canvas\",
\"events\": interact,
\"modes\": {
\"grab\": {
\"distance\": 140,
\"line_linked\": {
\"opacity\": 1
}
},
\"bubble\": {
\"distance\": 200,
\"size\": 5,
\"duration\": 2,
\"opacity\": 8,
\"speed\": 3
},
\"repulse\": {
\"distance\": 200,
\"duration\": 0.4
},
\"push\": {
\"particles_nb\": 4
},
\"remove\": {
\"particles_nb\": 2
}
}
},
\"retina_detect\": true
});
\$(\"#";
// line 102
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"display\",
\"block\");
\$(\"#";
// line 103
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"position\",
\"relative\");
\$(\".particles-js-canvas-el\").css(\"display\",
\"block\");
\$(\".particles-js-canvas-el\").css(\"position\",
\"absolute\");
\$(\".particles-js-canvas-el\").css(\"top\",
\"0\");
\$(\".particles-js-canvas-el\").css(\"bottom\",
\"0\");
\$(\"#";
// line 110
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo " >
.particles-js-canvas-el\").css(\"z-index\", \"";
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "zindex", []),
"html", null, true);
echo "\");
</script>
";
}
// line 113
if (($this->getAttribute($context["item"],
"style", []) == 2)) {
// line 114
echo "<script>
particlesJS('";
// line 115
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "', {
\"particles\": {
\"number\": {
\"value\": ";
// line 118
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "number", []),
"html", null, true);
echo ",
\"density\": {
\"enable\": true,
\"value_area\": 490
}
},
\"color\": {
\"value\": \"#ffffff\"
},
\"shape\": {
\"type\": \"polygon\",
\"polygon\": {
\"nb_sides\": 6
}
},
\"opacity\": {
\"value\": 0.03,
\"random\": true,
\"anim\": {
\"enable\": false,
\"speed\": 1,
\"opacity_min\": 0.1,
\"sync\": false
}
},
\"size\": {
\"value\": 160,
\"random\": true,
\"anim\": {
\"enable\": false,
\"speed\": 10,
\"size_min\": 40,
\"sync\": false
}
},
\"line_linked\": {
\"enable\": false,
\"distance\": 200,
\"color\": \"#ffffff\",
\"opacity\": 0.4,
\"width\": 1
},
\"move\": {
\"enable\": true,
\"speed\": ";
// line 162
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "speed", []),
"html", null, true);
echo ",
\"direction\": \"none\",
\"random\": false,
\"straight\": false,
\"out_mode\": \"";
// line 166
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "outmode",
[]), "html", null, true);
echo "\",
\"attract\": {
\"enable\": false,
\"rotateX\": 600,
\"rotateY\": 1200
}
}
},
\"interactivity\": {
\"detect_on\": \"canvas\",
\"events\": interact,
\"modes\": {
\"grab\": {
\"distance\": 140,
\"line_linked\": {
\"opacity\": 1
}
},
\"bubble\": {
\"distance\": 200,
\"size\": 5,
\"duration\": 2,
\"opacity\": 8,
\"speed\": 3
},
\"repulse\": {
\"distance\": 200,
\"duration\": 0.4
},
\"push\": {
\"particles_nb\": 4
},
\"remove\": {
\"particles_nb\": 2
}
}
},
\"retina_detect\": true
});
\$(\"#";
// line 206
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"display\",
\"block\");
\$(\"#";
// line 207
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"position\",
\"relative\");
\$(\".particles-js-canvas-el\").css(\"display\",
\"block\");
\$(\".particles-js-canvas-el\").css(\"position\",
\"absolute\");
\$(\".particles-js-canvas-el\").css(\"top\",
\"0\");
\$(\".particles-js-canvas-el\").css(\"bottom\",
\"0\");
\$(\"#";
// line 214
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo " >
.particles-js-canvas-el\").css(\"z-index\", \"";
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "zindex", []),
"html", null, true);
echo "\");
</script>
";
}
// line 217
echo "
";
// line 218
if (($this->getAttribute($context["item"],
"style", []) == 3)) {
// line 219
echo "<script>
particlesJS('";
// line 220
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "', {
\"particles\": {
\"number\": {
\"value\": ";
// line 223
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "number", []),
"html", null, true);
echo ",
\"density\": {
\"enable\": true,
\"value_area\": 800
}
},
\"color\": {
\"value\": \"#ffffff\"
},
\"shape\": {
\"type\": \"circle\"
},
\"opacity\": {
\"value\": 0.4,
\"random\": true,
\"anim\": {
\"enable\": false,
\"speed\": 1,
\"opacity_min\": 0.1,
\"sync\": false
}
},
\"size\": {
\"value\": 10,
\"random\": true,
\"anim\": {
\"enable\": false,
\"speed\": 40,
\"size_min\": 0.1,
\"sync\": false
}
},
\"line_linked\": {
\"enable\": false,
\"distance\": 500,
\"color\": \"#ffffff\",
\"opacity\": 0.4,
\"width\": 2
},
\"move\": {
\"enable\": true,
\"speed\": ";
// line 264
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "speed", []),
"html", null, true);
echo ",
\"direction\": \"bottom\",
\"random\": false,
\"straight\": false,
\"out_mode\": \"";
// line 268
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "outmode",
[]), "html", null, true);
echo "\",
\"attract\": {
\"enable\": false,
\"rotateX\": 600,
\"rotateY\": 1200
}
}
},
\"interactivity\": {
\"detect_on\": \"canvas\",
\"events\": interact,
\"modes\": {
\"grab\": {
\"distance\": 140,
\"line_linked\": {
\"opacity\": 1
}
},
\"bubble\": {
\"distance\": 200,
\"size\": 5,
\"duration\": 2,
\"opacity\": 8,
\"speed\": 3
},
\"repulse\": {
\"distance\": 200,
\"duration\": 0.4
},
\"push\": {
\"particles_nb\": 4
},
\"remove\": {
\"particles_nb\": 2
}
}
},
\"retina_detect\": true
});
\$(\"#";
// line 308
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"display\",
\"block\");
\$(\"#";
// line 309
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"position\",
\"relative\");
\$(\".particles-js-canvas-el\").css(\"display\",
\"block\");
\$(\".particles-js-canvas-el\").css(\"position\",
\"absolute\");
\$(\".particles-js-canvas-el\").css(\"top\",
\"0\");
\$(\".particles-js-canvas-el\").css(\"bottom\",
\"0\");
\$(\"#";
// line 316
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo " >
.particles-js-canvas-el\").css(\"z-index\", \"";
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "zindex", []),
"html", null, true);
echo "\");
</script>
";
}
// line 319
echo "
";
// line 320
if (($this->getAttribute($context["item"],
"style", []) == 4)) {
// line 321
echo "<script>
particlesJS('";
// line 322
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "', ";
echo
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->htmlFilter($this->getAttribute($context["item"],
"custom", []));
echo ");
\$(\"#";
// line 323
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"display\",
\"block\");
\$(\"#";
// line 324
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo "\").css(\"position\",
\"relative\");
\$(\".particles-js-canvas-el\").css(\"display\",
\"block\");
\$(\".particles-js-canvas-el\").css(\"position\",
\"absolute\");
\$(\".particles-js-canvas-el\").css(\"top\",
\"0\");
\$(\".particles-js-canvas-el\").css(\"bottom\",
\"0\");
\$(\"#";
// line 331
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "element",
[]), "html", null, true);
echo " >
.particles-js-canvas-el\").css(\"z-index\", \"";
echo twig_escape_filter($this->env,
$this->getAttribute($context["item"], "zindex", []),
"html", null, true);
echo "\");
</script>
";
}
// line 334
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['item'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
public function getTemplateName()
{
return "@particles/jlparticlejs.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 481 => 334, 473 => 331, 463 => 324, 459
=> 323, 453 => 322, 450 => 321, 448 => 320, 445 => 319,
437 => 316, 427 => 309, 423 => 308, 380 => 268, 373 =>
264, 329 => 223, 323 => 220, 320 => 219, 318 => 218, 315
=> 217, 307 => 214, 297 => 207, 293 => 206, 250 => 166,
243 => 162, 196 => 118, 190 => 115, 187 => 114, 185 =>
113, 177 => 110, 167 => 103, 163 => 102, 121 => 63, 114
=> 59, 70 => 18, 64 => 15, 61 => 14, 59 => 13, 55 =>
12, 44 => 5, 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/jlparticlejs.html.twig",
"/home/lmsyaran/public_html/templates/g5_hydrogen/custom/particles/jlparticlejs.html.twig");
}
}
PK��[$�CRRG7c/7c1db36dc353e520853af7d315954de078a89b336c08cee39ee1b1fa4fba6a38.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/container.html.twig */
class
__TwigTemplate_09b5c7f93f00ebf9eecddef19920ea617a357d7d779f99aac25c9174282d53be
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
ob_start(function () { return ''; });
// line 2
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length -
1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
// line 3
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"),
"@nucleus/layout/container.html.twig",
3)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 4
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 6
echo "
";
// line 7
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["html"] ?? null)))) {
// line 8
echo " ";
$context["attr_id"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) ?
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) :
(("g-" . $this->getAttribute(($context["segment"] ??
null), "id", []))));
// line 9
echo " ";
$context["boxed"] =
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "boxed", []);
// line 10
echo " ";
if ( !(null === ($context["boxed"] ?? null))) {
// line 11
echo " ";
$context["boxed"] =
(((twig_trim_filter(($context["boxed"] ?? null)) ==
"")) ?
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "layout", []), "sections", [])) :
(($context["boxed"] ?? null)));
// line 12
echo " ";
}
// line 13
echo " ";
$context["class"] = ("g-wrapper" .
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? (("
" .
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []))) :
("")));
// line 14
echo " ";
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 15
echo "
";
// line 16
if (( !(null === ($context["boxed"] ?? null))
&& ((($context["boxed"] ?? null) == 0) ||
(($context["boxed"] ?? null) == 2)))) {
// line 17
echo " ";
ob_start(function () { return ''; });
// line 18
echo " <div class=\"g-container";
echo (((($context["boxed"] ?? null) == 2)) ?
(" g-flushed") : (""));
echo "\">";
echo ($context["html"] ?? null);
echo "</div>
";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 20
echo " ";
}
// line 21
echo "
";
// line 22
ob_start(function () { return ''; });
// line 23
echo " <section id=\"";
echo twig_escape_filter($this->env,
($context["attr_id"] ?? null), "html", null, true);
echo "\" class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 24
echo ($context["html"] ?? null);
echo "
</section>
";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 27
echo "
";
// line 28
if ((($context["boxed"] ?? null) == 1)) {
// line 29
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
} else {
// line 31
echo " ";
echo ($context["html"] ?? null);
echo "
";
}
}
}
public function getTemplateName()
{
return "@nucleus/layout/container.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 144 => 31, 138 => 29, 136 => 28, 133
=> 27, 127 => 24, 118 => 23, 116 => 22, 113 => 21, 110
=> 20, 102 => 18, 99 => 17, 97 => 16, 94 => 15, 91
=> 14, 88 => 13, 85 => 12, 82 => 11, 79 => 10, 76 =>
9, 73 => 8, 71 => 7, 68 => 6, 53 => 4, 50 => 3, 32
=> 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/container.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/container.html.twig");
}
}
PK��[�c�??G29/29d4555bc75a12f05c040d0fcb4fdde5551d9a77370c9e8c31060a0d4c1894f5.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/copyright.html.twig */
class
__TwigTemplate_a127e290364697c3faf8e585aec37b3916638c303ac98806ec47b924aa1cbd6d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 3
$context["start_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", []))));
// line 4
$context["end_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", []))));
// line 1
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/copyright.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 6
public function block_particle($context, array $blocks = [])
{
// line 7
echo " ©
";
// line 8
if ((($context["start_date"] ?? null) !=
($context["end_date"] ?? null))) {
echo twig_escape_filter($this->env,
($context["start_date"] ?? null));
echo " - ";
}
// line 9
echo " ";
echo twig_escape_filter($this->env,
($context["end_date"] ?? null));
echo "
";
// line 10
echo $this->getAttribute(($context["particle"] ??
null), "owner", []);
echo "
";
}
public function getTemplateName()
{
return "@particles/copyright.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 60 => 10, 55 => 9, 50 => 8, 47 => 7,
44 => 6, 39 => 1, 37 => 4, 35 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/partials/particle.html.twig' %}
{% set start_date = particle.date.start|trim in ['now',
''] ? 'now'|date('Y') : particle.date.start|e
%}
{% set end_date = particle.date.end|trim in ['now', '']
? 'now'|date('Y') : particle.date.end|e %}
{% block particle %}
©
{% if (start_date != end_date) %}{{ start_date|e }} - {% endif %}
{{ end_date|e }}
{{ particle.owner|raw }}
{% endblock %}
", "@particles/copyright.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/copyright.html.twig");
}
}
PK��[.�m� � G94/94d559c4e1a70284c733716c192e98d78a75c8dc1544bf19199ad1205bf4cdd8.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/branding.html.twig */
class
__TwigTemplate_8863d0e994c188b24f70a188b91278b618d7ba8a2d87e6cf2388567e668c5400
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/branding.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo "<div class=\"g-branding ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "css", []), "class", []), "html",
null, true);
echo "\">
";
// line 5
echo $this->getAttribute(($context["particle"] ??
null), "content", []);
echo "
</div>
";
}
public function getTemplateName()
{
return "@particles/branding.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 47 => 5, 42 => 4, 39 => 3, 29 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/partials/particle.html.twig' %}
{% block particle %}
<div class=\"g-branding {{ particle.css.class }}\">
{{ particle.content|raw }}
</div>
{% endblock %}
", "@particles/branding.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/branding.html.twig");
}
}
PK��[�{}�++G56/56e01df8b1615c5b7dde5905a0033ca9f07e7eacc41b4db73965298891533714.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/mobile-menu.html.twig */
class
__TwigTemplate_87135321b0938bf047124679e4764f4ca0101f8b8838c51897440c727e35a1a7
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/mobile-menu.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " <div id=\"g-mobilemenu-container\"
data-g-menu-breakpoint=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"], "method",
true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"],
"method"), "48rem")) : ("48rem")),
"html", null, true);
echo "\"></div>
";
}
public function getTemplateName()
{
return "@particles/mobile-menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
'@nucleus/partials/particle.html.twig' %}
{% block particle %}
<div id=\"g-mobilemenu-container\"
data-g-menu-breakpoint=\"{{
gantry.config.get('styles.breakpoints.mobile-menu-breakpoint')|default('48rem')
}}\"></div>
{% endblock %}
", "@particles/mobile-menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/mobile-menu.html.twig");
}
}
PK��[�h�J��Gb8/b8230364a3ee2f99e284f11600b42b6da543a6713c9afee82408dbab0bd19c5c.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/error_head.html.twig */
class
__TwigTemplate_39b28f50ac02ae85e088efae61adacec3448951907a90a7d3c7e032895dc015f
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_application' => [$this,
'block_head_application'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page_head.html.twig",
"partials/error_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_application($context, array $blocks = [])
{
// line 4
echo "<meta charset=\"utf-8\" />
<meta http-equiv=\"content-type\"
content=\"text/html; charset=utf-8\" />
<title>";
// line 6
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null),
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR")))
:
($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR"))),
"html", null, true);
echo "</title>
";
// line 7
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "errorPage", [0 => true],
"method");
// line 8
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 9
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head", 1 => true],
"method"), "
");
echo "
";
// line 10
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head", 1 => true],
"method"), "
");
}
public function getTemplateName()
{
return "partials/error_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 61 => 10, 56 => 9, 54 => 8, 52 => 7,
46 => 6, 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("{% extends
\"partials/page_head.html.twig\" %}
{% block head_application -%}
<meta charset=\"utf-8\" />
<meta http-equiv=\"content-type\"
content=\"text/html; charset=utf-8\" />
<title>{{ errorcode|default(500) }} {{
error|default('GANTRY5_ENGINE_UNKNOWN_ERROR'|trans)
}}</title>
{% do gantry.document.errorPage(true) -%}
{% do gantry.platform.finalize() -%}
{{ gantry.styles('head', true)|join(\"\\n
\")|raw }}
{{ gantry.scripts('head', true)|join(\"\\n
\")|raw }}
{%- endblock %}
", "partials/error_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/error_head.html.twig");
}
}
PK��[�j�
�
G68/688d04c5d0f4bd58319e5a3c4369075b95c92e22e9095779fc39e086adcb9e6c.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* error.html.twig */
class
__TwigTemplate_af13167e5635e5a97e991fead09ad10ecf6f2461b488b0be1b072b5b22904f38
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_head' => [$this,
'block_page_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"error.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_head($context, array $blocks = [])
{
// line 4
$this->loadTemplate("partials/error_head.html.twig",
"error.html.twig", 4)->display($context);
}
// line 7
public function block_content($context, array $blocks = [])
{
// line 8
echo " <h1>";
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null), "Unknown
Error")) : ("Unknown Error")), "html", null,
true);
echo "</h1>
";
// line 9
echo ($context["backtrace"] ?? null);
echo "
";
}
public function getTemplateName()
{
return "error.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 57 => 9, 50 => 8, 47 => 7, 43 => 4,
40 => 3, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "error.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/error.html.twig");
}
}
PK��[��5RRGfc/fc33865e18ed059f77ead14bbc35a3f9d27f1256b0e5c3a076c0f05a27c085d8.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page.html.twig */
class
__TwigTemplate_1add5b8116edd066e59352a202af2c53131c6f37cb73617bb2bc60e6a76c01f5
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_footer' => [$this,
'block_page_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page.html.twig",
"partials/page.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_footer($context, array $blocks = [])
{
// line 4
echo " ";
$this->displayParentBlock("page_footer", $context,
$blocks);
echo "
<jdoc:include type=\"modules\" name=\"debug\"
/>
";
}
public function getTemplateName()
{
return "partials/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page.html.twig");
}
}
PK��[S��)�<�<Gbc/bc66d9ab8ccfbebd39f65b1ea09fff56ec375f1fd1dc8b1a16c06f09fcbe7f9e.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page.html.twig */
class
__TwigTemplate_3587f42ae9dc190accd71228bf9370010e869acf0aba931ac1626b1b955ca4d7
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'content' => [$this, 'block_content'],
'page_offcanvas' => [$this,
'block_page_offcanvas'],
'page_layout' => [$this,
'block_page_layout'],
'page_top' => [$this, 'block_page_top'],
'page_bottom' => [$this,
'block_page_bottom'],
'body_top' => [$this, 'block_body_top'],
'body_bottom' => [$this,
'block_body_bottom'],
'page_head' => [$this,
'block_page_head'],
'page_footer' => [$this,
'block_page_footer'],
'page' => [$this, 'block_page'],
'page_body' => [$this,
'block_page_body'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "startTimer", [0 =>
"render", 1 => "Rendering page"],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "setLayout", [],
"method");
// line 3
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$context["segments"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "segments", [],
"method");
// line 6
ob_start(function () { return ''; });
// line 7
echo " ";
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "hasContent", [],
"method")) {
// line 8
echo " ";
$this->displayBlock('content', $context, $blocks);
// line 10
echo " ";
}
$context["content"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 13
$context["offcanvas"] = null;
// line 14
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) == "offcanvas")) {
// line 15
$context["offcanvas"] =
$context["segment"];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
ob_start(function () { return ''; });
// line 19
echo " ";
$this->displayBlock('page_offcanvas', $context,
$blocks);
$context["page_offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 26
$context["page_offcanvas"] =
((twig_trim_filter(($context["page_offcanvas"] ?? null))) ?
(twig_trim_filter(($context["page_offcanvas"] ?? null))) :
(""));
// line 27
$context["offcanvas_position"] =
((($context["page_offcanvas"] ?? null)) ?
((($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", []), "g-offcanvas-left")) :
("g-offcanvas-left"))) : (""));
// line 29
ob_start(function () { return ''; });
// line 30
echo " ";
$this->displayBlock('page_layout', $context, $blocks);
$context["page_layout"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 37
ob_start(function () { return ''; });
// line 38
echo " ";
$this->displayBlock('page_top', $context, $blocks);
// line 40
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"top"], "method"), "
");
echo "
";
$context["page_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 43
ob_start(function () { return ''; });
// line 44
echo " ";
$this->displayBlock('page_bottom', $context, $blocks);
// line 46
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"bottom"], "method"), "
");
echo "
";
$context["page_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 49
ob_start(function () { return ''; });
// line 50
echo " ";
$this->displayBlock('body_top', $context, $blocks);
// line 52
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_top"], "method"), "
");
echo "
";
$context["body_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 55
ob_start(function () { return ''; });
// line 56
echo " ";
$this->displayBlock('body_bottom', $context, $blocks);
// line 58
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_bottom"], "method"), "
");
echo "
";
$context["body_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 61
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/main.js"),
1 => 11, 2 => "footer"], "method");
// line 65
ob_start(function () { return ''; });
// line 66
echo " ";
$this->displayBlock('page_head', $context, $blocks);
$context["page_head"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 71
ob_start(function () { return ''; });
// line 72
echo " ";
$this->displayBlock('page_footer', $context, $blocks);
// line 76
echo "
";
// line 77
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "render", [],
"method");
echo "
";
$context["page_footer"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 80
$this->displayBlock('page', $context, $blocks);
}
// line 8
public function block_content($context, array $blocks = [])
{
// line 9
echo " ";
}
// line 19
public function block_page_offcanvas($context, array $blocks = [])
{
// line 20
echo " ";
if (($context["offcanvas"] ?? null)) {
// line 21
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute(($context["offcanvas"] ?? null),
"type", [])) . ".html.twig"),
"@nucleus/page.html.twig",
21)->display(twig_array_merge($context, ["segment" =>
($context["offcanvas"] ?? null)]));
}
// line 23
echo " ";
}
// line 30
public function block_page_layout($context, array $blocks = [])
{
// line 31
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) != "offcanvas")) {
// line 32
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/page.html.twig",
32)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 33
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 38
public function block_page_top($context, array $blocks = [])
{
// line 39
echo " ";
}
// line 44
public function block_page_bottom($context, array $blocks = [])
{
// line 45
echo " ";
}
// line 50
public function block_body_top($context, array $blocks = [])
{
// line 51
echo " ";
}
// line 56
public function block_body_bottom($context, array $blocks = [])
{
// line 57
echo " ";
}
// line 66
public function block_page_head($context, array $blocks = [])
{
// line 67
$this->loadTemplate("partials/page_head.html.twig",
"@nucleus/page.html.twig", 67)->display($context);
}
// line 72
public function block_page_footer($context, array $blocks = [])
{
// line 73
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 74
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "footer"],
"method"), "
");
}
// line 80
public function block_page($context, array $blocks = [])
{
// line 81
echo "<!DOCTYPE ";
echo
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[]), "html")) : ("html"));
echo ">
<html";
// line 82
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "htmlAttributes", []);
echo ">
";
// line 83
echo ($context["page_head"] ?? null);
echo "
";
// line 84
$this->displayBlock('page_body', $context, $blocks);
// line 102
echo "
</html>
";
}
// line 84
public function block_page_body($context, array $blocks = [])
{
// line 85
echo "<body";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "bodyAttributes", [0 =>
["class" => [0 => ($context["offcanvas_position"]
?? null), 1 =>
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "preset", []), 2 =>
("g-style-" .
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "preset", []))]]],
"method");
echo ">
";
// line 86
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_top", []);
echo "
";
// line 87
echo ($context["body_top"] ?? null);
echo "
";
// line 88
echo ($context["page_offcanvas"] ?? null);
echo "
<div id=\"g-page-surround\">
";
// line 90
if (twig_trim_filter(($context["page_offcanvas"] ??
null))) {
// line 91
echo "<div class=\"g-offcanvas-hide
g-offcanvas-toggle\" role=\"navigation\"
data-offcanvas-toggle aria-controls=\"g-offcanvas\"
aria-expanded=\"false\"><i class=\"fa fa-fw
fa-bars\"></i></div>";
}
// line 93
echo " ";
echo ($context["page_top"] ?? null);
echo "
";
// line 94
echo ($context["page_layout"] ?? null);
echo "
";
// line 95
echo ($context["page_bottom"] ?? null);
echo "
</div>
";
// line 97
echo ($context["body_bottom"] ?? null);
echo "
";
// line 98
echo ($context["page_footer"] ?? null);
echo "
";
// line 99
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_bottom", []);
echo "
</body>";
}
public function getTemplateName()
{
return "@nucleus/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 335 => 99, 331 => 98, 327 => 97, 322
=> 95, 318 => 94, 313 => 93, 310 => 91, 308 => 90, 303
=> 88, 299 => 87, 295 => 86, 290 => 85, 287 => 84, 281
=> 102, 279 => 84, 275 => 83, 271 => 82, 266 => 81, 263
=> 80, 258 => 74, 255 => 73, 252 => 72, 248 => 67, 245
=> 66, 241 => 57, 238 => 56, 234 => 51, 231 => 50, 227
=> 45, 224 => 44, 220 => 39, 217 => 38, 213 => 34, 203
=> 33, 200 => 32, 188 => 31, 185 => 30, 181 => 23, 177
=> 21, 174 => 20, 171 => 19, 167 => 9, 164 => 8, 160
=> 80, 155 => 77, 152 => 76, 149 => 72, 147 => 71, 143
=> 66, 141 => 65, 139 => 61, 132 => 58, 129 => 56, 127
=> 55, 120 => 52, 117 => 50, 115 => 49, 108 => 46, 105
=> 44, 103 => 43, 96 => 40, 93 => 38, 91 => 37, 87
=> 30, 85 => 29, 83 => 27, 81 => 26, 77 => 19, 75 =>
18, 68 => 15, 63 => 14, 61 => 13, 57 => 10, 54 => 8,
51 => 7, 49 => 6, 47 => 4, 45 => 3, 43 => 2, 41 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page.html.twig");
}
}
PK��[
� --Gb0/b0369b6fe8485298426ff5a11f3ea6f068db06448fce43e0299431b1d5b84063.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/atom.html.twig */
class
__TwigTemplate_cdde922329015d22ddb197f749bbf3c889830932f51f6740780e9fbbfcd04323
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/content/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/content/particle.html.twig",
"@nucleus/content/atom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
public function getTemplateName()
{
return "@nucleus/content/atom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 28 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/atom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/atom.html.twig");
}
}
PK��[�U�||Gef/ef5674fb101b4072f719628d11d9931ce79881c1213f152ef0244877e0e48f6d.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/logo.html.twig */
class
__TwigTemplate_77925af592a3d28b3fa4b41f1ebefe87af65c3b2484101efd49286551196a32e
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/logo.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["url"] =
_twig_default_filter($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "url", [])),
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"));
// line 5
echo " ";
if ((($context["url"] ?? null) ==
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"))) {
$context["rel"] = "rel=\"home\"";
}
// line 6
echo " ";
$context["class"] =
(($this->getAttribute(($context["particle"] ?? null),
"class", [])) ? ((("class=\"" .
$this->getAttribute(($context["particle"] ?? null),
"class", [])) . "\"")) : (""));
// line 7
echo " ";
$context["image"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", []));
// line 8
echo " ";
$context["height"] =
(($this->getAttribute(($context["particle"] ?? null),
"height", [])) ? ((("style=\"max-height: " .
$this->getAttribute(($context["particle"] ?? null),
"height", [])) . "\"")) : (""));
// line 9
echo "
";
// line 10
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
// line 11
echo " <a href=\"";
echo twig_escape_filter($this->env,
($context["url"] ?? null), "html", null, true);
echo "\" target=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"target", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "target", []), "_self")) :
("_self")), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" aria-label=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" ";
echo (((isset($context["rel"]) ||
array_key_exists("rel", $context))) ?
(_twig_default_filter(($context["rel"] ?? null), "")) :
(""));
echo " ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">
";
} else {
// line 12
echo "<div ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">";
}
// line 13
echo " ";
if (
!twig_test_empty($this->getAttribute(($context["particle"] ??
null), "svg", []))) {
// line 14
echo " ";
echo $this->getAttribute(($context["particle"] ??
null), "svg", []);
echo "
";
} elseif ( // line 15
($context["image"] ?? null)) {
// line 16
echo " <img src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", [])), "html", null, true);
echo "\" ";
echo (((isset($context["height"]) ||
array_key_exists("height", $context))) ?
(_twig_default_filter(($context["height"] ?? null),
"")) : (""));
echo " alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" />
";
} else {
// line 18
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"text", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "text", []), "Logo")) : ("Logo")),
"html", null, true);
echo "
";
}
// line 20
echo " ";
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
echo "</a>";
} else {
echo "</div>";
}
}
public function getTemplateName()
{
return "@particles/logo.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 111 => 20, 105 => 18, 95 => 16, 93
=> 15, 88 => 14, 85 => 13, 80 => 12, 64 => 11, 62 =>
10, 59 => 9, 56 => 8, 53 => 7, 50 => 6, 45 => 5, 42
=> 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/logo.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/logo.html.twig");
}
}
PK��[gE�SSG63/63b8cd0e8fb7a57f71d22b35c030b6a0b3aba70f90fbed38b9d3604b66719673.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/partials/particle.html.twig */
class
__TwigTemplate_ca6457be33ccd8f7a59d7fb538a6e27408672f4a3b3ec430b1f3dcea84f77f8e
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'stylesheets' => [$this,
'block_stylesheets'],
'javascript' => [$this,
'block_javascript'],
'javascript_footer' => [$this,
'block_javascript_footer'],
'particle' => [$this, 'block_particle'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 2
echo " ";
$this->displayBlock('stylesheets', $context, $blocks);
// line 4
echo "
";
// line 5
$this->displayBlock('javascript', $context, $blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 9
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "footer";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 10
echo " ";
$this->displayBlock('javascript_footer', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 14
$this->displayBlock('particle', $context, $blocks);
}
// line 2
public function block_stylesheets($context, array $blocks = [])
{
// line 3
echo " ";
}
// line 5
public function block_javascript($context, array $blocks = [])
{
// line 6
echo " ";
}
// line 10
public function block_javascript_footer($context, array $blocks = [])
{
// line 11
echo " ";
}
// line 14
public function block_particle($context, array $blocks = [])
{
}
public function getTemplateName()
{
return "@nucleus/partials/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 14, 94 => 11, 91 => 10, 87 =>
6, 84 => 5, 80 => 3, 77 => 2, 73 => 14, 68 => 10, 56
=> 9, 52 => 5, 49 => 4, 46 => 2, 34 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/partials/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/partials/particle.html.twig");
}
}
PK��[�/����G7a/7aed9bdcbe4ad0be361e314239dd14c49642f7860e62d07d3cd0342e66744837.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/spacer.html.twig */
class
__TwigTemplate_d9bd14dd1f789dc6965ea4a000d81a1237197aebefb8ce8965be61804b3f59b3
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
if ( !($context["particle"] ?? null)) {
// line 2
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 3
echo " ";
$context["spacer"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
}
// line 5
echo "
";
// line 6
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 7
echo " <div class=\"spacer";
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\"></div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/spacer.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 44 => 7, 42 => 6, 39 => 5, 35 => 3,
32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/spacer.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/spacer.html.twig");
}
}
PK��[8#�~�~�G07/07f0baa7e6bf45fea603bb3400383da91fdc63ae035a0f78ab029da05caf204e.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu.html.twig */
class
__TwigTemplate_d78cd7e21f1592cd8fb85331e65bdf60c800a088c1f51a5e9a4de99cf9b8f258
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 4
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 6
echo "
";
// line 14
echo "
";
// line 23
echo "
";
// line 32
echo "
";
// line 117
echo "
";
// line 134
echo "
";
// line 142
echo "
";
// line 155
echo "
";
// line 156
$context["macro"] = $this;
// line 157
echo "
";
// line 158
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 159
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 161
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 7
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 8
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 9
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 10
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 15
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 16
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 17
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 18
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 19
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu.html.twig", 19);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 20
($context["context"] ?? null)));
}
// line 21
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 24
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 25
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 26
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 27
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 28
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 30
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 33
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 34
echo " ";
$context["self"] = $this;
// line 35
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 36
echo " ";
$context["enabled"] = 0;
// line 37
echo " ";
}
// line 38
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 39
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 40
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 41
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 42
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 43
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 44
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 45
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 46
echo "
";
// line 47
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 48
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 49
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 50
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 51
echo " ";
}
// line 52
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 53
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 54
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 55
echo " ";
}
// line 56
echo " ";
}
// line 57
echo "
";
// line 58
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 59
echo " ";
$context["linkAttributes"] = "";
// line 60
echo "
";
// line 61
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 62
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 63
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 64
echo " ";
if (($context["key"] ==
"rel")) {
// line 65
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 66
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 67
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 68
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 69
echo "
";
}
// line 70
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 71
echo " ";
} else {
// line 72
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 73
echo " ";
}
// line 74
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 76
echo " ";
}
// line 77
echo "
";
// line 78
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 79
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 80
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 81
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 82
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 83
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 84
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 85
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 86
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 87
($context["item"] ?? null), "icon", [])) {
// line 88
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 90
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 91
echo " <span
class=\"g-menu-item-content\">
";
// line 92
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 94
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 95
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 97
echo " ";
} else {
// line 98
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 99
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 100
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 101
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 103
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 105
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 106
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 108
echo " ";
}
// line 109
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 110
echo "</div>";
}
// line 111
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 112
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 114
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 118
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 119
echo " ";
$context["self"] = $this;
// line 120
echo " <div class=\"g-grid\">
";
// line 121
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 122
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 123
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 125
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 128
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 132
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 135
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 136
echo " ";
$context["self"] = $this;
// line 137
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 138
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 139
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 143
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 144
echo " ";
$context["self"] = $this;
// line 145
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 146
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 147
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 148
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 150
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 700 => 150, 690 => 148, 685 => 147, 682
=> 146, 679 => 145, 676 => 144, 661 => 143, 639 => 139,
634 => 138, 629 => 137, 626 => 136, 611 => 135, 595 =>
132, 585 => 128, 579 => 125, 573 => 123, 568 => 122, 566
=> 121, 563 => 120, 560 => 119, 545 => 118, 528 => 114,
525 => 112, 522 => 111, 519 => 110, 513 => 109, 510 =>
108, 507 => 106, 504 => 105, 496 => 103, 488 => 101, 486
=> 100, 481 => 99, 478 => 98, 475 => 97, 472 => 95, 470
=> 94, 465 => 92, 462 => 91, 459 => 90, 453 => 88, 451
=> 87, 444 => 86, 441 => 85, 434 => 84, 422 => 83, 413
=> 82, 411 => 81, 393 => 80, 390 => 79, 388 => 78, 385
=> 77, 382 => 76, 376 => 75, 370 => 74, 367 => 73, 364
=> 72, 361 => 71, 355 => 70, 352 => 69, 349 => 68, 346
=> 67, 343 => 66, 338 => 65, 335 => 64, 330 => 63, 325
=> 62, 323 => 61, 320 => 60, 317 => 59, 315 => 58, 312
=> 57, 309 => 56, 306 => 55, 303 => 54, 300 => 53, 297
=> 52, 294 => 51, 291 => 50, 288 => 49, 285 => 48, 283
=> 47, 280 => 46, 277 => 45, 274 => 44, 271 => 43, 268
=> 42, 265 => 41, 262 => 40, 259 => 39, 256 => 38, 253
=> 37, 250 => 36, 247 => 35, 244 => 34, 229 => 33, 213
=> 30, 207 => 28, 205 => 27, 200 => 26, 197 => 25, 185
=> 24, 169 => 21, 166 => 20, 158 => 19, 153 => 18, 150
=> 17, 147 => 16, 134 => 15, 112 => 10, 109 => 9, 107
=> 8, 92 => 7, 83 => 161, 75 => 159, 73 => 158, 70
=> 157, 68 => 156, 65 => 155, 62 => 142, 59 => 134, 56
=> 117, 53 => 32, 50 => 23, 47 => 14, 44 => 6, 38 =>
4, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/menu.html.twig");
}
}
PK��[W��FZZG61/6144baffe3b459d119d06d467e8dc709a5e7c0d5ffdff7d71435fe23480212e8.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/position.html.twig */
class
__TwigTemplate_0be66d26706921a21fc24e50c98fc6613163db5bb31e30d706547d11fab9e1cb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
if ( !($context["particle"] ?? null)) {
// line 3
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 4
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 5
echo " ";
}
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 9
echo " ";
$this->loadTemplate([0 => (("particles/" .
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig"), 1 =>
(("@particles/" . (($this->getAttribute( //
line 10
($context["segment"] ?? null), "subtype", [],
"any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig")],
"@nucleus/content/position.html.twig", 9)->display($context);
// line 11
echo " ";
}
// line 12
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 14
if (twig_trim_filter(($context["html"] ?? null))) {
// line 15
echo " ";
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- START POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 16
echo "
<div class=\"g-content";
// line 17
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
// line 20
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- END POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 21
echo " ";
}
// line 22
echo "
";
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 24
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position")), "html", null, true);
echo ".</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 24, 91 => 22, 88 => 21, 82 =>
20, 77 => 18, 73 => 17, 70 => 16, 63 => 15, 61 => 14,
58 => 12, 55 => 11, 53 => 10, 51 => 9, 48 => 8, 46
=> 7, 43 => 6, 40 => 5, 37 => 4, 34 => 3, 31 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/position.html.twig");
}
}
PK��[� 6� � Gd8/d87b6008543e6dd2de9a2e995980c60bf442d899c119320ee20fb08cd5383244.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/position.html.twig */
class
__TwigTemplate_37b81844ebda9ff1a52f65edfe536daae7990b5db9600530f22f85ec7f0c1cec
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/position.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModules", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"key", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry"))]], "method");
echo "
";
}
public function getTemplateName()
{
return "@particles/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/position.html.twig");
}
}
PK��[�[�
�
G33/331ad0e829f38af4c644801d75ee115f856ce79ce367cee80dc617044bde90b4.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/copyright.html.twig */
class
__TwigTemplate_5ff95f1fc04eab7de5533d12bd302f707641757cff5d4402db6f17a4cae6ff88
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 3
$context["start_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", []))));
// line 4
$context["end_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", []))));
// line 1
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/copyright.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 6
public function block_particle($context, array $blocks = [])
{
// line 7
echo " ©
";
// line 8
if ((($context["start_date"] ?? null) !=
($context["end_date"] ?? null))) {
echo twig_escape_filter($this->env,
($context["start_date"] ?? null));
echo " - ";
}
// line 9
echo " ";
echo twig_escape_filter($this->env,
($context["end_date"] ?? null));
echo "
";
// line 10
echo $this->getAttribute(($context["particle"] ??
null), "owner", []);
echo "
";
}
public function getTemplateName()
{
return "@particles/copyright.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 60 => 10, 55 => 9, 50 => 8, 47 => 7,
44 => 6, 39 => 1, 37 => 4, 35 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/copyright.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/copyright.html.twig");
}
}
PK��[]��)E E G9c/9c1b14d571671fc8c1648b07fe804228852e0de3cf83f267f69ba46537aa3bf9.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/branding.html.twig */
class
__TwigTemplate_f7e9e657d00d8c0398e200ecdbe0be8550080cd48918ab5009c815cab4eb83c0
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/branding.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo "<div class=\"g-branding ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "css", []), "class", []), "html",
null, true);
echo "\">
";
// line 5
echo $this->getAttribute(($context["particle"] ??
null), "content", []);
echo "
</div>
";
}
public function getTemplateName()
{
return "@particles/branding.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 47 => 5, 42 => 4, 39 => 3, 29 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/branding.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/branding.html.twig");
}
}
PK��[B�/dG9c/9ce56fe63ceb3bc0eec8358b885564512f145ed733609466eaf42238aab8d354.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/offcanvas.html.twig */
class
__TwigTemplate_6845d2e8659d453cc37cc793f09e42c60293e8439b484b835b78b46fd7f3ce58
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_class"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? ((("
class=\"" . twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []))) .
"\"")) : (""));
// line 2
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["segment"]
?? null), "children", []));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length -
1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"]
=> $context["child"]) {
// line 6
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["child"], "type", []))
. ".html.twig"), "@nucleus/layout/offcanvas.html.twig",
6)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["child"], "children",
[])]));
// line 7
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['child'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$context["offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 10
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["offcanvas"] ?? null)))) {
// line 11
echo "<div id=\"g-offcanvas\" ";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo " data-g-offcanvas-swipe=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", []), "1")) : ("1")),
"html", null, true);
echo "\" data-g-offcanvas-css3=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", []), "1")) : ("1")),
"html", null, true);
echo "\">
";
// line 12
echo ($context["offcanvas"] ?? null);
// line 13
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/offcanvas.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 89 => 13, 87 => 12, 77 => 11, 75 =>
10, 60 => 7, 57 => 6, 39 => 5, 37 => 4, 34 => 3, 32
=> 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/offcanvas.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/offcanvas.html.twig");
}
}
PK��[�]��2
2
Gf8/f837ecfee3b45dbde2c139e17f26a679c0df5a53b5a6f51a7ad77de02a9888a8.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/mobile-menu.html.twig */
class
__TwigTemplate_0cc52e95647b5bb158f87ee35acb81e3e09f7b51d2a9bf69e20a8c0e7ca355c6
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/mobile-menu.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " <div id=\"g-mobilemenu-container\"
data-g-menu-breakpoint=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"], "method",
true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"get", [0 =>
"styles.breakpoints.mobile-menu-breakpoint"],
"method"), "48rem")) : ("48rem")),
"html", null, true);
echo "\"></div>
";
}
public function getTemplateName()
{
return "@particles/mobile-menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/mobile-menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/mobile-menu.html.twig");
}
}
PK��[B�/dG35/3545c0479649b40af1378230a192943cd42281a9aed2fe6e2c71e207c6a954bf.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/offcanvas.html.twig */
class
__TwigTemplate_6845d2e8659d453cc37cc793f09e42c60293e8439b484b835b78b46fd7f3ce58
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_class"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", [])) ? ((("
class=\"" . twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []))) .
"\"")) : (""));
// line 2
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 3
echo "
";
// line 4
ob_start(function () { return ''; });
// line 5
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["segment"]
?? null), "children", []));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length -
1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"]
=> $context["child"]) {
// line 6
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["child"], "type", []))
. ".html.twig"), "@nucleus/layout/offcanvas.html.twig",
6)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["child"], "children",
[])]));
// line 7
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['child'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$context["offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 10
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["offcanvas"] ?? null)))) {
// line 11
echo "<div id=\"g-offcanvas\" ";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo " data-g-offcanvas-swipe=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"swipe", []), "1")) : ("1")),
"html", null, true);
echo "\" data-g-offcanvas-css3=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", [], "any", false, true),
"css3animation", []), "1")) : ("1")),
"html", null, true);
echo "\">
";
// line 12
echo ($context["offcanvas"] ?? null);
// line 13
echo "</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/offcanvas.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 89 => 13, 87 => 12, 77 => 11, 75 =>
10, 60 => 7, 57 => 6, 39 => 5, 37 => 4, 34 => 3, 32
=> 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/offcanvas.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/offcanvas.html.twig");
}
}
PK��[d'����Gde/de5ecb97f24644d343af1cd155b6fe911701ed030968998532cddea98f7ff670.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/block.html.twig */
class
__TwigTemplate_bfeb1e9f46796fe164167ac810a60af062937591db607f208499bb0abf6635b3
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
echo "
";
// line 3
$context["class"] = ((("g-block " .
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "size", [])])) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : (""))) .
(($this->getAttribute($this->getAttribute( // line 5
($context["segment"] ?? null), "attributes", []),
"class", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 9
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 10
echo " ";
if ($this->getAttribute($context["segment"],
"content", [])) {
// line 11
echo " ";
echo
$this->getAttribute($context["segment"], "content",
[]);
echo "
";
} else {
// line 13
echo " ";
$this->loadTemplate([0 =>
(("@nucleus/content/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), 1 => (("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig")],
"@nucleus/layout/block.html.twig",
13)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 14
echo " ";
}
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if (twig_trim_filter(($context["html"] ?? null))) {
// line 20
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []),
"html", null, true);
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 21
echo twig_trim_filter(($context["html"] ?? null));
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/block.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 113 => 21, 100 => 20, 98 => 19, 94
=> 16, 80 => 15, 77 => 14, 74 => 13, 68 => 11, 65 =>
10, 47 => 9, 44 => 8, 42 => 7, 39 => 6, 37 => 5, 36
=> 4, 35 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/block.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/block.html.twig");
}
}
PK��[�qk�!�!G55/5597cef4fdde325f7b39a565f5ae98c1c4232537051ecb25b24141e8c9822405.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/section.html.twig */
class
__TwigTemplate_7391ad20b48d9b09ea5528756167abdce4af2cab7fdc3abd63999b31a5c60dea
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["tag_type"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "section")) :
("section"));
// line 2
$context["attr_id"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) ?
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) :
(("g-" . $this->getAttribute(($context["segment"] ??
null), "id", []))));
// line 3
$context["attr_class"] =
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : ("")));
// line 5
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 6
$context["boxed"] =
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "boxed", []);
// line 7
if ( !(null === ($context["boxed"] ?? null))) {
// line 8
echo " ";
$context["boxed"] =
(((twig_trim_filter(($context["boxed"] ?? null)) ==
"")) ?
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "layout", []), "sections", [])) :
(($context["boxed"] ?? null)));
}
// line 11
ob_start(function () { return ''; });
// line 12
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 13
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 14
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"),
"@nucleus/layout/section.html.twig",
14)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["html"] ?? null)))) {
// line 20
if (( !(null === ($context["boxed"] ?? null))
&& ((($context["boxed"] ?? null) == 0) ||
(($context["boxed"] ?? null) == 2)))) {
// line 21
echo " ";
ob_start(function () { return ''; });
// line 22
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 24
echo " ";
}
// line 25
echo "
";
// line 26
ob_start(function () { return ''; });
// line 27
echo " ";
if ((($context["boxed"] ?? null) == 2)) {
$context["attr_class"] =
(($context["attr_class"] ?? null) . " g-flushed");
}
// line 28
echo " ";
$context["attr_class"] =
((($context["attr_class"] ?? null)) ? ((("
class=\"" . twig_trim_filter(($context["attr_class"] ??
null))) . "\"")) : (""));
// line 29
echo "<";
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo " id=\"";
echo twig_escape_filter($this->env,
($context["attr_id"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 30
echo ($context["html"] ?? null);
echo "
</";
// line 31
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo ">";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 34
if ((($context["boxed"] ?? null) == 1)) {
// line 35
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
} else {
// line 37
echo " ";
echo ($context["html"] ?? null);
echo "
";
}
}
}
public function getTemplateName()
{
return "@nucleus/layout/section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 146 => 37, 140 => 35, 138 => 34, 134
=> 31, 130 => 30, 120 => 29, 117 => 28, 112 => 27, 110
=> 26, 107 => 25, 104 => 24, 98 => 22, 95 => 21, 93
=> 20, 91 => 19, 87 => 16, 73 => 15, 70 => 14, 52 =>
13, 49 => 12, 47 => 11, 43 => 8, 41 => 7, 39 => 6, 37
=> 5, 35 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/section.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/section.html.twig");
}
}
PK��[w��wG55/5573cfc8db9cb53a84128578cfceeaefbaf11872d835b71045aa62110aefce25.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/logo.html.twig */
class
__TwigTemplate_77925af592a3d28b3fa4b41f1ebefe87af65c3b2484101efd49286551196a32e
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/logo.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["url"] =
_twig_default_filter($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "url", [])),
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"));
// line 5
echo " ";
if ((($context["url"] ?? null) ==
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"))) {
$context["rel"] = "rel=\"home\"";
}
// line 6
echo " ";
$context["class"] =
(($this->getAttribute(($context["particle"] ?? null),
"class", [])) ? ((("class=\"" .
$this->getAttribute(($context["particle"] ?? null),
"class", [])) . "\"")) : (""));
// line 7
echo " ";
$context["image"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", []));
// line 8
echo " ";
$context["height"] =
(($this->getAttribute(($context["particle"] ?? null),
"height", [])) ? ((("style=\"max-height: " .
$this->getAttribute(($context["particle"] ?? null),
"height", [])) . "\"")) : (""));
// line 9
echo "
";
// line 10
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
// line 11
echo " <a href=\"";
echo twig_escape_filter($this->env,
($context["url"] ?? null), "html", null, true);
echo "\" target=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"target", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "target", []), "_self")) :
("_self")), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" aria-label=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" ";
echo (((isset($context["rel"]) ||
array_key_exists("rel", $context))) ?
(_twig_default_filter(($context["rel"] ?? null), "")) :
(""));
echo " ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">
";
} else {
// line 12
echo "<div ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">";
}
// line 13
echo " ";
if (
!twig_test_empty($this->getAttribute(($context["particle"] ??
null), "svg", []))) {
// line 14
echo " ";
echo $this->getAttribute(($context["particle"] ??
null), "svg", []);
echo "
";
} elseif ( // line 15
($context["image"] ?? null)) {
// line 16
echo " <img src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", [])), "html", null, true);
echo "\" ";
echo (((isset($context["height"]) ||
array_key_exists("height", $context))) ?
(_twig_default_filter(($context["height"] ?? null),
"")) : (""));
echo " alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" />
";
} else {
// line 18
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"text", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "text", []), "Logo")) : ("Logo")),
"html", null, true);
echo "
";
}
// line 20
echo " ";
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
echo "</a>";
} else {
echo "</div>";
}
}
public function getTemplateName()
{
return "@particles/logo.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 111 => 20, 105 => 18, 95 => 16, 93
=> 15, 88 => 14, 85 => 13, 80 => 12, 64 => 11, 62 =>
10, 59 => 9, 56 => 8, 53 => 7, 50 => 6, 45 => 5, 42
=> 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/logo.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/particles/logo.html.twig");
}
}
PK��[rlaF�?�?G55/559c4fcee465d02c2d323d76e20b7d39e0d522638b117d1159010c7f474778d7.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page_head.html.twig */
class
__TwigTemplate_d0d1ea7c8ee8f853d8f29c03d68b264d7bf8dcc7c9d1a4d5720d316656f095d4
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'head_stylesheets' => [$this,
'block_head_stylesheets'],
'head_platform' => [$this,
'block_head_platform'],
'head_overrides' => [$this,
'block_head_overrides'],
'head_meta' => [$this,
'block_head_meta'],
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_ie_stylesheets' => [$this,
'block_head_ie_stylesheets'],
'head' => [$this, 'block_head'],
'head_custom' => [$this,
'block_head_custom'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "assets", [],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = ["priority" => 10];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 5
echo " ";
$this->displayBlock('head_stylesheets', $context,
$blocks);
// line 15
$this->displayBlock('head_platform', $context,
$blocks);
// line 16
echo "
";
// line 17
$this->displayBlock('head_overrides', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 24
echo "<head>
";
// line 25
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_top"], "method"), "
");
echo "
";
// line 26
$this->displayBlock('head_meta', $context, $blocks);
// line 52
$this->displayBlock('head_title', $context, $blocks);
// line 56
echo "
";
// line 57
$this->displayBlock('head_application', $context,
$blocks);
// line 61
echo "
";
// line 62
$this->displayBlock('head_ie_stylesheets', $context,
$blocks);
// line 70
$this->displayBlock('head', $context, $blocks);
// line 71
echo " ";
$this->displayBlock('head_custom', $context, $blocks);
// line 76
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_bottom"], "method"), "
");
echo "
</head>
";
}
// line 5
public function block_head_stylesheets($context, array $blocks = [])
{
// line 6
if
((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", []), 1)) : (1))) {
// line 7
echo " <link rel=\"stylesheet\"
href=\"gantry-assets://css/font-awesome.min.css\"
type=\"text/css\"/>
";
}
// line 9
echo " <link rel=\"stylesheet\"
href=\"gantry-engine://css-compiled/nucleus.css\"
type=\"text/css\"/>
";
// line 10
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[]),
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))) :
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 11
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo " ";
}
// line 15
public function block_head_platform($context, array $blocks = [])
{
}
// line 17
public function block_head_overrides($context, array $blocks = [])
{
// line 18
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "overrides", []));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 19
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " ";
}
// line 26
public function block_head_meta($context, array $blocks = [])
{
// line 27
echo " <meta name=\"viewport\"
content=\"width=device-width, initial-scale=1.0\">
<meta http-equiv=\"X-UA-Compatible\"
content=\"IE=edge\" />
";
// line 29
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", [])) {
// line 30
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 31
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 32
echo " ";
if
((is_string($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $context["key"]) &&
is_string($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
= "og:") && ('' ===
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
|| 0 ===
strpos($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4,
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144))))
{
// line 33
echo " <meta
property=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
} else {
// line 35
echo " <meta
name=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
}
// line 37
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 40
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_meta"], "method"), "
");
echo "
";
// line 42
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])) {
// line 43
echo " <link rel=\"icon\"
type=\"image/x-icon\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])), "html", null,
true);
echo "\" />
";
}
// line 45
echo "
";
// line 46
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])) {
// line 47
echo " <link rel=\"apple-touch-icon\"
sizes=\"180x180\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
<link rel=\"icon\" sizes=\"192x192\"
href=\"";
// line 48
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
";
}
// line 50
echo " ";
}
// line 52
public function block_head_title($context, array $blocks = [])
{
// line 53
echo "<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\" />
<title>Title</title>";
}
// line 57
public function block_head_application($context, array $blocks = [])
{
// line 58
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head"], "method"),
"
");
echo "
";
// line 59
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head"],
"method"), "
");
}
// line 62
public function block_head_ie_stylesheets($context, array $blocks = [])
{
// line 63
echo "<!--[if (gte IE 8)&(lte IE 9)]>
<script type=\"text/javascript\" src=\"";
// line 64
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/html5shiv-printshiv.min.js"),
"html", null, true);
echo "\"></script>
<link rel=\"stylesheet\" href=\"";
// line 65
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css/nucleus-ie9.css"),
"html", null, true);
echo "\" type=\"text/css\"/>
<script type=\"text/javascript\" src=\"";
// line 66
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/matchmedia.polyfill.js"),
"html", null, true);
echo "\"></script>
<![endif]-->
";
}
// line 70
public function block_head($context, array $blocks = [])
{
}
// line 71
public function block_head_custom($context, array $blocks = [])
{
// line 72
echo " ";
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", [])) {
// line 73
echo " ";
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", []);
echo "
";
}
// line 75
echo " ";
}
public function getTemplateName()
{
return "@nucleus/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 294 => 75, 288 => 73, 285 => 72, 282
=> 71, 277 => 70, 270 => 66, 266 => 65, 262 => 64, 259
=> 63, 256 => 62, 251 => 59, 246 => 58, 243 => 57, 238
=> 53, 235 => 52, 231 => 50, 226 => 48, 221 => 47, 219
=> 46, 216 => 45, 210 => 43, 208 => 42, 202 => 40, 191
=> 37, 183 => 35, 175 => 33, 172 => 32, 168 => 31, 164
=> 30, 162 => 29, 158 => 27, 155 => 26, 151 => 21, 143
=> 19, 139 => 18, 136 => 17, 131 => 15, 127 => 13, 119
=> 11, 115 => 10, 112 => 9, 108 => 7, 106 => 6, 103
=> 5, 94 => 76, 91 => 71, 89 => 70, 87 => 62, 84 =>
61, 82 => 57, 79 => 56, 77 => 52, 75 => 26, 70 => 25,
67 => 24, 63 => 17, 60 => 16, 58 => 15, 55 => 5, 43
=> 4, 41 => 2, 39 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page_head.html.twig");
}
}
PK��[�����
�
G2c/2c326277ada22a978ccb40d94414e863502f27d1a5c12d688b2d889b21abea55.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/error_head.html.twig */
class
__TwigTemplate_34e9e6d274bbbef8834539856daa946870637d6a9f3bdd9fb7591ab80fbafdc1
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_application' => [$this,
'block_head_application'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page_head.html.twig",
"partials/error_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_application($context, array $blocks = [])
{
// line 4
echo "<meta charset=\"utf-8\" />
<meta http-equiv=\"content-type\"
content=\"text/html; charset=utf-8\" />
<title>";
// line 6
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null),
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR")))
:
($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR"))),
"html", null, true);
echo "</title>
";
// line 7
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "errorPage", [0 => true],
"method");
// line 8
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 9
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head", 1 => true],
"method"), "
");
echo "
";
// line 10
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head", 1 => true],
"method"), "
");
}
public function getTemplateName()
{
return "partials/error_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 61 => 10, 56 => 9, 54 => 8, 52 => 7,
46 => 6, 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/error_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/error_head.html.twig");
}
}
PK��[�L'���G14/148def269a01d1bd2093d0a244216542314a99a7c81c6e6e92e7def4a7a43883.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page_head.html.twig */
class
__TwigTemplate_5895549fe4011b585d0b534ca89caafbd7a394a1354cb5ebc5af31c94c405110
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_platform' => [$this,
'block_head_platform'],
'head' => [$this, 'block_head'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page_head.html.twig",
"partials/page_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_title($context, array $blocks = [])
{
}
// line 6
public function block_head_application($context, array $blocks = [])
{
// line 7
echo "<jdoc:include type=\"head\" />";
}
// line 10
public function block_head_platform($context, array $blocks = [])
{
// line 11
$this->displayParentBlock("head_platform", $context,
$blocks);
echo "
";
// line 12
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "joomla", [])) {
// line 13
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://css/bootstrap-gantry.css"),
"html", null, true);
echo "\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"";
// line 14
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css-compiled/joomla.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
// line 15
if
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "direction", []) ==
"rtl")) {
// line 16
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/bootstrap-rtl.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 18
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/icomoon.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 20
echo " ";
if ($this->getAttribute(($context["gantry"] ?? null),
"debug", [])) {
// line 21
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/cms/css/debug.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
}
// line 25
public function block_head($context, array $blocks = [])
{
// line 26
$this->displayParentBlock("head", $context, $blocks);
}
public function getTemplateName()
{
return "partials/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 100 => 26, 97 => 25, 89 => 21, 86 =>
20, 80 => 18, 74 => 16, 72 => 15, 68 => 14, 63 => 13,
61 => 12, 57 => 11, 54 => 10, 50 => 7, 47 => 6, 42
=> 3, 32 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page_head.html.twig");
}
}
PK��[rlaF�?�?Gfb/fbcd80f2a7d906d223fdcf31dd45fdabe83792edb2d2f4554df8af67baa6b99e.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page_head.html.twig */
class
__TwigTemplate_d0d1ea7c8ee8f853d8f29c03d68b264d7bf8dcc7c9d1a4d5720d316656f095d4
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'head_stylesheets' => [$this,
'block_head_stylesheets'],
'head_platform' => [$this,
'block_head_platform'],
'head_overrides' => [$this,
'block_head_overrides'],
'head_meta' => [$this,
'block_head_meta'],
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_ie_stylesheets' => [$this,
'block_head_ie_stylesheets'],
'head' => [$this, 'block_head'],
'head_custom' => [$this,
'block_head_custom'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "assets", [],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = ["priority" => 10];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 5
echo " ";
$this->displayBlock('head_stylesheets', $context,
$blocks);
// line 15
$this->displayBlock('head_platform', $context,
$blocks);
// line 16
echo "
";
// line 17
$this->displayBlock('head_overrides', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 24
echo "<head>
";
// line 25
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_top"], "method"), "
");
echo "
";
// line 26
$this->displayBlock('head_meta', $context, $blocks);
// line 52
$this->displayBlock('head_title', $context, $blocks);
// line 56
echo "
";
// line 57
$this->displayBlock('head_application', $context,
$blocks);
// line 61
echo "
";
// line 62
$this->displayBlock('head_ie_stylesheets', $context,
$blocks);
// line 70
$this->displayBlock('head', $context, $blocks);
// line 71
echo " ";
$this->displayBlock('head_custom', $context, $blocks);
// line 76
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_bottom"], "method"), "
");
echo "
</head>
";
}
// line 5
public function block_head_stylesheets($context, array $blocks = [])
{
// line 6
if
((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true),
"fontawesome", [], "any", false, true),
"enable", []), 1)) : (1))) {
// line 7
echo " <link rel=\"stylesheet\"
href=\"gantry-assets://css/font-awesome.min.css\"
type=\"text/css\"/>
";
}
// line 9
echo " <link rel=\"stylesheet\"
href=\"gantry-engine://css-compiled/nucleus.css\"
type=\"text/css\"/>
";
// line 10
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", [], "any", false, true),
"configuration", [], "any", false, true),
"css", [], "any", false, true), "persistent",
[]),
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))) :
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "files", []))));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 11
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo " ";
}
// line 15
public function block_head_platform($context, array $blocks = [])
{
}
// line 17
public function block_head_overrides($context, array $blocks = [])
{
// line 18
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "configuration", []),
"css", []), "overrides", []));
foreach ($context['_seq'] as $context["_key"]
=> $context["scss"]) {
// line 19
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$context["scss"], "html", null, true);
echo ".scss\" type=\"text/css\"/>";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['scss'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " ";
}
// line 26
public function block_head_meta($context, array $blocks = [])
{
// line 27
echo " <meta name=\"viewport\"
content=\"width=device-width, initial-scale=1.0\">
<meta http-equiv=\"X-UA-Compatible\"
content=\"IE=edge\" />
";
// line 29
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", [])) {
// line 30
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "meta", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 31
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 32
echo " ";
if
((is_string($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $context["key"]) &&
is_string($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
= "og:") && ('' ===
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144
|| 0 ===
strpos($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4,
$__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144))))
{
// line 33
echo " <meta
property=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
} else {
// line 35
echo " <meta
name=\"";
echo twig_escape_filter($this->env,
$context["key"]);
echo "\" content=\"";
echo twig_escape_filter($this->env,
$context["value"]);
echo "\" />
";
}
// line 37
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 40
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"head_meta"], "method"), "
");
echo "
";
// line 42
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])) {
// line 43
echo " <link rel=\"icon\"
type=\"image/x-icon\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "favicon", [])), "html", null,
true);
echo "\" />
";
}
// line 45
echo "
";
// line 46
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])) {
// line 47
echo " <link rel=\"apple-touch-icon\"
sizes=\"180x180\" href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
<link rel=\"icon\" sizes=\"192x192\"
href=\"";
// line 48
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []),
"assets", []), "touchicon", [])), "html",
null, true);
echo "\">
";
}
// line 50
echo " ";
}
// line 52
public function block_head_title($context, array $blocks = [])
{
// line 53
echo "<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\" />
<title>Title</title>";
}
// line 57
public function block_head_application($context, array $blocks = [])
{
// line 58
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head"], "method"),
"
");
echo "
";
// line 59
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head"],
"method"), "
");
}
// line 62
public function block_head_ie_stylesheets($context, array $blocks = [])
{
// line 63
echo "<!--[if (gte IE 8)&(lte IE 9)]>
<script type=\"text/javascript\" src=\"";
// line 64
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/html5shiv-printshiv.min.js"),
"html", null, true);
echo "\"></script>
<link rel=\"stylesheet\" href=\"";
// line 65
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css/nucleus-ie9.css"),
"html", null, true);
echo "\" type=\"text/css\"/>
<script type=\"text/javascript\" src=\"";
// line 66
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/matchmedia.polyfill.js"),
"html", null, true);
echo "\"></script>
<![endif]-->
";
}
// line 70
public function block_head($context, array $blocks = [])
{
}
// line 71
public function block_head_custom($context, array $blocks = [])
{
// line 72
echo " ";
if
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", [])) {
// line 73
echo " ";
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "head",
[]), "head_bottom", []);
echo "
";
}
// line 75
echo " ";
}
public function getTemplateName()
{
return "@nucleus/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 294 => 75, 288 => 73, 285 => 72, 282
=> 71, 277 => 70, 270 => 66, 266 => 65, 262 => 64, 259
=> 63, 256 => 62, 251 => 59, 246 => 58, 243 => 57, 238
=> 53, 235 => 52, 231 => 50, 226 => 48, 221 => 47, 219
=> 46, 216 => 45, 210 => 43, 208 => 42, 202 => 40, 191
=> 37, 183 => 35, 175 => 33, 172 => 32, 168 => 31, 164
=> 30, 162 => 29, 158 => 27, 155 => 26, 151 => 21, 143
=> 19, 139 => 18, 136 => 17, 131 => 15, 127 => 13, 119
=> 11, 115 => 10, 112 => 9, 108 => 7, 106 => 6, 103
=> 5, 94 => 76, 91 => 71, 89 => 70, 87 => 62, 84 =>
61, 82 => 57, 79 => 56, 77 => 52, 75 => 26, 70 => 25,
67 => 24, 63 => 17, 60 => 16, 58 => 15, 55 => 5, 43
=> 4, 41 => 2, 39 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/page_head.html.twig");
}
}
PK��[��<�<G80/803165c8dd9f5808f90f799d6829e282cd3ff71dcadd0eefb94bd70e6160a423.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/page.html.twig */
class
__TwigTemplate_3587f42ae9dc190accd71228bf9370010e869acf0aba931ac1626b1b955ca4d7
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'content' => [$this, 'block_content'],
'page_offcanvas' => [$this,
'block_page_offcanvas'],
'page_layout' => [$this,
'block_page_layout'],
'page_top' => [$this, 'block_page_top'],
'page_bottom' => [$this,
'block_page_bottom'],
'body_top' => [$this, 'block_body_top'],
'body_bottom' => [$this,
'block_body_bottom'],
'page_head' => [$this,
'block_page_head'],
'page_footer' => [$this,
'block_page_footer'],
'page' => [$this, 'block_page'],
'page_body' => [$this,
'block_page_body'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "startTimer", [0 =>
"render", 1 => "Rendering page"],
"method");
// line 2
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "setLayout", [],
"method");
// line 3
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "loadAtoms", [],
"method");
// line 4
$context["segments"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "segments", [],
"method");
// line 6
ob_start(function () { return ''; });
// line 7
echo " ";
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "hasContent", [],
"method")) {
// line 8
echo " ";
$this->displayBlock('content', $context, $blocks);
// line 10
echo " ";
}
$context["content"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 13
$context["offcanvas"] = null;
// line 14
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) == "offcanvas")) {
// line 15
$context["offcanvas"] =
$context["segment"];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
ob_start(function () { return ''; });
// line 19
echo " ";
$this->displayBlock('page_offcanvas', $context,
$blocks);
$context["page_offcanvas"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 26
$context["page_offcanvas"] =
((twig_trim_filter(($context["page_offcanvas"] ?? null))) ?
(twig_trim_filter(($context["page_offcanvas"] ?? null))) :
(""));
// line 27
$context["offcanvas_position"] =
((($context["page_offcanvas"] ?? null)) ?
((($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["offcanvas"]
?? null), "attributes", [], "any", false, true),
"position", []), "g-offcanvas-left")) :
("g-offcanvas-left"))) : (""));
// line 29
ob_start(function () { return ''; });
// line 30
echo " ";
$this->displayBlock('page_layout', $context, $blocks);
$context["page_layout"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 37
ob_start(function () { return ''; });
// line 38
echo " ";
$this->displayBlock('page_top', $context, $blocks);
// line 40
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"top"], "method"), "
");
echo "
";
$context["page_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 43
ob_start(function () { return ''; });
// line 44
echo " ";
$this->displayBlock('page_bottom', $context, $blocks);
// line 46
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"bottom"], "method"), "
");
echo "
";
$context["page_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 49
ob_start(function () { return ''; });
// line 50
echo " ";
$this->displayBlock('body_top', $context, $blocks);
// line 52
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_top"], "method"), "
");
echo "
";
$context["body_top"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 55
ob_start(function () { return ''; });
// line 56
echo " ";
$this->displayBlock('body_bottom', $context, $blocks);
// line 58
echo " ";
echo
twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "getHtml", [0 =>
"body_bottom"], "method"), "
");
echo "
";
$context["body_bottom"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 61
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/main.js"),
1 => 11, 2 => "footer"], "method");
// line 65
ob_start(function () { return ''; });
// line 66
echo " ";
$this->displayBlock('page_head', $context, $blocks);
$context["page_head"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 71
ob_start(function () { return ''; });
// line 72
echo " ";
$this->displayBlock('page_footer', $context, $blocks);
// line 76
echo "
";
// line 77
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "debugger", []), "render", [],
"method");
echo "
";
$context["page_footer"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 80
$this->displayBlock('page', $context, $blocks);
}
// line 8
public function block_content($context, array $blocks = [])
{
// line 9
echo " ";
}
// line 19
public function block_page_offcanvas($context, array $blocks = [])
{
// line 20
echo " ";
if (($context["offcanvas"] ?? null)) {
// line 21
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute(($context["offcanvas"] ?? null),
"type", [])) . ".html.twig"),
"@nucleus/page.html.twig",
21)->display(twig_array_merge($context, ["segment" =>
($context["offcanvas"] ?? null)]));
}
// line 23
echo " ";
}
// line 30
public function block_page_layout($context, array $blocks = [])
{
// line 31
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
foreach ($context['_seq'] as $context["_key"]
=> $context["segment"]) {
if (($this->getAttribute($context["segment"],
"type", []) != "offcanvas")) {
// line 32
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), "@nucleus/page.html.twig",
32)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 33
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'],
$context['_key'], $context['segment'],
$context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 38
public function block_page_top($context, array $blocks = [])
{
// line 39
echo " ";
}
// line 44
public function block_page_bottom($context, array $blocks = [])
{
// line 45
echo " ";
}
// line 50
public function block_body_top($context, array $blocks = [])
{
// line 51
echo " ";
}
// line 56
public function block_body_bottom($context, array $blocks = [])
{
// line 57
echo " ";
}
// line 66
public function block_page_head($context, array $blocks = [])
{
// line 67
$this->loadTemplate("partials/page_head.html.twig",
"@nucleus/page.html.twig", 67)->display($context);
}
// line 72
public function block_page_footer($context, array $blocks = [])
{
// line 73
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 74
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "footer"],
"method"), "
");
}
// line 80
public function block_page($context, array $blocks = [])
{
// line 81
echo "<!DOCTYPE ";
echo
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", [], "any", false, true),
"page", [], "any", false, true), "doctype",
[]), "html")) : ("html"));
echo ">
<html";
// line 82
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "htmlAttributes", []);
echo ">
";
// line 83
echo ($context["page_head"] ?? null);
echo "
";
// line 84
$this->displayBlock('page_body', $context, $blocks);
// line 102
echo "
</html>
";
}
// line 84
public function block_page_body($context, array $blocks = [])
{
// line 85
echo "<body";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "bodyAttributes", [0 =>
["class" => [0 => ($context["offcanvas_position"]
?? null), 1 =>
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "preset", []), 2 =>
("g-style-" .
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "preset", []))]]],
"method");
echo ">
";
// line 86
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_top", []);
echo "
";
// line 87
echo ($context["body_top"] ?? null);
echo "
";
// line 88
echo ($context["page_offcanvas"] ?? null);
echo "
<div id=\"g-page-surround\">
";
// line 90
if (twig_trim_filter(($context["page_offcanvas"] ??
null))) {
// line 91
echo "<div class=\"g-offcanvas-hide
g-offcanvas-toggle\" role=\"navigation\"
data-offcanvas-toggle aria-controls=\"g-offcanvas\"
aria-expanded=\"false\"><i class=\"fa fa-fw
fa-bars\"></i></div>";
}
// line 93
echo " ";
echo ($context["page_top"] ?? null);
echo "
";
// line 94
echo ($context["page_layout"] ?? null);
echo "
";
// line 95
echo ($context["page_bottom"] ?? null);
echo "
</div>
";
// line 97
echo ($context["body_bottom"] ?? null);
echo "
";
// line 98
echo ($context["page_footer"] ?? null);
echo "
";
// line 99
echo
$this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "body_bottom", []);
echo "
</body>";
}
public function getTemplateName()
{
return "@nucleus/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 335 => 99, 331 => 98, 327 => 97, 322
=> 95, 318 => 94, 313 => 93, 310 => 91, 308 => 90, 303
=> 88, 299 => 87, 295 => 86, 290 => 85, 287 => 84, 281
=> 102, 279 => 84, 275 => 83, 271 => 82, 266 => 81, 263
=> 80, 258 => 74, 255 => 73, 252 => 72, 248 => 67, 245
=> 66, 241 => 57, 238 => 56, 234 => 51, 231 => 50, 227
=> 45, 224 => 44, 220 => 39, 217 => 38, 213 => 34, 203
=> 33, 200 => 32, 188 => 31, 185 => 30, 181 => 23, 177
=> 21, 174 => 20, 171 => 19, 167 => 9, 164 => 8, 160
=> 80, 155 => 77, 152 => 76, 149 => 72, 147 => 71, 143
=> 66, 141 => 65, 139 => 61, 132 => 58, 129 => 56, 127
=> 55, 120 => 52, 117 => 50, 115 => 49, 108 => 46, 105
=> 44, 103 => 43, 96 => 40, 93 => 38, 91 => 37, 87
=> 30, 85 => 29, 83 => 27, 81 => 26, 77 => 19, 75 =>
18, 68 => 15, 63 => 14, 61 => 13, 57 => 10, 54 => 8,
51 => 7, 49 => 6, 47 => 4, 45 => 3, 43 => 2, 41 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/page.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/templates/page.html.twig");
}
}
PK��[eak�00Gf1/f12747840de6303a541b29a72bec94a2ad9b58a5959332374012371ae4821314.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/atom.html.twig */
class
__TwigTemplate_cdde922329015d22ddb197f749bbf3c889830932f51f6740780e9fbbfcd04323
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/content/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/content/particle.html.twig",
"@nucleus/content/atom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
public function getTemplateName()
{
return "@nucleus/content/atom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 28 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/atom.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/templates/content/atom.html.twig");
}
}
PK��[|�:�..G6a/6aa551e1bbe68ad4a57acc08ab25faa7e2c7add43370d3ad02a3e011e4b388a2.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/particle.html.twig */
class
__TwigTemplate_f89f1ea992a4b12fff4c6f4a19233abf4bcce1b993f97849ba15b99639f0db0d
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["id"] =
$this->getAttribute(($context["segment"] ?? null),
"id", []);
// line 3
echo " ";
if ( !($context["particle"] ?? null)) {
// line 4
echo " ";
if (($context["noConfig"] ?? null)) {
// line 5
echo " ";
$context["enabled"] = true;
// line 6
echo " ";
$context["particle"] =
$this->getAttribute(($context["segment"] ?? null),
"attributes", []);
// line 7
echo " ";
} else {
// line 8
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".enabled"), 1 => 1],
"method");
// line 9
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 10
echo " ";
}
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
ob_start(function () { return ''; });
// line 14
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 15
echo " ";
$this->loadTemplate([0 => (("particles/" .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".html.twig"), 1 =>
(("@particles/" . $this->getAttribute( // line
16
($context["segment"] ?? null), "subtype", [])) .
".html.twig"), 2 =>
"@nucleus/content/missing.html.twig"],
"@nucleus/content/particle.html.twig", 15)->display($context);
// line 18
echo " ";
}
// line 19
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 20
echo " ";
$context["html"] =
twig_trim_filter(($context["html"] ?? null));
// line 21
echo "
";
// line 22
$context["classes"] = twig_trim_filter((((
!($context["inContent"] ?? null)) ? ("g-content g-particle
") : ("g-particle ")) .
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " ")));
// line 23
if (($context["html"] ?? null)) {
// line 24
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- START PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
// line 25
echo "
";
// line 26
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "<div id=\"";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo "-particle\" class=\"";
echo twig_escape_filter($this->env,
($context["classes"] ?? null), "html", null, true);
echo "\">";
}
// line 27
echo " ";
echo ($context["html"] ?? null);
echo "
";
// line 28
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "</div>";
}
// line 29
echo " ";
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- END PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
}
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 33
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["segment"] ?? null),
"subtype", []), "html", null, true);
echo " particle.</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 33, 115 => 29, 111 => 28, 106
=> 27, 98 => 26, 95 => 25, 89 => 24, 87 => 23, 85 =>
22, 82 => 21, 79 => 20, 76 => 19, 73 => 18, 71 => 16,
69 => 15, 66 => 14, 64 => 13, 61 => 12, 58 => 11, 55
=> 10, 52 => 9, 49 => 8, 46 => 7, 43 => 6, 40 => 5,
37 => 4, 34 => 3, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/particle.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/templates/content/particle.html.twig");
}
}
PK��[�"��}*}*Gb3/b3fb731d7330ce0a9cabbe19c78f8561ce76a8eb71d7595c25d304541b5b92ce.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/assets.html.twig */
class
__TwigTemplate_1a53827d63dde63d20a51c72f6f86a5cb8341c3e92c5ae82c7a103e964f06fa5
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
ob_start(function () { return ''; });
// line 2
if ($this->getAttribute(($context["particle"] ??
null), "enabled", [])) {
// line 3
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "css", []));
foreach ($context['_seq'] as
$context["_key"] => $context["css"]) {
// line 4
echo " ";
$context["params"] = [];
// line 5
echo " ";
if ($this->getAttribute($context["css"],
"extra", [])) {
// line 6
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["css"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 7
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 8
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 9
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 10
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
if ($this->getAttribute($context["css"],
"location", [])) {
// line 14
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["href" => $this->getAttribute($context["css"],
"location", [])]), 1 =>
$this->getAttribute($context["css"], "priority",
[])], "method");
// line 15
echo " ";
}
// line 16
echo "
";
// line 17
if ($this->getAttribute($context["css"],
"inline", [])) {
// line 18
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineStyle", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["css"], "inline",
[])]), 1 => $this->getAttribute($context["css"],
"priority", [])], "method");
// line 19
echo " ";
}
// line 20
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['css'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo "
";
// line 22
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["particle"]
?? null), "javascript", []));
foreach ($context['_seq'] as
$context["_key"] => $context["script"]) {
// line 23
echo " ";
$context["params"] = [];
// line 24
echo " ";
if ($this->getAttribute($context["script"],
"extra", [])) {
// line 25
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute($context["script"],
"extra", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attributes"]) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attributes"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 27
echo " ";
$context["params"] =
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
[$context["key"] => $context["value"]]);
// line 28
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 29
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attributes'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 30
echo " ";
}
// line 31
echo "
";
// line 32
if ($this->getAttribute($context["script"],
"location", [])) {
// line 33
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["src" => $this->getAttribute($context["script"],
"location", [])]), 1 =>
$this->getAttribute($context["script"], "priority",
[]), 2 => ((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 34
echo " ";
}
// line 35
echo "
";
// line 36
if ($this->getAttribute($context["script"],
"inline", [])) {
// line 37
echo " ";
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "addInlineScript", [0 =>
twig_array_merge((((isset($context["params"]) ||
array_key_exists("params", $context))) ?
(_twig_default_filter(($context["params"] ?? null), [])) : ([])),
["content" =>
$this->getAttribute($context["script"], "inline",
[])]), 1 => $this->getAttribute($context["script"],
"priority", []), 2 =>
((($this->getAttribute($context["script"],
"in_footer", []) == true)) ? ("footer") :
("head"))], "method");
// line 38
echo " ";
}
// line 39
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['script'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
echo trim(preg_replace('/>\s+</',
'><', ob_get_clean()));
}
public function getTemplateName()
{
return "@particles/assets.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 164 => 39, 161 => 38, 158 => 37, 156
=> 36, 153 => 35, 150 => 34, 147 => 33, 145 => 32, 142
=> 31, 139 => 30, 133 => 29, 127 => 28, 124 => 27, 119
=> 26, 114 => 25, 111 => 24, 108 => 23, 104 => 22, 101
=> 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 =>
16, 81 => 15, 78 => 14, 76 => 13, 73 => 12, 70 => 11,
64 => 10, 58 => 9, 55 => 8, 50 => 7, 45 => 6, 42 =>
5, 39 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/assets.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/particles/assets.html.twig");
}
}
PK��[����VVGfe/fea335a779d9bb4fda1bd17f9517d4ac5dc64e9439fa60ca1b8bfc0181bc6758.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/partials/particle.html.twig */
class
__TwigTemplate_ca6457be33ccd8f7a59d7fb538a6e27408672f4a3b3ec430b1f3dcea84f77f8e
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'stylesheets' => [$this,
'block_stylesheets'],
'javascript' => [$this,
'block_javascript'],
'javascript_footer' => [$this,
'block_javascript_footer'],
'particle' => [$this, 'block_particle'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 2
echo " ";
$this->displayBlock('stylesheets', $context, $blocks);
// line 4
echo "
";
// line 5
$this->displayBlock('javascript', $context, $blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 9
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "footer";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 10
echo " ";
$this->displayBlock('javascript_footer', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 14
$this->displayBlock('particle', $context, $blocks);
}
// line 2
public function block_stylesheets($context, array $blocks = [])
{
// line 3
echo " ";
}
// line 5
public function block_javascript($context, array $blocks = [])
{
// line 6
echo " ";
}
// line 10
public function block_javascript_footer($context, array $blocks = [])
{
// line 11
echo " ";
}
// line 14
public function block_particle($context, array $blocks = [])
{
}
public function getTemplateName()
{
return "@nucleus/partials/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 14, 94 => 11, 91 => 10, 87 =>
6, 84 => 5, 80 => 3, 77 => 2, 73 => 14, 68 => 10, 56
=> 9, 52 => 5, 49 => 4, 46 => 2, 34 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/partials/particle.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/templates/partials/particle.html.twig");
}
}
PK��[aR������Gbe/be8565ba64a093351aa59b9eb75fda833de2a5fc243b8686a99310780d9cb351.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu.html.twig */
class
__TwigTemplate_d78cd7e21f1592cd8fb85331e65bdf60c800a088c1f51a5e9a4de99cf9b8f258
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 4
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 6
echo "
";
// line 14
echo "
";
// line 23
echo "
";
// line 32
echo "
";
// line 117
echo "
";
// line 134
echo "
";
// line 142
echo "
";
// line 155
echo "
";
// line 156
$context["macro"] = $this;
// line 157
echo "
";
// line 158
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 159
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 161
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 7
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 8
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 9
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 10
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 15
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 16
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 17
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 18
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 19
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu.html.twig", 19);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 20
($context["context"] ?? null)));
}
// line 21
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 24
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 25
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 26
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 27
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 28
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 30
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 33
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 34
echo " ";
$context["self"] = $this;
// line 35
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 36
echo " ";
$context["enabled"] = 0;
// line 37
echo " ";
}
// line 38
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 39
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 40
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 41
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 42
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 43
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 44
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 45
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 46
echo "
";
// line 47
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 48
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 49
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 50
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 51
echo " ";
}
// line 52
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 53
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 54
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 55
echo " ";
}
// line 56
echo " ";
}
// line 57
echo "
";
// line 58
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 59
echo " ";
$context["linkAttributes"] = "";
// line 60
echo "
";
// line 61
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 62
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 63
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 64
echo " ";
if (($context["key"] ==
"rel")) {
// line 65
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 66
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 67
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 68
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 69
echo "
";
}
// line 70
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 71
echo " ";
} else {
// line 72
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 73
echo " ";
}
// line 74
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 76
echo " ";
}
// line 77
echo "
";
// line 78
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 79
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 80
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 81
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 82
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 83
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 84
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 85
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 86
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 87
($context["item"] ?? null), "icon", [])) {
// line 88
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 90
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 91
echo " <span
class=\"g-menu-item-content\">
";
// line 92
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 94
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 95
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 97
echo " ";
} else {
// line 98
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 99
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 100
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 101
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 103
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 105
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 106
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 108
echo " ";
}
// line 109
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 110
echo "</div>";
}
// line 111
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 112
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 114
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 118
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 119
echo " ";
$context["self"] = $this;
// line 120
echo " <div class=\"g-grid\">
";
// line 121
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 122
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 123
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 125
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 128
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 132
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 135
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 136
echo " ";
$context["self"] = $this;
// line 137
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 138
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 139
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 143
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 144
echo " ";
$context["self"] = $this;
// line 145
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 146
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 147
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 148
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 150
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 700 => 150, 690 => 148, 685 => 147, 682
=> 146, 679 => 145, 676 => 144, 661 => 143, 639 => 139,
634 => 138, 629 => 137, 626 => 136, 611 => 135, 595 =>
132, 585 => 128, 579 => 125, 573 => 123, 568 => 122, 566
=> 121, 563 => 120, 560 => 119, 545 => 118, 528 => 114,
525 => 112, 522 => 111, 519 => 110, 513 => 109, 510 =>
108, 507 => 106, 504 => 105, 496 => 103, 488 => 101, 486
=> 100, 481 => 99, 478 => 98, 475 => 97, 472 => 95, 470
=> 94, 465 => 92, 462 => 91, 459 => 90, 453 => 88, 451
=> 87, 444 => 86, 441 => 85, 434 => 84, 422 => 83, 413
=> 82, 411 => 81, 393 => 80, 390 => 79, 388 => 78, 385
=> 77, 382 => 76, 376 => 75, 370 => 74, 367 => 73, 364
=> 72, 361 => 71, 355 => 70, 352 => 69, 349 => 68, 346
=> 67, 343 => 66, 338 => 65, 335 => 64, 330 => 63, 325
=> 62, 323 => 61, 320 => 60, 317 => 59, 315 => 58, 312
=> 57, 309 => 56, 306 => 55, 303 => 54, 300 => 53, 297
=> 52, 294 => 51, 291 => 50, 288 => 49, 285 => 48, 283
=> 47, 280 => 46, 277 => 45, 274 => 44, 271 => 43, 268
=> 42, 265 => 41, 262 => 40, 259 => 39, 256 => 38, 253
=> 37, 250 => 36, 247 => 35, 244 => 34, 229 => 33, 213
=> 30, 207 => 28, 205 => 27, 200 => 26, 197 => 25, 185
=> 24, 169 => 21, 166 => 20, 158 => 19, 153 => 18, 150
=> 17, 147 => 16, 134 => 15, 112 => 10, 109 => 9, 107
=> 8, 92 => 7, 83 => 161, 75 => 159, 73 => 158, 70
=> 157, 68 => 156, 65 => 155, 62 => 142, 59 => 134, 56
=> 117, 53 => 32, 50 => 23, 47 => 14, 44 => 6, 38 =>
4, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/menu.html.twig",
"/home/lmsyaran/public_html/j3/media/gantry5/engines/nucleus/particles/menu.html.twig");
}
}
PK��[W��FZZG67/67fa2020d0e6e34857cf46cff5745c6e7170653d21fce25fa5d5bbdd439b7a3f.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/position.html.twig */
class
__TwigTemplate_0be66d26706921a21fc24e50c98fc6613163db5bb31e30d706547d11fab9e1cb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
if ( !($context["particle"] ?? null)) {
// line 3
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 4
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 5
echo " ";
}
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 9
echo " ";
$this->loadTemplate([0 => (("particles/" .
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig"), 1 =>
(("@particles/" . (($this->getAttribute( //
line 10
($context["segment"] ?? null), "subtype", [],
"any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position"))) . ".html.twig")],
"@nucleus/content/position.html.twig", 9)->display($context);
// line 11
echo " ";
}
// line 12
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 14
if (twig_trim_filter(($context["html"] ?? null))) {
// line 15
echo " ";
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- START POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 16
echo "
<div class=\"g-content";
// line 17
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\">
";
// line 18
echo ($context["html"] ?? null);
echo "
</div>
";
// line 20
if (($this->getAttribute(($context["gantry"]
?? null), "debug", []) &&
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []))) {
echo "<!-- END POSITION ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "key", []),
"html", null, true);
echo " -->";
}
// line 21
echo " ";
}
// line 22
echo "
";
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 24
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "position")) :
("position")), "html", null, true);
echo ".</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 24, 91 => 22, 88 => 21, 82 =>
20, 77 => 18, 73 => 17, 70 => 16, 63 => 15, 61 => 14,
58 => 12, 55 => 11, 53 => 10, 51 => 9, 48 => 8, 46
=> 7, 43 => 6, 40 => 5, 37 => 4, 34 => 3, 31 => 2,
30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/position.html.twig");
}
}
PK��[� 6� � G01/0199d7cc2e334d94e0cba0989deffdf79285691dc2334177aa3580ecfe830365.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/position.html.twig */
class
__TwigTemplate_37b81844ebda9ff1a52f65edfe536daae7990b5db9600530f22f85ec7f0c1cec
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/position.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
echo
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "displayModules", [0 =>
$this->getAttribute(($context["particle"] ?? null),
"key", []), 1 => ["style" =>
(($this->getAttribute(($context["particle"] ?? null),
"chrome", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "chrome", []), "gantry")) :
("gantry"))]], "method");
echo "
";
}
public function getTemplateName()
{
return "@particles/position.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/position.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/position.html.twig");
}
}
PK��[�[�
�
G64/648ff221bcdedd27677285b2d05338ff16f7b10be2d85b8d4771dc5bdea6c1cb.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/copyright.html.twig */
class
__TwigTemplate_5ff95f1fc04eab7de5533d12bd302f707641757cff5d4402db6f17a4cae6ff88
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 3
$context["start_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "start", []))));
// line 4
$context["end_date"] =
((twig_in_filter(twig_trim_filter($this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", [])), [0 =>
"now", 1 => ""])) ?
(call_user_func_array($this->env->getFilter('date')->getCallable(),
[$this->env, "now", "Y"])) :
(twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "date", []), "end", []))));
// line 1
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/copyright.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 6
public function block_particle($context, array $blocks = [])
{
// line 7
echo " ©
";
// line 8
if ((($context["start_date"] ?? null) !=
($context["end_date"] ?? null))) {
echo twig_escape_filter($this->env,
($context["start_date"] ?? null));
echo " - ";
}
// line 9
echo " ";
echo twig_escape_filter($this->env,
($context["end_date"] ?? null));
echo "
";
// line 10
echo $this->getAttribute(($context["particle"] ??
null), "owner", []);
echo "
";
}
public function getTemplateName()
{
return "@particles/copyright.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 60 => 10, 55 => 9, 50 => 8, 47 => 7,
44 => 6, 39 => 1, 37 => 4, 35 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/copyright.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/copyright.html.twig");
}
}
PK��[]��)E E G93/93f69c2de7c7dd5dc8cb7f48212f8a84d3fd4bb76b758987e96f481153297c70.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/branding.html.twig */
class
__TwigTemplate_f7e9e657d00d8c0398e200ecdbe0be8550080cd48918ab5009c815cab4eb83c0
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/branding.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo "<div class=\"g-branding ";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["particle"]
?? null), "css", []), "class", []), "html",
null, true);
echo "\">
";
// line 5
echo $this->getAttribute(($context["particle"] ??
null), "content", []);
echo "
</div>
";
}
public function getTemplateName()
{
return "@particles/branding.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 47 => 5, 42 => 4, 39 => 3, 29 =>
1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/branding.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/branding.html.twig");
}
}
PK��[d'����G6c/6caaadc3671e1d1a628eb326d77df0e25a72291914e189e94ca645cfd9d93b2a.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/block.html.twig */
class
__TwigTemplate_bfeb1e9f46796fe164167ac810a60af062937591db607f208499bb0abf6635b3
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 2
echo "
";
// line 3
$context["class"] = ((("g-block " .
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "size", [])])) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : (""))) .
(($this->getAttribute($this->getAttribute( // line 5
($context["segment"] ?? null), "attributes", []),
"class", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []), "
"))) : ("")));
// line 6
echo "
";
// line 7
ob_start(function () { return ''; });
// line 8
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 9
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 10
echo " ";
if ($this->getAttribute($context["segment"],
"content", [])) {
// line 11
echo " ";
echo
$this->getAttribute($context["segment"], "content",
[]);
echo "
";
} else {
// line 13
echo " ";
$this->loadTemplate([0 =>
(("@nucleus/content/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"), 1 => (("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig")],
"@nucleus/layout/block.html.twig",
13)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 14
echo " ";
}
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if (twig_trim_filter(($context["html"] ?? null))) {
// line 20
echo " <div ";
if
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) {
echo "id=\"";
echo twig_escape_filter($this->env,
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", []),
"html", null, true);
echo "\" ";
}
echo "class=\"";
echo twig_escape_filter($this->env,
($context["class"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 21
echo twig_trim_filter(($context["html"] ?? null));
echo "
</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/layout/block.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 113 => 21, 100 => 20, 98 => 19, 94
=> 16, 80 => 15, 77 => 14, 74 => 13, 68 => 11, 65 =>
10, 47 => 9, 44 => 8, 42 => 7, 39 => 6, 37 => 5, 36
=> 4, 35 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/block.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/block.html.twig");
}
}
PK��[�qk�!�!G22/224cbf6eb62f19df79ede505aa756674e377358244ebcfd9be378ad9a27cccaa.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/layout/section.html.twig */
class
__TwigTemplate_7391ad20b48d9b09ea5528756167abdce4af2cab7fdc3abd63999b31a5c60dea
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["tag_type"] =
(($this->getAttribute(($context["segment"] ?? null),
"subtype", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["segment"]
?? null), "subtype", []), "section")) :
("section"));
// line 2
$context["attr_id"] =
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) ?
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "id", [])) :
(("g-" . $this->getAttribute(($context["segment"] ??
null), "id", []))));
// line 3
$context["attr_class"] =
($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "class", []) .
(($this->getAttribute($this->getAttribute( // line 4
($context["segment"] ?? null), "attributes", []),
"variations", [])) ? ((" " .
twig_join_filter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "variations", []), "
"))) : ("")));
// line 5
$context["attr_extra"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "extra", []));
// line 6
$context["boxed"] =
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "boxed", []);
// line 7
if ( !(null === ($context["boxed"] ?? null))) {
// line 8
echo " ";
$context["boxed"] =
(((twig_trim_filter(($context["boxed"] ?? null)) ==
"")) ?
($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "page", []), "body",
[]), "layout", []), "sections", [])) :
(($context["boxed"] ?? null)));
}
// line 11
ob_start(function () { return ''; });
// line 12
echo " ";
if ($this->getAttribute(($context["segment"] ?? null),
"children", [])) {
// line 13
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["segments"] ?? null));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) ||
(is_object($context['_seq']) &&
$context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length
- 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 ===
$length;
}
foreach ($context['_seq'] as
$context["_key"] => $context["segment"]) {
// line 14
echo " ";
$this->loadTemplate((("@nucleus/layout/" .
$this->getAttribute($context["segment"], "type",
[])) . ".html.twig"),
"@nucleus/layout/section.html.twig",
14)->display(twig_array_merge($context, ["segments" =>
$this->getAttribute($context["segment"], "children",
[])]));
// line 15
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length']))
{
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 ===
$context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['segment'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
}
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 19
if
(($this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "sticky", []) ||
twig_trim_filter(($context["html"] ?? null)))) {
// line 20
if (( !(null === ($context["boxed"] ?? null))
&& ((($context["boxed"] ?? null) == 0) ||
(($context["boxed"] ?? null) == 2)))) {
// line 21
echo " ";
ob_start(function () { return ''; });
// line 22
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 24
echo " ";
}
// line 25
echo "
";
// line 26
ob_start(function () { return ''; });
// line 27
echo " ";
if ((($context["boxed"] ?? null) == 2)) {
$context["attr_class"] =
(($context["attr_class"] ?? null) . " g-flushed");
}
// line 28
echo " ";
$context["attr_class"] =
((($context["attr_class"] ?? null)) ? ((("
class=\"" . twig_trim_filter(($context["attr_class"] ??
null))) . "\"")) : (""));
// line 29
echo "<";
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo " id=\"";
echo twig_escape_filter($this->env,
($context["attr_id"] ?? null), "html", null, true);
echo "\"";
echo ($context["attr_class"] ?? null);
echo ($context["attr_extra"] ?? null);
echo ">
";
// line 30
echo ($context["html"] ?? null);
echo "
</";
// line 31
echo twig_escape_filter($this->env,
($context["tag_type"] ?? null), "html", null, true);
echo ">";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 34
if ((($context["boxed"] ?? null) == 1)) {
// line 35
echo " <div
class=\"g-container\">";
echo ($context["html"] ?? null);
echo "</div>
";
} else {
// line 37
echo " ";
echo ($context["html"] ?? null);
echo "
";
}
}
}
public function getTemplateName()
{
return "@nucleus/layout/section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 146 => 37, 140 => 35, 138 => 34, 134
=> 31, 130 => 30, 120 => 29, 117 => 28, 112 => 27, 110
=> 26, 107 => 25, 104 => 24, 98 => 22, 95 => 21, 93
=> 20, 91 => 19, 87 => 16, 73 => 15, 70 => 14, 52 =>
13, 49 => 12, 47 => 11, 43 => 8, 41 => 7, 39 => 6, 37
=> 5, 35 => 4, 34 => 3, 32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/layout/section.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/layout/section.html.twig");
}
}
PK��[�����
�
Gd9/d93dc4fd7bf0e5bbe20056eddc5effe5213f176c6e3a3f403f2a3200e859a8a2.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/error_head.html.twig */
class
__TwigTemplate_34e9e6d274bbbef8834539856daa946870637d6a9f3bdd9fb7591ab80fbafdc1
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_application' => [$this,
'block_head_application'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page_head.html.twig",
"partials/error_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_application($context, array $blocks = [])
{
// line 4
echo "<meta charset=\"utf-8\" />
<meta http-equiv=\"content-type\"
content=\"text/html; charset=utf-8\" />
<title>";
// line 6
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null),
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR")))
:
($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->transFilter("GANTRY5_ENGINE_UNKNOWN_ERROR"))),
"html", null, true);
echo "</title>
";
// line 7
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "document", []), "errorPage", [0 => true],
"method");
// line 8
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "platform", []), "finalize", [],
"method");
// line 9
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "styles", [0 => "head", 1 => true],
"method"), "
");
echo "
";
// line 10
echo
twig_join_filter($this->getAttribute(($context["gantry"] ??
null), "scripts", [0 => "head", 1 => true],
"method"), "
");
}
public function getTemplateName()
{
return "partials/error_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 61 => 10, 56 => 9, 54 => 8, 52 => 7,
46 => 6, 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/error_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/error_head.html.twig");
}
}
PK��[�L'���Gf5/f5b0c2914fc05749ddeb728df8cbeb852a105cb6701c311e5b4fa0b76d16b2e1.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page_head.html.twig */
class
__TwigTemplate_5895549fe4011b585d0b534ca89caafbd7a394a1354cb5ebc5af31c94c405110
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'head_title' => [$this,
'block_head_title'],
'head_application' => [$this,
'block_head_application'],
'head_platform' => [$this,
'block_head_platform'],
'head' => [$this, 'block_head'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page_head.html.twig",
"partials/page_head.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_title($context, array $blocks = [])
{
}
// line 6
public function block_head_application($context, array $blocks = [])
{
// line 7
echo "<jdoc:include type=\"head\" />";
}
// line 10
public function block_head_platform($context, array $blocks = [])
{
// line 11
$this->displayParentBlock("head_platform", $context,
$blocks);
echo "
";
// line 12
if
($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "theme", []), "joomla", [])) {
// line 13
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://css/bootstrap-gantry.css"),
"html", null, true);
echo "\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"";
// line 14
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css-compiled/joomla.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
// line 15
if
(($this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "page", []), "direction", []) ==
"rtl")) {
// line 16
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/bootstrap-rtl.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 18
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/jui/css/icomoon.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
// line 20
echo " ";
if ($this->getAttribute(($context["gantry"] ?? null),
"debug", [])) {
// line 21
echo " <link rel=\"stylesheet\"
href=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("media/cms/css/debug.css"),
"html", null, true);
echo "\" type=\"text/css\" />
";
}
}
// line 25
public function block_head($context, array $blocks = [])
{
// line 26
$this->displayParentBlock("head", $context, $blocks);
}
public function getTemplateName()
{
return "partials/page_head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 100 => 26, 97 => 25, 89 => 21, 86 =>
20, 80 => 18, 74 => 16, 72 => 15, 68 => 14, 63 => 13,
61 => 12, 57 => 11, 54 => 10, 50 => 7, 47 => 6, 42
=> 3, 32 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page_head.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page_head.html.twig");
}
}
PK��[�z&�
�
Gcf/cf4370298d0433a4ea201205c02654bc9f83e5e8789eddfa8ed8cf78564a6b31.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* error.html.twig */
class
__TwigTemplate_b71754fe98b2486bc9114ee41796e4a64d0bc5ab5e2f250153e562f9521d64fc
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_head' => [$this,
'block_page_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("partials/page.html.twig",
"error.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_head($context, array $blocks = [])
{
// line 4
$this->loadTemplate("partials/error_head.html.twig",
"error.html.twig", 4)->display($context);
}
// line 7
public function block_content($context, array $blocks = [])
{
// line 8
echo " <h1>";
echo twig_escape_filter($this->env,
(((isset($context["errorcode"]) ||
array_key_exists("errorcode", $context))) ?
(_twig_default_filter(($context["errorcode"] ?? null), 500)) :
(500)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
(((isset($context["error"]) ||
array_key_exists("error", $context))) ?
(_twig_default_filter(($context["error"] ?? null), "Unknown
Error")) : ("Unknown Error")), "html", null,
true);
echo "</h1>
";
// line 9
echo ($context["backtrace"] ?? null);
echo "
";
}
public function getTemplateName()
{
return "error.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 57 => 9, 50 => 8, 47 => 7, 43 => 4,
40 => 3, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "error.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/error.html.twig");
}
}
PK��[��jRRG79/792111a238f91ef295af6aae9a74faadde6ee49c217c18944fc35fc4a2947904.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partials/page.html.twig */
class
__TwigTemplate_59ae8abb2321bae78d42709bae6871e8af2646fe8ef8eb6ba26825f012cb9c79
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'page_footer' => [$this,
'block_page_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/page.html.twig",
"partials/page.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_page_footer($context, array $blocks = [])
{
// line 4
echo " ";
$this->displayParentBlock("page_footer", $context,
$blocks);
echo "
<jdoc:include type=\"modules\" name=\"debug\"
/>
";
}
public function getTemplateName()
{
return "partials/page.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 42 => 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"partials/page.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/twig/partials/page.html.twig");
}
}
PK��[��_--Gc5/c561188e6bbdba85209a3584ba9deb194071a3595d5e6d8a3e7624c0b35fca04.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/atom.html.twig */
class
__TwigTemplate_602c6bcbdacf3f5f5d67657f03a6c92fcee43a94a6f1b35cd45a2147b2831642
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/content/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/content/particle.html.twig",
"@nucleus/content/atom.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
public function getTemplateName()
{
return "@nucleus/content/atom.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 28 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/atom.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/atom.html.twig");
}
}
PK��[��Z++Gd7/d7a0bf0fc62442da637f6e9eb8bcb34fb11f559ab7ff98411adf15e3b2b47762.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/particle.html.twig */
class
__TwigTemplate_1b4e14f886ad1f531e982ec1a2a653bbb64381623041587cbc33353e6dee1be8
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["id"] =
$this->getAttribute(($context["segment"] ?? null),
"id", []);
// line 3
echo " ";
if ( !($context["particle"] ?? null)) {
// line 4
echo " ";
if (($context["noConfig"] ?? null)) {
// line 5
echo " ";
$context["enabled"] = true;
// line 6
echo " ";
$context["particle"] =
$this->getAttribute(($context["segment"] ?? null),
"attributes", []);
// line 7
echo " ";
} else {
// line 8
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".enabled"), 1 => 1],
"method");
// line 9
echo " ";
$context["particle"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
// line 10
echo " ";
}
// line 11
echo " ";
}
// line 12
echo "
";
// line 13
ob_start(function () { return ''; });
// line 14
echo " ";
if ((($context["enabled"] ?? null) && ((null
===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 15
echo " ";
$this->loadTemplate([0 => (("particles/" .
$this->getAttribute(($context["segment"] ?? null),
"subtype", [])) . ".html.twig"), 1 =>
(("@particles/" . $this->getAttribute( // line
16
($context["segment"] ?? null), "subtype", [])) .
".html.twig"), 2 =>
"@nucleus/content/missing.html.twig"],
"@nucleus/content/particle.html.twig", 15)->display($context);
// line 18
echo " ";
}
// line 19
echo " ";
$context["html"] = ('' === $tmp =
ob_get_clean()) ? '' : new Markup($tmp,
$this->env->getCharset());
// line 20
echo " ";
$context["html"] =
twig_trim_filter(($context["html"] ?? null));
// line 21
echo "
";
// line 22
$context["classes"] = twig_trim_filter((((
!($context["inContent"] ?? null)) ? ("g-content g-particle
") : ("g-particle ")) .
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " ")));
// line 23
if (($context["html"] ?? null)) {
// line 24
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- START PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
// line 25
echo "
";
// line 26
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "<div id=\"";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo "-particle\" class=\"";
echo twig_escape_filter($this->env,
($context["classes"] ?? null), "html", null, true);
echo "\">";
}
// line 27
echo " ";
echo ($context["html"] ?? null);
echo "
";
// line 28
if ( !(isset($context["ajax"]) ||
array_key_exists("ajax", $context))) {
echo "</div>";
}
// line 29
echo " ";
if ($this->getAttribute(($context["gantry"] ??
null), "debug", [])) {
echo "<!-- END PARTICLE ";
echo twig_escape_filter($this->env,
($context["id"] ?? null), "html", null, true);
echo " -->";
}
}
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 33
echo " <div class=\"alert
alert-error\"><strong>Error</strong> while rendering
";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["segment"] ?? null),
"subtype", []), "html", null, true);
echo " particle.</div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 33, 115 => 29, 111 => 28, 106
=> 27, 98 => 26, 95 => 25, 89 => 24, 87 => 23, 85 =>
22, 82 => 21, 79 => 20, 76 => 19, 73 => 18, 71 => 16,
69 => 15, 66 => 14, 64 => 13, 61 => 12, 58 => 11, 55
=> 10, 52 => 9, 49 => 8, 46 => 7, 43 => 6, 40 => 5,
37 => 4, 34 => 3, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/particle.html.twig");
}
}
PK��[=||G42/42cb7f7461d4e9db9032539eed17f61d1d9d3ac06c559d4572dd53a37e038049.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/logo.html.twig */
class
__TwigTemplate_273ae843dacf43aa56965f911e0980d4b302cf97d276a964bc2a9a779cb056fb
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->blocks = [
'particle' => [$this, 'block_particle'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/partials/particle.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent =
$this->loadTemplate("@nucleus/partials/particle.html.twig",
"@particles/logo.html.twig", 1);
$this->parent->display($context,
array_merge($this->blocks, $blocks));
}
// line 3
public function block_particle($context, array $blocks = [])
{
// line 4
echo " ";
$context["url"] =
_twig_default_filter($this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "url", [])),
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"));
// line 5
echo " ";
if ((($context["url"] ?? null) ==
$this->getAttribute(($context["gantry"] ?? null),
"siteUrl", [], "method"))) {
$context["rel"] = "rel=\"home\"";
}
// line 6
echo " ";
$context["class"] =
(($this->getAttribute(($context["particle"] ?? null),
"class", [])) ? ((("class=\"" .
$this->getAttribute(($context["particle"] ?? null),
"class", [])) . "\"")) : (""));
// line 7
echo " ";
$context["image"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", []));
// line 8
echo " ";
$context["height"] =
(($this->getAttribute(($context["particle"] ?? null),
"height", [])) ? ((("style=\"max-height: " .
$this->getAttribute(($context["particle"] ?? null),
"height", [])) . "\"")) : (""));
// line 9
echo "
";
// line 10
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
// line 11
echo " <a href=\"";
echo twig_escape_filter($this->env,
($context["url"] ?? null), "html", null, true);
echo "\" target=\"";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"target", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "target", []), "_self")) :
("_self")), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" aria-label=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" ";
echo (((isset($context["rel"]) ||
array_key_exists("rel", $context))) ?
(_twig_default_filter(($context["rel"] ?? null), "")) :
(""));
echo " ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">
";
} else {
// line 12
echo "<div ";
echo (((isset($context["class"]) ||
array_key_exists("class", $context))) ?
(_twig_default_filter(($context["class"] ?? null), ""))
: (""));
echo ">";
}
// line 13
echo " ";
if (
!twig_test_empty($this->getAttribute(($context["particle"] ??
null), "svg", []))) {
// line 14
echo " ";
echo $this->getAttribute(($context["particle"] ??
null), "svg", []);
echo "
";
} elseif ( // line 15
($context["image"] ?? null)) {
// line 16
echo " <img src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["particle"]
?? null), "image", [])), "html", null, true);
echo "\" ";
echo (((isset($context["height"]) ||
array_key_exists("height", $context))) ?
(_twig_default_filter(($context["height"] ?? null),
"")) : (""));
echo " alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["particle"] ?? null),
"text", []), "html", null, true);
echo "\" />
";
} else {
// line 18
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["particle"] ?? null),
"text", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "text", []), "Logo")) : ("Logo")),
"html", null, true);
echo "
";
}
// line 20
echo " ";
if (($this->getAttribute(($context["particle"] ??
null), "link", []) == true)) {
echo "</a>";
} else {
echo "</div>";
}
}
public function getTemplateName()
{
return "@particles/logo.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 111 => 20, 105 => 18, 95 => 16, 93
=> 15, 88 => 14, 85 => 13, 80 => 12, 64 => 11, 62 =>
10, 59 => 9, 56 => 8, 53 => 7, 50 => 6, 45 => 5, 42
=> 4, 39 => 3, 29 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/logo.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/logo.html.twig");
}
}
PK��[�N��SSGf0/f0cdc5d5c360a2da8c3af85fb0bc292586174c6feabcfb15a631a578721a49d4.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/partials/particle.html.twig */
class
__TwigTemplate_a2ab00ad970cd8bd04ec73919ef1f876105f6403df96ef1cfbb251efd60f285a
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'stylesheets' => [$this,
'block_stylesheets'],
'javascript' => [$this,
'block_javascript'],
'javascript_footer' => [$this,
'block_javascript_footer'],
'particle' => [$this, 'block_particle'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "head";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 2
echo " ";
$this->displayBlock('stylesheets', $context, $blocks);
// line 4
echo "
";
// line 5
$this->displayBlock('javascript', $context, $blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 9
$assetFunction =
$this->env->getFunction('parse_assets')->getCallable();
$assetVariables = [];
if ($assetVariables && !is_array($assetVariables)) {
throw new UnexpectedValueException('{% scripts with x %}:
x is not an array');
}
$location = "footer";
if ($location && !is_string($location)) {
throw new UnexpectedValueException('{% scripts in x %}: x
is not a string');
}
$priority = isset($assetVariables['priority']) ?
$assetVariables['priority'] : 0;
ob_start();
// line 10
echo " ";
$this->displayBlock('javascript_footer', $context,
$blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 14
$this->displayBlock('particle', $context, $blocks);
}
// line 2
public function block_stylesheets($context, array $blocks = [])
{
// line 3
echo " ";
}
// line 5
public function block_javascript($context, array $blocks = [])
{
// line 6
echo " ";
}
// line 10
public function block_javascript_footer($context, array $blocks = [])
{
// line 11
echo " ";
}
// line 14
public function block_particle($context, array $blocks = [])
{
}
public function getTemplateName()
{
return "@nucleus/partials/particle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 14, 94 => 11, 91 => 10, 87 =>
6, 84 => 5, 80 => 3, 77 => 2, 73 => 14, 68 => 10, 56
=> 9, 52 => 5, 49 => 4, 46 => 2, 34 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/partials/particle.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/partials/particle.html.twig");
}
}
PK��[>L����G50/50449965f5824704f402bc59ffd7d86b0afecdc6e1dfad741b5a136412559540.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @nucleus/content/spacer.html.twig */
class
__TwigTemplate_f2609fe2da342f85627bedb4d00acfb50d50a746d345ecea596983541838aea1
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
if ( !($context["particle"] ?? null)) {
// line 2
echo " ";
$context["enabled"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "get", [0 =>
(("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])) . ".enabled"), 1 => 1],
"method");
// line 3
echo " ";
$context["spacer"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "config", []), "getJoined", [0 =>
("particles." .
$this->getAttribute(($context["segment"] ?? null),
"type", [])), 1 =>
$this->getAttribute(($context["segment"] ?? null),
"attributes", [])], "method");
}
// line 5
echo "
";
// line 6
if ((($context["enabled"] ?? null) && ((null ===
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])) ||
$this->getAttribute($this->getAttribute(($context["segment"]
?? null), "attributes", []), "enabled", [])))) {
// line 7
echo " <div class=\"spacer";
(($this->getAttribute(($context["segment"] ??
null), "classes", [])) ? (print
(twig_escape_filter($this->env, (" " .
twig_escape_filter($this->env,
twig_join_filter($this->getAttribute(($context["segment"] ??
null), "classes", []), " "))), "html", null,
true))) : (print ("")));
echo "\"></div>
";
}
}
public function getTemplateName()
{
return "@nucleus/content/spacer.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 44 => 7, 42 => 6, 39 => 5, 35 => 3,
32 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@nucleus/content/spacer.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/templates/content/spacer.html.twig");
}
}
PK��[�I|~�~�G87/87b839f42f3ea20f1a3ba065dcce5553a4005633920fd59cf0c62020043e29c0.phpnu�[���<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @particles/menu.html.twig */
class
__TwigTemplate_27bc786e40ed5c0d44a0d8e33e804a749baff60b7cdd20abfcadf8d211ae7a4c
extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
try { // line 2
echo " ";
$context["menu"] =
$this->getAttribute($this->getAttribute(($context["gantry"]
?? null), "menu", []), "instance", [0 =>
($context["particle"] ?? null)], "method");
} catch (\Exception $e) {
if ($context['gantry']->debug()) throw $e;
GANTRY_DEBUGGER &&
method_exists('Gantry\Debugger', 'addException')
&& \Gantry\Debugger::addException($e);
$context['e'] = $e;
// line 4
echo " <div class=\"alert
alert-error\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["e"] ?? null),
"getMessage", []), "html", null, true);
echo "</div>
";
}
// line 6
echo "
";
// line 14
echo "
";
// line 23
echo "
";
// line 32
echo "
";
// line 117
echo "
";
// line 134
echo "
";
// line 142
echo "
";
// line 155
echo "
";
// line 156
$context["macro"] = $this;
// line 157
echo "
";
// line 158
if
($this->getAttribute($this->getAttribute(($context["menu"]
?? null), "root", []), "count", [],
"method")) {
// line 159
echo " <nav class=\"g-main-nav\"";
echo (($this->getAttribute(($context["particle"]
?? null), "mobileTarget", [])) ? ("
data-g-mobile-target") : (""));
echo " data-g-hover-expand=\"";
echo (((($this->getAttribute(($context["particle"]
?? null), "hoverExpand", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["particle"]
?? null), "hoverExpand", []), "true")) :
("true"))) ? ("true") : ("false"));
echo "\">
<ul class=\"g-toplevel\">
";
// line 161
echo
$context["macro"]->getdisplayItems($this->getAttribute(($context["menu"]
?? null), "root", []), ($context["menu"] ?? null),
$context);
echo "
</ul>
</nav>
";
}
}
// line 7
public function getgetCustomWidth($__item__ = null, $__menu__ = null,
$__mode__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"mode" => $__mode__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 8
if ((((($this->getAttribute(($context["item"] ??
null), "width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && !((($context["dropdown_type"] ??
null) == "fullwidth") &&
($this->getAttribute(($context["item"] ?? null),
"level", []) > 1)))) {
// line 9
if ((($context["mode"] ?? null) ==
"item")) {
echo " style=\"position:
relative;\"";
} elseif (( // line 10
($context["mode"] ?? null) == "submenu")) {
echo " style=\"width:";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo ";\" data-g-item-width=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"width", []), "html", null, true);
echo "\"";
}
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 15
public function getdisplayParticle($__item__ = null, $__context__ =
null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"context" => $__context__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 16
echo " ";
$context["context"] =
twig_array_merge(($context["context"] ?? null),
["particle" =>
$this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", [])]);
// line 17
echo " ";
$context["classes"] =
$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "block", []),
"class", []);
// line 18
echo " <div class=\"menu-item-particle";
((($context["classes"] ?? null)) ? (print
(twig_escape_filter($this->env, (" " .
($context["classes"] ?? null)), "html", null, true))) :
(print ("")));
echo "\">
";
// line 19
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= null;
try {
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4
= $this->loadTemplate([0 => (("particles/"
. $this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig"), 1 =>
(("@particles/" .
$this->getAttribute(($context["item"] ?? null),
"particle", [])) . ".html.twig")],
"@particles/menu.html.twig", 19);
} catch (LoaderError $e) {
// ignore missing template
}
if
($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4)
{
$__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display(twig_to_array(
// line 20
($context["context"] ?? null)));
}
// line 21
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 24
public function getdisplayTitle($__item__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 25
echo " ";
if (( !$this->getAttribute(($context["item"] ??
null), "icon_only", []) ||
!($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) {
// line 26
echo " <span
class=\"g-menu-item-title\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "</span>
";
// line 27
if ($this->getAttribute(($context["item"] ??
null), "subtitle", [])) {
// line 28
echo " <span
class=\"g-menu-item-subtitle\">";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"subtitle", []), "html", null, true);
echo "</span>
";
}
// line 30
echo " ";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 33
public function getdisplayItem($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 34
echo " ";
$context["self"] = $this;
// line 35
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "type", []) == "particle") &&
!$this->getAttribute($this->getAttribute($this->getAttribute(($context["item"]
?? null), "options", []), "particle", []),
"enabled", []))) {
// line 36
echo " ";
$context["enabled"] = 0;
// line 37
echo " ";
}
// line 38
echo " ";
if ((($this->getAttribute(($context["item"] ??
null), "visible", []) &&
$this->getAttribute(($context["item"] ?? null),
"enabled", [])) &&
(((isset($context["enabled"]) ||
array_key_exists("enabled", $context))) ?
(_twig_default_filter(($context["enabled"] ?? null), 1)) : (1))))
{
// line 39
echo " ";
$context["title"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) ||
$this->getAttribute(($context["item"] ?? null),
"link_title", []))) ? (((" title=\"" .
twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"link_title", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "link_title", []),
$this->getAttribute(($context["item"] ?? null),
"title", []))) :
($this->getAttribute(($context["item"] ?? null),
"title", []))))) . "\"")) : (""));
// line 40
echo " ";
$context["label"] =
((($this->getAttribute(($context["item"] ?? null),
"icon_only", []) &&
($this->getAttribute(($context["item"] ?? null),
"image", []) ||
$this->getAttribute(($context["item"] ?? null),
"icon", [])))) ? (((" aria-label=\"" .
twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []))) . "\"")) : (""));
// line 41
echo " ";
$context["active"] =
(($this->getAttribute(($context["menu"] ?? null),
"isActive", [0 => ($context["item"] ?? null)],
"method")) ? (" active") : (""));
// line 42
echo " ";
$context["dropdown"] =
((($this->getAttribute(($context["item"] ?? null),
"level", []) == 1)) ? ((" g-" .
$this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method"))) : (""));
// line 43
echo " ";
$context["parent"] =
(($this->getAttribute(($context["item"] ?? null),
"children", [])) ? (" g-parent") : (""));
// line 44
echo " ";
$context["target"] =
(((($this->getAttribute(($context["item"] ?? null),
"target", []) != "_self") ||
$this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", []), "forceTarget", []))) ?
(((" target=\"" . twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"target", []))) . "\"")) : (""));
// line 45
echo " ";
$context["rel"] =
$this->getAttribute(($context["item"] ?? null),
"rel", []);
// line 46
echo "
";
// line 47
if (($this->getAttribute(($context["item"] ??
null), "target", []) == "_blank")) {
// line 48
echo " ";
if (!twig_in_filter("noopener",
($context["rel"] ?? null))) {
// line 49
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 50
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noopener");
// line 51
echo " ";
}
// line 52
echo " ";
if (!twig_in_filter("noreferrer",
($context["rel"] ?? null))) {
// line 53
echo " ";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 54
echo " ";
$context["rel"] =
(($context["rel"] ?? null) . "noreferrer");
// line 55
echo " ";
}
// line 56
echo " ";
}
// line 57
echo "
";
// line 58
$context["listAttributes"] =
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->attributeArrayFilter($this->getAttribute(($context["item"]
?? null), "attributes", []));
// line 59
echo " ";
$context["linkAttributes"] = "";
// line 60
echo "
";
// line 61
if ($this->getAttribute(($context["item"] ??
null), "link_attributes", [])) {
// line 62
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($this->getAttribute(($context["item"]
?? null), "link_attributes", []));
foreach ($context['_seq'] as
$context["_key"] => $context["attribute"]) {
// line 63
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable($context["attribute"]);
foreach ($context['_seq'] as
$context["key"] => $context["value"]) {
// line 64
echo " ";
if (($context["key"] ==
"rel")) {
// line 65
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(twig_split_filter($this->env,
$context["value"], " "));
foreach ($context['_seq'] as
$context["_key"] => $context["hVal"]) {
// line 66
echo "
";
if
(!twig_in_filter($context["hVal"], ($context["rel"] ??
null))) {
// line 67
echo "
";
$context["rel"] =
((($context["rel"] ?? null)) ? ((($context["rel"] ??
null) . " ")) : (($context["rel"] ?? null)));
// line 68
echo "
";
$context["rel"] =
(($context["rel"] ?? null) . $context["hVal"]);
// line 69
echo "
";
}
// line 70
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['hVal'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context,
$_parent) + $_parent;
// line 71
echo " ";
} else {
// line 72
echo " ";
$context["linkAttributes"] =
(((((($context["linkAttributes"] ?? null) . " ") .
twig_escape_filter($this->env, $context["key"])) .
"=\"") . twig_escape_filter($this->env,
$context["value"], "html_attr")) .
"\"");
// line 73
echo " ";
}
// line 74
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['key'],
$context['value'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent)
+ $_parent;
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['attribute'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) +
$_parent;
// line 76
echo " ";
}
// line 77
echo "
";
// line 78
$context["rel"] = ((($context["rel"] ??
null)) ? (((" rel=\"" . twig_escape_filter($this->env,
($context["rel"] ?? null), "html_attr")) .
"\"")) : (""));
// line 79
echo "
<li class=\"g-menu-item g-menu-item-type-";
// line 80
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"type", []), "html", null, true);
echo " g-menu-item-";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"id", []), "html", null, true);
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
echo twig_escape_filter($this->env,
($context["parent"] ?? null), "html", null, true);
}
echo twig_escape_filter($this->env,
($context["active"] ?? null), "html", null, true);
echo twig_escape_filter($this->env,
($context["dropdown"] ?? null), "html", null, true);
echo " ";
if (($this->getAttribute(($context["item"] ??
null), "url", []) &&
$this->getAttribute(($context["item"] ?? null),
"children", []))) {
if (
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", [])) {
echo "g-menu-item-link-parent";
}
}
echo " ";
echo twig_escape_filter($this->env,
(($this->getAttribute(($context["item"] ?? null),
"class", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "class", []), "")) : ("")),
"html", null, true);
echo "\"";
// line 81
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "item",
($context["dropdown"] ?? null));
// line 82
if
((($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute($this->getAttribute(($context["context"]
?? null), "particle", [], "any", false, true),
"renderTitles", []), 0)) : (0))) {
echo " title=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\"";
}
echo ($context["listAttributes"] ?? null);
echo ">
";
// line 83
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "<a
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\" href=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"url", []), "html", null, true);
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"hash", []), "html", null, true);
echo "\"";
echo ((((($context["title"] ?? null) .
($context["label"] ?? null)) . ($context["target"] ??
null)) . ($context["rel"] ?? null)) .
($context["linkAttributes"] ?? null));
echo ">
";
} else {
// line 84
echo "<div
class=\"g-menu-item-container";
(($this->getAttribute(($context["item"] ??
null), "anchor_class", [])) ? (print
(twig_escape_filter($this->env, (" " .
$this->getAttribute(($context["item"] ?? null),
"anchor_class", [])), "html", null, true))) : (print
("")));
echo "\"
data-g-menuparent=\"\"";
echo ($context["label"] ?? null);
echo ">";
}
// line 85
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "image", [])) {
// line 86
echo " <img
src=\"";
echo twig_escape_filter($this->env,
$this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc($this->getAttribute(($context["item"]
?? null), "image", [])), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"title", []), "html", null, true);
echo "\" />
";
} elseif ($this->getAttribute( // line 87
($context["item"] ?? null), "icon", [])) {
// line 88
echo " <i
class=\"";
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"icon", []), "html", null, true);
echo "\"
aria-hidden=\"true\"></i>
";
}
// line 90
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
// line 91
echo " <span
class=\"g-menu-item-content\">
";
// line 92
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "
</span>
";
// line 94
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 95
echo "<span
class=\"g-menu-parent-indicator\"
data-g-menuparent=\"\"></span>";
}
// line 97
echo " ";
} else {
// line 98
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "type", []) == "particle")) {
// line 99
echo " ";
echo
$context["self"]->getdisplayParticle(($context["item"]
?? null), ($context["context"] ?? null));
echo "
";
} elseif (($this->getAttribute(
// line 100
($context["item"] ?? null), "type", []) ==
"heading")) {
// line 101
echo " <span
class=\"g-nav-header g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
} else {
// line 103
echo " <span
class=\"g-separator g-menu-item-content\"";
echo ($context["title"] ?? null);
echo ">";
echo
$context["self"]->getdisplayTitle(($context["item"]
?? null));
echo "</span>
";
}
// line 105
echo " ";
if (($this->getAttribute(($context["item"]
?? null), "children", []) &&
!$this->getAttribute(($context["item"] ?? null),
"dropdown_hide", []))) {
// line 106
echo "<span
class=\"g-menu-parent-indicator\"></span>";
}
// line 108
echo " ";
}
// line 109
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "url", [])) {
echo "</a>
";
} else {
// line 110
echo "</div>";
}
// line 111
echo " ";
if ($this->getAttribute(($context["item"] ??
null), "children", [])) {
// line 112
echo
$context["self"]->getdisplaySubmenu(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
}
// line 114
echo " </li>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 118
public function getdisplayContainers($__item__ = null, $__menu__ =
null, $__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 119
echo " ";
$context["self"] = $this;
// line 120
echo " <div class=\"g-grid\">
";
// line 121
$context["groups"] =
((($this->getAttribute(($context["item"] ?? null),
"getDropdown", [], "method") == "standard"))
? ([0 => ($context["item"] ?? null)]) :
($this->getAttribute(($context["item"] ?? null),
"groups", [])));
// line 122
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["groups"] ?? null));
foreach ($context['_seq'] as
$context["column"] => $context["items"]) {
// line 123
echo " <div class=\"g-block ";
echo twig_escape_filter($this->env,
call_user_func_array($this->env->getFilter('toGrid')->getCallable(),
[$this->getAttribute(($context["item"] ?? null),
"columnWidth", [0 => $context["column"]],
"method")]), "html", null, true);
echo "\">
<ul class=\"g-sublevel\">
<li class=\"g-level-";
// line 125
echo twig_escape_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"level", []), "html", null, true);
echo " g-go-back\">
<a class=\"g-menu-item-container\"
href=\"#\"
data-g-menuparent=\"\"><span>Back</span></a>
</li>
";
// line 128
echo
$context["self"]->getdisplayItems($context["items"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
</ul>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['column'],
$context['items'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 132
echo " </div>
";
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 135
public function getdisplayItems($__items__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"items" => $__items__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 136
echo " ";
$context["self"] = $this;
// line 137
echo " ";
$context['_parent'] = $context;
$context['_seq'] =
twig_ensure_traversable(($context["items"] ?? null));
foreach ($context['_seq'] as
$context["_key"] => $context["item"]) {
// line 138
echo " ";
if (($this->getAttribute($context["item"],
"level", []) == 1)) {
$context["dropdown_type"] =
$this->getAttribute($context["item"], "dropdown",
[]);
}
// line 139
echo " ";
echo
$context["self"]->getdisplayItem($context["item"],
($context["menu"] ?? null), ($context["context"] ??
null), ($context["dropdown_type"] ?? null));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'],
$context['_iterated'], $context['_key'],
$context['item'], $context['_parent'],
$context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
// line 143
public function getdisplaySubmenu($__item__ = null, $__menu__ = null,
$__context__ = null, $__dropdown_type__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals([
"item" => $__item__,
"menu" => $__menu__,
"context" => $__context__,
"dropdown_type" => $__dropdown_type__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start(function () { return ''; });
try {
// line 144
echo " ";
$context["self"] = $this;
// line 145
echo " ";
if ( !$this->getAttribute(($context["item"] ??
null), "dropdown_hide", [])) {
// line 146
echo " ";
$context["animation"] =
(($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method", true, true))
?
(_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"]
?? null), "gantry", [], "any", false, true),
"config", [], "any", false, true), "get", [0
=> "styles.menu.animation"], "method"),
"g-fade")) : ("g-fade"));
// line 147
echo " ";
if (((((twig_length_filter($this->env,
$this->getAttribute(($context["item"] ?? null),
"groups", [])) == 1) && (
!($context["dropdown_type"] ?? null) == "fullwidth"))
|| (($context["dropdown_type"] ?? null) == "standard"))
|| (((($this->getAttribute(($context["item"] ?? null),
"width", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "width", []), "auto")) : ("auto")) !=
"auto") && (($context["dropdown_type"] ?? null)
== "fullwidth")))) {
$context["dropdown_dir"] =
("g-dropdown-" .
(($this->getAttribute(($context["item"] ?? null),
"dropdown_dir", [], "any", true, true)) ?
(_twig_default_filter($this->getAttribute(($context["item"] ??
null), "dropdown_dir", []), "right")) :
("right")));
}
// line 148
echo " <ul class=\"g-dropdown
g-inactive ";
echo twig_escape_filter($this->env,
($context["animation"] ?? null), "html", null, true);
echo " ";
echo twig_escape_filter($this->env,
($context["dropdown_dir"] ?? null), "html", null,
true);
echo "\"";
echo
$context["self"]->getgetCustomWidth(($context["item"]
?? null), ($context["menu"] ?? null), "submenu",
($context["dropdown_type"] ?? null));
echo ">
<li class=\"g-dropdown-column\">
";
// line 150
echo
$context["self"]->getdisplayContainers(($context["item"]
?? null), ($context["menu"] ?? null),
($context["context"] ?? null),
($context["dropdown_type"] ?? null));
echo "
</li>
</ul>
";
}
} catch (\Exception $e) {
ob_end_clean();
throw $e;
} catch (\Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' :
new Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "@particles/menu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 700 => 150, 690 => 148, 685 => 147, 682
=> 146, 679 => 145, 676 => 144, 661 => 143, 639 => 139,
634 => 138, 629 => 137, 626 => 136, 611 => 135, 595 =>
132, 585 => 128, 579 => 125, 573 => 123, 568 => 122, 566
=> 121, 563 => 120, 560 => 119, 545 => 118, 528 => 114,
525 => 112, 522 => 111, 519 => 110, 513 => 109, 510 =>
108, 507 => 106, 504 => 105, 496 => 103, 488 => 101, 486
=> 100, 481 => 99, 478 => 98, 475 => 97, 472 => 95, 470
=> 94, 465 => 92, 462 => 91, 459 => 90, 453 => 88, 451
=> 87, 444 => 86, 441 => 85, 434 => 84, 422 => 83, 413
=> 82, 411 => 81, 393 => 80, 390 => 79, 388 => 78, 385
=> 77, 382 => 76, 376 => 75, 370 => 74, 367 => 73, 364
=> 72, 361 => 71, 355 => 70, 352 => 69, 349 => 68, 346
=> 67, 343 => 66, 338 => 65, 335 => 64, 330 => 63, 325
=> 62, 323 => 61, 320 => 60, 317 => 59, 315 => 58, 312
=> 57, 309 => 56, 306 => 55, 303 => 54, 300 => 53, 297
=> 52, 294 => 51, 291 => 50, 288 => 49, 285 => 48, 283
=> 47, 280 => 46, 277 => 45, 274 => 44, 271 => 43, 268
=> 42, 265 => 41, 262 => 40, 259 => 39, 256 => 38, 253
=> 37, 250 => 36, 247 => 35, 244 => 34, 229 => 33, 213
=> 30, 207 => 28, 205 => 27, 200 => 26, 197 => 25, 185
=> 24, 169 => 21, 166 => 20, 158 => 19, 153 => 18, 150
=> 17, 147 => 16, 134 => 15, 112 => 10, 109 => 9, 107
=> 8, 92 => 7, 83 => 161, 75 => 159, 73 => 158, 70
=> 157, 68 => 156, 65 => 155, 62 => 142, 59 => 134, 56
=> 117, 53 => 32, 50 => 23, 47 => 14, 44 => 6, 38 =>
4, 31 => 2, 30 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("",
"@particles/menu.html.twig",
"/home/lmsyaran/public_html/media/gantry5/engines/nucleus/particles/menu.html.twig");
}
}
PK��[�ʺ9twig/.php_cs.distnu�[���<?php
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
'php_unit_dedicate_assert' => ['target'
=> '5.6'],
'array_syntax' => ['syntax' =>
'short'],
'php_unit_fqcn_annotation' => true,
'no_unreachable_default_argument_value' => false,
'braces' => ['allow_single_line_closure'
=> true],
'heredoc_to_nowdoc' => false,
'ordered_imports' => true,
'phpdoc_types_order' => ['null_adjustment'
=> 'always_last', 'sort_algorithm' =>
'none'],
'native_function_invocation' => ['include'
=> ['@compiler_optimized'], 'scope' =>
'all'],
])
->setRiskyAllowed(true)
->setFinder(PhpCsFixer\Finder::create()->in(__DIR__))
;
PK��[_P?>��twig/composer.jsonnu�[���{
"name": "twig/twig",
"type": "library",
"description": "Twig, the flexible, fast, and secure
template language for PHP",
"keywords": ["templating"],
"homepage": "https://twig.symfony.com",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Twig Team",
"role": "Contributors"
},
{
"name": "Armin Ronacher",
"email": "armin.ronacher@active-4.com",
"role": "Project Founder"
}
],
"require": {
"php": ">=5.5.0",
"symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.4|^5.0",
"psr/container": "^1.0"
},
"autoload": {
"psr-0" : {
"Twig_" : "lib/"
},
"psr-4" : {
"Twig\\" : "src/"
}
},
"autoload-dev": {
"psr-4" : {
"Twig\\Tests\\" : "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.42-dev"
}
}
}
PK��[�g���twig/lib/Twig/Autoloader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Autoloads Twig classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.21 and will be removed in 2.0. Use Composer instead.
2.0.
*/
class Twig_Autoloader
{
/**
* Registers Twig_Autoloader as an SPL autoloader.
*
* @param bool $prepend whether to prepend the autoloader or not
*/
public static function register($prepend = false)
{
@trigger_error('Using Twig_Autoloader is deprecated since
version 1.21. Use Composer instead.', E_USER_DEPRECATED);
spl_autoload_register([__CLASS__, 'autoload'], true,
$prepend);
}
/**
* Handles autoloading of classes.
*
* @param string $class a class name
*/
public static function autoload($class)
{
if (0 !== strpos($class, 'Twig')) {
return;
}
if (is_file($file =
__DIR__.'/../'.str_replace(['_', "\0"],
['/', ''], $class).'.php')) {
require $file;
} elseif (is_file($file =
__DIR__.'/../../src/'.str_replace(['Twig\\',
'\\', "\0"], ['', '/',
''], $class).'.php')) {
require $file;
}
}
}
PK��[&����!twig/lib/Twig/BaseNodeVisitor.phpnu�[���<?php
use Twig\NodeVisitor\AbstractNodeVisitor;
class_exists('Twig\NodeVisitor\AbstractNodeVisitor');
if (\false) {
class Twig_BaseNodeVisitor extends AbstractNodeVisitor
{
}
}
PK��[Q�����"twig/lib/Twig/Cache/Filesystem.phpnu�[���<?php
use Twig\Cache\FilesystemCache;
class_exists('Twig\Cache\FilesystemCache');
if (\false) {
class Twig_Cache_Filesystem extends FilesystemCache
{
}
}
PK��[ ��ʑ�twig/lib/Twig/Cache/Null.phpnu�[���<?php
use Twig\Cache\NullCache;
class_exists('Twig\Cache\NullCache');
if (\false) {
class Twig_Cache_Null extends NullCache
{
}
}
PK��[�=����
twig/lib/Twig/CacheInterface.phpnu�[���<?php
use Twig\Cache\CacheInterface;
class_exists('Twig\Cache\CacheInterface');
if (\false) {
class Twig_CacheInterface extends CacheInterface
{
}
}
PK��[�Vv3��twig/lib/Twig/Compiler.phpnu�[���<?php
use Twig\Compiler;
class_exists('Twig\Compiler');
if (\false) {
class Twig_Compiler extends Compiler
{
}
}
PK��[��R��#twig/lib/Twig/CompilerInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Interface implemented by compiler classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_CompilerInterface
{
/**
* Compiles a node.
*
* @return $this
*/
public function compile(Twig_NodeInterface $node);
/**
* Gets the current PHP code after compilation.
*
* @return string The PHP code
*/
public function getSource();
}
PK��[ɻ�T��(twig/lib/Twig/ContainerRuntimeLoader.phpnu�[���<?php
use Twig\RuntimeLoader\ContainerRuntimeLoader;
class_exists('Twig\RuntimeLoader\ContainerRuntimeLoader');
if (\false) {
class Twig_ContainerRuntimeLoader extends ContainerRuntimeLoader
{
}
}
PK��[��9���twig/lib/Twig/Environment.phpnu�[���<?php
use Twig\Environment;
class_exists('Twig\Environment');
if (\false) {
class Twig_Environment extends Environment
{
}
}
PK��[�
ei��twig/lib/Twig/Error/Loader.phpnu�[���<?php
use Twig\Error\LoaderError;
class_exists('Twig\Error\LoaderError');
if (\false) {
class Twig_Error_Loader extends LoaderError
{
}
}
PK��[�#ڝ�twig/lib/Twig/Error/Runtime.phpnu�[���<?php
use Twig\Error\RuntimeError;
class_exists('Twig\Error\RuntimeError');
if (\false) {
class Twig_Error_Runtime extends RuntimeError
{
}
}
PK��[d�˃��twig/lib/Twig/Error/Syntax.phpnu�[���<?php
use Twig\Error\SyntaxError;
class_exists('Twig\Error\SyntaxError');
if (\false) {
class Twig_Error_Syntax extends SyntaxError
{
}
}
PK��[�Bڨ��twig/lib/Twig/Error.phpnu�[���<?php
use Twig\Error\Error;
class_exists('Twig\Error\Error');
if (\false) {
class Twig_Error extends Error
{
}
}
PK��[ð�=��'twig/lib/Twig/ExistsLoaderInterface.phpnu�[���<?php
use Twig\Loader\ExistsLoaderInterface;
class_exists('Twig\Loader\ExistsLoaderInterface');
if (\false) {
class Twig_ExistsLoaderInterface extends ExistsLoaderInterface
{
}
}
PK��[D;��"twig/lib/Twig/ExpressionParser.phpnu�[���<?php
use Twig\ExpressionParser;
class_exists('Twig\ExpressionParser');
if (\false) {
class Twig_ExpressionParser extends ExpressionParser
{
}
}
PK��["G���
twig/lib/Twig/Extension/Core.phpnu�[���<?php
use Twig\Extension\CoreExtension;
class_exists('Twig\Extension\CoreExtension');
if (\false) {
class Twig_Extension_Core extends CoreExtension
{
}
}
PK��[:��e��!twig/lib/Twig/Extension/Debug.phpnu�[���<?php
use Twig\Extension\DebugExtension;
class_exists('Twig\Extension\DebugExtension');
if (\false) {
class Twig_Extension_Debug extends DebugExtension
{
}
}
PK��[��Aٵ�#twig/lib/Twig/Extension/Escaper.phpnu�[���<?php
use Twig\Extension\EscaperExtension;
class_exists('Twig\Extension\EscaperExtension');
if (\false) {
class Twig_Extension_Escaper extends EscaperExtension
{
}
}
PK��[��I��,twig/lib/Twig/Extension/GlobalsInterface.phpnu�[���<?php
use Twig\Extension\GlobalsInterface;
class_exists('Twig\Extension\GlobalsInterface');
if (\false) {
class Twig_Extension_GlobalsInterface extends GlobalsInterface
{
}
}
PK��[�����0twig/lib/Twig/Extension/InitRuntimeInterface.phpnu�[���<?php
use Twig\Extension\InitRuntimeInterface;
class_exists('Twig\Extension\InitRuntimeInterface');
if (\false) {
class Twig_Extension_InitRuntimeInterface extends InitRuntimeInterface
{
}
}
PK��[n���%twig/lib/Twig/Extension/Optimizer.phpnu�[���<?php
use Twig\Extension\OptimizerExtension;
class_exists('Twig\Extension\OptimizerExtension');
if (\false) {
class Twig_Extension_Optimizer extends OptimizerExtension
{
}
}
PK��[ѕu��$twig/lib/Twig/Extension/Profiler.phpnu�[���<?php
use Twig\Extension\ProfilerExtension;
class_exists('Twig\Extension\ProfilerExtension');
if (\false) {
class Twig_Extension_Profiler extends ProfilerExtension
{
}
}
PK��[��3���#twig/lib/Twig/Extension/Sandbox.phpnu�[���<?php
use Twig\Extension\SandboxExtension;
class_exists('Twig\Extension\SandboxExtension');
if (\false) {
class Twig_Extension_Sandbox extends SandboxExtension
{
}
}
PK��[P�El��#twig/lib/Twig/Extension/Staging.phpnu�[���<?php
use Twig\Extension\StagingExtension;
class_exists('Twig\Extension\StagingExtension');
if (\false) {
class Twig_Extension_Staging extends StagingExtension
{
}
}
PK��[��"���(twig/lib/Twig/Extension/StringLoader.phpnu�[���<?php
use Twig\Extension\StringLoaderExtension;
class_exists('Twig\Extension\StringLoaderExtension');
if (\false) {
class Twig_Extension_StringLoader extends StringLoaderExtension
{
}
}
PK��[����twig/lib/Twig/Extension.phpnu�[���<?php
use Twig\Extension\AbstractExtension;
class_exists('Twig\Extension\AbstractExtension');
if (\false) {
class Twig_Extension extends AbstractExtension
{
}
}
PK��[�3���$twig/lib/Twig/ExtensionInterface.phpnu�[���<?php
use Twig\Extension\ExtensionInterface;
class_exists('Twig\Extension\ExtensionInterface');
if (\false) {
class Twig_ExtensionInterface extends ExtensionInterface
{
}
}
PK��[�<���&twig/lib/Twig/FactoryRuntimeLoader.phpnu�[���<?php
use Twig\RuntimeLoader\FactoryRuntimeLoader;
class_exists('Twig\RuntimeLoader\FactoryRuntimeLoader');
if (\false) {
class Twig_FactoryRuntimeLoader extends FactoryRuntimeLoader
{
}
}
PK��[�,L���/twig/lib/Twig/FileExtensionEscapingStrategy.phpnu�[���<?php
use Twig\FileExtensionEscapingStrategy;
class_exists('Twig\FileExtensionEscapingStrategy');
if (\false) {
class Twig_FileExtensionEscapingStrategy extends
FileExtensionEscapingStrategy
{
}
}
PK��[�R��!twig/lib/Twig/Filter/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a function template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Function extends Twig_Filter
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}
PK��[�M�MXXtwig/lib/Twig/Filter/Method.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Extension\ExtensionInterface;
@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);
/**
* Represents a method template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Method extends Twig_Filter
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method,
array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return
sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($this->extension), $this->method);
}
}
PK��[��`pptwig/lib/Twig/Filter/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a template filter as a node.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Node extends Twig_Filter
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}
PK��[��k���twig/lib/Twig/Filter.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
@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);
/**
* Represents a template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
abstract class Twig_Filter implements Twig_FilterInterface,
Twig_FilterCallableInterface
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'pre_escape' => null,
'preserves_safety' => null,
'callable' => null,
], $options);
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $filterArgs)
{
if (isset($this->options['is_safe'])) {
return $this->options['is_safe'];
}
if (isset($this->options['is_safe_callback'])) {
return
\call_user_func($this->options['is_safe_callback'],
$filterArgs);
}
}
public function getPreservesSafety()
{
return $this->options['preserves_safety'];
}
public function getPreEscape()
{
return $this->options['pre_escape'];
}
public function getCallable()
{
return $this->options['callable'];
}
}
PK��[,ı+��)twig/lib/Twig/FilterCallableInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a callable template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FilterCallableInterface
{
public function getCallable();
}
PK��[� �?[[!twig/lib/Twig/FilterInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
/**
* Represents a template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FilterInterface
{
/**
* Compiles a filter.
*
* @return string The PHP code for the filter
*/
public function compile();
public function needsEnvironment();
public function needsContext();
public function getSafe(Node $filterArgs);
public function getPreservesSafety();
public function getPreEscape();
public function setArguments($arguments);
public function getArguments();
}
PK��[�Ὢ��#twig/lib/Twig/Function/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a function template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Function_Function extends Twig_Function
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}
PK��[�a��{{!twig/lib/Twig/Function/Method.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Extension\ExtensionInterface;
@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);
/**
* Represents a method template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Function_Method extends Twig_Function
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method,
array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return
sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($this->extension), $this->method);
}
}
PK��[ �|||twig/lib/Twig/Function/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a template function as a node.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Function_Node extends Twig_Function
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}
PK��[So�)��twig/lib/Twig/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
@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);
/**
* Represents a template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
abstract class Twig_Function implements Twig_FunctionInterface,
Twig_FunctionCallableInterface
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'callable' => null,
], $options);
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $functionArgs)
{
if (isset($this->options['is_safe'])) {
return $this->options['is_safe'];
}
if (isset($this->options['is_safe_callback'])) {
return
\call_user_func($this->options['is_safe_callback'],
$functionArgs);
}
return [];
}
public function getCallable()
{
return $this->options['callable'];
}
}
PK��[d����+twig/lib/Twig/FunctionCallableInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a callable template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FunctionCallableInterface
{
public function getCallable();
}
PK��[9t/,,#twig/lib/Twig/FunctionInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
/**
* Represents a template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FunctionInterface
{
/**
* Compiles a function.
*
* @return string The PHP code for the function
*/
public function compile();
public function needsEnvironment();
public function needsContext();
public function getSafe(Node $filterArgs);
public function setArguments($arguments);
public function getArguments();
}
PK��[��t�tttwig/lib/Twig/Lexer.phpnu�[���<?php
use Twig\Lexer;
class_exists('Twig\Lexer');
if (\false) {
class Twig_Lexer extends Lexer
{
}
}
PK��[�Y�
twig/lib/Twig/LexerInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Error\SyntaxError;
use Twig\Source;
use Twig\TokenStream;
/**
* Interface implemented by lexer classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_LexerInterface
{
/**
* Tokenizes a source code.
*
* @param string|Source $code The source code
* @param string $name A unique identifier for the source code
*
* @return TokenStream
*
* @throws SyntaxError When the code is syntactically wrong
*/
public function tokenize($code, $name = null);
}
PK��[�) ��twig/lib/Twig/Loader/Array.phpnu�[���<?php
use Twig\Loader\ArrayLoader;
class_exists('Twig\Loader\ArrayLoader');
if (\false) {
class Twig_Loader_Array extends ArrayLoader
{
}
}
PK��[�#�ʛ�twig/lib/Twig/Loader/Chain.phpnu�[���<?php
use Twig\Loader\ChainLoader;
class_exists('Twig\Loader\ChainLoader');
if (\false) {
class Twig_Loader_Chain extends ChainLoader
{
}
}
PK��[4`v˯�#twig/lib/Twig/Loader/Filesystem.phpnu�[���<?php
use Twig\Loader\FilesystemLoader;
class_exists('Twig\Loader\FilesystemLoader');
if (\false) {
class Twig_Loader_Filesystem extends FilesystemLoader
{
}
}
PK��[T����twig/lib/Twig/Loader/String.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Loader\ExistsLoaderInterface;
use Twig\Loader\LoaderInterface;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\Source;
@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);
/**
* Loads a template from a string.
*
* This loader should NEVER be used. It only exists for Twig internal
purposes.
*
* When using this loader with a cache mechanism, you should know that a
new cache
* key is generated each time a template content "changes" (the
cache key being the
* source code of the template). If you don't want to see your cache
grows out of
* control, you need to take care of clearing the old cache file by
yourself.
*
* @deprecated since 1.18.1 (to be removed in 2.0)
*
* @internal
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_Loader_String implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
return $name;
}
public function getSourceContext($name)
{
return new Source($name, $name);
}
public function exists($name)
{
return true;
}
public function getCacheKey($name)
{
return $name;
}
public function isFresh($name, $time)
{
return true;
}
}
PK��[7b����!twig/lib/Twig/LoaderInterface.phpnu�[���<?php
use Twig\Loader\LoaderInterface;
class_exists('Twig\Loader\LoaderInterface');
if (\false) {
class Twig_LoaderInterface extends LoaderInterface
{
}
}
PK��[^�<�xxtwig/lib/Twig/Markup.phpnu�[���<?php
use Twig\Markup;
class_exists('Twig\Markup');
if (\false) {
class Twig_Markup extends Markup
{
}
}
PK��[���!twig/lib/Twig/Node/AutoEscape.phpnu�[���<?php
use Twig\Node\AutoEscapeNode;
class_exists('Twig\Node\AutoEscapeNode');
if (\false) {
class Twig_Node_AutoEscape extends AutoEscapeNode
{
}
}
PK��[V��~��twig/lib/Twig/Node/Block.phpnu�[���<?php
use Twig\Node\BlockNode;
class_exists('Twig\Node\BlockNode');
if (\false) {
class Twig_Node_Block extends BlockNode
{
}
}
PK��[<B�G��%twig/lib/Twig/Node/BlockReference.phpnu�[���<?php
use Twig\Node\BlockReferenceNode;
class_exists('Twig\Node\BlockReferenceNode');
if (\false) {
class Twig_Node_BlockReference extends BlockReferenceNode
{
}
}
PK��[�Z�
��twig/lib/Twig/Node/Body.phpnu�[���<?php
use Twig\Node\BodyNode;
class_exists('Twig\Node\BodyNode');
if (\false) {
class Twig_Node_Body extends BodyNode
{
}
}
PK��[m8�2��$twig/lib/Twig/Node/CheckSecurity.phpnu�[���<?php
use Twig\Node\CheckSecurityNode;
class_exists('Twig\Node\CheckSecurityNode');
if (\false) {
class Twig_Node_CheckSecurity extends CheckSecurityNode
{
}
}
PK��[c��ţ�!twig/lib/Twig/Node/Deprecated.phpnu�[���<?php
use Twig\Node\DeprecatedNode;
class_exists('Twig\Node\DeprecatedNode');
if (\false) {
class Twig_Node_Deprecated extends DeprecatedNode
{
}
}
PK��[�a���twig/lib/Twig/Node/Do.phpnu�[���<?php
use Twig\Node\DoNode;
class_exists('Twig\Node\DoNode');
if (\false) {
class Twig_Node_Do extends DoNode
{
}
}
PK��[C��ԏ�twig/lib/Twig/Node/Embed.phpnu�[���<?php
use Twig\Node\EmbedNode;
class_exists('Twig\Node\EmbedNode');
if (\false) {
class Twig_Node_Embed extends EmbedNode
{
}
}
PK��[����'twig/lib/Twig/Node/Expression/Array.phpnu�[���<?php
use Twig\Node\Expression\ArrayExpression;
class_exists('Twig\Node\Expression\ArrayExpression');
if (\false) {
class Twig_Node_Expression_Array extends ArrayExpression
{
}
}
PK��[B&���,twig/lib/Twig/Node/Expression/AssignName.phpnu�[���<?php
use Twig\Node\Expression\AssignNameExpression;
class_exists('Twig\Node\Expression\AssignNameExpression');
if (\false) {
class Twig_Node_Expression_AssignName extends AssignNameExpression
{
}
}
PK��[2K����,twig/lib/Twig/Node/Expression/Binary/Add.phpnu�[���<?php
use Twig\Node\Expression\Binary\AddBinary;
class_exists('Twig\Node\Expression\Binary\AddBinary');
if (\false) {
class Twig_Node_Expression_Binary_Add extends AddBinary
{
}
}
PK��[�~����,twig/lib/Twig/Node/Expression/Binary/And.phpnu�[���<?php
use Twig\Node\Expression\Binary\AndBinary;
class_exists('Twig\Node\Expression\Binary\AndBinary');
if (\false) {
class Twig_Node_Expression_Binary_And extends AndBinary
{
}
}
PK��[S
���3twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.phpnu�[���<?php
use Twig\Node\Expression\Binary\BitwiseAndBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseAndBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseAnd extends BitwiseAndBinary
{
}
}
PK��[�ѣ���2twig/lib/Twig/Node/Expression/Binary/BitwiseOr.phpnu�[���<?php
use Twig\Node\Expression\Binary\BitwiseOrBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseOrBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseOr extends BitwiseOrBinary
{
}
}
PK��[���3twig/lib/Twig/Node/Expression/Binary/BitwiseXor.phpnu�[���<?php
use Twig\Node\Expression\Binary\BitwiseXorBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseXorBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseXor extends BitwiseXorBinary
{
}
}
PK��[������/twig/lib/Twig/Node/Expression/Binary/Concat.phpnu�[���<?php
use Twig\Node\Expression\Binary\ConcatBinary;
class_exists('Twig\Node\Expression\Binary\ConcatBinary');
if (\false) {
class Twig_Node_Expression_Binary_Concat extends ConcatBinary
{
}
}
PK��[(�B���,twig/lib/Twig/Node/Expression/Binary/Div.phpnu�[���<?php
use Twig\Node\Expression\Binary\DivBinary;
class_exists('Twig\Node\Expression\Binary\DivBinary');
if (\false) {
class Twig_Node_Expression_Binary_Div extends DivBinary
{
}
}
PK��[W��G��1twig/lib/Twig/Node/Expression/Binary/EndsWith.phpnu�[���<?php
use Twig\Node\Expression\Binary\EndsWithBinary;
class_exists('Twig\Node\Expression\Binary\EndsWithBinary');
if (\false) {
class Twig_Node_Expression_Binary_EndsWith extends EndsWithBinary
{
}
}
PK��[}�n2��.twig/lib/Twig/Node/Expression/Binary/Equal.phpnu�[���<?php
use Twig\Node\Expression\Binary\EqualBinary;
class_exists('Twig\Node\Expression\Binary\EqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_Equal extends EqualBinary
{
}
}
PK��[�*�/��1twig/lib/Twig/Node/Expression/Binary/FloorDiv.phpnu�[���<?php
use Twig\Node\Expression\Binary\FloorDivBinary;
class_exists('Twig\Node\Expression\Binary\FloorDivBinary');
if (\false) {
class Twig_Node_Expression_Binary_FloorDiv extends FloorDivBinary
{
}
}
PK��[-�Z��0twig/lib/Twig/Node/Expression/Binary/Greater.phpnu�[���<?php
use Twig\Node\Expression\Binary\GreaterBinary;
class_exists('Twig\Node\Expression\Binary\GreaterBinary');
if (\false) {
class Twig_Node_Expression_Binary_Greater extends GreaterBinary
{
}
}
PK��[ߞ����5twig/lib/Twig/Node/Expression/Binary/GreaterEqual.phpnu�[���<?php
use Twig\Node\Expression\Binary\GreaterEqualBinary;
class_exists('Twig\Node\Expression\Binary\GreaterEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_GreaterEqual extends
GreaterEqualBinary
{
}
}
PK��[K�n���+twig/lib/Twig/Node/Expression/Binary/In.phpnu�[���<?php
use Twig\Node\Expression\Binary\InBinary;
class_exists('Twig\Node\Expression\Binary\InBinary');
if (\false) {
class Twig_Node_Expression_Binary_In extends InBinary
{
}
}
PK��[�w�~��-twig/lib/Twig/Node/Expression/Binary/Less.phpnu�[���<?php
use Twig\Node\Expression\Binary\LessBinary;
class_exists('Twig\Node\Expression\Binary\LessBinary');
if (\false) {
class Twig_Node_Expression_Binary_Less extends LessBinary
{
}
}
PK��[�[�%��2twig/lib/Twig/Node/Expression/Binary/LessEqual.phpnu�[���<?php
use Twig\Node\Expression\Binary\LessEqualBinary;
class_exists('Twig\Node\Expression\Binary\LessEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_LessEqual extends LessEqualBinary
{
}
}
PK��[�y����0twig/lib/Twig/Node/Expression/Binary/Matches.phpnu�[���<?php
use Twig\Node\Expression\Binary\MatchesBinary;
class_exists('Twig\Node\Expression\Binary\MatchesBinary');
if (\false) {
class Twig_Node_Expression_Binary_Matches extends MatchesBinary
{
}
}
PK��[�aL���,twig/lib/Twig/Node/Expression/Binary/Mod.phpnu�[���<?php
use Twig\Node\Expression\Binary\ModBinary;
class_exists('Twig\Node\Expression\Binary\ModBinary');
if (\false) {
class Twig_Node_Expression_Binary_Mod extends ModBinary
{
}
}
PK��[8Vd'��,twig/lib/Twig/Node/Expression/Binary/Mul.phpnu�[���<?php
use Twig\Node\Expression\Binary\MulBinary;
class_exists('Twig\Node\Expression\Binary\MulBinary');
if (\false) {
class Twig_Node_Expression_Binary_Mul extends MulBinary
{
}
}
PK��[DCO��1twig/lib/Twig/Node/Expression/Binary/NotEqual.phpnu�[���<?php
use Twig\Node\Expression\Binary\NotEqualBinary;
class_exists('Twig\Node\Expression\Binary\NotEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_NotEqual extends NotEqualBinary
{
}
}
PK��[�ސB��.twig/lib/Twig/Node/Expression/Binary/NotIn.phpnu�[���<?php
use Twig\Node\Expression\Binary\NotInBinary;
class_exists('Twig\Node\Expression\Binary\NotInBinary');
if (\false) {
class Twig_Node_Expression_Binary_NotIn extends NotInBinary
{
}
}
PK��[�����+twig/lib/Twig/Node/Expression/Binary/Or.phpnu�[���<?php
use Twig\Node\Expression\Binary\OrBinary;
class_exists('Twig\Node\Expression\Binary\OrBinary');
if (\false) {
class Twig_Node_Expression_Binary_Or extends OrBinary
{
}
}
PK��[�~u@��.twig/lib/Twig/Node/Expression/Binary/Power.phpnu�[���<?php
use Twig\Node\Expression\Binary\PowerBinary;
class_exists('Twig\Node\Expression\Binary\PowerBinary');
if (\false) {
class Twig_Node_Expression_Binary_Power extends PowerBinary
{
}
}
PK��[ٰ�w��.twig/lib/Twig/Node/Expression/Binary/Range.phpnu�[���<?php
use Twig\Node\Expression\Binary\RangeBinary;
class_exists('Twig\Node\Expression\Binary\RangeBinary');
if (\false) {
class Twig_Node_Expression_Binary_Range extends RangeBinary
{
}
}
PK��[��s��3twig/lib/Twig/Node/Expression/Binary/StartsWith.phpnu�[���<?php
use Twig\Node\Expression\Binary\StartsWithBinary;
class_exists('Twig\Node\Expression\Binary\StartsWithBinary');
if (\false) {
class Twig_Node_Expression_Binary_StartsWith extends StartsWithBinary
{
}
}
PK��[�nڸ��,twig/lib/Twig/Node/Expression/Binary/Sub.phpnu�[���<?php
use Twig\Node\Expression\Binary\SubBinary;
class_exists('Twig\Node\Expression\Binary\SubBinary');
if (\false) {
class Twig_Node_Expression_Binary_Sub extends SubBinary
{
}
}
PK��[��q5��(twig/lib/Twig/Node/Expression/Binary.phpnu�[���<?php
use Twig\Node\Expression\Binary\AbstractBinary;
class_exists('Twig\Node\Expression\Binary\AbstractBinary');
if (\false) {
class Twig_Node_Expression_Binary extends AbstractBinary
{
}
}
PK��[(d���0twig/lib/Twig/Node/Expression/BlockReference.phpnu�[���<?php
use Twig\Node\Expression\BlockReferenceExpression;
class_exists('Twig\Node\Expression\BlockReferenceExpression');
if (\false) {
class Twig_Node_Expression_BlockReference extends
BlockReferenceExpression
{
}
}
PK��[p��,��&twig/lib/Twig/Node/Expression/Call.phpnu�[���<?php
use Twig\Node\Expression\CallExpression;
class_exists('Twig\Node\Expression\CallExpression');
if (\false) {
class Twig_Node_Expression_Call extends CallExpression
{
}
}
PK��[�R�!��-twig/lib/Twig/Node/Expression/Conditional.phpnu�[���<?php
use Twig\Node\Expression\ConditionalExpression;
class_exists('Twig\Node\Expression\ConditionalExpression');
if (\false) {
class Twig_Node_Expression_Conditional extends ConditionalExpression
{
}
}
PK��[���T��*twig/lib/Twig/Node/Expression/Constant.phpnu�[���<?php
use Twig\Node\Expression\ConstantExpression;
class_exists('Twig\Node\Expression\ConstantExpression');
if (\false) {
class Twig_Node_Expression_Constant extends ConstantExpression
{
}
}
PK��[����4twig/lib/Twig/Node/Expression/ExtensionReference.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
@trigger_error('The Twig_Node_Expression_ExtensionReference class is
deprecated since version 1.23 and will be removed in 2.0.',
E_USER_DEPRECATED);
/**
* Represents an extension call node.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.23 and will be removed in 2.0.
*/
class Twig_Node_Expression_ExtensionReference extends AbstractExpression
{
public function __construct($name, $lineno, $tag = null)
{
parent::__construct([], ['name' => $name], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler->raw(sprintf("\$this->env->getExtension('%s')",
$this->getAttribute('name')));
}
}
PK��[#�"0��0twig/lib/Twig/Node/Expression/Filter/Default.phpnu�[���<?php
use Twig\Node\Expression\Filter\DefaultFilter;
class_exists('Twig\Node\Expression\Filter\DefaultFilter');
if (\false) {
class Twig_Node_Expression_Filter_Default extends DefaultFilter
{
}
}
PK��[f��(twig/lib/Twig/Node/Expression/Filter.phpnu�[���<?php
use Twig\Node\Expression\FilterExpression;
class_exists('Twig\Node\Expression\FilterExpression');
if (\false) {
class Twig_Node_Expression_Filter extends FilterExpression
{
}
}
PK��[��j!��*twig/lib/Twig/Node/Expression/Function.phpnu�[���<?php
use Twig\Node\Expression\FunctionExpression;
class_exists('Twig\Node\Expression\FunctionExpression');
if (\false) {
class Twig_Node_Expression_Function extends FunctionExpression
{
}
}
PK��[����)twig/lib/Twig/Node/Expression/GetAttr.phpnu�[���<?php
use Twig\Node\Expression\GetAttrExpression;
class_exists('Twig\Node\Expression\GetAttrExpression');
if (\false) {
class Twig_Node_Expression_GetAttr extends GetAttrExpression
{
}
}
PK��[�����,twig/lib/Twig/Node/Expression/MethodCall.phpnu�[���<?php
use Twig\Node\Expression\MethodCallExpression;
class_exists('Twig\Node\Expression\MethodCallExpression');
if (\false) {
class Twig_Node_Expression_MethodCall extends MethodCallExpression
{
}
}
PK��[�c�Ѿ�&twig/lib/Twig/Node/Expression/Name.phpnu�[���<?php
use Twig\Node\Expression\NameExpression;
class_exists('Twig\Node\Expression\NameExpression');
if (\false) {
class Twig_Node_Expression_Name extends NameExpression
{
}
}
PK��[�=߲��.twig/lib/Twig/Node/Expression/NullCoalesce.phpnu�[���<?php
use Twig\Node\Expression\NullCoalesceExpression;
class_exists('Twig\Node\Expression\NullCoalesceExpression');
if (\false) {
class Twig_Node_Expression_NullCoalesce extends NullCoalesceExpression
{
}
}
PK��[4\3���(twig/lib/Twig/Node/Expression/Parent.phpnu�[���<?php
use Twig\Node\Expression\ParentExpression;
class_exists('Twig\Node\Expression\ParentExpression');
if (\false) {
class Twig_Node_Expression_Parent extends ParentExpression
{
}
}
PK��[�U��*twig/lib/Twig/Node/Expression/TempName.phpnu�[���<?php
use Twig\Node\Expression\TempNameExpression;
class_exists('Twig\Node\Expression\TempNameExpression');
if (\false) {
class Twig_Node_Expression_TempName extends TempNameExpression
{
}
}
PK��[�7o��/twig/lib/Twig/Node/Expression/Test/Constant.phpnu�[���<?php
use Twig\Node\Expression\Test\ConstantTest;
class_exists('Twig\Node\Expression\Test\ConstantTest');
if (\false) {
class Twig_Node_Expression_Test_Constant extends ConstantTest
{
}
}
PK��[��!%��.twig/lib/Twig/Node/Expression/Test/Defined.phpnu�[���<?php
use Twig\Node\Expression\Test\DefinedTest;
class_exists('Twig\Node\Expression\Test\DefinedTest');
if (\false) {
class Twig_Node_Expression_Test_Defined extends DefinedTest
{
}
}
PK��[�h�n��2twig/lib/Twig/Node/Expression/Test/Divisibleby.phpnu�[���<?php
use Twig\Node\Expression\Test\DivisiblebyTest;
class_exists('Twig\Node\Expression\Test\DivisiblebyTest');
if (\false) {
class Twig_Node_Expression_Test_Divisibleby extends DivisiblebyTest
{
}
}
PK��[�DLc��+twig/lib/Twig/Node/Expression/Test/Even.phpnu�[���<?php
use Twig\Node\Expression\Test\EvenTest;
class_exists('Twig\Node\Expression\Test\EvenTest');
if (\false) {
class Twig_Node_Expression_Test_Even extends EvenTest
{
}
}
PK��[���+twig/lib/Twig/Node/Expression/Test/Null.phpnu�[���<?php
use Twig\Node\Expression\Test\NullTest;
class_exists('Twig\Node\Expression\Test\NullTest');
if (\false) {
class Twig_Node_Expression_Test_Null extends NullTest
{
}
}
PK��[��H��*twig/lib/Twig/Node/Expression/Test/Odd.phpnu�[���<?php
use Twig\Node\Expression\Test\OddTest;
class_exists('Twig\Node\Expression\Test\OddTest');
if (\false) {
class Twig_Node_Expression_Test_Odd extends OddTest
{
}
}
PK��[b@R���-twig/lib/Twig/Node/Expression/Test/Sameas.phpnu�[���<?php
use Twig\Node\Expression\Test\SameasTest;
class_exists('Twig\Node\Expression\Test\SameasTest');
if (\false) {
class Twig_Node_Expression_Test_Sameas extends SameasTest
{
}
}
PK��[��C��&twig/lib/Twig/Node/Expression/Test.phpnu�[���<?php
use Twig\Node\Expression\TestExpression;
class_exists('Twig\Node\Expression\TestExpression');
if (\false) {
class Twig_Node_Expression_Test extends TestExpression
{
}
}
PK��[��\C��+twig/lib/Twig/Node/Expression/Unary/Neg.phpnu�[���<?php
use Twig\Node\Expression\Unary\NegUnary;
class_exists('Twig\Node\Expression\Unary\NegUnary');
if (\false) {
class Twig_Node_Expression_Unary_Neg extends NegUnary
{
}
}
PK��[V�I��+twig/lib/Twig/Node/Expression/Unary/Not.phpnu�[���<?php
use Twig\Node\Expression\Unary\NotUnary;
class_exists('Twig\Node\Expression\Unary\NotUnary');
if (\false) {
class Twig_Node_Expression_Unary_Not extends NotUnary
{
}
}
PK��[�P����+twig/lib/Twig/Node/Expression/Unary/Pos.phpnu�[���<?php
use Twig\Node\Expression\Unary\PosUnary;
class_exists('Twig\Node\Expression\Unary\PosUnary');
if (\false) {
class Twig_Node_Expression_Unary_Pos extends PosUnary
{
}
}
PK��[=��y��'twig/lib/Twig/Node/Expression/Unary.phpnu�[���<?php
use Twig\Node\Expression\Unary\AbstractUnary;
class_exists('Twig\Node\Expression\Unary\AbstractUnary');
if (\false) {
class Twig_Node_Expression_Unary extends AbstractUnary
{
}
}
PK��[b��d��!twig/lib/Twig/Node/Expression.phpnu�[���<?php
use Twig\Node\Expression\AbstractExpression;
class_exists('Twig\Node\Expression\AbstractExpression');
if (\false) {
class Twig_Node_Expression extends AbstractExpression
{
}
}
PK��[FzP��twig/lib/Twig/Node/Flush.phpnu�[���<?php
use Twig\Node\FlushNode;
class_exists('Twig\Node\FlushNode');
if (\false) {
class Twig_Node_Flush extends FlushNode
{
}
}
PK��[*�b��twig/lib/Twig/Node/For.phpnu�[���<?php
use Twig\Node\ForNode;
class_exists('Twig\Node\ForNode');
if (\false) {
class Twig_Node_For extends ForNode
{
}
}
PK��[�Nח�twig/lib/Twig/Node/ForLoop.phpnu�[���<?php
use Twig\Node\ForLoopNode;
class_exists('Twig\Node\ForLoopNode');
if (\false) {
class Twig_Node_ForLoop extends ForLoopNode
{
}
}
PK��[w=����twig/lib/Twig/Node/If.phpnu�[���<?php
use Twig\Node\IfNode;
class_exists('Twig\Node\IfNode');
if (\false) {
class Twig_Node_If extends IfNode
{
}
}
PK��[��n��twig/lib/Twig/Node/Import.phpnu�[���<?php
use Twig\Node\ImportNode;
class_exists('Twig\Node\ImportNode');
if (\false) {
class Twig_Node_Import extends ImportNode
{
}
}
PK��[�0��twig/lib/Twig/Node/Include.phpnu�[���<?php
use Twig\Node\IncludeNode;
class_exists('Twig\Node\IncludeNode');
if (\false) {
class Twig_Node_Include extends IncludeNode
{
}
}
PK��[��<A��twig/lib/Twig/Node/Macro.phpnu�[���<?php
use Twig\Node\MacroNode;
class_exists('Twig\Node\MacroNode');
if (\false) {
class Twig_Node_Macro extends MacroNode
{
}
}
PK��[��禎�twig/lib/Twig/Node/Module.phpnu�[���<?php
use Twig\Node\ModuleNode;
class_exists('Twig\Node\ModuleNode');
if (\false) {
class Twig_Node_Module extends ModuleNode
{
}
}
PK��[ԡ�Ï�twig/lib/Twig/Node/Print.phpnu�[���<?php
use Twig\Node\PrintNode;
class_exists('Twig\Node\PrintNode');
if (\false) {
class Twig_Node_Print extends PrintNode
{
}
}
PK��[�~���twig/lib/Twig/Node/Sandbox.phpnu�[���<?php
use Twig\Node\SandboxNode;
class_exists('Twig\Node\SandboxNode');
if (\false) {
class Twig_Node_Sandbox extends SandboxNode
{
}
}
PK��[�y�@��%twig/lib/Twig/Node/SandboxedPrint.phpnu�[���<?php
use Twig\Node\SandboxedPrintNode;
class_exists('Twig\Node\SandboxedPrintNode');
if (\false) {
class Twig_Node_SandboxedPrint extends SandboxedPrintNode
{
}
}
PK��[絡߇�twig/lib/Twig/Node/Set.phpnu�[���<?php
use Twig\Node\SetNode;
class_exists('Twig\Node\SetNode');
if (\false) {
class Twig_Node_Set extends SetNode
{
}
}
PK��[0�f��twig/lib/Twig/Node/SetTemp.phpnu�[���<?php
use Twig\Node\SetTempNode;
class_exists('Twig\Node\SetTempNode');
if (\false) {
class Twig_Node_SetTemp extends SetTempNode
{
}
}
PK��[��͟�
twig/lib/Twig/Node/Spaceless.phpnu�[���<?php
use Twig\Node\SpacelessNode;
class_exists('Twig\Node\SpacelessNode');
if (\false) {
class Twig_Node_Spaceless extends SpacelessNode
{
}
}
PK��[5c�x��twig/lib/Twig/Node/Text.phpnu�[���<?php
use Twig\Node\TextNode;
class_exists('Twig\Node\TextNode');
if (\false) {
class Twig_Node_Text extends TextNode
{
}
}
PK��[@3�&��twig/lib/Twig/Node/With.phpnu�[���<?php
use Twig\Node\WithNode;
class_exists('Twig\Node\WithNode');
if (\false) {
class Twig_Node_With extends WithNode
{
}
}
PK��[~ң�zztwig/lib/Twig/Node.phpnu�[���<?php
use Twig\Node\Node;
class_exists('Twig\Node\Node');
if (\false) {
class Twig_Node extends Node
{
}
}
PK��[��N��&twig/lib/Twig/NodeCaptureInterface.phpnu�[���<?php
use Twig\Node\NodeCaptureInterface;
class_exists('Twig\Node\NodeCaptureInterface');
if (\false) {
class Twig_NodeCaptureInterface extends NodeCaptureInterface
{
}
}
PK��[br����twig/lib/Twig/NodeInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Compiler;
/**
* Represents a node in the AST.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_NodeInterface extends \Countable, \IteratorAggregate
{
/**
* Compiles the node to PHP.
*/
public function compile(Compiler $compiler);
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getLine();
public function getNodeTag();
}
PK��[O�8��%twig/lib/Twig/NodeOutputInterface.phpnu�[���<?php
use Twig\Node\NodeOutputInterface;
class_exists('Twig\Node\NodeOutputInterface');
if (\false) {
class Twig_NodeOutputInterface extends NodeOutputInterface
{
}
}
PK��[��퓔�twig/lib/Twig/NodeTraverser.phpnu�[���<?php
use Twig\NodeTraverser;
class_exists('Twig\NodeTraverser');
if (\false) {
class Twig_NodeTraverser extends NodeTraverser
{
}
}
PK��[h��%twig/lib/Twig/NodeVisitor/Escaper.phpnu�[���<?php
use Twig\NodeVisitor\EscaperNodeVisitor;
class_exists('Twig\NodeVisitor\EscaperNodeVisitor');
if (\false) {
class Twig_NodeVisitor_Escaper extends EscaperNodeVisitor
{
}
}
PK��[$�����'twig/lib/Twig/NodeVisitor/Optimizer.phpnu�[���<?php
use Twig\NodeVisitor\OptimizerNodeVisitor;
class_exists('Twig\NodeVisitor\OptimizerNodeVisitor');
if (\false) {
class Twig_NodeVisitor_Optimizer extends OptimizerNodeVisitor
{
}
}
PK��[�����*twig/lib/Twig/NodeVisitor/SafeAnalysis.phpnu�[���<?php
use Twig\NodeVisitor\SafeAnalysisNodeVisitor;
class_exists('Twig\NodeVisitor\SafeAnalysisNodeVisitor');
if (\false) {
class Twig_NodeVisitor_SafeAnalysis extends SafeAnalysisNodeVisitor
{
}
}
PK��[�����%twig/lib/Twig/NodeVisitor/Sandbox.phpnu�[���<?php
use Twig\NodeVisitor\SandboxNodeVisitor;
class_exists('Twig\NodeVisitor\SandboxNodeVisitor');
if (\false) {
class Twig_NodeVisitor_Sandbox extends SandboxNodeVisitor
{
}
}
PK��[�N@��&twig/lib/Twig/NodeVisitorInterface.phpnu�[���<?php
use Twig\NodeVisitor\NodeVisitorInterface;
class_exists('Twig\NodeVisitor\NodeVisitorInterface');
if (\false) {
class Twig_NodeVisitorInterface extends NodeVisitorInterface
{
}
}
PK��[�(%xxtwig/lib/Twig/Parser.phpnu�[���<?php
use Twig\Parser;
class_exists('Twig\Parser');
if (\false) {
class Twig_Parser extends Parser
{
}
}
PK��[L�E���!twig/lib/Twig/ParserInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Error\SyntaxError;
use Twig\Node\ModuleNode;
use Twig\TokenStream;
/**
* Interface implemented by parser classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_ParserInterface
{
/**
* Converts a token stream to a node tree.
*
* @return ModuleNode
*
* @throws SyntaxError When the token stream is syntactically or
semantically wrong
*/
public function parse(TokenStream $stream);
}
PK��[
��&twig/lib/Twig/Profiler/Dumper/Base.phpnu�[���<?php
use Twig\Profiler\Dumper\BaseDumper;
class_exists('Twig\Profiler\Dumper\BaseDumper');
if (\false) {
class Twig_Profiler_Dumper_Base extends BaseDumper
{
}
}
PK��[w���+twig/lib/Twig/Profiler/Dumper/Blackfire.phpnu�[���<?php
use Twig\Profiler\Dumper\BlackfireDumper;
class_exists('Twig\Profiler\Dumper\BlackfireDumper');
if (\false) {
class Twig_Profiler_Dumper_Blackfire extends BlackfireDumper
{
}
}
PK��[X�f���&twig/lib/Twig/Profiler/Dumper/Html.phpnu�[���<?php
use Twig\Profiler\Dumper\HtmlDumper;
class_exists('Twig\Profiler\Dumper\HtmlDumper');
if (\false) {
class Twig_Profiler_Dumper_Html extends HtmlDumper
{
}
}
PK��[�����&twig/lib/Twig/Profiler/Dumper/Text.phpnu�[���<?php
use Twig\Profiler\Dumper\TextDumper;
class_exists('Twig\Profiler\Dumper\TextDumper');
if (\false) {
class Twig_Profiler_Dumper_Text extends TextDumper
{
}
}
PK��[d����,twig/lib/Twig/Profiler/Node/EnterProfile.phpnu�[���<?php
use Twig\Profiler\Node\EnterProfileNode;
class_exists('Twig\Profiler\Node\EnterProfileNode');
if (\false) {
class Twig_Profiler_Node_EnterProfile extends EnterProfileNode
{
}
}
PK��[�����,twig/lib/Twig/Profiler/Node/LeaveProfile.phpnu�[���<?php
use Twig\Profiler\Node\LeaveProfileNode;
class_exists('Twig\Profiler\Node\LeaveProfileNode');
if (\false) {
class Twig_Profiler_Node_LeaveProfile extends LeaveProfileNode
{
}
}
PK��[~�~��/twig/lib/Twig/Profiler/NodeVisitor/Profiler.phpnu�[���<?php
use Twig\Profiler\NodeVisitor\ProfilerNodeVisitor;
class_exists('Twig\Profiler\NodeVisitor\ProfilerNodeVisitor');
if (\false) {
class Twig_Profiler_NodeVisitor_Profiler extends ProfilerNodeVisitor
{
}
}
PK��[%V��"twig/lib/Twig/Profiler/Profile.phpnu�[���<?php
use Twig\Profiler\Profile;
class_exists('Twig\Profiler\Profile');
if (\false) {
class Twig_Profiler_Profile extends Profile
{
}
}
PK��[Stʼ��(twig/lib/Twig/RuntimeLoaderInterface.phpnu�[���<?php
use Twig\RuntimeLoader\RuntimeLoaderInterface;
class_exists('Twig\RuntimeLoader\RuntimeLoaderInterface');
if (\false) {
class Twig_RuntimeLoaderInterface extends RuntimeLoaderInterface
{
}
}
PK��[
����'twig/lib/Twig/Sandbox/SecurityError.phpnu�[���<?php
use Twig\Sandbox\SecurityError;
class_exists('Twig\Sandbox\SecurityError');
if (\false) {
class Twig_Sandbox_SecurityError extends SecurityError
{
}
}
PK��[�����7twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedFilterError;
class_exists('Twig\Sandbox\SecurityNotAllowedFilterError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedFilterError extends
SecurityNotAllowedFilterError
{
}
}
PK��[����9twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedFunctionError;
class_exists('Twig\Sandbox\SecurityNotAllowedFunctionError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedFunctionError extends
SecurityNotAllowedFunctionError
{
}
}
PK��[y,����7twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedMethodError;
class_exists('Twig\Sandbox\SecurityNotAllowedMethodError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedMethodError extends
SecurityNotAllowedMethodError
{
}
}
PK��[PMQ��9twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedPropertyError;
class_exists('Twig\Sandbox\SecurityNotAllowedPropertyError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedPropertyError extends
SecurityNotAllowedPropertyError
{
}
}
PK��[�M����4twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.phpnu�[���<?php
use Twig\Sandbox\SecurityNotAllowedTagError;
class_exists('Twig\Sandbox\SecurityNotAllowedTagError');
if (\false) {
class Twig_Sandbox_SecurityNotAllowedTagError extends
SecurityNotAllowedTagError
{
}
}
PK��[�}@���(twig/lib/Twig/Sandbox/SecurityPolicy.phpnu�[���<?php
use Twig\Sandbox\SecurityPolicy;
class_exists('Twig\Sandbox\SecurityPolicy');
if (\false) {
class Twig_Sandbox_SecurityPolicy extends SecurityPolicy
{
}
}
PK��[��W���1twig/lib/Twig/Sandbox/SecurityPolicyInterface.phpnu�[���<?php
use Twig\Sandbox\SecurityPolicyInterface;
class_exists('Twig\Sandbox\SecurityPolicyInterface');
if (\false) {
class Twig_Sandbox_SecurityPolicyInterface extends
SecurityPolicyInterface
{
}
}
PK��[�S�twig/lib/Twig/SimpleFilter.phpnu�[���<?php
use Twig\TwigFilter;
class_exists('Twig\TwigFilter');
if (\false) {
class Twig_SimpleFilter extends TwigFilter
{
}
}
PK��[�\��
twig/lib/Twig/SimpleFunction.phpnu�[���<?php
use Twig\TwigFunction;
class_exists('Twig\TwigFunction');
if (\false) {
class Twig_SimpleFunction extends TwigFunction
{
}
}
PK��[���m��twig/lib/Twig/SimpleTest.phpnu�[���<?php
use Twig\TwigTest;
class_exists('Twig\TwigTest');
if (\false) {
class Twig_SimpleTest extends TwigTest
{
}
}
PK��[��vxxtwig/lib/Twig/Source.phpnu�[���<?php
use Twig\Source;
class_exists('Twig\Source');
if (\false) {
class Twig_Source extends Source
{
}
}
PK��[�����.twig/lib/Twig/SourceContextLoaderInterface.phpnu�[���<?php
use Twig\Loader\SourceContextLoaderInterface;
class_exists('Twig\Loader\SourceContextLoaderInterface');
if (\false) {
class Twig_SourceContextLoaderInterface extends
SourceContextLoaderInterface
{
}
}
PK��[ֹ鈀�twig/lib/Twig/Template.phpnu�[���<?php
use Twig\Template;
class_exists('Twig\Template');
if (\false) {
class Twig_Template extends Template
{
}
}
PK��[�yv���#twig/lib/Twig/TemplateInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Environment;
/**
* Interface implemented by all compiled templates.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_TemplateInterface
{
const ANY_CALL = 'any';
const ARRAY_CALL = 'array';
const METHOD_CALL = 'method';
/**
* Renders the template with the given context and returns it as
string.
*
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*/
public function render(array $context);
/**
* Displays the template with the given context.
*
* @param array $context An array of parameters to pass to the template
* @param array $blocks An array of blocks to pass to the template
*/
public function display(array $context, array $blocks = []);
/**
* Returns the bound environment for this template.
*
* @return Environment
*/
public function getEnvironment();
}
PK��[�����!twig/lib/Twig/TemplateWrapper.phpnu�[���<?php
use Twig\TemplateWrapper;
class_exists('Twig\TemplateWrapper');
if (\false) {
class Twig_TemplateWrapper extends TemplateWrapper
{
}
}
PK��[i��WWtwig/lib/Twig/Test/Function.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a function template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Test_Function extends Twig_Test
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}
PK��[��U��*twig/lib/Twig/Test/IntegrationTestCase.phpnu�[���<?php
use Twig\Test\IntegrationTestCase;
class_exists('Twig\Test\IntegrationTestCase');
if (\false) {
class Twig_Test_IntegrationTestCase extends IntegrationTestCase
{
}
}
PK��[_�<**twig/lib/Twig/Test/Method.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Extension\ExtensionInterface;
@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);
/**
* Represents a method template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Test_Method extends Twig_Test
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method,
array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return
sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($this->extension), $this->method);
}
}
PK��[�r�\&&twig/lib/Twig/Test/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@trigger_error('The Twig_Test_Node class is deprecated since version
1.12 and will be removed in 2.0.', E_USER_DEPRECATED);
/**
* Represents a template test as a Node.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Test_Node extends Twig_Test
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}
PK��[��P^��#twig/lib/Twig/Test/NodeTestCase.phpnu�[���<?php
use Twig\Test\NodeTestCase;
class_exists('Twig\Test\NodeTestCase');
if (\false) {
class Twig_Test_NodeTestCase extends NodeTestCase
{
}
}
PK��[�@'tttwig/lib/Twig/Test.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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);
/**
* Represents a template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
abstract class Twig_Test implements Twig_TestInterface,
Twig_TestCallableInterface
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'callable' => null,
], $options);
}
public function getCallable()
{
return $this->options['callable'];
}
}
PK��[�5}��'twig/lib/Twig/TestCallableInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a callable template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_TestCallableInterface
{
public function getCallable();
}
PK��[�J3��twig/lib/Twig/TestInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Represents a template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_TestInterface
{
/**
* Compiles a test.
*
* @return string The PHP code for the test
*/
public function compile();
}
PK��[�tttwig/lib/Twig/Token.phpnu�[���<?php
use Twig\Token;
class_exists('Twig\Token');
if (\false) {
class Twig_Token extends Token
{
}
}
PK��[ ��R��(twig/lib/Twig/TokenParser/AutoEscape.phpnu�[���<?php
use Twig\TokenParser\AutoEscapeTokenParser;
class_exists('Twig\TokenParser\AutoEscapeTokenParser');
if (\false) {
class Twig_TokenParser_AutoEscape extends AutoEscapeTokenParser
{
}
}
PK��[���#twig/lib/Twig/TokenParser/Block.phpnu�[���<?php
use Twig\TokenParser\BlockTokenParser;
class_exists('Twig\TokenParser\BlockTokenParser');
if (\false) {
class Twig_TokenParser_Block extends BlockTokenParser
{
}
}
PK��[�+�b��(twig/lib/Twig/TokenParser/Deprecated.phpnu�[���<?php
use Twig\TokenParser\DeprecatedTokenParser;
class_exists('Twig\TokenParser\DeprecatedTokenParser');
if (\false) {
class Twig_TokenParser_Deprecated extends DeprecatedTokenParser
{
}
}
PK��[:IA[��
twig/lib/Twig/TokenParser/Do.phpnu�[���<?php
use Twig\TokenParser\DoTokenParser;
class_exists('Twig\TokenParser\DoTokenParser');
if (\false) {
class Twig_TokenParser_Do extends DoTokenParser
{
}
}
PK��[�!'�#twig/lib/Twig/TokenParser/Embed.phpnu�[���<?php
use Twig\TokenParser\EmbedTokenParser;
class_exists('Twig\TokenParser\EmbedTokenParser');
if (\false) {
class Twig_TokenParser_Embed extends EmbedTokenParser
{
}
}
PK��[�z���%twig/lib/Twig/TokenParser/Extends.phpnu�[���<?php
use Twig\TokenParser\ExtendsTokenParser;
class_exists('Twig\TokenParser\ExtendsTokenParser');
if (\false) {
class Twig_TokenParser_Extends extends ExtendsTokenParser
{
}
}
PK��[�UTK��$twig/lib/Twig/TokenParser/Filter.phpnu�[���<?php
use Twig\TokenParser\FilterTokenParser;
class_exists('Twig\TokenParser\FilterTokenParser');
if (\false) {
class Twig_TokenParser_Filter extends FilterTokenParser
{
}
}
PK��[�����#twig/lib/Twig/TokenParser/Flush.phpnu�[���<?php
use Twig\TokenParser\FlushTokenParser;
class_exists('Twig\TokenParser\FlushTokenParser');
if (\false) {
class Twig_TokenParser_Flush extends FlushTokenParser
{
}
}
PK��[N
���!twig/lib/Twig/TokenParser/For.phpnu�[���<?php
use Twig\TokenParser\ForTokenParser;
class_exists('Twig\TokenParser\ForTokenParser');
if (\false) {
class Twig_TokenParser_For extends ForTokenParser
{
}
}
PK��[e�mU��"twig/lib/Twig/TokenParser/From.phpnu�[���<?php
use Twig\TokenParser\FromTokenParser;
class_exists('Twig\TokenParser\FromTokenParser');
if (\false) {
class Twig_TokenParser_From extends FromTokenParser
{
}
}
PK��[?_d`��
twig/lib/Twig/TokenParser/If.phpnu�[���<?php
use Twig\TokenParser\IfTokenParser;
class_exists('Twig\TokenParser\IfTokenParser');
if (\false) {
class Twig_TokenParser_If extends IfTokenParser
{
}
}
PK��[�1 ��$twig/lib/Twig/TokenParser/Import.phpnu�[���<?php
use Twig\TokenParser\ImportTokenParser;
class_exists('Twig\TokenParser\ImportTokenParser');
if (\false) {
class Twig_TokenParser_Import extends ImportTokenParser
{
}
}
PK��[�@�|��%twig/lib/Twig/TokenParser/Include.phpnu�[���<?php
use Twig\TokenParser\IncludeTokenParser;
class_exists('Twig\TokenParser\IncludeTokenParser');
if (\false) {
class Twig_TokenParser_Include extends IncludeTokenParser
{
}
}
PK��[Bl�
��#twig/lib/Twig/TokenParser/Macro.phpnu�[���<?php
use Twig\TokenParser\MacroTokenParser;
class_exists('Twig\TokenParser\MacroTokenParser');
if (\false) {
class Twig_TokenParser_Macro extends MacroTokenParser
{
}
}
PK��[�V̐��%twig/lib/Twig/TokenParser/Sandbox.phpnu�[���<?php
use Twig\TokenParser\SandboxTokenParser;
class_exists('Twig\TokenParser\SandboxTokenParser');
if (\false) {
class Twig_TokenParser_Sandbox extends SandboxTokenParser
{
}
}
PK��[g����!twig/lib/Twig/TokenParser/Set.phpnu�[���<?php
use Twig\TokenParser\SetTokenParser;
class_exists('Twig\TokenParser\SetTokenParser');
if (\false) {
class Twig_TokenParser_Set extends SetTokenParser
{
}
}
PK��[������'twig/lib/Twig/TokenParser/Spaceless.phpnu�[���<?php
use Twig\TokenParser\SpacelessTokenParser;
class_exists('Twig\TokenParser\SpacelessTokenParser');
if (\false) {
class Twig_TokenParser_Spaceless extends SpacelessTokenParser
{
}
}
PK��[A�[��!twig/lib/Twig/TokenParser/Use.phpnu�[���<?php
use Twig\TokenParser\UseTokenParser;
class_exists('Twig\TokenParser\UseTokenParser');
if (\false) {
class Twig_TokenParser_Use extends UseTokenParser
{
}
}
PK��[�ou��"twig/lib/Twig/TokenParser/With.phpnu�[���<?php
use Twig\TokenParser\WithTokenParser;
class_exists('Twig\TokenParser\WithTokenParser');
if (\false) {
class Twig_TokenParser_With extends WithTokenParser
{
}
}
PK��[/u�:��twig/lib/Twig/TokenParser.phpnu�[���<?php
use Twig\TokenParser\AbstractTokenParser;
class_exists('Twig\TokenParser\AbstractTokenParser');
if (\false) {
class Twig_TokenParser extends AbstractTokenParser
{
}
}
PK��[��Z�#twig/lib/Twig/TokenParserBroker.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\TokenParser\TokenParserInterface;
/**
* Default implementation of a token parser broker.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface
{
protected $parser;
protected $parsers = [];
protected $brokers = [];
/**
* @param array|\Traversable $parsers A \Traversable of
Twig_TokenParserInterface instances
* @param array|\Traversable $brokers A \Traversable of
Twig_TokenParserBrokerInterface instances
* @param bool $triggerDeprecationError
*/
public function __construct($parsers = [], $brokers = [],
$triggerDeprecationError = true)
{
if ($triggerDeprecationError) {
@trigger_error('The '.__CLASS__.' class is
deprecated since version 1.12 and will be removed in 2.0.',
E_USER_DEPRECATED);
}
foreach ($parsers as $parser) {
if (!$parser instanceof TokenParserInterface) {
throw new \LogicException('$parsers must a an array of
Twig_TokenParserInterface.');
}
$this->parsers[$parser->getTag()] = $parser;
}
foreach ($brokers as $broker) {
if (!$broker instanceof Twig_TokenParserBrokerInterface) {
throw new \LogicException('$brokers must a an array of
Twig_TokenParserBrokerInterface.');
}
$this->brokers[] = $broker;
}
}
public function addTokenParser(TokenParserInterface $parser)
{
$this->parsers[$parser->getTag()] = $parser;
}
public function removeTokenParser(TokenParserInterface $parser)
{
$name = $parser->getTag();
if (isset($this->parsers[$name]) && $parser ===
$this->parsers[$name]) {
unset($this->parsers[$name]);
}
}
public function addTokenParserBroker(self $broker)
{
$this->brokers[] = $broker;
}
public function removeTokenParserBroker(self $broker)
{
if (false !== $pos = array_search($broker, $this->brokers)) {
unset($this->brokers[$pos]);
}
}
/**
* Gets a suitable TokenParser for a tag.
*
* First looks in parsers, then in brokers.
*
* @param string $tag A tag name
*
* @return TokenParserInterface|null A Twig_TokenParserInterface or
null if no suitable TokenParser was found
*/
public function getTokenParser($tag)
{
if (isset($this->parsers[$tag])) {
return $this->parsers[$tag];
}
$broker = end($this->brokers);
while (false !== $broker) {
$parser = $broker->getTokenParser($tag);
if (null !== $parser) {
return $parser;
}
$broker = prev($this->brokers);
}
}
public function getParsers()
{
return $this->parsers;
}
public function getParser()
{
return $this->parser;
}
public function setParser(Twig_ParserInterface $parser)
{
$this->parser = $parser;
foreach ($this->parsers as $tokenParser) {
$tokenParser->setParser($parser);
}
foreach ($this->brokers as $broker) {
$broker->setParser($parser);
}
}
}
PK��[�@v#��,twig/lib/Twig/TokenParserBrokerInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\TokenParser\TokenParserInterface;
/**
* Interface implemented by token parser brokers.
*
* Token parser brokers allows to implement custom logic in the process of
resolving a token parser for a given tag name.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_TokenParserBrokerInterface
{
/**
* Gets a TokenParser suitable for a tag.
*
* @param string $tag A tag name
*
* @return TokenParserInterface|null A Twig_TokenParserInterface or
null if no suitable TokenParser was found
*/
public function getTokenParser($tag);
/**
* Calls Twig\TokenParser\TokenParserInterface::setParser on all
parsers the implementation knows of.
*/
public function setParser(Twig_ParserInterface $parser);
/**
* Gets the Twig_ParserInterface.
*
* @return Twig_ParserInterface|null A Twig_ParserInterface instance or
null
*/
public function getParser();
}
PK��[����&twig/lib/Twig/TokenParserInterface.phpnu�[���<?php
use Twig\TokenParser\TokenParserInterface;
class_exists('Twig\TokenParser\TokenParserInterface');
if (\false) {
class Twig_TokenParserInterface extends TokenParserInterface
{
}
}
PK��[�ܚ��twig/lib/Twig/TokenStream.phpnu�[���<?php
use Twig\TokenStream;
class_exists('Twig\TokenStream');
if (\false) {
class Twig_TokenStream extends TokenStream
{
}
}
PK��["�ǿ�+twig/lib/Twig/Util/DeprecationCollector.phpnu�[���<?php
use Twig\Util\DeprecationCollector;
class_exists('Twig\Util\DeprecationCollector');
if (\false) {
class Twig_Util_DeprecationCollector extends DeprecationCollector
{
}
}
PK��[Z8�Q��*twig/lib/Twig/Util/TemplateDirIterator.phpnu�[���<?php
use Twig\Util\TemplateDirIterator;
class_exists('Twig\Util\TemplateDirIterator');
if (\false) {
class Twig_Util_TemplateDirIterator extends TemplateDirIterator
{
}
}
PK��[��P;��!twig/src/Cache/CacheInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Cache;
/**
* Interface implemented by cache classes.
*
* It is highly recommended to always store templates on the filesystem to
* benefit from the PHP opcode cache. This interface is mostly useful if
you
* need to implement a custom strategy for storing templates on the
filesystem.
*
* @author Andrew Tch <andrew@noop.lv>
*/
interface CacheInterface
{
/**
* Generates a cache key for the given template class name.
*
* @param string $name The template name
* @param string $className The template class name
*
* @return string
*/
public function generateKey($name, $className);
/**
* Writes the compiled template to cache.
*
* @param string $key The cache key
* @param string $content The template representation as a PHP class
*/
public function write($key, $content);
/**
* Loads a template from the cache.
*
* @param string $key The cache key
*/
public function load($key);
/**
* Returns the modification timestamp of a key.
*
* @param string $key The cache key
*
* @return int
*/
public function getTimestamp($key);
}
class_alias('Twig\Cache\CacheInterface',
'Twig_CacheInterface');
PK��[E���0
0
"twig/src/Cache/FilesystemCache.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Cache;
/**
* Implements a cache on the filesystem.
*
* @author Andrew Tch <andrew@noop.lv>
*/
class FilesystemCache implements CacheInterface
{
const FORCE_BYTECODE_INVALIDATION = 1;
private $directory;
private $options;
/**
* @param string $directory The root cache directory
* @param int $options A set of options
*/
public function __construct($directory, $options = 0)
{
$this->directory = rtrim($directory,
'\/').'/';
$this->options = $options;
}
public function generateKey($name, $className)
{
$hash = hash('sha256', $className);
return
$this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
}
public function load($key)
{
if (file_exists($key)) {
@include_once $key;
}
}
public function write($key, $content)
{
$dir = \dirname($key);
if (!is_dir($dir)) {
if (false === @mkdir($dir, 0777, true)) {
clearstatcache(true, $dir);
if (!is_dir($dir)) {
throw new \RuntimeException(sprintf('Unable to
create the cache directory (%s).', $dir));
}
}
} elseif (!is_writable($dir)) {
throw new \RuntimeException(sprintf('Unable to write in
the cache directory (%s).', $dir));
}
$tmpFile = tempnam($dir, basename($key));
if (false !== @file_put_contents($tmpFile, $content) &&
@rename($tmpFile, $key)) {
@chmod($key, 0666 & ~umask());
if (self::FORCE_BYTECODE_INVALIDATION == ($this->options
& self::FORCE_BYTECODE_INVALIDATION)) {
// Compile cached file into bytecode cache
if (\function_exists('opcache_invalidate')
&& filter_var(ini_get('opcache.enable'),
FILTER_VALIDATE_BOOLEAN)) {
@opcache_invalidate($key, true);
} elseif (\function_exists('apc_compile_file')) {
apc_compile_file($key);
}
}
return;
}
throw new \RuntimeException(sprintf('Failed to write cache
file "%s".', $key));
}
public function getTimestamp($key)
{
if (!file_exists($key)) {
return 0;
}
return (int) @filemtime($key);
}
}
class_alias('Twig\Cache\FilesystemCache',
'Twig_Cache_Filesystem');
PK��[�6T��twig/src/Cache/NullCache.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Cache;
/**
* Implements a no-cache strategy.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class NullCache implements CacheInterface
{
public function generateKey($name, $className)
{
return '';
}
public function write($key, $content)
{
}
public function load($key)
{
}
public function getTimestamp($key)
{
return 0;
}
}
class_alias('Twig\Cache\NullCache', 'Twig_Cache_Null');
PK��[:��Xzztwig/src/Compiler.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Node\ModuleNode;
/**
* Compiles a node to PHP code.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Compiler implements \Twig_CompilerInterface
{
protected $lastLine;
protected $source;
protected $indentation;
protected $env;
protected $debugInfo = [];
protected $sourceOffset;
protected $sourceLine;
protected $filename;
private $varNameSalt = 0;
public function __construct(Environment $env)
{
$this->env = $env;
}
/**
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getFilename()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
return $this->filename;
}
/**
* Returns the environment instance related to this compiler.
*
* @return Environment
*/
public function getEnvironment()
{
return $this->env;
}
/**
* Gets the current PHP code after compilation.
*
* @return string The PHP code
*/
public function getSource()
{
return $this->source;
}
/**
* Compiles a node.
*
* @param int $indentation The current indentation
*
* @return $this
*/
public function compile(\Twig_NodeInterface $node, $indentation = 0)
{
$this->lastLine = null;
$this->source = '';
$this->debugInfo = [];
$this->sourceOffset = 0;
// source code starts at 1 (as we then increment it when we
encounter new lines)
$this->sourceLine = 1;
$this->indentation = $indentation;
$this->varNameSalt = 0;
if ($node instanceof ModuleNode) {
// to be removed in 2.0
$this->filename = $node->getTemplateName();
}
$node->compile($this);
return $this;
}
public function subcompile(\Twig_NodeInterface $node, $raw = true)
{
if (false === $raw) {
$this->source .= str_repeat(' ',
$this->indentation * 4);
}
$node->compile($this);
return $this;
}
/**
* Adds a raw string to the compiled code.
*
* @param string $string The string
*
* @return $this
*/
public function raw($string)
{
$this->source .= $string;
return $this;
}
/**
* Writes a string to the compiled code by adding indentation.
*
* @return $this
*/
public function write()
{
$strings = \func_get_args();
foreach ($strings as $string) {
$this->source .= str_repeat(' ',
$this->indentation * 4).$string;
}
return $this;
}
/**
* Appends an indentation to the current PHP code after compilation.
*
* @return $this
*
* @deprecated since 1.27 (to be removed in 2.0).
*/
public function addIndentation()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
write(\'\') instead.', E_USER_DEPRECATED);
$this->source .= str_repeat(' ', $this->indentation
* 4);
return $this;
}
/**
* Adds a quoted string to the compiled code.
*
* @param string $value The string
*
* @return $this
*/
public function string($value)
{
$this->source .= sprintf('"%s"',
addcslashes($value, "\0\t\"\$\\"));
return $this;
}
/**
* Returns a PHP representation of a given value.
*
* @param mixed $value The value to convert
*
* @return $this
*/
public function repr($value)
{
if (\is_int($value) || \is_float($value)) {
if (false !== $locale = setlocale(LC_NUMERIC, '0')) {
setlocale(LC_NUMERIC, 'C');
}
$this->raw(var_export($value, true));
if (false !== $locale) {
setlocale(LC_NUMERIC, $locale);
}
} elseif (null === $value) {
$this->raw('null');
} elseif (\is_bool($value)) {
$this->raw($value ? 'true' : 'false');
} elseif (\is_array($value)) {
$this->raw('[');
$first = true;
foreach ($value as $key => $v) {
if (!$first) {
$this->raw(', ');
}
$first = false;
$this->repr($key);
$this->raw(' => ');
$this->repr($v);
}
$this->raw(']');
} else {
$this->string($value);
}
return $this;
}
/**
* Adds debugging information.
*
* @return $this
*/
public function addDebugInfo(\Twig_NodeInterface $node)
{
if ($node->getTemplateLine() != $this->lastLine) {
$this->write(sprintf("// line %d\n",
$node->getTemplateLine()));
// when mbstring.func_overload is set to 2
// mb_substr_count() replaces substr_count()
// but they have different signatures!
if (((int) ini_get('mbstring.func_overload')) &
2) {
@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);
// this is much slower than the "right" version
$this->sourceLine +=
mb_substr_count(mb_substr($this->source, $this->sourceOffset),
"\n");
} else {
$this->sourceLine += substr_count($this->source,
"\n", $this->sourceOffset);
}
$this->sourceOffset = \strlen($this->source);
$this->debugInfo[$this->sourceLine] =
$node->getTemplateLine();
$this->lastLine = $node->getTemplateLine();
}
return $this;
}
public function getDebugInfo()
{
ksort($this->debugInfo);
return $this->debugInfo;
}
/**
* Indents the generated code.
*
* @param int $step The number of indentation to add
*
* @return $this
*/
public function indent($step = 1)
{
$this->indentation += $step;
return $this;
}
/**
* Outdents the generated code.
*
* @param int $step The number of indentation to remove
*
* @return $this
*
* @throws \LogicException When trying to outdent too much so the
indentation would become negative
*/
public function outdent($step = 1)
{
// can't outdent by more steps than the current indentation
level
if ($this->indentation < $step) {
throw new \LogicException('Unable to call outdent() as the
indentation would become negative.');
}
$this->indentation -= $step;
return $this;
}
public function getVarName()
{
return sprintf('__internal_%s', hash('sha256',
__METHOD__.$this->varNameSalt++));
}
}
class_alias('Twig\Compiler', 'Twig_Compiler');
PK��[��.����twig/src/Environment.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Cache\CacheInterface;
use Twig\Cache\FilesystemCache;
use Twig\Cache\NullCache;
use Twig\Error\Error;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use Twig\Extension\CoreExtension;
use Twig\Extension\EscaperExtension;
use Twig\Extension\ExtensionInterface;
use Twig\Extension\GlobalsInterface;
use Twig\Extension\InitRuntimeInterface;
use Twig\Extension\OptimizerExtension;
use Twig\Extension\StagingExtension;
use Twig\Loader\ArrayLoader;
use Twig\Loader\ChainLoader;
use Twig\Loader\LoaderInterface;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\Node\ModuleNode;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\RuntimeLoader\RuntimeLoaderInterface;
use Twig\TokenParser\TokenParserInterface;
/**
* Stores the Twig configuration.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Environment
{
const VERSION = '1.42.5';
const VERSION_ID = 14205;
const MAJOR_VERSION = 1;
const MINOR_VERSION = 42;
const RELEASE_VERSION = 5;
const EXTRA_VERSION = '';
protected $charset;
protected $loader;
protected $debug;
protected $autoReload;
protected $cache;
protected $lexer;
protected $parser;
protected $compiler;
protected $baseTemplateClass;
protected $extensions;
protected $parsers;
protected $visitors;
protected $filters;
protected $tests;
protected $functions;
protected $globals;
protected $runtimeInitialized = false;
protected $extensionInitialized = false;
protected $loadedTemplates;
protected $strictVariables;
protected $unaryOperators;
protected $binaryOperators;
protected $templateClassPrefix = '__TwigTemplate_';
protected $functionCallbacks = [];
protected $filterCallbacks = [];
protected $staging;
private $originalCache;
private $bcWriteCacheFile = false;
private $bcGetCacheFilename = false;
private $lastModifiedExtension = 0;
private $extensionsByClass = [];
private $runtimeLoaders = [];
private $runtimes = [];
private $optionsHash;
/**
* Constructor.
*
* Available options:
*
* * debug: When set to true, it automatically set
"auto_reload" to true as
* well (default to false).
*
* * charset: The charset used by the templates (default to UTF-8).
*
* * base_template_class: The base template class to use for generated
* templates (default to \Twig\Template).
*
* * cache: An absolute path where to store the compiled templates,
* a \Twig\Cache\CacheInterface implementation,
* or false to disable compilation cache (default).
*
* * auto_reload: Whether to reload the template if the original
source changed.
* If you don't provide the auto_reload option, it
will be
* determined automatically based on the debug value.
*
* * strict_variables: Whether to ignore invalid variables in
templates
* (default to false).
*
* * autoescape: Whether to enable auto-escaping (default to html):
* * false: disable auto-escaping
* * true: equivalent to html
* * html, js: set the autoescaping to one of the
supported strategies
* * name: set the autoescaping strategy based on the
template name extension
* * PHP callback: a PHP callback that returns an
escaping strategy based on the template "name"
*
* * optimizations: A flag that indicates which optimizations to apply
* (default to -1 which means that all optimizations
are enabled;
* set it to 0 to disable).
*/
public function __construct(LoaderInterface $loader = null, $options =
[])
{
if (null !== $loader) {
$this->setLoader($loader);
} else {
@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);
}
$options = array_merge([
'debug' => false,
'charset' => 'UTF-8',
'base_template_class' =>
'\Twig\Template',
'strict_variables' => false,
'autoescape' => 'html',
'cache' => false,
'auto_reload' => null,
'optimizations' => -1,
], $options);
$this->debug = (bool) $options['debug'];
$this->charset = strtoupper($options['charset']);
$this->baseTemplateClass =
$options['base_template_class'];
$this->autoReload = null === $options['auto_reload'] ?
$this->debug : (bool) $options['auto_reload'];
$this->strictVariables = (bool)
$options['strict_variables'];
$this->setCache($options['cache']);
$this->addExtension(new CoreExtension());
$this->addExtension(new
EscaperExtension($options['autoescape']));
$this->addExtension(new
OptimizerExtension($options['optimizations']));
$this->staging = new StagingExtension();
// For BC
if (\is_string($this->originalCache)) {
$r = new \ReflectionMethod($this, 'writeCacheFile');
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error('The Twig\Environment::writeCacheFile
method is deprecated since version 1.22 and will be removed in Twig
2.0.', E_USER_DEPRECATED);
$this->bcWriteCacheFile = true;
}
$r = new \ReflectionMethod($this,
'getCacheFilename');
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error('The Twig\Environment::getCacheFilename
method is deprecated since version 1.22 and will be removed in Twig
2.0.', E_USER_DEPRECATED);
$this->bcGetCacheFilename = true;
}
}
}
/**
* Gets the base template class for compiled templates.
*
* @return string The base template class name
*/
public function getBaseTemplateClass()
{
return $this->baseTemplateClass;
}
/**
* Sets the base template class for compiled templates.
*
* @param string $class The base template class name
*/
public function setBaseTemplateClass($class)
{
$this->baseTemplateClass = $class;
$this->updateOptionsHash();
}
/**
* Enables debugging mode.
*/
public function enableDebug()
{
$this->debug = true;
$this->updateOptionsHash();
}
/**
* Disables debugging mode.
*/
public function disableDebug()
{
$this->debug = false;
$this->updateOptionsHash();
}
/**
* Checks if debug mode is enabled.
*
* @return bool true if debug mode is enabled, false otherwise
*/
public function isDebug()
{
return $this->debug;
}
/**
* Enables the auto_reload option.
*/
public function enableAutoReload()
{
$this->autoReload = true;
}
/**
* Disables the auto_reload option.
*/
public function disableAutoReload()
{
$this->autoReload = false;
}
/**
* Checks if the auto_reload option is enabled.
*
* @return bool true if auto_reload is enabled, false otherwise
*/
public function isAutoReload()
{
return $this->autoReload;
}
/**
* Enables the strict_variables option.
*/
public function enableStrictVariables()
{
$this->strictVariables = true;
$this->updateOptionsHash();
}
/**
* Disables the strict_variables option.
*/
public function disableStrictVariables()
{
$this->strictVariables = false;
$this->updateOptionsHash();
}
/**
* Checks if the strict_variables option is enabled.
*
* @return bool true if strict_variables is enabled, false otherwise
*/
public function isStrictVariables()
{
return $this->strictVariables;
}
/**
* Gets the current cache implementation.
*
* @param bool $original Whether to return the original cache option or
the real cache instance
*
* @return CacheInterface|string|false A Twig\Cache\CacheInterface
implementation,
* an absolute path to the compiled
templates,
* or false to disable cache
*/
public function getCache($original = true)
{
return $original ? $this->originalCache : $this->cache;
}
/**
* Sets the current cache implementation.
*
* @param CacheInterface|string|false $cache A
Twig\Cache\CacheInterface implementation,
* an absolute path to the
compiled templates,
* or false to disable cache
*/
public function setCache($cache)
{
if (\is_string($cache)) {
$this->originalCache = $cache;
$this->cache = new FilesystemCache($cache);
} elseif (false === $cache) {
$this->originalCache = $cache;
$this->cache = new NullCache();
} elseif (null === $cache) {
@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);
$this->originalCache = false;
$this->cache = new NullCache();
} elseif ($cache instanceof CacheInterface) {
$this->originalCache = $this->cache = $cache;
} else {
throw new \LogicException(sprintf('Cache can only be a
string, false, or a \Twig\Cache\CacheInterface implementation.'));
}
}
/**
* Gets the cache filename for a given template.
*
* @param string $name The template name
*
* @return string|false The cache file name or false when caching is
disabled
*
* @deprecated since 1.22 (to be removed in 2.0)
*/
public function getCacheFilename($name)
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.22 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
$key = $this->cache->generateKey($name,
$this->getTemplateClass($name));
return !$key ? false : $key;
}
/**
* Gets the template class associated with the given string.
*
* The generated template class is based on the following parameters:
*
* * The cache key for the given template;
* * The currently enabled extensions;
* * Whether the Twig C extension is available or not;
* * PHP version;
* * Twig version;
* * Options with what environment was created.
*
* @param string $name The name for which to calculate the template
class name
* @param int|null $index The index if it is an embedded template
*
* @return string The template class name
*/
public function getTemplateClass($name, $index = null)
{
$key =
$this->getLoader()->getCacheKey($name).$this->optionsHash;
return $this->templateClassPrefix.hash('sha256',
$key).(null === $index ? '' : '___'.$index);
}
/**
* Gets the template class prefix.
*
* @return string The template class prefix
*
* @deprecated since 1.22 (to be removed in 2.0)
*/
public function getTemplateClassPrefix()
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.22 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
return $this->templateClassPrefix;
}
/**
* Renders a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to
pass to the template
*
* @return string The rendered template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = [])
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to
pass to the template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function display($name, array $context = [])
{
$this->load($name)->display($context);
}
/**
* Loads a template.
*
* @param string|TemplateWrapper|\Twig\Template $name The template name
*
* @throws LoaderError When the template cannot be found
* @throws RuntimeError When a previously generated cache is corrupted
* @throws SyntaxError When an error occurred during compilation
*
* @return TemplateWrapper
*/
public function load($name)
{
if ($name instanceof TemplateWrapper) {
return $name;
}
if ($name instanceof Template) {
return new TemplateWrapper($this, $name);
}
return new TemplateWrapper($this, $this->loadTemplate($name));
}
/**
* Loads a template internal representation.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The template name
* @param int $index The index if it is an embedded template
*
* @return \Twig_TemplateInterface A template instance representing the
given template name
*
* @throws LoaderError When the template cannot be found
* @throws RuntimeError When a previously generated cache is corrupted
* @throws SyntaxError When an error occurred during compilation
*
* @internal
*/
public function loadTemplate($name, $index = null)
{
return $this->loadClass($this->getTemplateClass($name),
$name, $index);
}
/**
* @internal
*/
public function loadClass($cls, $name, $index = null)
{
$mainCls = $cls;
if (null !== $index) {
$cls .= '___'.$index;
}
if (isset($this->loadedTemplates[$cls])) {
return $this->loadedTemplates[$cls];
}
if (!class_exists($cls, false)) {
if ($this->bcGetCacheFilename) {
$key = $this->getCacheFilename($name);
} else {
$key = $this->cache->generateKey($name, $mainCls);
}
if (!$this->isAutoReload() ||
$this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
$this->cache->load($key);
}
$source = null;
if (!class_exists($cls, false)) {
$loader = $this->getLoader();
if (!$loader instanceof SourceContextLoaderInterface) {
$source = new Source($loader->getSource($name),
$name);
} else {
$source = $loader->getSourceContext($name);
}
$content = $this->compileSource($source);
if ($this->bcWriteCacheFile) {
$this->writeCacheFile($key, $content);
} else {
$this->cache->write($key, $content);
$this->cache->load($key);
}
if (!class_exists($mainCls, false)) {
/* Last line of defense if either
$this->bcWriteCacheFile was used,
* $this->cache is implemented as a no-op or we have
a race condition
* where the cache was cleared between the above calls
to write to and load from
* the cache.
*/
eval('?>'.$content);
}
}
if (!class_exists($cls, false)) {
throw new RuntimeError(sprintf('Failed to load Twig
template "%s", index "%s": cache might be
corrupted.', $name, $index), -1, $source);
}
}
if (!$this->runtimeInitialized) {
$this->initRuntime();
}
return $this->loadedTemplates[$cls] = new $cls($this);
}
/**
* Creates a template from source.
*
* This method should not be used as a generic way to load templates.
*
* @param string $template The template source
* @param string $name An optional name of the template to be used
in error messages
*
* @return TemplateWrapper A template instance representing the given
template name
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
*/
public function createTemplate($template, $name = null)
{
$hash = hash('sha256', $template, false);
if (null !== $name) {
$name = sprintf('%s (string template %s)', $name,
$hash);
} else {
$name = sprintf('__string_template__%s', $hash);
}
$loader = new ChainLoader([
new ArrayLoader([$name => $template]),
$current = $this->getLoader(),
]);
$this->setLoader($loader);
try {
$template = new TemplateWrapper($this,
$this->loadTemplate($name));
} catch (\Exception $e) {
$this->setLoader($current);
throw $e;
} catch (\Throwable $e) {
$this->setLoader($current);
throw $e;
}
$this->setLoader($current);
return $template;
}
/**
* Returns true if the template is still fresh.
*
* Besides checking the loader for freshness information,
* this method also checks if the enabled extensions have
* not changed.
*
* @param string $name The template name
* @param int $time The last modification time of the cached
template
*
* @return bool true if the template is fresh, false otherwise
*/
public function isTemplateFresh($name, $time)
{
if (0 === $this->lastModifiedExtension) {
foreach ($this->extensions as $extension) {
$r = new \ReflectionObject($extension);
if (file_exists($r->getFileName()) &&
($extensionTime = filemtime($r->getFileName())) >
$this->lastModifiedExtension) {
$this->lastModifiedExtension = $extensionTime;
}
}
}
return $this->lastModifiedExtension <= $time &&
$this->getLoader()->isFresh($name, $time);
}
/**
* Tries to load a template consecutively from an array.
*
* Similar to load() but it also accepts instances of \Twig\Template
and
* \Twig\TemplateWrapper, and an array of templates where each is tried
to be loaded.
*
* @param string|Template|\Twig\TemplateWrapper|array $names A template
or an array of templates to try consecutively
*
* @return TemplateWrapper|Template
*
* @throws LoaderError When none of the templates can be found
* @throws SyntaxError When an error occurred during compilation
*/
public function resolveTemplate($names)
{
if (!\is_array($names)) {
$names = [$names];
}
foreach ($names as $name) {
if ($name instanceof Template) {
return $name;
}
if ($name instanceof TemplateWrapper) {
return $name;
}
try {
return $this->loadTemplate($name);
} catch (LoaderError $e) {
if (1 === \count($names)) {
throw $e;
}
}
}
throw new LoaderError(sprintf('Unable to find one of the
following templates: "%s".', implode('",
"', $names)));
}
/**
* Clears the internal template cache.
*
* @deprecated since 1.18.3 (to be removed in 2.0)
*/
public function clearTemplateCache()
{
@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);
$this->loadedTemplates = [];
}
/**
* Clears the template cache files on the filesystem.
*
* @deprecated since 1.22 (to be removed in 2.0)
*/
public function clearCacheFiles()
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.22 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
if (\is_string($this->originalCache)) {
foreach (new \RecursiveIteratorIterator(new
\RecursiveDirectoryIterator($this->originalCache),
\RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
if ($file->isFile()) {
@unlink($file->getPathname());
}
}
}
}
/**
* Gets the Lexer instance.
*
* @return \Twig_LexerInterface
*
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getLexer()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
if (null === $this->lexer) {
$this->lexer = new Lexer($this);
}
return $this->lexer;
}
public function setLexer(\Twig_LexerInterface $lexer)
{
$this->lexer = $lexer;
}
/**
* Tokenizes a source code.
*
* @param string|Source $source The template source code
* @param string $name The template name (deprecated)
*
* @return TokenStream
*
* @throws SyntaxError When the code is syntactically wrong
*/
public function tokenize($source, $name = null)
{
if (!$source instanceof Source) {
@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);
$source = new Source($source, $name);
}
if (null === $this->lexer) {
$this->lexer = new Lexer($this);
}
return $this->lexer->tokenize($source);
}
/**
* Gets the Parser instance.
*
* @return \Twig_ParserInterface
*
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getParser()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
if (null === $this->parser) {
$this->parser = new Parser($this);
}
return $this->parser;
}
public function setParser(\Twig_ParserInterface $parser)
{
$this->parser = $parser;
}
/**
* Converts a token stream to a node tree.
*
* @return ModuleNode
*
* @throws SyntaxError When the token stream is syntactically or
semantically wrong
*/
public function parse(TokenStream $stream)
{
if (null === $this->parser) {
$this->parser = new Parser($this);
}
return $this->parser->parse($stream);
}
/**
* Gets the Compiler instance.
*
* @return \Twig_CompilerInterface
*
* @deprecated since 1.25 (to be removed in 2.0)
*/
public function getCompiler()
{
@trigger_error(sprintf('The %s() method is deprecated since
version 1.25 and will be removed in 2.0.', __FUNCTION__),
E_USER_DEPRECATED);
if (null === $this->compiler) {
$this->compiler = new Compiler($this);
}
return $this->compiler;
}
public function setCompiler(\Twig_CompilerInterface $compiler)
{
$this->compiler = $compiler;
}
/**
* Compiles a node and returns the PHP code.
*
* @return string The compiled PHP source code
*/
public function compile(\Twig_NodeInterface $node)
{
if (null === $this->compiler) {
$this->compiler = new Compiler($this);
}
return $this->compiler->compile($node)->getSource();
}
/**
* Compiles a template source code.
*
* @param string|Source $source The template source code
* @param string $name The template name (deprecated)
*
* @return string The compiled PHP source code
*
* @throws SyntaxError When there was an error during tokenizing,
parsing or compiling
*/
public function compileSource($source, $name = null)
{
if (!$source instanceof Source) {
@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);
$source = new Source($source, $name);
}
try {
return
$this->compile($this->parse($this->tokenize($source)));
} catch (Error $e) {
$e->setSourceContext($source);
throw $e;
} catch (\Exception $e) {
throw new SyntaxError(sprintf('An exception has been
thrown during the compilation of a template ("%s").',
$e->getMessage()), -1, $source, $e);
}
}
public function setLoader(LoaderInterface $loader)
{
if (!$loader instanceof SourceContextLoaderInterface && 0
!== strpos(\get_class($loader), 'Mock_')) {
@trigger_error(sprintf('Twig loader "%s" should
implement Twig\Loader\SourceContextLoaderInterface since version
1.27.', \get_class($loader)), E_USER_DEPRECATED);
}
$this->loader = $loader;
}
/**
* Gets the Loader instance.
*
* @return LoaderInterface
*/
public function getLoader()
{
if (null === $this->loader) {
throw new \LogicException('You must set a loader
first.');
}
return $this->loader;
}
/**
* Sets the default template charset.
*
* @param string $charset The default charset
*/
public function setCharset($charset)
{
$this->charset = strtoupper($charset);
}
/**
* Gets the default template charset.
*
* @return string The default charset
*/
public function getCharset()
{
return $this->charset;
}
/**
* Initializes the runtime environment.
*
* @deprecated since 1.23 (to be removed in 2.0)
*/
public function initRuntime()
{
$this->runtimeInitialized = true;
foreach ($this->getExtensions() as $name => $extension) {
if (!$extension instanceof InitRuntimeInterface) {
$m = new \ReflectionMethod($extension,
'initRuntime');
$parentClass = $m->getDeclaringClass()->getName();
if ('Twig_Extension' !== $parentClass &&
'Twig\Extension\AbstractExtension' !== $parentClass) {
@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);
}
}
$extension->initRuntime($this);
}
}
/**
* Returns true if the given extension is registered.
*
* @param string $class The extension class name
*
* @return bool Whether the extension is registered or not
*/
public function hasExtension($class)
{
$class = ltrim($class, '\\');
if (!isset($this->extensionsByClass[$class]) &&
class_exists($class, false)) {
// For BC/FC with namespaced aliases
$class = new \ReflectionClass($class);
$class = $class->name;
}
if (isset($this->extensions[$class])) {
if ($class !== \get_class($this->extensions[$class])) {
@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);
}
return true;
}
return isset($this->extensionsByClass[$class]);
}
/**
* Adds a runtime loader.
*/
public function addRuntimeLoader(RuntimeLoaderInterface $loader)
{
$this->runtimeLoaders[] = $loader;
}
/**
* Gets an extension by class name.
*
* @param string $class The extension class name
*
* @return ExtensionInterface
*/
public function getExtension($class)
{
$class = ltrim($class, '\\');
if (!isset($this->extensionsByClass[$class]) &&
class_exists($class, false)) {
// For BC/FC with namespaced aliases
$class = new \ReflectionClass($class);
$class = $class->name;
}
if (isset($this->extensions[$class])) {
if ($class !== \get_class($this->extensions[$class])) {
@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);
}
return $this->extensions[$class];
}
if (!isset($this->extensionsByClass[$class])) {
throw new RuntimeError(sprintf('The "%s"
extension is not enabled.', $class));
}
return $this->extensionsByClass[$class];
}
/**
* Returns the runtime implementation of a Twig element
(filter/function/test).
*
* @param string $class A runtime class name
*
* @return object The runtime implementation
*
* @throws RuntimeError When the template cannot be found
*/
public function getRuntime($class)
{
if (isset($this->runtimes[$class])) {
return $this->runtimes[$class];
}
foreach ($this->runtimeLoaders as $loader) {
if (null !== $runtime = $loader->load($class)) {
return $this->runtimes[$class] = $runtime;
}
}
throw new RuntimeError(sprintf('Unable to load the
"%s" runtime.', $class));
}
public function addExtension(ExtensionInterface $extension)
{
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to register
extension "%s" as extensions have already been
initialized.', $extension->getName()));
}
$class = \get_class($extension);
if ($class !== $extension->getName()) {
if (isset($this->extensions[$extension->getName()])) {
unset($this->extensions[$extension->getName()],
$this->extensionsByClass[$class]);
@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);
}
}
$this->lastModifiedExtension = 0;
$this->extensionsByClass[$class] = $extension;
$this->extensions[$extension->getName()] = $extension;
$this->updateOptionsHash();
}
/**
* Removes an extension by name.
*
* This method is deprecated and you should not use it.
*
* @param string $name The extension name
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
public function removeExtension($name)
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.12 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to remove
extension "%s" as extensions have already been
initialized.', $name));
}
$class = ltrim($name, '\\');
if (!isset($this->extensionsByClass[$class]) &&
class_exists($class, false)) {
// For BC/FC with namespaced aliases
$class = new \ReflectionClass($class);
$class = $class->name;
}
if (isset($this->extensions[$class])) {
if ($class !== \get_class($this->extensions[$class])) {
@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);
}
unset($this->extensions[$class]);
}
unset($this->extensions[$class]);
$this->updateOptionsHash();
}
/**
* Registers an array of extensions.
*
* @param array $extensions An array of extensions
*/
public function setExtensions(array $extensions)
{
foreach ($extensions as $extension) {
$this->addExtension($extension);
}
}
/**
* Returns all registered extensions.
*
* @return ExtensionInterface[] An array of extensions (keys are for
internal usage only and should not be relied on)
*/
public function getExtensions()
{
return $this->extensions;
}
public function addTokenParser(TokenParserInterface $parser)
{
if ($this->extensionInitialized) {
throw new \LogicException('Unable to add a token parser as
extensions have already been initialized.');
}
$this->staging->addTokenParser($parser);
}
/**
* Gets the registered Token Parsers.
*
* @return \Twig_TokenParserBrokerInterface
*
* @internal
*/
public function getTokenParsers()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->parsers;
}
/**
* Gets registered tags.
*
* Be warned that this method cannot return tags defined by
\Twig_TokenParserBrokerInterface classes.
*
* @return TokenParserInterface[]
*
* @internal
*/
public function getTags()
{
$tags = [];
foreach ($this->getTokenParsers()->getParsers() as $parser) {
if ($parser instanceof TokenParserInterface) {
$tags[$parser->getTag()] = $parser;
}
}
return $tags;
}
public function addNodeVisitor(NodeVisitorInterface $visitor)
{
if ($this->extensionInitialized) {
throw new \LogicException('Unable to add a node visitor as
extensions have already been initialized.');
}
$this->staging->addNodeVisitor($visitor);
}
/**
* Gets the registered Node Visitors.
*
* @return NodeVisitorInterface[]
*
* @internal
*/
public function getNodeVisitors()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->visitors;
}
/**
* Registers a Filter.
*
* @param string|TwigFilter $name The filter name or a
\Twig_SimpleFilter instance
* @param \Twig_FilterInterface|TwigFilter $filter
*/
public function addFilter($name, $filter = null)
{
if (!$name instanceof TwigFilter && !($filter instanceof
TwigFilter || $filter instanceof \Twig_FilterInterface)) {
throw new \LogicException('A filter must be an instance of
\Twig_FilterInterface or \Twig_SimpleFilter.');
}
if ($name instanceof TwigFilter) {
$filter = $name;
$name = $filter->getName();
} else {
@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);
}
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to add filter
"%s" as extensions have already been initialized.', $name));
}
$this->staging->addFilter($name, $filter);
}
/**
* Get a filter by name.
*
* Subclasses may override this method and load filters differently;
* so no list of filters is available.
*
* @param string $name The filter name
*
* @return \Twig_Filter|false
*
* @internal
*/
public function getFilter($name)
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
if (isset($this->filters[$name])) {
return $this->filters[$name];
}
foreach ($this->filters as $pattern => $filter) {
$pattern = str_replace('\\*', '(.*?)',
preg_quote($pattern, '#'), $count);
if ($count) {
if (preg_match('#^'.$pattern.'$#',
$name, $matches)) {
array_shift($matches);
$filter->setArguments($matches);
return $filter;
}
}
}
foreach ($this->filterCallbacks as $callback) {
if (false !== $filter = \call_user_func($callback, $name)) {
return $filter;
}
}
return false;
}
public function registerUndefinedFilterCallback($callable)
{
$this->filterCallbacks[] = $callable;
}
/**
* Gets the registered Filters.
*
* Be warned that this method cannot return filters defined with
registerUndefinedFilterCallback.
*
* @return \Twig_FilterInterface[]
*
* @see registerUndefinedFilterCallback
*
* @internal
*/
public function getFilters()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->filters;
}
/**
* Registers a Test.
*
* @param string|TwigTest $name The test name or a
\Twig_SimpleTest instance
* @param \Twig_TestInterface|TwigTest $test A \Twig_TestInterface
instance or a \Twig_SimpleTest instance
*/
public function addTest($name, $test = null)
{
if (!$name instanceof TwigTest && !($test instanceof
TwigTest || $test instanceof \Twig_TestInterface)) {
throw new \LogicException('A test must be an instance of
\Twig_TestInterface or \Twig_SimpleTest.');
}
if ($name instanceof TwigTest) {
$test = $name;
$name = $test->getName();
} else {
@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);
}
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to add test
"%s" as extensions have already been initialized.', $name));
}
$this->staging->addTest($name, $test);
}
/**
* Gets the registered Tests.
*
* @return \Twig_TestInterface[]
*
* @internal
*/
public function getTests()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->tests;
}
/**
* Gets a test by name.
*
* @param string $name The test name
*
* @return \Twig_Test|false
*
* @internal
*/
public function getTest($name)
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
if (isset($this->tests[$name])) {
return $this->tests[$name];
}
foreach ($this->tests as $pattern => $test) {
$pattern = str_replace('\\*', '(.*?)',
preg_quote($pattern, '#'), $count);
if ($count) {
if (preg_match('#^'.$pattern.'$#',
$name, $matches)) {
array_shift($matches);
$test->setArguments($matches);
return $test;
}
}
}
return false;
}
/**
* Registers a Function.
*
* @param string|TwigFunction $name The function
name or a \Twig_SimpleFunction instance
* @param \Twig_FunctionInterface|TwigFunction $function
*/
public function addFunction($name, $function = null)
{
if (!$name instanceof TwigFunction && !($function
instanceof TwigFunction || $function instanceof \Twig_FunctionInterface)) {
throw new \LogicException('A function must be an instance
of \Twig_FunctionInterface or \Twig_SimpleFunction.');
}
if ($name instanceof TwigFunction) {
$function = $name;
$name = $function->getName();
} else {
@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);
}
if ($this->extensionInitialized) {
throw new \LogicException(sprintf('Unable to add function
"%s" as extensions have already been initialized.', $name));
}
$this->staging->addFunction($name, $function);
}
/**
* Get a function by name.
*
* Subclasses may override this method and load functions differently;
* so no list of functions is available.
*
* @param string $name function name
*
* @return \Twig_Function|false
*
* @internal
*/
public function getFunction($name)
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
if (isset($this->functions[$name])) {
return $this->functions[$name];
}
foreach ($this->functions as $pattern => $function) {
$pattern = str_replace('\\*', '(.*?)',
preg_quote($pattern, '#'), $count);
if ($count) {
if (preg_match('#^'.$pattern.'$#',
$name, $matches)) {
array_shift($matches);
$function->setArguments($matches);
return $function;
}
}
}
foreach ($this->functionCallbacks as $callback) {
if (false !== $function = \call_user_func($callback, $name)) {
return $function;
}
}
return false;
}
public function registerUndefinedFunctionCallback($callable)
{
$this->functionCallbacks[] = $callable;
}
/**
* Gets registered functions.
*
* Be warned that this method cannot return functions defined with
registerUndefinedFunctionCallback.
*
* @return \Twig_FunctionInterface[]
*
* @see registerUndefinedFunctionCallback
*
* @internal
*/
public function getFunctions()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->functions;
}
/**
* Registers a Global.
*
* New globals can be added before compiling or rendering a template;
* but after, you can only update existing globals.
*
* @param string $name The global name
* @param mixed $value The global value
*/
public function addGlobal($name, $value)
{
if ($this->extensionInitialized || $this->runtimeInitialized)
{
if (null === $this->globals) {
$this->globals = $this->initGlobals();
}
if (!\array_key_exists($name, $this->globals)) {
// The deprecation notice must be turned into the following
exception in Twig 2.0
@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);
//throw new \LogicException(sprintf('Unable to add
global "%s" as the runtime or the extensions have already been
initialized.', $name));
}
}
if ($this->extensionInitialized || $this->runtimeInitialized)
{
// update the value
$this->globals[$name] = $value;
} else {
$this->staging->addGlobal($name, $value);
}
}
/**
* Gets the registered Globals.
*
* @return array An array of globals
*
* @internal
*/
public function getGlobals()
{
if (!$this->runtimeInitialized &&
!$this->extensionInitialized) {
return $this->initGlobals();
}
if (null === $this->globals) {
$this->globals = $this->initGlobals();
}
return $this->globals;
}
/**
* Merges a context with the defined globals.
*
* @param array $context An array representing the context
*
* @return array The context merged with the globals
*/
public function mergeGlobals(array $context)
{
// we don't use array_merge as the context being generally
// bigger than globals, this code is faster.
foreach ($this->getGlobals() as $key => $value) {
if (!\array_key_exists($key, $context)) {
$context[$key] = $value;
}
}
return $context;
}
/**
* Gets the registered unary Operators.
*
* @return array An array of unary operators
*
* @internal
*/
public function getUnaryOperators()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->unaryOperators;
}
/**
* Gets the registered binary Operators.
*
* @return array An array of binary operators
*
* @internal
*/
public function getBinaryOperators()
{
if (!$this->extensionInitialized) {
$this->initExtensions();
}
return $this->binaryOperators;
}
/**
* @deprecated since 1.23 (to be removed in 2.0)
*/
public function computeAlternatives($name, $items)
{
@trigger_error(sprintf('The %s method is deprecated since
version 1.23 and will be removed in Twig 2.0.', __METHOD__),
E_USER_DEPRECATED);
return SyntaxError::computeAlternatives($name, $items);
}
/**
* @internal
*/
protected function initGlobals()
{
$globals = [];
foreach ($this->extensions as $name => $extension) {
if (!$extension instanceof GlobalsInterface) {
$m = new \ReflectionMethod($extension,
'getGlobals');
$parentClass = $m->getDeclaringClass()->getName();
if ('Twig_Extension' !== $parentClass &&
'Twig\Extension\AbstractExtension' !== $parentClass) {
@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);
}
}
$extGlob = $extension->getGlobals();
if (!\is_array($extGlob)) {
throw new
\UnexpectedValueException(sprintf('"%s::getGlobals()" must
return an array of globals.', \get_class($extension)));
}
$globals[] = $extGlob;
}
$globals[] = $this->staging->getGlobals();
return \call_user_func_array('array_merge', $globals);
}
/**
* @internal
*/
protected function initExtensions()
{
if ($this->extensionInitialized) {
return;
}
$this->parsers = new \Twig_TokenParserBroker([], [], false);
$this->filters = [];
$this->functions = [];
$this->tests = [];
$this->visitors = [];
$this->unaryOperators = [];
$this->binaryOperators = [];
foreach ($this->extensions as $extension) {
$this->initExtension($extension);
}
$this->initExtension($this->staging);
// Done at the end only, so that an exception during initialization
does not mark the environment as initialized when catching the exception
$this->extensionInitialized = true;
}
/**
* @internal
*/
protected function initExtension(ExtensionInterface $extension)
{
// filters
foreach ($extension->getFilters() as $name => $filter) {
if ($filter instanceof TwigFilter) {
$name = $filter->getName();
} else {
@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);
}
$this->filters[$name] = $filter;
}
// functions
foreach ($extension->getFunctions() as $name => $function) {
if ($function instanceof TwigFunction) {
$name = $function->getName();
} else {
@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);
}
$this->functions[$name] = $function;
}
// tests
foreach ($extension->getTests() as $name => $test) {
if ($test instanceof TwigTest) {
$name = $test->getName();
} else {
@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);
}
$this->tests[$name] = $test;
}
// token parsers
foreach ($extension->getTokenParsers() as $parser) {
if ($parser instanceof TokenParserInterface) {
$this->parsers->addTokenParser($parser);
} elseif ($parser instanceof \Twig_TokenParserBrokerInterface)
{
@trigger_error('Registering a
\Twig_TokenParserBrokerInterface instance is deprecated since version
1.21.', E_USER_DEPRECATED);
$this->parsers->addTokenParserBroker($parser);
} else {
throw new \LogicException('getTokenParsers() must
return an array of \Twig_TokenParserInterface or
\Twig_TokenParserBrokerInterface instances.');
}
}
// node visitors
foreach ($extension->getNodeVisitors() as $visitor) {
$this->visitors[] = $visitor;
}
// operators
if ($operators = $extension->getOperators()) {
if (!\is_array($operators)) {
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)));
}
if (2 !== \count($operators)) {
throw new
\InvalidArgumentException(sprintf('"%s::getOperators()" must
return an array of 2 elements, got %d.', \get_class($extension),
\count($operators)));
}
$this->unaryOperators =
array_merge($this->unaryOperators, $operators[0]);
$this->binaryOperators =
array_merge($this->binaryOperators, $operators[1]);
}
}
/**
* @deprecated since 1.22 (to be removed in 2.0)
*/
protected function writeCacheFile($file, $content)
{
$this->cache->write($file, $content);
}
private function updateOptionsHash()
{
$hashParts = array_merge(
array_keys($this->extensions),
[
(int)
\function_exists('twig_template_get_attributes'),
PHP_MAJOR_VERSION,
PHP_MINOR_VERSION,
self::VERSION,
(int) $this->debug,
$this->baseTemplateClass,
(int) $this->strictVariables,
]
);
$this->optionsHash = implode(':', $hashParts);
}
}
class_alias('Twig\Environment', 'Twig_Environment');
PK��[���&�&twig/src/Error/Error.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
use Twig\Source;
use Twig\Template;
/**
* Twig base exception.
*
* This exception class and its children must only be used when
* an error occurs during the loading of a template, when a syntax error
* is detected in a template, or when rendering a template. Other
* errors must use regular PHP exception classes (like when the template
* cache directory is not writable for instance).
*
* To help debugging template issues, this class tracks the original
template
* name and line where the error occurred.
*
* Whenever possible, you must set these information (original template
name
* and line number) yourself by passing them to the constructor. If some or
all
* these information are not available from where you throw the exception,
then
* this class will guess them automatically (when the line number is set to
-1
* and/or the name is set to null). As this is a costly operation, this
* can be disabled by passing false for both the name and the line number
* when creating a new instance of this class.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Error extends \Exception
{
protected $lineno;
// to be renamed to name in 2.0
protected $filename;
protected $rawMessage;
private $sourcePath;
private $sourceCode;
/**
* Constructor.
*
* Set the line number to -1 to enable its automatic guessing.
* Set the name to null to enable its automatic guessing.
*
* @param string $message The error message
* @param int $lineno The template line where the
error occurred
* @param Source|string|null $source The source context where the
error occurred
* @param \Exception $previous The previous exception
*/
public function __construct($message, $lineno = -1, $source = null,
\Exception $previous = null)
{
if (null === $source) {
$name = null;
} elseif (!$source instanceof Source) {
// for compat with the Twig C ext., passing the template name
as string is accepted
$name = $source;
} else {
$name = $source->getName();
$this->sourceCode = $source->getCode();
$this->sourcePath = $source->getPath();
}
parent::__construct('', 0, $previous);
$this->lineno = $lineno;
$this->filename = $name;
$this->rawMessage = $message;
$this->updateRepr();
}
/**
* Gets the raw message.
*
* @return string The raw message
*/
public function getRawMessage()
{
return $this->rawMessage;
}
/**
* Gets the logical name where the error occurred.
*
* @return string The name
*
* @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead.
*/
public function getTemplateFile()
{
@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);
return $this->filename;
}
/**
* Sets the logical name where the error occurred.
*
* @param string $name The name
*
* @deprecated since 1.27 (to be removed in 2.0). Use
setSourceContext() instead.
*/
public function setTemplateFile($name)
{
@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);
$this->filename = $name;
$this->updateRepr();
}
/**
* Gets the logical name where the error occurred.
*
* @return string The name
*
* @deprecated since 1.29 (to be removed in 2.0). Use
getSourceContext() instead.
*/
public function getTemplateName()
{
@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);
return $this->filename;
}
/**
* Sets the logical name where the error occurred.
*
* @param string $name The name
*
* @deprecated since 1.29 (to be removed in 2.0). Use
setSourceContext() instead.
*/
public function setTemplateName($name)
{
@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);
$this->filename = $name;
$this->sourceCode = $this->sourcePath = null;
$this->updateRepr();
}
/**
* Gets the template line where the error occurred.
*
* @return int The template line
*/
public function getTemplateLine()
{
return $this->lineno;
}
/**
* Sets the template line where the error occurred.
*
* @param int $lineno The template line
*/
public function setTemplateLine($lineno)
{
$this->lineno = $lineno;
$this->updateRepr();
}
/**
* Gets the source context of the Twig template where the error
occurred.
*
* @return Source|null
*/
public function getSourceContext()
{
return $this->filename ? new Source($this->sourceCode,
$this->filename, $this->sourcePath) : null;
}
/**
* Sets the source context of the Twig template where the error
occurred.
*/
public function setSourceContext(Source $source = null)
{
if (null === $source) {
$this->sourceCode = $this->filename =
$this->sourcePath = null;
} else {
$this->sourceCode = $source->getCode();
$this->filename = $source->getName();
$this->sourcePath = $source->getPath();
}
$this->updateRepr();
}
public function guess()
{
$this->guessTemplateInfo();
$this->updateRepr();
}
public function appendMessage($rawMessage)
{
$this->rawMessage .= $rawMessage;
$this->updateRepr();
}
/**
* @internal
*/
protected function updateRepr()
{
$this->message = $this->rawMessage;
if ($this->sourcePath && $this->lineno > 0) {
$this->file = $this->sourcePath;
$this->line = $this->lineno;
return;
}
$dot = false;
if ('.' === substr($this->message, -1)) {
$this->message = substr($this->message, 0, -1);
$dot = true;
}
$questionMark = false;
if ('?' === substr($this->message, -1)) {
$this->message = substr($this->message, 0, -1);
$questionMark = true;
}
if ($this->filename) {
if (\is_string($this->filename) ||
(\is_object($this->filename) &&
method_exists($this->filename, '__toString'))) {
$name = sprintf('"%s"',
$this->filename);
} else {
$name = json_encode($this->filename);
}
$this->message .= sprintf(' in %s', $name);
}
if ($this->lineno && $this->lineno >= 0) {
$this->message .= sprintf(' at line %d',
$this->lineno);
}
if ($dot) {
$this->message .= '.';
}
if ($questionMark) {
$this->message .= '?';
}
}
/**
* @internal
*/
protected function guessTemplateInfo()
{
$template = null;
$templateClass = null;
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS |
DEBUG_BACKTRACE_PROVIDE_OBJECT);
foreach ($backtrace as $trace) {
if (isset($trace['object']) &&
$trace['object'] instanceof Template &&
'Twig_Template' !== \get_class($trace['object'])) {
$currentClass = \get_class($trace['object']);
$isEmbedContainer = 0 === strpos($templateClass,
$currentClass);
if (null === $this->filename || ($this->filename ==
$trace['object']->getTemplateName() &&
!$isEmbedContainer)) {
$template = $trace['object'];
$templateClass =
\get_class($trace['object']);
}
}
}
// update template name
if (null !== $template && null === $this->filename) {
$this->filename = $template->getTemplateName();
}
// update template path if any
if (null !== $template && null === $this->sourcePath) {
$src = $template->getSourceContext();
$this->sourceCode = $src->getCode();
$this->sourcePath = $src->getPath();
}
if (null === $template || $this->lineno > -1) {
return;
}
$r = new \ReflectionObject($template);
$file = $r->getFileName();
$exceptions = [$e = $this];
while ($e instanceof self && $e = $e->getPrevious()) {
$exceptions[] = $e;
}
while ($e = array_pop($exceptions)) {
$traces = $e->getTrace();
array_unshift($traces, ['file' =>
$e->getFile(), 'line' => $e->getLine()]);
while ($trace = array_shift($traces)) {
if (!isset($trace['file']) ||
!isset($trace['line']) || $file != $trace['file']) {
continue;
}
foreach ($template->getDebugInfo() as $codeLine =>
$templateLine) {
if ($codeLine <= $trace['line']) {
// update template line
$this->lineno = $templateLine;
return;
}
}
}
}
}
}
class_alias('Twig\Error\Error', 'Twig_Error');
PK��[��T���twig/src/Error/LoaderError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
/**
* Exception thrown when an error occurs during template loading.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class LoaderError extends Error
{
}
class_alias('Twig\Error\LoaderError',
'Twig_Error_Loader');
PK��[3%����twig/src/Error/RuntimeError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
/**
* Exception thrown when an error occurs at runtime.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class RuntimeError extends Error
{
}
class_alias('Twig\Error\RuntimeError',
'Twig_Error_Runtime');
PK��[ث�6��twig/src/Error/SyntaxError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Error;
/**
* \Exception thrown when a syntax error occurs during lexing or parsing of
a template.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SyntaxError extends Error
{
/**
* Tweaks the error message to include suggestions.
*
* @param string $name The original name of the item that does not
exist
* @param array $items An array of possible items
*/
public function addSuggestions($name, array $items)
{
if (!$alternatives = self::computeAlternatives($name, $items)) {
return;
}
$this->appendMessage(sprintf(' Did you mean
"%s"?', implode('", "',
$alternatives)));
}
/**
* @internal
*
* To be merged with the addSuggestions() method in 2.0.
*/
public static function computeAlternatives($name, $items)
{
$alternatives = [];
foreach ($items as $item) {
$lev = levenshtein($name, $item);
if ($lev <= \strlen($name) / 3 || false !== strpos($item,
$name)) {
$alternatives[$item] = $lev;
}
}
asort($alternatives);
return array_keys($alternatives);
}
}
class_alias('Twig\Error\SyntaxError',
'Twig_Error_Syntax');
PK��[��vw��twig/src/ExpressionParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\ArrayExpression;
use Twig\Node\Expression\ArrowFunctionExpression;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\Expression\Binary\ConcatBinary;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\MethodCallExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Expression\Unary\NegUnary;
use Twig\Node\Expression\Unary\NotUnary;
use Twig\Node\Expression\Unary\PosUnary;
use Twig\Node\Node;
/**
* Parses expressions.
*
* This parser implements a "Precedence climbing" algorithm.
*
* @see https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
* @see https://en.wikipedia.org/wiki/Operator-precedence_parser
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @internal
*/
class ExpressionParser
{
const OPERATOR_LEFT = 1;
const OPERATOR_RIGHT = 2;
protected $parser;
protected $unaryOperators;
protected $binaryOperators;
private $env;
public function __construct(Parser $parser, $env = null)
{
$this->parser = $parser;
if ($env instanceof Environment) {
$this->env = $env;
$this->unaryOperators = $env->getUnaryOperators();
$this->binaryOperators = $env->getBinaryOperators();
} else {
@trigger_error('Passing the operators as constructor
arguments to '.__METHOD__.' is deprecated since version 1.27.
Pass the environment instead.', E_USER_DEPRECATED);
$this->env = $parser->getEnvironment();
$this->unaryOperators = func_get_arg(1);
$this->binaryOperators = func_get_arg(2);
}
}
public function parseExpression($precedence = 0, $allowArrow = false)
{
if ($allowArrow && $arrow = $this->parseArrow()) {
return $arrow;
}
$expr = $this->getPrimary();
$token = $this->parser->getCurrentToken();
while ($this->isBinary($token) &&
$this->binaryOperators[$token->getValue()]['precedence']
>= $precedence) {
$op = $this->binaryOperators[$token->getValue()];
$this->parser->getStream()->next();
if ('is not' === $token->getValue()) {
$expr = $this->parseNotTestExpression($expr);
} elseif ('is' === $token->getValue()) {
$expr = $this->parseTestExpression($expr);
} elseif (isset($op['callable'])) {
$expr = \call_user_func($op['callable'],
$this->parser, $expr);
} else {
$expr1 = $this->parseExpression(self::OPERATOR_LEFT ===
$op['associativity'] ? $op['precedence'] + 1 :
$op['precedence']);
$class = $op['class'];
$expr = new $class($expr, $expr1, $token->getLine());
}
$token = $this->parser->getCurrentToken();
}
if (0 === $precedence) {
return $this->parseConditionalExpression($expr);
}
return $expr;
}
/**
* @return ArrowFunctionExpression|null
*/
private function parseArrow()
{
$stream = $this->parser->getStream();
// short array syntax (one argument, no parentheses)?
if ($stream->look(1)->test(Token::ARROW_TYPE)) {
$line = $stream->getCurrent()->getLine();
$token = $stream->expect(Token::NAME_TYPE);
$names = [new AssignNameExpression($token->getValue(),
$token->getLine())];
$stream->expect(Token::ARROW_TYPE);
return new
ArrowFunctionExpression($this->parseExpression(0), new Node($names),
$line);
}
// first, determine if we are parsing an arrow function by finding
=> (long form)
$i = 0;
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE,
'(')) {
return null;
}
++$i;
while (true) {
// variable name
++$i;
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE,
',')) {
break;
}
++$i;
}
if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE,
')')) {
return null;
}
++$i;
if (!$stream->look($i)->test(Token::ARROW_TYPE)) {
return null;
}
// yes, let's parse it properly
$token = $stream->expect(Token::PUNCTUATION_TYPE,
'(');
$line = $token->getLine();
$names = [];
while (true) {
$token = $stream->expect(Token::NAME_TYPE);
$names[] = new AssignNameExpression($token->getValue(),
$token->getLine());
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
}
$stream->expect(Token::PUNCTUATION_TYPE, ')');
$stream->expect(Token::ARROW_TYPE);
return new ArrowFunctionExpression($this->parseExpression(0),
new Node($names), $line);
}
protected function getPrimary()
{
$token = $this->parser->getCurrentToken();
if ($this->isUnary($token)) {
$operator = $this->unaryOperators[$token->getValue()];
$this->parser->getStream()->next();
$expr =
$this->parseExpression($operator['precedence']);
$class = $operator['class'];
return $this->parsePostfixExpression(new $class($expr,
$token->getLine()));
} elseif ($token->test(Token::PUNCTUATION_TYPE, '('))
{
$this->parser->getStream()->next();
$expr = $this->parseExpression();
$this->parser->getStream()->expect(Token::PUNCTUATION_TYPE,
')', 'An opened parenthesis is not properly closed');
return $this->parsePostfixExpression($expr);
}
return $this->parsePrimaryExpression();
}
protected function parseConditionalExpression($expr)
{
while
($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
'?')) {
if
(!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
':')) {
$expr2 = $this->parseExpression();
if
($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
':')) {
$expr3 = $this->parseExpression();
} else {
$expr3 = new ConstantExpression('',
$this->parser->getCurrentToken()->getLine());
}
} else {
$expr2 = $expr;
$expr3 = $this->parseExpression();
}
$expr = new ConditionalExpression($expr, $expr2, $expr3,
$this->parser->getCurrentToken()->getLine());
}
return $expr;
}
protected function isUnary(Token $token)
{
return $token->test(Token::OPERATOR_TYPE) &&
isset($this->unaryOperators[$token->getValue()]);
}
protected function isBinary(Token $token)
{
return $token->test(Token::OPERATOR_TYPE) &&
isset($this->binaryOperators[$token->getValue()]);
}
public function parsePrimaryExpression()
{
$token = $this->parser->getCurrentToken();
switch ($token->getType()) {
case Token::NAME_TYPE:
$this->parser->getStream()->next();
switch ($token->getValue()) {
case 'true':
case 'TRUE':
$node = new ConstantExpression(true,
$token->getLine());
break;
case 'false':
case 'FALSE':
$node = new ConstantExpression(false,
$token->getLine());
break;
case 'none':
case 'NONE':
case 'null':
case 'NULL':
$node = new ConstantExpression(null,
$token->getLine());
break;
default:
if ('(' ===
$this->parser->getCurrentToken()->getValue()) {
$node =
$this->getFunctionNode($token->getValue(), $token->getLine());
} else {
$node = new
NameExpression($token->getValue(), $token->getLine());
}
}
break;
case Token::NUMBER_TYPE:
$this->parser->getStream()->next();
$node = new ConstantExpression($token->getValue(),
$token->getLine());
break;
case Token::STRING_TYPE:
case Token::INTERPOLATION_START_TYPE:
$node = $this->parseStringExpression();
break;
case Token::OPERATOR_TYPE:
if (preg_match(Lexer::REGEX_NAME, $token->getValue(),
$matches) && $matches[0] == $token->getValue()) {
// in this context, string operators are variable names
$this->parser->getStream()->next();
$node = new NameExpression($token->getValue(),
$token->getLine());
break;
} elseif
(isset($this->unaryOperators[$token->getValue()])) {
$class =
$this->unaryOperators[$token->getValue()]['class'];
$ref = new \ReflectionClass($class);
$negClass =
'Twig\Node\Expression\Unary\NegUnary';
$posClass =
'Twig\Node\Expression\Unary\PosUnary';
if (!(\in_array($ref->getName(), [$negClass,
$posClass, 'Twig_Node_Expression_Unary_Neg',
'Twig_Node_Expression_Unary_Pos'])
|| $ref->isSubclassOf($negClass) ||
$ref->isSubclassOf($posClass)
||
$ref->isSubclassOf('Twig_Node_Expression_Unary_Neg') ||
$ref->isSubclassOf('Twig_Node_Expression_Unary_Pos'))
) {
throw new SyntaxError(sprintf('Unexpected
unary operator "%s".', $token->getValue()),
$token->getLine(),
$this->parser->getStream()->getSourceContext());
}
$this->parser->getStream()->next();
$expr = $this->parsePrimaryExpression();
$node = new $class($expr, $token->getLine());
break;
}
// no break
default:
if ($token->test(Token::PUNCTUATION_TYPE,
'[')) {
$node = $this->parseArrayExpression();
} elseif ($token->test(Token::PUNCTUATION_TYPE,
'{')) {
$node = $this->parseHashExpression();
} elseif ($token->test(Token::OPERATOR_TYPE,
'=') && ('==' ===
$this->parser->getStream()->look(-1)->getValue() ||
'!=' ===
$this->parser->getStream()->look(-1)->getValue())) {
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());
} else {
throw new SyntaxError(sprintf('Unexpected token
"%s" of value "%s".',
Token::typeToEnglish($token->getType()), $token->getValue()),
$token->getLine(),
$this->parser->getStream()->getSourceContext());
}
}
return $this->parsePostfixExpression($node);
}
public function parseStringExpression()
{
$stream = $this->parser->getStream();
$nodes = [];
// a string cannot be followed by another string in a single
expression
$nextCanBeString = true;
while (true) {
if ($nextCanBeString && $token =
$stream->nextIf(Token::STRING_TYPE)) {
$nodes[] = new ConstantExpression($token->getValue(),
$token->getLine());
$nextCanBeString = false;
} elseif ($stream->nextIf(Token::INTERPOLATION_START_TYPE))
{
$nodes[] = $this->parseExpression();
$stream->expect(Token::INTERPOLATION_END_TYPE);
$nextCanBeString = true;
} else {
break;
}
}
$expr = array_shift($nodes);
foreach ($nodes as $node) {
$expr = new ConcatBinary($expr, $node,
$node->getTemplateLine());
}
return $expr;
}
public function parseArrayExpression()
{
$stream = $this->parser->getStream();
$stream->expect(Token::PUNCTUATION_TYPE, '[', 'An
array element was expected');
$node = new ArrayExpression([],
$stream->getCurrent()->getLine());
$first = true;
while (!$stream->test(Token::PUNCTUATION_TYPE, ']')) {
if (!$first) {
$stream->expect(Token::PUNCTUATION_TYPE, ',',
'An array element must be followed by a comma');
// trailing ,?
if ($stream->test(Token::PUNCTUATION_TYPE,
']')) {
break;
}
}
$first = false;
$node->addElement($this->parseExpression());
}
$stream->expect(Token::PUNCTUATION_TYPE, ']', 'An
opened array is not properly closed');
return $node;
}
public function parseHashExpression()
{
$stream = $this->parser->getStream();
$stream->expect(Token::PUNCTUATION_TYPE, '{', 'A
hash element was expected');
$node = new ArrayExpression([],
$stream->getCurrent()->getLine());
$first = true;
while (!$stream->test(Token::PUNCTUATION_TYPE, '}')) {
if (!$first) {
$stream->expect(Token::PUNCTUATION_TYPE, ',',
'A hash value must be followed by a comma');
// trailing ,?
if ($stream->test(Token::PUNCTUATION_TYPE,
'}')) {
break;
}
}
$first = false;
// a hash key can be:
//
// * a number -- 12
// * a string -- 'a'
// * a name, which is equivalent to a string -- a
// * an expression, which must be enclosed in parentheses --
(1 + 2)
if (($token = $stream->nextIf(Token::STRING_TYPE)) ||
($token = $stream->nextIf(Token::NAME_TYPE)) || $token =
$stream->nextIf(Token::NUMBER_TYPE)) {
$key = new ConstantExpression($token->getValue(),
$token->getLine());
} elseif ($stream->test(Token::PUNCTUATION_TYPE,
'(')) {
$key = $this->parseExpression();
} else {
$current = $stream->getCurrent();
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());
}
$stream->expect(Token::PUNCTUATION_TYPE, ':',
'A hash key must be followed by a colon (:)');
$value = $this->parseExpression();
$node->addElement($value, $key);
}
$stream->expect(Token::PUNCTUATION_TYPE, '}', 'An
opened hash is not properly closed');
return $node;
}
public function parsePostfixExpression($node)
{
while (true) {
$token = $this->parser->getCurrentToken();
if (Token::PUNCTUATION_TYPE == $token->getType()) {
if ('.' == $token->getValue() || '['
== $token->getValue()) {
$node = $this->parseSubscriptExpression($node);
} elseif ('|' == $token->getValue()) {
$node = $this->parseFilterExpression($node);
} else {
break;
}
} else {
break;
}
}
return $node;
}
public function getFunctionNode($name, $line)
{
switch ($name) {
case 'parent':
$this->parseArguments();
if (!\count($this->parser->getBlockStack())) {
throw new SyntaxError('Calling "parent"
outside a block is forbidden.', $line,
$this->parser->getStream()->getSourceContext());
}
if (!$this->parser->getParent() &&
!$this->parser->hasTraits()) {
throw new SyntaxError('Calling "parent"
on a template that does not extend nor "use" another template is
forbidden.', $line,
$this->parser->getStream()->getSourceContext());
}
return new
ParentExpression($this->parser->peekBlockStack(), $line);
case 'block':
$args = $this->parseArguments();
if (\count($args) < 1) {
throw new SyntaxError('The "block"
function takes one argument (the block name).', $line,
$this->parser->getStream()->getSourceContext());
}
return new BlockReferenceExpression($args->getNode(0),
\count($args) > 1 ? $args->getNode(1) : null, $line);
case 'attribute':
$args = $this->parseArguments();
if (\count($args) < 2) {
throw new SyntaxError('The "attribute"
function takes at least two arguments (the variable and the
attributes).', $line,
$this->parser->getStream()->getSourceContext());
}
return new GetAttrExpression($args->getNode(0),
$args->getNode(1), \count($args) > 2 ? $args->getNode(2) : null,
Template::ANY_CALL, $line);
default:
if (null !== $alias =
$this->parser->getImportedSymbol('function', $name)) {
$arguments = new ArrayExpression([], $line);
foreach ($this->parseArguments() as $n) {
$arguments->addElement($n);
}
$node = new
MethodCallExpression($alias['node'], $alias['name'],
$arguments, $line);
$node->setAttribute('safe', true);
return $node;
}
$args = $this->parseArguments(true);
$class = $this->getFunctionNodeClass($name, $line);
return new $class($name, $args, $line);
}
}
public function parseSubscriptExpression($node)
{
$stream = $this->parser->getStream();
$token = $stream->next();
$lineno = $token->getLine();
$arguments = new ArrayExpression([], $lineno);
$type = Template::ANY_CALL;
if ('.' == $token->getValue()) {
$token = $stream->next();
if (
Token::NAME_TYPE == $token->getType()
||
Token::NUMBER_TYPE == $token->getType()
||
(Token::OPERATOR_TYPE == $token->getType() &&
preg_match(Lexer::REGEX_NAME, $token->getValue()))
) {
$arg = new ConstantExpression($token->getValue(),
$lineno);
if ($stream->test(Token::PUNCTUATION_TYPE,
'(')) {
$type = Template::METHOD_CALL;
foreach ($this->parseArguments() as $n) {
$arguments->addElement($n);
}
}
} else {
throw new SyntaxError('Expected name or number.',
$lineno, $stream->getSourceContext());
}
if ($node instanceof NameExpression && null !==
$this->parser->getImportedSymbol('template',
$node->getAttribute('name'))) {
if (!$arg instanceof ConstantExpression) {
throw new SyntaxError(sprintf('Dynamic macro names
are not supported (called on "%s").',
$node->getAttribute('name')), $token->getLine(),
$stream->getSourceContext());
}
$name = $arg->getAttribute('value');
if ($this->parser->isReservedMacroName($name)) {
throw new SyntaxError(sprintf('"%s"
cannot be called as macro as it is a reserved keyword.', $name),
$token->getLine(), $stream->getSourceContext());
}
$node = new MethodCallExpression($node,
'get'.$name, $arguments, $lineno);
$node->setAttribute('safe', true);
return $node;
}
} else {
$type = Template::ARRAY_CALL;
// slice?
$slice = false;
if ($stream->test(Token::PUNCTUATION_TYPE, ':')) {
$slice = true;
$arg = new ConstantExpression(0, $token->getLine());
} else {
$arg = $this->parseExpression();
}
if ($stream->nextIf(Token::PUNCTUATION_TYPE, ':'))
{
$slice = true;
}
if ($slice) {
if ($stream->test(Token::PUNCTUATION_TYPE,
']')) {
$length = new ConstantExpression(null,
$token->getLine());
} else {
$length = $this->parseExpression();
}
$class = $this->getFilterNodeClass('slice',
$token->getLine());
$arguments = new Node([$arg, $length]);
$filter = new $class($node, new
ConstantExpression('slice', $token->getLine()), $arguments,
$token->getLine());
$stream->expect(Token::PUNCTUATION_TYPE, ']');
return $filter;
}
$stream->expect(Token::PUNCTUATION_TYPE, ']');
}
return new GetAttrExpression($node, $arg, $arguments, $type,
$lineno);
}
public function parseFilterExpression($node)
{
$this->parser->getStream()->next();
return $this->parseFilterExpressionRaw($node);
}
public function parseFilterExpressionRaw($node, $tag = null)
{
while (true) {
$token =
$this->parser->getStream()->expect(Token::NAME_TYPE);
$name = new ConstantExpression($token->getValue(),
$token->getLine());
if
(!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE,
'(')) {
$arguments = new Node();
} else {
$arguments = $this->parseArguments(true, false, true);
}
$class =
$this->getFilterNodeClass($name->getAttribute('value'),
$token->getLine());
$node = new $class($node, $name, $arguments,
$token->getLine(), $tag);
if
(!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE,
'|')) {
break;
}
$this->parser->getStream()->next();
}
return $node;
}
/**
* Parses arguments.
*
* @param bool $namedArguments Whether to allow named arguments or not
* @param bool $definition Whether we are parsing arguments for a
function definition
*
* @return Node
*
* @throws SyntaxError
*/
public function parseArguments($namedArguments = false, $definition =
false, $allowArrow = false)
{
$args = [];
$stream = $this->parser->getStream();
$stream->expect(Token::PUNCTUATION_TYPE, '(', 'A
list of arguments must begin with an opening parenthesis');
while (!$stream->test(Token::PUNCTUATION_TYPE, ')')) {
if (!empty($args)) {
$stream->expect(Token::PUNCTUATION_TYPE, ',',
'Arguments must be separated by a comma');
}
if ($definition) {
$token = $stream->expect(Token::NAME_TYPE, null,
'An argument must be a name');
$value = new NameExpression($token->getValue(),
$this->parser->getCurrentToken()->getLine());
} else {
$value = $this->parseExpression(0, $allowArrow);
}
$name = null;
if ($namedArguments && $token =
$stream->nextIf(Token::OPERATOR_TYPE, '=')) {
if (!$value instanceof NameExpression) {
throw new SyntaxError(sprintf('A parameter name
must be a string, "%s" given.', \get_class($value)),
$token->getLine(), $stream->getSourceContext());
}
$name = $value->getAttribute('name');
if ($definition) {
$value = $this->parsePrimaryExpression();
if (!$this->checkConstantExpression($value)) {
throw new SyntaxError(sprintf('A default value
for an argument must be a constant (a boolean, a string, a number, or an
array).'), $token->getLine(), $stream->getSourceContext());
}
} else {
$value = $this->parseExpression(0, $allowArrow);
}
}
if ($definition) {
if (null === $name) {
$name = $value->getAttribute('name');
$value = new ConstantExpression(null,
$this->parser->getCurrentToken()->getLine());
}
$args[$name] = $value;
} else {
if (null === $name) {
$args[] = $value;
} else {
$args[$name] = $value;
}
}
}
$stream->expect(Token::PUNCTUATION_TYPE, ')', 'A
list of arguments must be closed by a parenthesis');
return new Node($args);
}
public function parseAssignmentExpression()
{
$stream = $this->parser->getStream();
$targets = [];
while (true) {
$token = $this->parser->getCurrentToken();
if ($stream->test(Token::OPERATOR_TYPE) &&
preg_match(Lexer::REGEX_NAME, $token->getValue())) {
// in this context, string operators are variable names
$this->parser->getStream()->next();
} else {
$stream->expect(Token::NAME_TYPE, null, 'Only
variables can be assigned to');
}
$value = $token->getValue();
if (\in_array(strtr($value,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz'), ['true',
'false', 'none', 'null'])) {
throw new SyntaxError(sprintf('You cannot assign a
value to "%s".', $value), $token->getLine(),
$stream->getSourceContext());
}
$targets[] = new AssignNameExpression($value,
$token->getLine());
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
}
return new Node($targets);
}
public function parseMultitargetExpression()
{
$targets = [];
while (true) {
$targets[] = $this->parseExpression();
if
(!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
}
return new Node($targets);
}
private function parseNotTestExpression(\Twig_NodeInterface $node)
{
return new NotUnary($this->parseTestExpression($node),
$this->parser->getCurrentToken()->getLine());
}
private function parseTestExpression(\Twig_NodeInterface $node)
{
$stream = $this->parser->getStream();
list($name, $test) =
$this->getTest($node->getTemplateLine());
$class = $this->getTestNodeClass($test);
$arguments = null;
if ($stream->test(Token::PUNCTUATION_TYPE, '(')) {
$arguments = $this->parseArguments(true);
}
return new $class($node, $name, $arguments,
$this->parser->getCurrentToken()->getLine());
}
private function getTest($line)
{
$stream = $this->parser->getStream();
$name = $stream->expect(Token::NAME_TYPE)->getValue();
if ($test = $this->env->getTest($name)) {
return [$name, $test];
}
if ($stream->test(Token::NAME_TYPE)) {
// try 2-words tests
$name = $name.'
'.$this->parser->getCurrentToken()->getValue();
if ($test = $this->env->getTest($name)) {
$stream->next();
return [$name, $test];
}
}
$e = new SyntaxError(sprintf('Unknown "%s"
test.', $name), $line, $stream->getSourceContext());
$e->addSuggestions($name,
array_keys($this->env->getTests()));
throw $e;
}
private function getTestNodeClass($test)
{
if ($test instanceof TwigTest && $test->isDeprecated())
{
$stream = $this->parser->getStream();
$message = sprintf('Twig Test "%s" is
deprecated', $test->getName());
if (!\is_bool($test->getDeprecatedVersion())) {
$message .= sprintf(' since version %s',
$test->getDeprecatedVersion());
}
if ($test->getAlternative()) {
$message .= sprintf('. Use "%s"
instead', $test->getAlternative());
}
$src = $stream->getSourceContext();
$message .= sprintf(' in %s at line %d.',
$src->getPath() ? $src->getPath() : $src->getName(),
$stream->getCurrent()->getLine());
@trigger_error($message, E_USER_DEPRECATED);
}
if ($test instanceof TwigTest) {
return $test->getNodeClass();
}
return $test instanceof \Twig_Test_Node ? $test->getClass() :
'Twig\Node\Expression\TestExpression';
}
protected function getFunctionNodeClass($name, $line)
{
if (false === $function = $this->env->getFunction($name)) {
$e = new SyntaxError(sprintf('Unknown "%s"
function.', $name), $line,
$this->parser->getStream()->getSourceContext());
$e->addSuggestions($name,
array_keys($this->env->getFunctions()));
throw $e;
}
if ($function instanceof TwigFunction &&
$function->isDeprecated()) {
$message = sprintf('Twig Function "%s" is
deprecated', $function->getName());
if (!\is_bool($function->getDeprecatedVersion())) {
$message .= sprintf(' since version %s',
$function->getDeprecatedVersion());
}
if ($function->getAlternative()) {
$message .= sprintf('. Use "%s"
instead', $function->getAlternative());
}
$src = $this->parser->getStream()->getSourceContext();
$message .= sprintf(' in %s at line %d.',
$src->getPath() ? $src->getPath() : $src->getName(), $line);
@trigger_error($message, E_USER_DEPRECATED);
}
if ($function instanceof TwigFunction) {
return $function->getNodeClass();
}
return $function instanceof \Twig_Function_Node ?
$function->getClass() :
'Twig\Node\Expression\FunctionExpression';
}
protected function getFilterNodeClass($name, $line)
{
if (false === $filter = $this->env->getFilter($name)) {
$e = new SyntaxError(sprintf('Unknown "%s"
filter.', $name), $line,
$this->parser->getStream()->getSourceContext());
$e->addSuggestions($name,
array_keys($this->env->getFilters()));
throw $e;
}
if ($filter instanceof TwigFilter &&
$filter->isDeprecated()) {
$message = sprintf('Twig Filter "%s" is
deprecated', $filter->getName());
if (!\is_bool($filter->getDeprecatedVersion())) {
$message .= sprintf(' since version %s',
$filter->getDeprecatedVersion());
}
if ($filter->getAlternative()) {
$message .= sprintf('. Use "%s"
instead', $filter->getAlternative());
}
$src = $this->parser->getStream()->getSourceContext();
$message .= sprintf(' in %s at line %d.',
$src->getPath() ? $src->getPath() : $src->getName(), $line);
@trigger_error($message, E_USER_DEPRECATED);
}
if ($filter instanceof TwigFilter) {
return $filter->getNodeClass();
}
return $filter instanceof \Twig_Filter_Node ?
$filter->getClass() : 'Twig\Node\Expression\FilterExpression';
}
// checks that the node only contains "constant" elements
protected function checkConstantExpression(\Twig_NodeInterface $node)
{
if (!($node instanceof ConstantExpression || $node instanceof
ArrayExpression
|| $node instanceof NegUnary || $node instanceof PosUnary
)) {
return false;
}
foreach ($node as $n) {
if (!$this->checkConstantExpression($n)) {
return false;
}
}
return true;
}
}
class_alias('Twig\ExpressionParser',
'Twig_ExpressionParser');
PK��[HAAA(twig/src/Extension/AbstractExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\Environment;
abstract class AbstractExtension implements ExtensionInterface
{
/**
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_InitRuntimeInterface instead
*/
public function initRuntime(Environment $environment)
{
}
public function getTokenParsers()
{
return [];
}
public function getNodeVisitors()
{
return [];
}
public function getFilters()
{
return [];
}
public function getTests()
{
return [];
}
public function getFunctions()
{
return [];
}
public function getOperators()
{
return [];
}
/**
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_GlobalsInterface instead
*/
public function getGlobals()
{
return [];
}
/**
* @deprecated since 1.26 (to be removed in 2.0), not used anymore
internally
*/
public function getName()
{
return \get_class($this);
}
}
class_alias('Twig\Extension\AbstractExtension',
'Twig_Extension');
PK��[��k?�?�$twig/src/Extension/CoreExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\ExpressionParser;
use Twig\TokenParser\ApplyTokenParser;
use Twig\TokenParser\BlockTokenParser;
use Twig\TokenParser\DeprecatedTokenParser;
use Twig\TokenParser\DoTokenParser;
use Twig\TokenParser\EmbedTokenParser;
use Twig\TokenParser\ExtendsTokenParser;
use Twig\TokenParser\FilterTokenParser;
use Twig\TokenParser\FlushTokenParser;
use Twig\TokenParser\ForTokenParser;
use Twig\TokenParser\FromTokenParser;
use Twig\TokenParser\IfTokenParser;
use Twig\TokenParser\ImportTokenParser;
use Twig\TokenParser\IncludeTokenParser;
use Twig\TokenParser\MacroTokenParser;
use Twig\TokenParser\SetTokenParser;
use Twig\TokenParser\SpacelessTokenParser;
use Twig\TokenParser\UseTokenParser;
use Twig\TokenParser\WithTokenParser;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\TwigTest;
/**
* @final
*/
class CoreExtension extends AbstractExtension
{
protected $dateFormats = ['F j, Y H:i', '%d days'];
protected $numberFormat = [0, '.', ','];
protected $timezone = null;
protected $escapers = [];
/**
* Defines a new escaper to be used via the escape filter.
*
* @param string $strategy The strategy name that should be used as a
strategy in the escape call
* @param callable $callable A valid PHP callable
*/
public function setEscaper($strategy, $callable)
{
$this->escapers[$strategy] = $callable;
}
/**
* Gets all defined escapers.
*
* @return array An array of escapers
*/
public function getEscapers()
{
return $this->escapers;
}
/**
* Sets the default format to be used by the date filter.
*
* @param string $format The default date format string
* @param string $dateIntervalFormat The default date interval format
string
*/
public function setDateFormat($format = null, $dateIntervalFormat =
null)
{
if (null !== $format) {
$this->dateFormats[0] = $format;
}
if (null !== $dateIntervalFormat) {
$this->dateFormats[1] = $dateIntervalFormat;
}
}
/**
* Gets the default format to be used by the date filter.
*
* @return array The default date format string and the default date
interval format string
*/
public function getDateFormat()
{
return $this->dateFormats;
}
/**
* Sets the default timezone to be used by the date filter.
*
* @param \DateTimeZone|string $timezone The default timezone string or
a \DateTimeZone object
*/
public function setTimezone($timezone)
{
$this->timezone = $timezone instanceof \DateTimeZone ? $timezone
: new \DateTimeZone($timezone);
}
/**
* Gets the default timezone to be used by the date filter.
*
* @return \DateTimeZone The default timezone currently in use
*/
public function getTimezone()
{
if (null === $this->timezone) {
$this->timezone = new
\DateTimeZone(date_default_timezone_get());
}
return $this->timezone;
}
/**
* Sets the default format to be used by the number_format filter.
*
* @param int $decimal the number of decimal places to use
* @param string $decimalPoint the character(s) to use for the decimal
point
* @param string $thousandSep the character(s) to use for the
thousands separator
*/
public function setNumberFormat($decimal, $decimalPoint, $thousandSep)
{
$this->numberFormat = [$decimal, $decimalPoint, $thousandSep];
}
/**
* Get the default format used by the number_format filter.
*
* @return array The arguments for number_format()
*/
public function getNumberFormat()
{
return $this->numberFormat;
}
public function getTokenParsers()
{
return [
new ApplyTokenParser(),
new ForTokenParser(),
new IfTokenParser(),
new ExtendsTokenParser(),
new IncludeTokenParser(),
new BlockTokenParser(),
new UseTokenParser(),
new FilterTokenParser(),
new MacroTokenParser(),
new ImportTokenParser(),
new FromTokenParser(),
new SetTokenParser(),
new SpacelessTokenParser(),
new FlushTokenParser(),
new DoTokenParser(),
new EmbedTokenParser(),
new WithTokenParser(),
new DeprecatedTokenParser(),
];
}
public function getFilters()
{
$filters = [
// formatting filters
new TwigFilter('date',
'twig_date_format_filter', ['needs_environment' =>
true]),
new TwigFilter('date_modify',
'twig_date_modify_filter', ['needs_environment' =>
true]),
new TwigFilter('format', 'sprintf'),
new TwigFilter('replace',
'twig_replace_filter'),
new TwigFilter('number_format',
'twig_number_format_filter', ['needs_environment' =>
true]),
new TwigFilter('abs', 'abs'),
new TwigFilter('round', 'twig_round'),
// encoding
new TwigFilter('url_encode',
'twig_urlencode_filter'),
new TwigFilter('json_encode',
'twig_jsonencode_filter'),
new TwigFilter('convert_encoding',
'twig_convert_encoding'),
// string filters
new TwigFilter('title',
'twig_title_string_filter', ['needs_environment' =>
true]),
new TwigFilter('capitalize',
'twig_capitalize_string_filter', ['needs_environment'
=> true]),
new TwigFilter('upper', 'strtoupper'),
new TwigFilter('lower', 'strtolower'),
new TwigFilter('striptags', 'strip_tags'),
new TwigFilter('trim', 'twig_trim_filter'),
new TwigFilter('nl2br', 'nl2br',
['pre_escape' => 'html', 'is_safe' =>
['html']]),
new TwigFilter('spaceless',
'twig_spaceless', ['is_safe' =>
['html']]),
// array helpers
new TwigFilter('join', 'twig_join_filter'),
new TwigFilter('split',
'twig_split_filter', ['needs_environment' => true]),
new TwigFilter('sort', 'twig_sort_filter'),
new TwigFilter('merge',
'twig_array_merge'),
new TwigFilter('batch',
'twig_array_batch'),
new TwigFilter('filter',
'twig_array_filter'),
new TwigFilter('map', 'twig_array_map'),
new TwigFilter('reduce',
'twig_array_reduce'),
// string/array filters
new TwigFilter('reverse',
'twig_reverse_filter', ['needs_environment' =>
true]),
new TwigFilter('length',
'twig_length_filter', ['needs_environment' =>
true]),
new TwigFilter('slice', 'twig_slice',
['needs_environment' => true]),
new TwigFilter('first', 'twig_first',
['needs_environment' => true]),
new TwigFilter('last', 'twig_last',
['needs_environment' => true]),
// iteration and runtime
new TwigFilter('default',
'_twig_default_filter', ['node_class' =>
'\Twig\Node\Expression\Filter\DefaultFilter']),
new TwigFilter('keys',
'twig_get_array_keys_filter'),
// escaping
new TwigFilter('escape',
'twig_escape_filter', ['needs_environment' => true,
'is_safe_callback' =>
'twig_escape_filter_is_safe']),
new TwigFilter('e', 'twig_escape_filter',
['needs_environment' => true, 'is_safe_callback'
=> 'twig_escape_filter_is_safe']),
];
if (\function_exists('mb_get_info')) {
$filters[] = new TwigFilter('upper',
'twig_upper_filter', ['needs_environment' => true]);
$filters[] = new TwigFilter('lower',
'twig_lower_filter', ['needs_environment' => true]);
}
return $filters;
}
public function getFunctions()
{
return [
new TwigFunction('max', 'max'),
new TwigFunction('min', 'min'),
new TwigFunction('range', 'range'),
new TwigFunction('constant',
'twig_constant'),
new TwigFunction('cycle', 'twig_cycle'),
new TwigFunction('random', 'twig_random',
['needs_environment' => true]),
new TwigFunction('date',
'twig_date_converter', ['needs_environment' =>
true]),
new TwigFunction('include', 'twig_include',
['needs_environment' => true, 'needs_context' =>
true, 'is_safe' => ['all']]),
new TwigFunction('source', 'twig_source',
['needs_environment' => true, 'is_safe' =>
['all']]),
];
}
public function getTests()
{
return [
new TwigTest('even', null, ['node_class'
=> '\Twig\Node\Expression\Test\EvenTest']),
new TwigTest('odd', null, ['node_class'
=> '\Twig\Node\Expression\Test\OddTest']),
new TwigTest('defined', null, ['node_class'
=> '\Twig\Node\Expression\Test\DefinedTest']),
new TwigTest('sameas', null, ['node_class'
=> '\Twig\Node\Expression\Test\SameasTest',
'deprecated' => '1.21', 'alternative'
=> 'same as']),
new TwigTest('same as', null, ['node_class'
=> '\Twig\Node\Expression\Test\SameasTest']),
new TwigTest('none', null, ['node_class'
=> '\Twig\Node\Expression\Test\NullTest']),
new TwigTest('null', null, ['node_class'
=> '\Twig\Node\Expression\Test\NullTest']),
new TwigTest('divisibleby', null,
['node_class' =>
'\Twig\Node\Expression\Test\DivisiblebyTest',
'deprecated' => '1.21', 'alternative'
=> 'divisible by']),
new TwigTest('divisible by', null,
['node_class' =>
'\Twig\Node\Expression\Test\DivisiblebyTest']),
new TwigTest('constant', null,
['node_class' =>
'\Twig\Node\Expression\Test\ConstantTest']),
new TwigTest('empty', 'twig_test_empty'),
new TwigTest('iterable',
'twig_test_iterable'),
];
}
public function getOperators()
{
return [
[
'not' => ['precedence' => 50,
'class' => '\Twig\Node\Expression\Unary\NotUnary'],
'-' => ['precedence' => 500,
'class' => '\Twig\Node\Expression\Unary\NegUnary'],
'+' => ['precedence' => 500,
'class' => '\Twig\Node\Expression\Unary\PosUnary'],
],
[
'or' => ['precedence' => 10,
'class' => '\Twig\Node\Expression\Binary\OrBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'and' => ['precedence' => 15,
'class' => '\Twig\Node\Expression\Binary\AndBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'b-or' => ['precedence' => 16,
'class' =>
'\Twig\Node\Expression\Binary\BitwiseOrBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'b-xor' => ['precedence' => 17,
'class' =>
'\Twig\Node\Expression\Binary\BitwiseXorBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'b-and' => ['precedence' => 18,
'class' =>
'\Twig\Node\Expression\Binary\BitwiseAndBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'==' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\EqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'!=' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\NotEqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'<' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\LessBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'>' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\GreaterBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'>=' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\GreaterEqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'<=' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\LessEqualBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'not in' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\NotInBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'in' => ['precedence' => 20,
'class' => '\Twig\Node\Expression\Binary\InBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'matches' => ['precedence' => 20,
'class' =>
'\Twig\Node\Expression\Binary\MatchesBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'starts with' => ['precedence' =>
20, 'class' =>
'\Twig\Node\Expression\Binary\StartsWithBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'ends with' => ['precedence' =>
20, 'class' =>
'\Twig\Node\Expression\Binary\EndsWithBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'..' => ['precedence' => 25,
'class' =>
'\Twig\Node\Expression\Binary\RangeBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'+' => ['precedence' => 30,
'class' => '\Twig\Node\Expression\Binary\AddBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'-' => ['precedence' => 30,
'class' => '\Twig\Node\Expression\Binary\SubBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'~' => ['precedence' => 40,
'class' =>
'\Twig\Node\Expression\Binary\ConcatBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'*' => ['precedence' => 60,
'class' => '\Twig\Node\Expression\Binary\MulBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'/' => ['precedence' => 60,
'class' => '\Twig\Node\Expression\Binary\DivBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'//' => ['precedence' => 60,
'class' =>
'\Twig\Node\Expression\Binary\FloorDivBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'%' => ['precedence' => 60,
'class' => '\Twig\Node\Expression\Binary\ModBinary',
'associativity' => ExpressionParser::OPERATOR_LEFT],
'is' => ['precedence' => 100,
'associativity' => ExpressionParser::OPERATOR_LEFT],
'is not' => ['precedence' => 100,
'associativity' => ExpressionParser::OPERATOR_LEFT],
'**' => ['precedence' => 200,
'class' =>
'\Twig\Node\Expression\Binary\PowerBinary',
'associativity' => ExpressionParser::OPERATOR_RIGHT],
'??' => ['precedence' => 300,
'class' =>
'\Twig\Node\Expression\NullCoalesceExpression',
'associativity' => ExpressionParser::OPERATOR_RIGHT],
],
];
}
public function getName()
{
return 'core';
}
}
class_alias('Twig\Extension\CoreExtension',
'Twig_Extension_Core');
}
namespace {
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\Markup;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Node;
/**
* Cycles over a value.
*
* @param \ArrayAccess|array $values
* @param int $position The cycle position
*
* @return string The next value in the cycle
*/
function twig_cycle($values, $position)
{
if (!\is_array($values) && !$values instanceof \ArrayAccess) {
return $values;
}
return $values[$position % \count($values)];
}
/**
* Returns a random value depending on the supplied parameter type:
* - a random item from a \Traversable or array
* - a random character from a string
* - a random integer between 0 and the integer parameter.
*
* @param \Traversable|array|int|float|string $values The values to pick a
random item from
* @param int|null $max Maximum value used
when $values is an int
*
* @throws RuntimeError when $values is an empty array (does not apply to
an empty string which is returned as is)
*
* @return mixed A random value from the given sequence
*/
function twig_random(Environment $env, $values = null, $max = null)
{
if (null === $values) {
return null === $max ? mt_rand() : mt_rand(0, $max);
}
if (\is_int($values) || \is_float($values)) {
if (null === $max) {
if ($values < 0) {
$max = 0;
$min = $values;
} else {
$max = $values;
$min = 0;
}
} else {
$min = $values;
$max = $max;
}
return mt_rand($min, $max);
}
if (\is_string($values)) {
if ('' === $values) {
return '';
}
if (null !== $charset = $env->getCharset()) {
if ('UTF-8' !== $charset) {
$values = twig_convert_encoding($values, 'UTF-8',
$charset);
}
// unicode version of str_split()
// split at all positions, but not after the start and not
before the end
$values = preg_split('/(?<!^)(?!$)/u', $values);
if ('UTF-8' !== $charset) {
foreach ($values as $i => $value) {
$values[$i] = twig_convert_encoding($value, $charset,
'UTF-8');
}
}
} else {
return $values[mt_rand(0, \strlen($values) - 1)];
}
}
if (!twig_test_iterable($values)) {
return $values;
}
$values = twig_to_array($values);
if (0 === \count($values)) {
throw new RuntimeError('The random function cannot pick from
an empty array.');
}
return $values[array_rand($values, 1)];
}
/**
* Converts a date to the given format.
*
* {{ post.published_at|date("m/d/Y") }}
*
* @param \DateTime|\DateTimeInterface|\DateInterval|string $date A
date
* @param string|null $format The
target format, null to use the default
* @param \DateTimeZone|string|false|null $timezone The
target timezone, null to use the default, false to leave unchanged
*
* @return string The formatted date
*/
function twig_date_format_filter(Environment $env, $date, $format = null,
$timezone = null)
{
if (null === $format) {
$formats =
$env->getExtension('\Twig\Extension\CoreExtension')->getDateFormat();
$format = $date instanceof \DateInterval ? $formats[1] :
$formats[0];
}
if ($date instanceof \DateInterval) {
return $date->format($format);
}
return twig_date_converter($env, $date, $timezone)->format($format);
}
/**
* Returns a new date object modified.
*
* {{
post.published_at|date_modify("-1day")|date("m/d/Y") }}
*
* @param \DateTime|string $date A date
* @param string $modifier A modifier string
*
* @return \DateTime
*/
function twig_date_modify_filter(Environment $env, $date, $modifier)
{
$date = twig_date_converter($env, $date, false);
$resultDate = $date->modify($modifier);
// This is a hack to ensure PHP 5.2 support and support for
\DateTimeImmutable
// \DateTime::modify does not return the modified \DateTime object <
5.3.0
// and \DateTimeImmutable does not modify $date.
return null === $resultDate ? $date : $resultDate;
}
/**
* Converts an input to a \DateTime instance.
*
* {% if date(user.created_at) < date('+2days') %}
* {# do something #}
* {% endif %}
*
* @param \DateTime|\DateTimeInterface|string|null $date A date
* @param \DateTimeZone|string|false|null $timezone The target
timezone, null to use the default, false to leave unchanged
*
* @return \DateTimeInterface
*/
function twig_date_converter(Environment $env, $date = null, $timezone =
null)
{
// determine the timezone
if (false !== $timezone) {
if (null === $timezone) {
$timezone =
$env->getExtension('\Twig\Extension\CoreExtension')->getTimezone();
} elseif (!$timezone instanceof \DateTimeZone) {
$timezone = new \DateTimeZone($timezone);
}
}
// immutable dates
if ($date instanceof \DateTimeImmutable) {
return false !== $timezone ? $date->setTimezone($timezone) :
$date;
}
if ($date instanceof \DateTime || $date instanceof \DateTimeInterface)
{
$date = clone $date;
if (false !== $timezone) {
$date->setTimezone($timezone);
}
return $date;
}
if (null === $date || 'now' === $date) {
return new \DateTime($date, false !== $timezone ? $timezone :
$env->getExtension('\Twig\Extension\CoreExtension')->getTimezone());
}
$asString = (string) $date;
if (ctype_digit($asString) || (!empty($asString) &&
'-' === $asString[0] && ctype_digit(substr($asString,
1)))) {
$date = new \DateTime('@'.$date);
} else {
$date = new \DateTime($date,
$env->getExtension('\Twig\Extension\CoreExtension')->getTimezone());
}
if (false !== $timezone) {
$date->setTimezone($timezone);
}
return $date;
}
/**
* Replaces strings within a string.
*
* @param string $str String to replace in
* @param array|\Traversable $from Replace values
* @param string|null $to Replace to, deprecated (@see
https://secure.php.net/manual/en/function.strtr.php)
*
* @return string
*/
function twig_replace_filter($str, $from, $to = null)
{
if (\is_string($from) && \is_string($to)) {
@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);
return strtr($str, $from, $to);
}
if (!twig_test_iterable($from)) {
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)));
}
return strtr($str, twig_to_array($from));
}
/**
* Rounds a number.
*
* @param int|float $value The value to round
* @param int|float $precision The rounding precision
* @param string $method The method to use for rounding
*
* @return int|float The rounded number
*/
function twig_round($value, $precision = 0, $method = 'common')
{
if ('common' == $method) {
return round($value, $precision);
}
if ('ceil' != $method && 'floor' !=
$method) {
throw new RuntimeError('The round filter only supports the
"common", "ceil", and "floor"
methods.');
}
return $method($value * pow(10, $precision)) / pow(10, $precision);
}
/**
* Number format filter.
*
* All of the formatting options can be left null, in that case the
defaults will
* be used. Supplying any of the parameters will override the defaults set
in the
* environment object.
*
* @param mixed $number A float/int/string of the number to format
* @param int $decimal the number of decimal points to display
* @param string $decimalPoint the character(s) to use for the decimal
point
* @param string $thousandSep the character(s) to use for the thousands
separator
*
* @return string The formatted number
*/
function twig_number_format_filter(Environment $env, $number, $decimal =
null, $decimalPoint = null, $thousandSep = null)
{
$defaults =
$env->getExtension('\Twig\Extension\CoreExtension')->getNumberFormat();
if (null === $decimal) {
$decimal = $defaults[0];
}
if (null === $decimalPoint) {
$decimalPoint = $defaults[1];
}
if (null === $thousandSep) {
$thousandSep = $defaults[2];
}
return number_format((float) $number, $decimal, $decimalPoint,
$thousandSep);
}
/**
* URL encodes (RFC 3986) a string as a path segment or an array as a query
string.
*
* @param string|array $url A URL or an array of query parameters
*
* @return string The URL encoded value
*/
function twig_urlencode_filter($url)
{
if (\is_array($url)) {
if (\defined('PHP_QUERY_RFC3986')) {
return http_build_query($url, '', '&',
PHP_QUERY_RFC3986);
}
return http_build_query($url, '', '&');
}
return rawurlencode($url);
}
/**
* JSON encodes a variable.
*
* @param mixed $value the value to encode
* @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
*
* @return mixed The JSON encoded value
*/
function twig_jsonencode_filter($value, $options = 0)
{
if ($value instanceof Markup) {
$value = (string) $value;
} elseif (\is_array($value)) {
array_walk_recursive($value, '_twig_markup2string');
}
return json_encode($value, $options);
}
function _twig_markup2string(&$value)
{
if ($value instanceof Markup) {
$value = (string) $value;
}
}
/**
* Merges an array with another one.
*
* {% set items = { 'apple': 'fruit',
'orange': 'fruit' } %}
*
* {% set items = items|merge({ 'peugeot': 'car' }) %}
*
* {# items now contains { 'apple': 'fruit',
'orange': 'fruit', 'peugeot': 'car'
} #}
*
* @param array|\Traversable $arr1 An array
* @param array|\Traversable $arr2 An array
*
* @return array The merged array
*/
function twig_array_merge($arr1, $arr2)
{
if (!twig_test_iterable($arr1)) {
throw new RuntimeError(sprintf('The merge filter only works
with arrays or "Traversable", got "%s" as first
argument.', \gettype($arr1)));
}
if (!twig_test_iterable($arr2)) {
throw new RuntimeError(sprintf('The merge filter only works
with arrays or "Traversable", got "%s" as second
argument.', \gettype($arr2)));
}
return array_merge(twig_to_array($arr1), twig_to_array($arr2));
}
/**
* Slices a variable.
*
* @param mixed $item A variable
* @param int $start Start of the slice
* @param int $length Size of the slice
* @param bool $preserveKeys Whether to preserve key or not (when the
input is an array)
*
* @return mixed The sliced variable
*/
function twig_slice(Environment $env, $item, $start, $length = null,
$preserveKeys = false)
{
if ($item instanceof \Traversable) {
while ($item instanceof \IteratorAggregate) {
$item = $item->getIterator();
}
if ($start >= 0 && $length >= 0 && $item
instanceof \Iterator) {
try {
return iterator_to_array(new \LimitIterator($item, $start,
null === $length ? -1 : $length), $preserveKeys);
} catch (\OutOfBoundsException $e) {
return [];
}
}
$item = iterator_to_array($item, $preserveKeys);
}
if (\is_array($item)) {
return \array_slice($item, $start, $length, $preserveKeys);
}
$item = (string) $item;
if (\function_exists('mb_get_info') && null !==
$charset = $env->getCharset()) {
return (string) mb_substr($item, $start, null === $length ?
mb_strlen($item, $charset) - $start : $length, $charset);
}
return (string) (null === $length ? substr($item, $start) :
substr($item, $start, $length));
}
/**
* Returns the first element of the item.
*
* @param mixed $item A variable
*
* @return mixed The first element of the item
*/
function twig_first(Environment $env, $item)
{
$elements = twig_slice($env, $item, 0, 1, false);
return \is_string($elements) ? $elements : current($elements);
}
/**
* Returns the last element of the item.
*
* @param mixed $item A variable
*
* @return mixed The last element of the item
*/
function twig_last(Environment $env, $item)
{
$elements = twig_slice($env, $item, -1, 1, false);
return \is_string($elements) ? $elements : current($elements);
}
/**
* Joins the values to a string.
*
* The separators between elements are empty strings per default, you can
define them with the optional parameters.
*
* {{ [1, 2, 3]|join(', ', ' and ') }}
* {# returns 1, 2 and 3 #}
*
* {{ [1, 2, 3]|join('|') }}
* {# returns 1|2|3 #}
*
* {{ [1, 2, 3]|join }}
* {# returns 123 #}
*
* @param array $value An array
* @param string $glue The separator
* @param string|null $and The separator for the last pair
*
* @return string The concatenated string
*/
function twig_join_filter($value, $glue = '', $and = null)
{
if (!twig_test_iterable($value)) {
$value = (array) $value;
}
$value = twig_to_array($value, false);
if (0 === \count($value)) {
return '';
}
if (null === $and || $and === $glue) {
return implode($glue, $value);
}
if (1 === \count($value)) {
return $value[0];
}
return implode($glue, \array_slice($value, 0,
-1)).$and.$value[\count($value) - 1];
}
/**
* Splits the string into an array.
*
* {{ "one,two,three"|split(',') }}
* {# returns [one, two, three] #}
*
* {{ "one,two,three,four,five"|split(',', 3) }}
* {# returns [one, two, "three,four,five"] #}
*
* {{ "123"|split('') }}
* {# returns [1, 2, 3] #}
*
* {{ "aabbcc"|split('', 2) }}
* {# returns [aa, bb, cc] #}
*
* @param string $value A string
* @param string $delimiter The delimiter
* @param int $limit The limit
*
* @return array The split string as an array
*/
function twig_split_filter(Environment $env, $value, $delimiter, $limit =
null)
{
if (\strlen($delimiter) > 0) {
return null === $limit ? explode($delimiter, $value) :
explode($delimiter, $value, $limit);
}
if (!\function_exists('mb_get_info') || null === $charset =
$env->getCharset()) {
return str_split($value, null === $limit ? 1 : $limit);
}
if ($limit <= 1) {
return preg_split('/(?<!^)(?!$)/u', $value);
}
$length = mb_strlen($value, $charset);
if ($length < $limit) {
return [$value];
}
$r = [];
for ($i = 0; $i < $length; $i += $limit) {
$r[] = mb_substr($value, $i, $limit, $charset);
}
return $r;
}
// The '_default' filter is used internally to avoid using the
ternary operator
// which costs a lot for big contexts (before PHP 5.4). So, on average,
// a function call is cheaper.
/**
* @internal
*/
function _twig_default_filter($value, $default = '')
{
if (twig_test_empty($value)) {
return $default;
}
return $value;
}
/**
* Returns the keys for the given array.
*
* It is useful when you want to iterate over the keys of an array:
*
* {% for key in array|keys %}
* {# ... #}
* {% endfor %}
*
* @param array $array An array
*
* @return array The keys
*/
function twig_get_array_keys_filter($array)
{
if ($array instanceof \Traversable) {
while ($array instanceof \IteratorAggregate) {
$array = $array->getIterator();
}
if ($array instanceof \Iterator) {
$keys = [];
$array->rewind();
while ($array->valid()) {
$keys[] = $array->key();
$array->next();
}
return $keys;
}
$keys = [];
foreach ($array as $key => $item) {
$keys[] = $key;
}
return $keys;
}
if (!\is_array($array)) {
return [];
}
return array_keys($array);
}
/**
* Reverses a variable.
*
* @param array|\Traversable|string $item An array, a \Traversable
instance, or a string
* @param bool $preserveKeys Whether to preserve key
or not
*
* @return mixed The reversed input
*/
function twig_reverse_filter(Environment $env, $item, $preserveKeys =
false)
{
if ($item instanceof \Traversable) {
return array_reverse(iterator_to_array($item), $preserveKeys);
}
if (\is_array($item)) {
return array_reverse($item, $preserveKeys);
}
if (null !== $charset = $env->getCharset()) {
$string = (string) $item;
if ('UTF-8' !== $charset) {
$item = twig_convert_encoding($string, 'UTF-8',
$charset);
}
preg_match_all('/./us', $item, $matches);
$string = implode('', array_reverse($matches[0]));
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
}
return strrev((string) $item);
}
/**
* Sorts an array.
*
* @param array|\Traversable $array
*
* @return array
*/
function twig_sort_filter($array)
{
if ($array instanceof \Traversable) {
$array = iterator_to_array($array);
} elseif (!\is_array($array)) {
throw new RuntimeError(sprintf('The sort filter only works
with arrays or "Traversable", got "%s".',
\gettype($array)));
}
asort($array);
return $array;
}
/**
* @internal
*/
function twig_in_filter($value, $compare)
{
if ($value instanceof Markup) {
$value = (string) $value;
}
if ($compare instanceof Markup) {
$compare = (string) $compare;
}
if (\is_array($compare)) {
return \in_array($value, $compare, \is_object($value) ||
\is_resource($value));
} elseif (\is_string($compare) && (\is_string($value) ||
\is_int($value) || \is_float($value))) {
return '' === $value || false !== strpos($compare,
(string) $value);
} elseif ($compare instanceof \Traversable) {
if (\is_object($value) || \is_resource($value)) {
foreach ($compare as $item) {
if ($item === $value) {
return true;
}
}
} else {
foreach ($compare as $item) {
if ($item == $value) {
return true;
}
}
}
return false;
}
return false;
}
/**
* Returns a trimmed string.
*
* @return string
*
* @throws RuntimeError When an invalid trimming side is used (not a string
or not 'left', 'right', or 'both')
*/
function twig_trim_filter($string, $characterMask = null, $side =
'both')
{
if (null === $characterMask) {
$characterMask = " \t\n\r\0\x0B";
}
switch ($side) {
case 'both':
return trim($string, $characterMask);
case 'left':
return ltrim($string, $characterMask);
case 'right':
return rtrim($string, $characterMask);
default:
throw new RuntimeError('Trimming side must be
"left", "right" or "both".');
}
}
/**
* Removes whitespaces between HTML tags.
*
* @return string
*/
function twig_spaceless($content)
{
return trim(preg_replace('/>\s+</',
'><', $content));
}
/**
* Escapes a string.
*
* @param mixed $string The value to be escaped
* @param string $strategy The escaping strategy
* @param string $charset The charset
* @param bool $autoescape Whether the function is called by the
auto-escaping feature (true) or by the developer (false)
*
* @return string
*/
function twig_escape_filter(Environment $env, $string, $strategy =
'html', $charset = null, $autoescape = false)
{
if ($autoescape && $string instanceof Markup) {
return $string;
}
if (!\is_string($string)) {
if (\is_object($string) && method_exists($string,
'__toString')) {
$string = (string) $string;
} elseif (\in_array($strategy, ['html', 'js',
'css', 'html_attr', 'url'])) {
return $string;
}
}
if ('' === $string) {
return '';
}
if (null === $charset) {
$charset = $env->getCharset();
}
switch ($strategy) {
case 'html':
// see https://secure.php.net/htmlspecialchars
// Using a static variable to avoid initializing the array
// each time the function is called. Moving the declaration on
the
// top of the function slow downs other escaping strategies.
static $htmlspecialcharsCharsets = [
'ISO-8859-1' => true, 'ISO8859-1'
=> true,
'ISO-8859-15' => true, 'ISO8859-15'
=> true,
'utf-8' => true, 'UTF-8' => true,
'CP866' => true, 'IBM866' =>
true, '866' => true,
'CP1251' => true, 'WINDOWS-1251'
=> true, 'WIN-1251' => true,
'1251' => true,
'CP1252' => true, 'WINDOWS-1252'
=> true, '1252' => true,
'KOI8-R' => true, 'KOI8-RU' =>
true, 'KOI8R' => true,
'BIG5' => true, '950' => true,
'GB2312' => true, '936' => true,
'BIG5-HKSCS' => true,
'SHIFT_JIS' => true, 'SJIS' =>
true, '932' => true,
'EUC-JP' => true, 'EUCJP' =>
true,
'ISO8859-5' => true, 'ISO-8859-5'
=> true, 'MACROMAN' => true,
];
if (isset($htmlspecialcharsCharsets[$charset])) {
return htmlspecialchars($string, ENT_QUOTES |
ENT_SUBSTITUTE, $charset);
}
if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) {
// cache the lowercase variant for future iterations
$htmlspecialcharsCharsets[$charset] = true;
return htmlspecialchars($string, ENT_QUOTES |
ENT_SUBSTITUTE, $charset);
}
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
$string = htmlspecialchars($string, ENT_QUOTES |
ENT_SUBSTITUTE, 'UTF-8');
return twig_convert_encoding($string, $charset,
'UTF-8');
case 'js':
// escape all non-alphanumeric characters
// into their \x or \uHHHH representations
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
}
if (!preg_match('//u', $string)) {
throw new RuntimeError('The string to escape is not a
valid UTF-8 string.');
}
$string =
preg_replace_callback('#[^a-zA-Z0-9,\._]#Su',
'_twig_escape_js_callback', $string);
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
case 'css':
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
}
if (!preg_match('//u', $string)) {
throw new RuntimeError('The string to escape is not a
valid UTF-8 string.');
}
$string = preg_replace_callback('#[^a-zA-Z0-9]#Su',
'_twig_escape_css_callback', $string);
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
case 'html_attr':
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, 'UTF-8',
$charset);
}
if (!preg_match('//u', $string)) {
throw new RuntimeError('The string to escape is not a
valid UTF-8 string.');
}
$string =
preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su',
'_twig_escape_html_attr_callback', $string);
if ('UTF-8' !== $charset) {
$string = twig_convert_encoding($string, $charset,
'UTF-8');
}
return $string;
case 'url':
return rawurlencode($string);
default:
static $escapers;
if (null === $escapers) {
$escapers =
$env->getExtension('\Twig\Extension\CoreExtension')->getEscapers();
}
if (isset($escapers[$strategy])) {
return \call_user_func($escapers[$strategy], $env, $string,
$charset);
}
$validStrategies = implode(', ',
array_merge(['html', 'js', 'url',
'css', 'html_attr'], array_keys($escapers)));
throw new RuntimeError(sprintf('Invalid escaping strategy
"%s" (valid ones: %s).', $strategy, $validStrategies));
}
}
/**
* @internal
*/
function twig_escape_filter_is_safe(Node $filterArgs)
{
foreach ($filterArgs as $arg) {
if ($arg instanceof ConstantExpression) {
return [$arg->getAttribute('value')];
}
return [];
}
return ['html'];
}
if (\function_exists('mb_convert_encoding')) {
function twig_convert_encoding($string, $to, $from)
{
return mb_convert_encoding($string, $to, $from);
}
} elseif (\function_exists('iconv')) {
function twig_convert_encoding($string, $to, $from)
{
return iconv($from, $to, $string);
}
} else {
function twig_convert_encoding($string, $to, $from)
{
throw new RuntimeError('No suitable convert encoding function
(use UTF-8 as your encoding or install the iconv or mbstring
extension).');
}
}
if (\function_exists('mb_ord')) {
function twig_ord($string)
{
return mb_ord($string, 'UTF-8');
}
} else {
function twig_ord($string)
{
$code = ($string = unpack('C*', substr($string, 0, 4))) ?
$string[1] : 0;
if (0xF0 <= $code) {
return (($code - 0xF0) << 18) + (($string[2] - 0x80)
<< 12) + (($string[3] - 0x80) << 6) + $string[4] - 0x80;
}
if (0xE0 <= $code) {
return (($code - 0xE0) << 12) + (($string[2] - 0x80)
<< 6) + $string[3] - 0x80;
}
if (0xC0 <= $code) {
return (($code - 0xC0) << 6) + $string[2] - 0x80;
}
return $code;
}
}
function _twig_escape_js_callback($matches)
{
$char = $matches[0];
/*
* A few characters have short escape sequences in JSON and JavaScript.
* Escape sequences supported only by JavaScript, not JSON, are
ommitted.
* \" is also supported but omitted, because the resulting string
is not HTML safe.
*/
static $shortMap = [
'\\' => '\\\\',
'/' => '\\/',
"\x08" => '\b',
"\x0C" => '\f',
"\x0A" => '\n',
"\x0D" => '\r',
"\x09" => '\t',
];
if (isset($shortMap[$char])) {
return $shortMap[$char];
}
// \uHHHH
$char = twig_convert_encoding($char, 'UTF-16BE',
'UTF-8');
$char = strtoupper(bin2hex($char));
if (4 >= \strlen($char)) {
return sprintf('\u%04s', $char);
}
return sprintf('\u%04s\u%04s', substr($char, 0, -4),
substr($char, -4));
}
function _twig_escape_css_callback($matches)
{
$char = $matches[0];
return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) :
twig_ord($char));
}
/**
* This function is adapted from code coming from Zend Framework.
*
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc.
(https://www.zend.com)
* @license https://framework.zend.com/license/new-bsd New BSD License
*/
function _twig_escape_html_attr_callback($matches)
{
$chr = $matches[0];
$ord = \ord($chr);
/*
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
if (($ord <= 0x1f && "\t" != $chr &&
"\n" != $chr && "\r" != $chr) || ($ord >=
0x7f && $ord <= 0x9f)) {
return '�';
}
/*
* Check if the current character to escape has a name entity we should
* replace it with while grabbing the hex value of the character.
*/
if (1 == \strlen($chr)) {
/*
* While HTML supports far more named entities, the lowest common
denominator
* has become HTML5's XML Serialisation which is restricted to
the those named
* entities that XML supports. Using HTML entities would result in
this error:
* XML Parsing Error: undefined entity
*/
static $entityMap = [
34 => '"', /* quotation mark */
38 => '&', /* ampersand */
60 => '<', /* less-than sign */
62 => '>', /* greater-than sign */
];
if (isset($entityMap[$ord])) {
return $entityMap[$ord];
}
return sprintf('&#x%02X;', $ord);
}
/*
* Per OWASP recommendations, we'll use hex entities for any other
* characters where a named entity does not exist.
*/
return sprintf('&#x%04X;', twig_ord($chr));
}
// add multibyte extensions if possible
if (\function_exists('mb_get_info')) {
/**
* Returns the length of a variable.
*
* @param mixed $thing A variable
*
* @return int The length of the value
*/
function twig_length_filter(Environment $env, $thing)
{
if (null === $thing) {
return 0;
}
if (is_scalar($thing)) {
return mb_strlen($thing, $env->getCharset());
}
if ($thing instanceof \Countable || \is_array($thing) || $thing
instanceof \SimpleXMLElement) {
return \count($thing);
}
if ($thing instanceof \Traversable) {
return iterator_count($thing);
}
if (\is_object($thing) && method_exists($thing,
'__toString')) {
return mb_strlen((string) $thing, $env->getCharset());
}
return 1;
}
/**
* Converts a string to uppercase.
*
* @param string $string A string
*
* @return string The uppercased string
*/
function twig_upper_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_strtoupper($string, $charset);
}
return strtoupper($string);
}
/**
* Converts a string to lowercase.
*
* @param string $string A string
*
* @return string The lowercased string
*/
function twig_lower_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_strtolower($string, $charset);
}
return strtolower($string);
}
/**
* Returns a titlecased string.
*
* @param string $string A string
*
* @return string The titlecased string
*/
function twig_title_string_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_convert_case($string, MB_CASE_TITLE, $charset);
}
return ucwords(strtolower($string));
}
/**
* Returns a capitalized string.
*
* @param string $string A string
*
* @return string The capitalized string
*/
function twig_capitalize_string_filter(Environment $env, $string)
{
if (null !== $charset = $env->getCharset()) {
return mb_strtoupper(mb_substr($string, 0, 1, $charset),
$charset).mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset),
$charset), $charset);
}
return ucfirst(strtolower($string));
}
}
// and byte fallback
else {
/**
* Returns the length of a variable.
*
* @param mixed $thing A variable
*
* @return int The length of the value
*/
function twig_length_filter(Environment $env, $thing)
{
if (null === $thing) {
return 0;
}
if (is_scalar($thing)) {
return \strlen($thing);
}
if ($thing instanceof \SimpleXMLElement) {
return \count($thing);
}
if (\is_object($thing) && method_exists($thing,
'__toString') && !$thing instanceof \Countable) {
return \strlen((string) $thing);
}
if ($thing instanceof \Countable || \is_array($thing)) {
return \count($thing);
}
if ($thing instanceof \IteratorAggregate) {
return iterator_count($thing);
}
return 1;
}
/**
* Returns a titlecased string.
*
* @param string $string A string
*
* @return string The titlecased string
*/
function twig_title_string_filter(Environment $env, $string)
{
return ucwords(strtolower($string));
}
/**
* Returns a capitalized string.
*
* @param string $string A string
*
* @return string The capitalized string
*/
function twig_capitalize_string_filter(Environment $env, $string)
{
return ucfirst(strtolower($string));
}
}
/**
* @internal
*/
function twig_ensure_traversable($seq)
{
if ($seq instanceof \Traversable || \is_array($seq)) {
return $seq;
}
return [];
}
/**
* @internal
*/
function twig_to_array($seq, $preserveKeys = true)
{
if ($seq instanceof \Traversable) {
return iterator_to_array($seq, $preserveKeys);
}
if (!\is_array($seq)) {
return $seq;
}
return $preserveKeys ? $seq : array_values($seq);
}
/**
* Checks if a variable is empty.
*
* {# evaluates to true if the foo variable is null, false, or the empty
string #}
* {% if foo is empty %}
* {# ... #}
* {% endif %}
*
* @param mixed $value A variable
*
* @return bool true if the value is empty, false otherwise
*/
function twig_test_empty($value)
{
if ($value instanceof \Countable) {
return 0 == \count($value);
}
if ($value instanceof \Traversable) {
return !iterator_count($value);
}
if (\is_object($value) && method_exists($value,
'__toString')) {
return '' === (string) $value;
}
return '' === $value || false === $value || null === $value
|| [] === $value;
}
/**
* Checks if a variable is traversable.
*
* {# evaluates to true if the foo variable is an array or a traversable
object #}
* {% if foo is iterable %}
* {# ... #}
* {% endif %}
*
* @param mixed $value A variable
*
* @return bool true if the value is traversable
*/
function twig_test_iterable($value)
{
return $value instanceof \Traversable || \is_array($value);
}
/**
* Renders a template.
*
* @param array $context
* @param string|array $template The template to render or an array of
templates to try consecutively
* @param array $variables The variables to pass to the template
* @param bool $withContext
* @param bool $ignoreMissing Whether to ignore missing templates
or not
* @param bool $sandboxed Whether to sandbox the template or
not
*
* @return string The rendered template
*/
function twig_include(Environment $env, $context, $template, $variables =
[], $withContext = true, $ignoreMissing = false, $sandboxed = false)
{
$alreadySandboxed = false;
$sandbox = null;
if ($withContext) {
$variables = array_merge($context, $variables);
}
if ($isSandboxed = $sandboxed &&
$env->hasExtension('\Twig\Extension\SandboxExtension')) {
$sandbox =
$env->getExtension('\Twig\Extension\SandboxExtension');
if (!$alreadySandboxed = $sandbox->isSandboxed()) {
$sandbox->enableSandbox();
}
}
$loaded = null;
try {
$loaded = $env->resolveTemplate($template);
} catch (LoaderError $e) {
if (!$ignoreMissing) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
}
} catch (\Throwable $e) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
} catch (\Exception $e) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
}
try {
$ret = $loaded ? $loaded->render($variables) : '';
} catch (\Exception $e) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
}
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
return $ret;
}
/**
* Returns a template content without rendering it.
*
* @param string $name The template name
* @param bool $ignoreMissing Whether to ignore missing templates or not
*
* @return string The template source
*/
function twig_source(Environment $env, $name, $ignoreMissing = false)
{
$loader = $env->getLoader();
try {
if (!$loader instanceof SourceContextLoaderInterface) {
return $loader->getSource($name);
} else {
return $loader->getSourceContext($name)->getCode();
}
} catch (LoaderError $e) {
if (!$ignoreMissing) {
throw $e;
}
}
}
/**
* Provides the ability to get constants from instances as well as
class/global constants.
*
* @param string $constant The name of the constant
* @param object|null $object The object to get the constant from
*
* @return string
*/
function twig_constant($constant, $object = null)
{
if (null !== $object) {
$constant = \get_class($object).'::'.$constant;
}
return \constant($constant);
}
/**
* Checks if a constant exists.
*
* @param string $constant The name of the constant
* @param object|null $object The object to get the constant from
*
* @return bool
*/
function twig_constant_is_defined($constant, $object = null)
{
if (null !== $object) {
$constant = \get_class($object).'::'.$constant;
}
return \defined($constant);
}
/**
* Batches item.
*
* @param array $items An array of items
* @param int $size The size of the batch
* @param mixed $fill A value used to fill missing items
*
* @return array
*/
function twig_array_batch($items, $size, $fill = null, $preserveKeys =
true)
{
if (!twig_test_iterable($items)) {
throw new RuntimeError(sprintf('The "batch" filter
expects an array or "Traversable", got "%s".',
\is_object($items) ? \get_class($items) : \gettype($items)));
}
$size = ceil($size);
$result = array_chunk(twig_to_array($items, $preserveKeys), $size,
$preserveKeys);
if (null !== $fill && $result) {
$last = \count($result) - 1;
if ($fillCount = $size - \count($result[$last])) {
for ($i = 0; $i < $fillCount; ++$i) {
$result[$last][] = $fill;
}
}
}
return $result;
}
function twig_array_filter($array, $arrow)
{
if (\is_array($array)) {
if (\PHP_VERSION_ID >= 50600) {
return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH);
}
return array_filter($array, $arrow);
}
// the IteratorIterator wrapping is needed as some internal PHP classes
are \Traversable but do not implement \Iterator
return new \CallbackFilterIterator(new \IteratorIterator($array),
$arrow);
}
function twig_array_map($array, $arrow)
{
$r = [];
foreach ($array as $k => $v) {
$r[$k] = $arrow($v, $k);
}
return $r;
}
function twig_array_reduce($array, $arrow, $initial = null)
{
if (!\is_array($array)) {
$array = iterator_to_array($array);
}
return array_reduce($array, $arrow, $initial);
}
}
PK��[6����%twig/src/Extension/DebugExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\TwigFunction;
/**
* @final
*/
class DebugExtension extends AbstractExtension
{
public function getFunctions()
{
// dump is safe if var_dump is overridden by xdebug
$isDumpOutputHtmlSafe = \extension_loaded('xdebug')
// false means that it was not set (and the default is on) or
it explicitly enabled
&& (false ===
ini_get('xdebug.overload_var_dump') ||
ini_get('xdebug.overload_var_dump'))
// false means that it was not set (and the default is on) or
it explicitly enabled
// xdebug.overload_var_dump produces HTML only when html_errors
is also enabled
&& (false === ini_get('html_errors') ||
ini_get('html_errors'))
|| 'cli' === \PHP_SAPI
;
return [
new TwigFunction('dump', 'twig_var_dump',
['is_safe' => $isDumpOutputHtmlSafe ? ['html'] : [],
'needs_context' => true, 'needs_environment' =>
true, 'is_variadic' => true]),
];
}
public function getName()
{
return 'debug';
}
}
class_alias('Twig\Extension\DebugExtension',
'Twig_Extension_Debug');
}
namespace {
use Twig\Environment;
use Twig\Template;
use Twig\TemplateWrapper;
function twig_var_dump(Environment $env, $context, array $vars = [])
{
if (!$env->isDebug()) {
return;
}
ob_start();
if (!$vars) {
$vars = [];
foreach ($context as $key => $value) {
if (!$value instanceof Template && !$value instanceof
TemplateWrapper) {
$vars[$key] = $value;
}
}
var_dump($vars);
} else {
foreach ($vars as $var) {
var_dump($var);
}
}
return ob_get_clean();
}
}
PK��[�%ϑ��'twig/src/Extension/EscaperExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\NodeVisitor\EscaperNodeVisitor;
use Twig\TokenParser\AutoEscapeTokenParser;
use Twig\TwigFilter;
/**
* @final
*/
class EscaperExtension extends AbstractExtension
{
protected $defaultStrategy;
/**
* @param string|false|callable $defaultStrategy An escaping strategy
*
* @see setDefaultStrategy()
*/
public function __construct($defaultStrategy = 'html')
{
$this->setDefaultStrategy($defaultStrategy);
}
public function getTokenParsers()
{
return [new AutoEscapeTokenParser()];
}
public function getNodeVisitors()
{
return [new EscaperNodeVisitor()];
}
public function getFilters()
{
return [
new TwigFilter('raw', 'twig_raw_filter',
['is_safe' => ['all']]),
];
}
/**
* Sets the default strategy to use when not defined by the user.
*
* The strategy can be a valid PHP callback that takes the template
* name as an argument and returns the strategy to use.
*
* @param string|false|callable $defaultStrategy An escaping strategy
*/
public function setDefaultStrategy($defaultStrategy)
{
// for BC
if (true === $defaultStrategy) {
@trigger_error('Using "true" as the default
strategy is deprecated since version 1.21. Use "html"
instead.', E_USER_DEPRECATED);
$defaultStrategy = 'html';
}
if ('filename' === $defaultStrategy) {
@trigger_error('Using "filename" as the default
strategy is deprecated since version 1.27. Use "name"
instead.', E_USER_DEPRECATED);
$defaultStrategy = 'name';
}
if ('name' === $defaultStrategy) {
$defaultStrategy =
['\Twig\FileExtensionEscapingStrategy', 'guess'];
}
$this->defaultStrategy = $defaultStrategy;
}
/**
* Gets the default strategy to use when not defined by the user.
*
* @param string $name The template name
*
* @return string|false The default strategy to use for the template
*/
public function getDefaultStrategy($name)
{
// disable string callables to avoid calling a function named html
or js,
// or any other upcoming escaping strategy
if (!\is_string($this->defaultStrategy) && false !==
$this->defaultStrategy) {
return \call_user_func($this->defaultStrategy, $name);
}
return $this->defaultStrategy;
}
public function getName()
{
return 'escaper';
}
}
class_alias('Twig\Extension\EscaperExtension',
'Twig_Extension_Escaper');
}
namespace {
/**
* Marks a variable as being safe.
*
* @param string $string A PHP variable
*
* @return string
*/
function twig_raw_filter($string)
{
return $string;
}
}
PK��[Ϡ��B
B
)twig/src/Extension/ExtensionInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\Environment;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\TokenParser\TokenParserInterface;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\TwigTest;
/**
* Interface implemented by extension classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ExtensionInterface
{
/**
* Initializes the runtime environment.
*
* This is where you can load some file that contains filter functions
for instance.
*
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_InitRuntimeInterface instead
*/
public function initRuntime(Environment $environment);
/**
* Returns the token parser instances to add to the existing list.
*
* @return TokenParserInterface[]
*/
public function getTokenParsers();
/**
* Returns the node visitor instances to add to the existing list.
*
* @return NodeVisitorInterface[]
*/
public function getNodeVisitors();
/**
* Returns a list of filters to add to the existing list.
*
* @return TwigFilter[]
*/
public function getFilters();
/**
* Returns a list of tests to add to the existing list.
*
* @return TwigTest[]
*/
public function getTests();
/**
* Returns a list of functions to add to the existing list.
*
* @return TwigFunction[]
*/
public function getFunctions();
/**
* Returns a list of operators to add to the existing list.
*
* @return array<array> First array of unary operators, second
array of binary operators
*/
public function getOperators();
/**
* Returns a list of global variables to add to the existing list.
*
* @return array An array of global variables
*
* @deprecated since 1.23 (to be removed in 2.0), implement
\Twig_Extension_GlobalsInterface instead
*/
public function getGlobals();
/**
* Returns the name of the extension.
*
* @return string The extension name
*
* @deprecated since 1.26 (to be removed in 2.0), not used anymore
internally
*/
public function getName();
}
class_alias('Twig\Extension\ExtensionInterface',
'Twig_ExtensionInterface');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Environment');
PK��[{e�rr'twig/src/Extension/GlobalsInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
/**
* Enables usage of the deprecated
Twig\Extension\AbstractExtension::getGlobals() method.
*
* Explicitly implement this interface if you really need to implement the
* deprecated getGlobals() method in your extensions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface GlobalsInterface
{
}
class_alias('Twig\Extension\GlobalsInterface',
'Twig_Extension_GlobalsInterface');
PK��[�Cˀ�+twig/src/Extension/InitRuntimeInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
/**
* Enables usage of the deprecated
Twig\Extension\AbstractExtension::initRuntime() method.
*
* Explicitly implement this interface if you really need to implement the
* deprecated initRuntime() method in your extensions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface InitRuntimeInterface
{
}
class_alias('Twig\Extension\InitRuntimeInterface',
'Twig_Extension_InitRuntimeInterface');
PK��[yxD��)twig/src/Extension/OptimizerExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\NodeVisitor\OptimizerNodeVisitor;
/**
* @final
*/
class OptimizerExtension extends AbstractExtension
{
protected $optimizers;
public function __construct($optimizers = -1)
{
$this->optimizers = $optimizers;
}
public function getNodeVisitors()
{
return [new OptimizerNodeVisitor($this->optimizers)];
}
public function getName()
{
return 'optimizer';
}
}
class_alias('Twig\Extension\OptimizerExtension',
'Twig_Extension_Optimizer');
PK��[Em
�__(twig/src/Extension/ProfilerExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\Profiler\NodeVisitor\ProfilerNodeVisitor;
use Twig\Profiler\Profile;
class ProfilerExtension extends AbstractExtension
{
private $actives = [];
public function __construct(Profile $profile)
{
$this->actives[] = $profile;
}
public function enter(Profile $profile)
{
$this->actives[0]->addProfile($profile);
array_unshift($this->actives, $profile);
}
public function leave(Profile $profile)
{
$profile->leave();
array_shift($this->actives);
if (1 === \count($this->actives)) {
$this->actives[0]->leave();
}
}
public function getNodeVisitors()
{
return [new ProfilerNodeVisitor(\get_class($this))];
}
public function getName()
{
return 'profiler';
}
}
class_alias('Twig\Extension\ProfilerExtension',
'Twig_Extension_Profiler');
PK��[��FF0twig/src/Extension/RuntimeExtensionInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
/**
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*/
interface RuntimeExtensionInterface
{
}
PK��[c ��T T 'twig/src/Extension/SandboxExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\NodeVisitor\SandboxNodeVisitor;
use Twig\Sandbox\SecurityPolicyInterface;
use Twig\TokenParser\SandboxTokenParser;
/**
* @final
*/
class SandboxExtension extends AbstractExtension
{
protected $sandboxedGlobally;
protected $sandboxed;
protected $policy;
public function __construct(SecurityPolicyInterface $policy, $sandboxed
= false)
{
$this->policy = $policy;
$this->sandboxedGlobally = $sandboxed;
}
public function getTokenParsers()
{
return [new SandboxTokenParser()];
}
public function getNodeVisitors()
{
return [new SandboxNodeVisitor()];
}
public function enableSandbox()
{
$this->sandboxed = true;
}
public function disableSandbox()
{
$this->sandboxed = false;
}
public function isSandboxed()
{
return $this->sandboxedGlobally || $this->sandboxed;
}
public function isSandboxedGlobally()
{
return $this->sandboxedGlobally;
}
public function setSecurityPolicy(SecurityPolicyInterface $policy)
{
$this->policy = $policy;
}
public function getSecurityPolicy()
{
return $this->policy;
}
public function checkSecurity($tags, $filters, $functions)
{
if ($this->isSandboxed()) {
$this->policy->checkSecurity($tags, $filters,
$functions);
}
}
public function checkMethodAllowed($obj, $method)
{
if ($this->isSandboxed()) {
$this->policy->checkMethodAllowed($obj, $method);
}
}
public function checkPropertyAllowed($obj, $method)
{
if ($this->isSandboxed()) {
$this->policy->checkPropertyAllowed($obj, $method);
}
}
public function ensureToStringAllowed($obj)
{
if ($this->isSandboxed() && \is_object($obj) &&
method_exists($obj, '__toString')) {
$this->policy->checkMethodAllowed($obj,
'__toString');
}
return $obj;
}
public function getName()
{
return 'sandbox';
}
}
class_alias('Twig\Extension\SandboxExtension',
'Twig_Extension_Sandbox');
PK��[������'twig/src/Extension/StagingExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\TokenParser\TokenParserInterface;
/**
* Internal class.
*
* This class is used by \Twig\Environment as a staging area and must not
be used directly.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @internal
*/
class StagingExtension extends AbstractExtension
{
protected $functions = [];
protected $filters = [];
protected $visitors = [];
protected $tokenParsers = [];
protected $globals = [];
protected $tests = [];
public function addFunction($name, $function)
{
if (isset($this->functions[$name])) {
@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);
}
$this->functions[$name] = $function;
}
public function getFunctions()
{
return $this->functions;
}
public function addFilter($name, $filter)
{
if (isset($this->filters[$name])) {
@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);
}
$this->filters[$name] = $filter;
}
public function getFilters()
{
return $this->filters;
}
public function addNodeVisitor(NodeVisitorInterface $visitor)
{
$this->visitors[] = $visitor;
}
public function getNodeVisitors()
{
return $this->visitors;
}
public function addTokenParser(TokenParserInterface $parser)
{
if (isset($this->tokenParsers[$parser->getTag()])) {
@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);
}
$this->tokenParsers[$parser->getTag()] = $parser;
}
public function getTokenParsers()
{
return $this->tokenParsers;
}
public function addGlobal($name, $value)
{
$this->globals[$name] = $value;
}
public function getGlobals()
{
return $this->globals;
}
public function addTest($name, $test)
{
if (isset($this->tests[$name])) {
@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);
}
$this->tests[$name] = $test;
}
public function getTests()
{
return $this->tests;
}
public function getName()
{
return 'staging';
}
}
class_alias('Twig\Extension\StagingExtension',
'Twig_Extension_Staging');
PK��[�iy��,twig/src/Extension/StringLoaderExtension.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Extension {
use Twig\TwigFunction;
/**
* @final
*/
class StringLoaderExtension extends AbstractExtension
{
public function getFunctions()
{
return [
new TwigFunction('template_from_string',
'twig_template_from_string', ['needs_environment' =>
true]),
];
}
public function getName()
{
return 'string_loader';
}
}
class_alias('Twig\Extension\StringLoaderExtension',
'Twig_Extension_StringLoader');
}
namespace {
use Twig\Environment;
use Twig\TemplateWrapper;
/**
* Loads a template from a string.
*
* {{ include(template_from_string("Hello {{ name }}")) }}
*
* @param string $template A template as a string or object implementing
__toString()
* @param string $name An optional name of the template to be used in
error messages
*
* @return TemplateWrapper
*/
function twig_template_from_string(Environment $env, $template, $name =
null)
{
return $env->createTemplate((string) $template, $name);
}
}
PK��[W���*twig/src/FileExtensionEscapingStrategy.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Default autoescaping strategy based on file names.
*
* This strategy sets the HTML as the default autoescaping strategy,
* but changes it based on the template name.
*
* Note that there is no runtime performance impact as the
* default autoescaping strategy is set at compilation time.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FileExtensionEscapingStrategy
{
/**
* Guesses the best autoescaping strategy based on the file name.
*
* @param string $name The template name
*
* @return string|false The escaping strategy name to use or false to
disable
*/
public static function guess($name)
{
if (\in_array(substr($name, -1), ['/', '\\']))
{
return 'html'; // return html for directories
}
if ('.twig' === substr($name, -5)) {
$name = substr($name, 0, -5);
}
$extension = pathinfo($name, PATHINFO_EXTENSION);
switch ($extension) {
case 'js':
return 'js';
case 'css':
return 'css';
case 'txt':
return false;
default:
return 'html';
}
}
}
class_alias('Twig\FileExtensionEscapingStrategy',
'Twig_FileExtensionEscapingStrategy');
PK��[z���dPdPtwig/src/Lexer.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
/**
* Lexes a template string.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Lexer implements \Twig_LexerInterface
{
protected $tokens;
protected $code;
protected $cursor;
protected $lineno;
protected $end;
protected $state;
protected $states;
protected $brackets;
protected $env;
// to be renamed to $name in 2.0 (where it is private)
protected $filename;
protected $options;
protected $regexes;
protected $position;
protected $positions;
protected $currentVarBlockLine;
private $source;
const STATE_DATA = 0;
const STATE_BLOCK = 1;
const STATE_VAR = 2;
const STATE_STRING = 3;
const STATE_INTERPOLATION = 4;
const REGEX_NAME =
'/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A';
const REGEX_NUMBER =
'/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A';
const REGEX_STRING =
'/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As';
const REGEX_DQ_STRING_DELIM = '/"/A';
const REGEX_DQ_STRING_PART =
'/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As';
const PUNCTUATION = '()[]{}?:.,|';
public function __construct(Environment $env, array $options = [])
{
$this->env = $env;
$this->options = array_merge([
'tag_comment' => ['{#', '#}'],
'tag_block' => ['{%', '%}'],
'tag_variable' => ['{{',
'}}'],
'whitespace_trim' => '-',
'whitespace_line_trim' => '~',
'whitespace_line_chars' => ' \t\0\x0B',
'interpolation' => ['#{',
'}'],
], $options);
// when PHP 7.3 is the min version, we will be able to remove the
'#' part in preg_quote as it's part of the default
$this->regexes = [
// }}
'lex_var' => '{
\s*
(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1],
'#').'\s*'. // -}}\s*
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~}}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_variable'][1], '#').
// }}
')
}Ax',
// %}
'lex_block' => '{
\s*
(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1],
'#').'\s*\n?'. // -%}\s*\n?
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~%}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_block'][1],
'#').'\n?'. // %}\n?
')
}Ax',
// {% endverbatim %}
'lex_raw_data' => '{'.
preg_quote($this->options['tag_block'][0],
'#'). // {%
'('.
$this->options['whitespace_trim']. // -
'|'.
$this->options['whitespace_line_trim']. //
~
')?\s*'.
'(?:end%s)'. // endraw or endverbatim
'\s*'.
'(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1],
'#').'\s*'. // -%}
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~%}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_block'][1],
'#'). // %}
')
}sx',
'operator' => $this->getOperatorRegex(),
// #}
'lex_comment' => '{
(?:'.
preg_quote($this->options['whitespace_trim']).preg_quote($this->options['tag_comment'][1],
'#').'\s*\n?'. // -#}\s*\n?
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_comment'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~#}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_comment'][1],
'#').'\n?'. // #}\n?
')
}sx',
// verbatim %}
'lex_block_raw' => '{
\s*
(raw|verbatim)
\s*
(?:'.
preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1],
'#').'\s*'. // -%}\s*
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1],
'#').'['.$this->options['whitespace_line_chars'].']*'.
// ~%}[ \t\0\x0B]*
'|'.
preg_quote($this->options['tag_block'][1],
'#'). // %}
')
}Asx',
'lex_block_line' =>
'{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1],
'#').'}As',
// {{ or {% or {#
'lex_tokens_start' => '{
('.
preg_quote($this->options['tag_variable'][0], '#').
// {{
'|'.
preg_quote($this->options['tag_block'][0],
'#'). // {%
'|'.
preg_quote($this->options['tag_comment'][0], '#').
// {#
')('.
preg_quote($this->options['whitespace_trim'], '#').
// -
'|'.
preg_quote($this->options['whitespace_line_trim'],
'#'). // ~
')?
}sx',
'interpolation_start' =>
'{'.preg_quote($this->options['interpolation'][0],
'#').'\s*}A',
'interpolation_end' =>
'{\s*'.preg_quote($this->options['interpolation'][1],
'#').'}A',
];
}
public function tokenize($code, $name = null)
{
if (!$code instanceof Source) {
@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);
$this->source = new Source($code, $name);
} else {
$this->source = $code;
}
if (((int) ini_get('mbstring.func_overload')) & 2) {
@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);
}
if (\function_exists('mb_internal_encoding') &&
((int) ini_get('mbstring.func_overload')) & 2) {
$mbEncoding = mb_internal_encoding();
mb_internal_encoding('ASCII');
} else {
$mbEncoding = null;
}
$this->code = str_replace(["\r\n", "\r"],
"\n", $this->source->getCode());
$this->filename = $this->source->getName();
$this->cursor = 0;
$this->lineno = 1;
$this->end = \strlen($this->code);
$this->tokens = [];
$this->state = self::STATE_DATA;
$this->states = [];
$this->brackets = [];
$this->position = -1;
// find all token starts in one go
preg_match_all($this->regexes['lex_tokens_start'],
$this->code, $matches, PREG_OFFSET_CAPTURE);
$this->positions = $matches;
while ($this->cursor < $this->end) {
// dispatch to the lexing functions depending
// on the current state
switch ($this->state) {
case self::STATE_DATA:
$this->lexData();
break;
case self::STATE_BLOCK:
$this->lexBlock();
break;
case self::STATE_VAR:
$this->lexVar();
break;
case self::STATE_STRING:
$this->lexString();
break;
case self::STATE_INTERPOLATION:
$this->lexInterpolation();
break;
}
}
$this->pushToken(Token::EOF_TYPE);
if (!empty($this->brackets)) {
list($expect, $lineno) = array_pop($this->brackets);
throw new SyntaxError(sprintf('Unclosed
"%s".', $expect), $lineno, $this->source);
}
if ($mbEncoding) {
mb_internal_encoding($mbEncoding);
}
return new TokenStream($this->tokens, $this->source);
}
protected function lexData()
{
// if no matches are left we return the rest of the template as
simple text token
if ($this->position == \count($this->positions[0]) - 1) {
$this->pushToken(Token::TEXT_TYPE, substr($this->code,
$this->cursor));
$this->cursor = $this->end;
return;
}
// Find the first token after the current cursor
$position = $this->positions[0][++$this->position];
while ($position[1] < $this->cursor) {
if ($this->position == \count($this->positions[0]) - 1) {
return;
}
$position = $this->positions[0][++$this->position];
}
// push the template text first
$text = $textContent = substr($this->code, $this->cursor,
$position[1] - $this->cursor);
// trim?
if (isset($this->positions[2][$this->position][0])) {
if ($this->options['whitespace_trim'] ===
$this->positions[2][$this->position][0]) {
// whitespace_trim detected ({%-, {{- or {#-)
$text = rtrim($text);
} elseif ($this->options['whitespace_line_trim']
=== $this->positions[2][$this->position][0]) {
// whitespace_line_trim detected ({%~, {{~ or {#~)
// don't trim \r and \n
$text = rtrim($text, " \t\0\x0B");
}
}
$this->pushToken(Token::TEXT_TYPE, $text);
$this->moveCursor($textContent.$position[0]);
switch ($this->positions[1][$this->position][0]) {
case $this->options['tag_comment'][0]:
$this->lexComment();
break;
case $this->options['tag_block'][0]:
// raw data?
if
(preg_match($this->regexes['lex_block_raw'], $this->code,
$match, 0, $this->cursor)) {
$this->moveCursor($match[0]);
$this->lexRawData($match[1]);
// {% line \d+ %}
} elseif
(preg_match($this->regexes['lex_block_line'], $this->code,
$match, 0, $this->cursor)) {
$this->moveCursor($match[0]);
$this->lineno = (int) $match[1];
} else {
$this->pushToken(Token::BLOCK_START_TYPE);
$this->pushState(self::STATE_BLOCK);
$this->currentVarBlockLine = $this->lineno;
}
break;
case $this->options['tag_variable'][0]:
$this->pushToken(Token::VAR_START_TYPE);
$this->pushState(self::STATE_VAR);
$this->currentVarBlockLine = $this->lineno;
break;
}
}
protected function lexBlock()
{
if (empty($this->brackets) &&
preg_match($this->regexes['lex_block'], $this->code,
$match, 0, $this->cursor)) {
$this->pushToken(Token::BLOCK_END_TYPE);
$this->moveCursor($match[0]);
$this->popState();
} else {
$this->lexExpression();
}
}
protected function lexVar()
{
if (empty($this->brackets) &&
preg_match($this->regexes['lex_var'], $this->code, $match,
0, $this->cursor)) {
$this->pushToken(Token::VAR_END_TYPE);
$this->moveCursor($match[0]);
$this->popState();
} else {
$this->lexExpression();
}
}
protected function lexExpression()
{
// whitespace
if (preg_match('/\s+/A', $this->code, $match, 0,
$this->cursor)) {
$this->moveCursor($match[0]);
if ($this->cursor >= $this->end) {
throw new SyntaxError(sprintf('Unclosed
"%s".', self::STATE_BLOCK === $this->state ?
'block' : 'variable'), $this->currentVarBlockLine,
$this->source);
}
}
// arrow function
if ('=' === $this->code[$this->cursor] &&
'>' === $this->code[$this->cursor + 1]) {
$this->pushToken(Token::ARROW_TYPE, '=>');
$this->moveCursor('=>');
}
// operators
elseif (preg_match($this->regexes['operator'],
$this->code, $match, 0, $this->cursor)) {
$this->pushToken(Token::OPERATOR_TYPE,
preg_replace('/\s+/', ' ', $match[0]));
$this->moveCursor($match[0]);
}
// names
elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0,
$this->cursor)) {
$this->pushToken(Token::NAME_TYPE, $match[0]);
$this->moveCursor($match[0]);
}
// numbers
elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0,
$this->cursor)) {
$number = (float) $match[0]; // floats
if (ctype_digit($match[0]) && $number <=
PHP_INT_MAX) {
$number = (int) $match[0]; // integers lower than the
maximum
}
$this->pushToken(Token::NUMBER_TYPE, $number);
$this->moveCursor($match[0]);
}
// punctuation
elseif (false !== strpos(self::PUNCTUATION,
$this->code[$this->cursor])) {
// opening bracket
if (false !== strpos('([{',
$this->code[$this->cursor])) {
$this->brackets[] = [$this->code[$this->cursor],
$this->lineno];
}
// closing bracket
elseif (false !== strpos(')]}',
$this->code[$this->cursor])) {
if (empty($this->brackets)) {
throw new SyntaxError(sprintf('Unexpected
"%s".', $this->code[$this->cursor]), $this->lineno,
$this->source);
}
list($expect, $lineno) = array_pop($this->brackets);
if ($this->code[$this->cursor] != strtr($expect,
'([{', ')]}')) {
throw new SyntaxError(sprintf('Unclosed
"%s".', $expect), $lineno, $this->source);
}
}
$this->pushToken(Token::PUNCTUATION_TYPE,
$this->code[$this->cursor]);
++$this->cursor;
}
// strings
elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0,
$this->cursor)) {
$this->pushToken(Token::STRING_TYPE,
stripcslashes(substr($match[0], 1, -1)));
$this->moveCursor($match[0]);
}
// opening double quoted string
elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code,
$match, 0, $this->cursor)) {
$this->brackets[] = ['"', $this->lineno];
$this->pushState(self::STATE_STRING);
$this->moveCursor($match[0]);
}
// unlexable
else {
throw new SyntaxError(sprintf('Unexpected character
"%s".', $this->code[$this->cursor]), $this->lineno,
$this->source);
}
}
protected function lexRawData($tag)
{
if ('raw' === $tag) {
@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);
}
if (!preg_match(str_replace('%s', $tag,
$this->regexes['lex_raw_data']), $this->code, $match,
PREG_OFFSET_CAPTURE, $this->cursor)) {
throw new SyntaxError(sprintf('Unexpected end of file:
Unclosed "%s" block.', $tag), $this->lineno,
$this->source);
}
$text = substr($this->code, $this->cursor, $match[0][1] -
$this->cursor);
$this->moveCursor($text.$match[0][0]);
// trim?
if (isset($match[1][0])) {
if ($this->options['whitespace_trim'] ===
$match[1][0]) {
// whitespace_trim detected ({%-, {{- or {#-)
$text = rtrim($text);
} else {
// whitespace_line_trim detected ({%~, {{~ or {#~)
// don't trim \r and \n
$text = rtrim($text, " \t\0\x0B");
}
}
$this->pushToken(Token::TEXT_TYPE, $text);
}
protected function lexComment()
{
if (!preg_match($this->regexes['lex_comment'],
$this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
throw new SyntaxError('Unclosed comment.',
$this->lineno, $this->source);
}
$this->moveCursor(substr($this->code, $this->cursor,
$match[0][1] - $this->cursor).$match[0][0]);
}
protected function lexString()
{
if (preg_match($this->regexes['interpolation_start'],
$this->code, $match, 0, $this->cursor)) {
$this->brackets[] =
[$this->options['interpolation'][0], $this->lineno];
$this->pushToken(Token::INTERPOLATION_START_TYPE);
$this->moveCursor($match[0]);
$this->pushState(self::STATE_INTERPOLATION);
} elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code,
$match, 0, $this->cursor) && \strlen($match[0]) > 0) {
$this->pushToken(Token::STRING_TYPE,
stripcslashes($match[0]));
$this->moveCursor($match[0]);
} elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code,
$match, 0, $this->cursor)) {
list($expect, $lineno) = array_pop($this->brackets);
if ('"' != $this->code[$this->cursor]) {
throw new SyntaxError(sprintf('Unclosed
"%s".', $expect), $lineno, $this->source);
}
$this->popState();
++$this->cursor;
} else {
// unlexable
throw new SyntaxError(sprintf('Unexpected character
"%s".', $this->code[$this->cursor]), $this->lineno,
$this->source);
}
}
protected function lexInterpolation()
{
$bracket = end($this->brackets);
if ($this->options['interpolation'][0] === $bracket[0]
&& preg_match($this->regexes['interpolation_end'],
$this->code, $match, 0, $this->cursor)) {
array_pop($this->brackets);
$this->pushToken(Token::INTERPOLATION_END_TYPE);
$this->moveCursor($match[0]);
$this->popState();
} else {
$this->lexExpression();
}
}
protected function pushToken($type, $value = '')
{
// do not push empty text tokens
if (Token::TEXT_TYPE === $type && '' === $value)
{
return;
}
$this->tokens[] = new Token($type, $value, $this->lineno);
}
protected function moveCursor($text)
{
$this->cursor += \strlen($text);
$this->lineno += substr_count($text, "\n");
}
protected function getOperatorRegex()
{
$operators = array_merge(
['='],
array_keys($this->env->getUnaryOperators()),
array_keys($this->env->getBinaryOperators())
);
$operators = array_combine($operators,
array_map('strlen', $operators));
arsort($operators);
$regex = [];
foreach ($operators as $operator => $length) {
// an operator that ends with a character must be followed by
// a whitespace or a parenthesis
if (ctype_alpha($operator[$length - 1])) {
$r = preg_quote($operator,
'/').'(?=[\s()])';
} else {
$r = preg_quote($operator, '/');
}
// an operator with a space can be any amount of whitespaces
$r = preg_replace('/\s+/', '\s+', $r);
$regex[] = $r;
}
return '/'.implode('|', $regex).'/A';
}
protected function pushState($state)
{
$this->states[] = $this->state;
$this->state = $state;
}
protected function popState()
{
if (0 === \count($this->states)) {
throw new \LogicException('Cannot pop state without a
previous state.');
}
$this->state = array_pop($this->states);
}
}
class_alias('Twig\Lexer', 'Twig_Lexer');
PK��[�i��
�
twig/src/Loader/ArrayLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Loads a template from an array.
*
* When using this loader with a cache mechanism, you should know that a
new cache
* key is generated each time a template content "changes" (the
cache key being the
* source code of the template). If you don't want to see your cache
grows out of
* control, you need to take care of clearing the old cache file by
yourself.
*
* This loader should only be used for unit testing.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ArrayLoader implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
protected $templates = [];
/**
* @param array $templates An array of templates (keys are the names,
and values are the source code)
*/
public function __construct(array $templates = [])
{
$this->templates = $templates;
}
/**
* Adds or overrides a template.
*
* @param string $name The template name
* @param string $template The template source
*/
public function setTemplate($name, $template)
{
$this->templates[(string) $name] = $template;
}
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return $this->templates[$name];
}
public function getSourceContext($name)
{
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return new Source($this->templates[$name], $name);
}
public function exists($name)
{
return isset($this->templates[(string) $name]);
}
public function getCacheKey($name)
{
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return $name.':'.$this->templates[$name];
}
public function isFresh($name, $time)
{
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new LoaderError(sprintf('Template "%s" is
not defined.', $name));
}
return true;
}
}
class_alias('Twig\Loader\ArrayLoader',
'Twig_Loader_Array');
PK��[]�O9))twig/src/Loader/ChainLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Loads templates from other loaders.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ChainLoader implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
private $hasSourceCache = [];
protected $loaders = [];
/**
* @param LoaderInterface[] $loaders
*/
public function __construct(array $loaders = [])
{
foreach ($loaders as $loader) {
$this->addLoader($loader);
}
}
public function addLoader(LoaderInterface $loader)
{
$this->loaders[] = $loader;
$this->hasSourceCache = [];
}
/**
* @return LoaderInterface[]
*/
public function getLoaders()
{
return $this->loaders;
}
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
return $loader->getSource($name);
} catch (LoaderError $e) {
$exceptions[] = $e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
public function getSourceContext($name)
{
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
if ($loader instanceof SourceContextLoaderInterface) {
return $loader->getSourceContext($name);
}
return new Source($loader->getSource($name), $name);
} catch (LoaderError $e) {
$exceptions[] = $e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
public function exists($name)
{
$name = (string) $name;
if (isset($this->hasSourceCache[$name])) {
return $this->hasSourceCache[$name];
}
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface) {
if ($loader->exists($name)) {
return $this->hasSourceCache[$name] = true;
}
continue;
}
try {
if ($loader instanceof SourceContextLoaderInterface) {
$loader->getSourceContext($name);
} else {
$loader->getSource($name);
}
return $this->hasSourceCache[$name] = true;
} catch (LoaderError $e) {
}
}
return $this->hasSourceCache[$name] = false;
}
public function getCacheKey($name)
{
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
return $loader->getCacheKey($name);
} catch (LoaderError $e) {
$exceptions[] = \get_class($loader).':
'.$e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
public function isFresh($name, $time)
{
$exceptions = [];
foreach ($this->loaders as $loader) {
if ($loader instanceof ExistsLoaderInterface &&
!$loader->exists($name)) {
continue;
}
try {
return $loader->isFresh($name, $time);
} catch (LoaderError $e) {
$exceptions[] = \get_class($loader).':
'.$e->getMessage();
}
}
throw new LoaderError(sprintf('Template "%s" is not
defined%s.', $name, $exceptions ? ' ('.implode(',
', $exceptions).')' : ''));
}
}
class_alias('Twig\Loader\ChainLoader',
'Twig_Loader_Chain');
PK��[vH)twig/src/Loader/ExistsLoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
/**
* Adds an exists() method for loaders.
*
* @author Florin Patan <florinpatan@gmail.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface ExistsLoaderInterface
{
/**
* Check if we have the source code of a template, given its name.
*
* @param string $name The name of the template to check if we can load
*
* @return bool If the template source code is handled by this loader
or not
*/
public function exists($name);
}
class_alias('Twig\Loader\ExistsLoaderInterface',
'Twig_ExistsLoaderInterface');
PK��[�(��$�$$twig/src/Loader/FilesystemLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Loads template from the filesystem.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface,
SourceContextLoaderInterface
{
/** Identifier of the main namespace. */
const MAIN_NAMESPACE = '__main__';
protected $paths = [];
protected $cache = [];
protected $errorCache = [];
private $rootPath;
/**
* @param string|array $paths A path or an array of paths where to
look for templates
* @param string|null $rootPath The root path common to all relative
paths (null for getcwd())
*/
public function __construct($paths = [], $rootPath = null)
{
$this->rootPath = (null === $rootPath ? getcwd() :
$rootPath).\DIRECTORY_SEPARATOR;
if (false !== $realPath = realpath($rootPath)) {
$this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
}
if ($paths) {
$this->setPaths($paths);
}
}
/**
* Returns the paths to the templates.
*
* @param string $namespace A path namespace
*
* @return array The array of paths where to look for templates
*/
public function getPaths($namespace = self::MAIN_NAMESPACE)
{
return isset($this->paths[$namespace]) ?
$this->paths[$namespace] : [];
}
/**
* Returns the path namespaces.
*
* The main namespace is always defined.
*
* @return array The array of defined namespaces
*/
public function getNamespaces()
{
return array_keys($this->paths);
}
/**
* Sets the paths where templates are stored.
*
* @param string|array $paths A path or an array of paths where to
look for templates
* @param string $namespace A path namespace
*/
public function setPaths($paths, $namespace = self::MAIN_NAMESPACE)
{
if (!\is_array($paths)) {
$paths = [$paths];
}
$this->paths[$namespace] = [];
foreach ($paths as $path) {
$this->addPath($path, $namespace);
}
}
/**
* Adds a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace A path namespace
*
* @throws LoaderError
*/
public function addPath($path, $namespace = self::MAIN_NAMESPACE)
{
// invalidate the cache
$this->cache = $this->errorCache = [];
$checkPath = $this->isAbsolutePath($path) ? $path :
$this->rootPath.$path;
if (!is_dir($checkPath)) {
throw new LoaderError(sprintf('The "%s"
directory does not exist ("%s").', $path, $checkPath));
}
$this->paths[$namespace][] = rtrim($path, '/\\');
}
/**
* Prepends a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace A path namespace
*
* @throws LoaderError
*/
public function prependPath($path, $namespace = self::MAIN_NAMESPACE)
{
// invalidate the cache
$this->cache = $this->errorCache = [];
$checkPath = $this->isAbsolutePath($path) ? $path :
$this->rootPath.$path;
if (!is_dir($checkPath)) {
throw new LoaderError(sprintf('The "%s"
directory does not exist ("%s").', $path, $checkPath));
}
$path = rtrim($path, '/\\');
if (!isset($this->paths[$namespace])) {
$this->paths[$namespace][] = $path;
} else {
array_unshift($this->paths[$namespace], $path);
}
}
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on
"%s" is deprecated since 1.27. Use getSourceContext()
instead.', \get_class($this)), E_USER_DEPRECATED);
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return '';
}
return file_get_contents($path);
}
public function getSourceContext($name)
{
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return new Source('', $name, '');
}
return new Source(file_get_contents($path), $name, $path);
}
public function getCacheKey($name)
{
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return '';
}
$len = \strlen($this->rootPath);
if (0 === strncmp($this->rootPath, $path, $len)) {
return substr($path, $len);
}
return $path;
}
public function exists($name)
{
$name = $this->normalizeName($name);
if (isset($this->cache[$name])) {
return true;
}
try {
return null !== ($path = $this->findTemplate($name, false))
&& false !== $path;
} catch (LoaderError $e) {
@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.', \get_class($this)),
E_USER_DEPRECATED);
return false;
}
}
public function isFresh($name, $time)
{
// false support to be removed in 3.0
if (null === ($path = $this->findTemplate($name)) || false ===
$path) {
return false;
}
return filemtime($path) < $time;
}
/**
* Checks if the template can be found.
*
* @param string $name The template name
*
* @return string|false|null The template name or false/null
*/
protected function findTemplate($name)
{
$throw = \func_num_args() > 1 ? func_get_arg(1) : true;
$name = $this->normalizeName($name);
if (isset($this->cache[$name])) {
return $this->cache[$name];
}
if (isset($this->errorCache[$name])) {
if (!$throw) {
return false;
}
throw new LoaderError($this->errorCache[$name]);
}
try {
$this->validateName($name);
list($namespace, $shortname) = $this->parseName($name);
} catch (LoaderError $e) {
if (!$throw) {
return false;
}
throw $e;
}
if (!isset($this->paths[$namespace])) {
$this->errorCache[$name] = sprintf('There are no
registered paths for namespace "%s".', $namespace);
if (!$throw) {
return false;
}
throw new LoaderError($this->errorCache[$name]);
}
foreach ($this->paths[$namespace] as $path) {
if (!$this->isAbsolutePath($path)) {
$path = $this->rootPath.$path;
}
if (is_file($path.'/'.$shortname)) {
if (false !== $realpath =
realpath($path.'/'.$shortname)) {
return $this->cache[$name] = $realpath;
}
return $this->cache[$name] =
$path.'/'.$shortname;
}
}
$this->errorCache[$name] = sprintf('Unable to find template
"%s" (looked into: %s).', $name, implode(', ',
$this->paths[$namespace]));
if (!$throw) {
return false;
}
throw new LoaderError($this->errorCache[$name]);
}
protected function parseName($name, $default = self::MAIN_NAMESPACE)
{
if (isset($name[0]) && '@' == $name[0]) {
if (false === $pos = strpos($name, '/')) {
throw new LoaderError(sprintf('Malformed namespaced
template name "%s" (expecting
"@namespace/template_name").', $name));
}
$namespace = substr($name, 1, $pos - 1);
$shortname = substr($name, $pos + 1);
return [$namespace, $shortname];
}
return [$default, $name];
}
protected function normalizeName($name)
{
return preg_replace('#/{2,}#', '/',
str_replace('\\', '/', (string) $name));
}
protected function validateName($name)
{
if (false !== strpos($name, "\0")) {
throw new LoaderError('A template name cannot contain NUL
bytes.');
}
$name = ltrim($name, '/');
$parts = explode('/', $name);
$level = 0;
foreach ($parts as $part) {
if ('..' === $part) {
--$level;
} elseif ('.' !== $part) {
++$level;
}
if ($level < 0) {
throw new LoaderError(sprintf('Looks like you try to
load a template outside configured directories (%s).', $name));
}
}
}
private function isAbsolutePath($file)
{
return strspn($file, '/\\', 0, 1)
|| (\strlen($file) > 3 && ctype_alpha($file[0])
&& ':' === substr($file, 1, 1)
&& strspn($file, '/\\', 2, 1)
)
|| null !== parse_url($file, PHP_URL_SCHEME)
;
}
}
class_alias('Twig\Loader\FilesystemLoader',
'Twig_Loader_Filesystem');
PK��[O(�###twig/src/Loader/LoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
/**
* Interface all loaders must implement.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface LoaderInterface
{
/**
* Gets the source code of a template, given its name.
*
* @param string $name The name of the template to load
*
* @return string The template source code
*
* @throws LoaderError When $name is not found
*
* @deprecated since 1.27 (to be removed in 2.0), implement
Twig\Loader\SourceContextLoaderInterface
*/
public function getSource($name);
/**
* Gets the cache key to use for the cache for a given template name.
*
* @param string $name The name of the template to load
*
* @return string The cache key
*
* @throws LoaderError When $name is not found
*/
public function getCacheKey($name);
/**
* Returns true if the template is still fresh.
*
* @param string $name The template name
* @param int $time Timestamp of the last modification time of the
* cached template
*
* @return bool true if the template is fresh, false otherwise
*
* @throws LoaderError When $name is not found
*/
public function isFresh($name, $time);
}
class_alias('Twig\Loader\LoaderInterface',
'Twig_LoaderInterface');
PK��[0ӗPP0twig/src/Loader/SourceContextLoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Loader;
use Twig\Error\LoaderError;
use Twig\Source;
/**
* Adds a getSourceContext() method for loaders.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.27 (to be removed in 3.0)
*/
interface SourceContextLoaderInterface
{
/**
* Returns the source context for a given template logical name.
*
* @param string $name The template logical name
*
* @return Source
*
* @throws LoaderError When $name is not found
*/
public function getSourceContext($name);
}
class_alias('Twig\Loader\SourceContextLoaderInterface',
'Twig_SourceContextLoaderInterface');
PK��[��Rh22twig/src/Markup.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Marks a content as safe.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Markup implements \Countable
{
protected $content;
protected $charset;
public function __construct($content, $charset)
{
$this->content = (string) $content;
$this->charset = $charset;
}
public function __toString()
{
return $this->content;
}
public function count()
{
return \function_exists('mb_get_info') ?
mb_strlen($this->content, $this->charset) :
\strlen($this->content);
}
}
class_alias('Twig\Markup', 'Twig_Markup');
PK��[鉅���
twig/src/Node/AutoEscapeNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents an autoescape node.
*
* The value is the escaping strategy (can be html, js, ...)
*
* The true value is equivalent to html.
*
* If autoescaping is disabled, then the value is false.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class AutoEscapeNode extends Node
{
public function __construct($value, \Twig_NodeInterface $body, $lineno,
$tag = 'autoescape')
{
parent::__construct(['body' => $body],
['value' => $value], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->subcompile($this->getNode('body'));
}
}
class_alias('Twig\Node\AutoEscapeNode',
'Twig_Node_AutoEscape');
PK��[���twig/src/Node/BlockNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a block node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BlockNode extends Node
{
public function __construct($name, \Twig_NodeInterface $body, $lineno,
$tag = null)
{
parent::__construct(['body' => $body],
['name' => $name], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write(sprintf("public function block_%s(\$context,
array \$blocks = [])\n", $this->getAttribute('name')),
"{\n")
->indent()
;
$compiler
->subcompile($this->getNode('body'))
->outdent()
->write("}\n\n")
;
}
}
class_alias('Twig\Node\BlockNode', 'Twig_Node_Block');
PK��[���qq$twig/src/Node/BlockReferenceNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a block call node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BlockReferenceNode extends Node implements NodeOutputInterface
{
public function __construct($name, $lineno, $tag = null)
{
parent::__construct([], ['name' => $name], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write(sprintf("\$this->displayBlock('%s', \$context,
\$blocks);\n", $this->getAttribute('name')))
;
}
}
class_alias('Twig\Node\BlockReferenceNode',
'Twig_Node_BlockReference');
PK��[_c����twig/src/Node/BodyNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
/**
* Represents a body node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BodyNode extends Node
{
}
class_alias('Twig\Node\BodyNode', 'Twig_Node_Body');
PK��[���#twig/src/Node/CheckSecurityNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class CheckSecurityNode extends Node
{
protected $usedFilters;
protected $usedTags;
protected $usedFunctions;
public function __construct(array $usedFilters, array $usedTags, array
$usedFunctions)
{
$this->usedFilters = $usedFilters;
$this->usedTags = $usedTags;
$this->usedFunctions = $usedFunctions;
parent::__construct();
}
public function compile(Compiler $compiler)
{
$tags = $filters = $functions = [];
foreach (['tags', 'filters',
'functions'] as $type) {
foreach ($this->{'used'.ucfirst($type)} as $name
=> $node) {
if ($node instanceof Node) {
${$type}[$name] = $node->getTemplateLine();
} else {
${$type}[$node] = null;
}
}
}
$compiler
->write("\$this->sandbox =
\$this->env->getExtension('\Twig\Extension\SandboxExtension');\n")
->write('$tags =
')->repr(array_filter($tags))->raw(";\n")
->write('$filters =
')->repr(array_filter($filters))->raw(";\n")
->write('$functions =
')->repr(array_filter($functions))->raw(";\n\n")
->write("try {\n")
->indent()
->write("\$this->sandbox->checkSecurity(\n")
->indent()
->write(!$tags ? "[],\n" :
"['".implode("', '",
array_keys($tags))."'],\n")
->write(!$filters ? "[],\n" :
"['".implode("', '",
array_keys($filters))."'],\n")
->write(!$functions ? "[]\n" :
"['".implode("', '",
array_keys($functions))."']\n")
->outdent()
->write(");\n")
->outdent()
->write("} catch (SecurityError \$e) {\n")
->indent()
->write("\$e->setSourceContext(\$this->getSourceContext());\n\n")
->write("if (\$e instanceof SecurityNotAllowedTagError
&& isset(\$tags[\$e->getTagName()])) {\n")
->indent()
->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n")
->outdent()
->write("} elseif (\$e instanceof
SecurityNotAllowedFilterError &&
isset(\$filters[\$e->getFilterName()])) {\n")
->indent()
->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n")
->outdent()
->write("} elseif (\$e instanceof
SecurityNotAllowedFunctionError &&
isset(\$functions[\$e->getFunctionName()])) {\n")
->indent()
->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n")
->outdent()
->write("}\n\n")
->write("throw \$e;\n")
->outdent()
->write("}\n\n")
;
}
}
class_alias('Twig\Node\CheckSecurityNode',
'Twig_Node_CheckSecurity');
PK��[� N�ss#twig/src/Node/CheckToStringNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Checks if casting an expression to __toString() is allowed by the
sandbox.
*
* For instance, when there is a simple Print statement, like {{ article
}},
* and if the sandbox is enabled, we need to check that the __toString()
* method is allowed if 'article' is an object. The same goes for
{{ article|upper }}
* or {{ random(article) }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class CheckToStringNode extends AbstractExpression
{
public function __construct(AbstractExpression $expr)
{
parent::__construct(['expr' => $expr], [],
$expr->getTemplateLine(), $expr->getNodeTag());
}
public function compile(Compiler $compiler)
{
$compiler
->raw('$this->sandbox->ensureToStringAllowed(')
->subcompile($this->getNode('expr'))
->raw(')')
;
}
}
PK��[qS��
twig/src/Node/DeprecatedNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ConstantExpression;
/**
* Represents a deprecated node.
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
*/
class DeprecatedNode extends Node
{
public function __construct(AbstractExpression $expr, $lineno, $tag =
null)
{
parent::__construct(['expr' => $expr], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
$expr = $this->getNode('expr');
if ($expr instanceof ConstantExpression) {
$compiler->write('@trigger_error(')
->subcompile($expr);
} else {
$varName = $compiler->getVarName();
$compiler->write(sprintf('$%s = ', $varName))
->subcompile($expr)
->raw(";\n")
->write(sprintf('@trigger_error($%s',
$varName));
}
$compiler
->raw('.')
->string(sprintf(' ("%s" at line %d).',
$this->getTemplateName(), $this->getTemplateLine()))
->raw(", E_USER_DEPRECATED);\n")
;
}
}
class_alias('Twig\Node\DeprecatedNode',
'Twig_Node_Deprecated');
PK��[���BBtwig/src/Node/DoNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Represents a do node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DoNode extends Node
{
public function __construct(AbstractExpression $expr, $lineno, $tag =
null)
{
parent::__construct(['expr' => $expr], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('')
->subcompile($this->getNode('expr'))
->raw(";\n")
;
}
}
class_alias('Twig\Node\DoNode', 'Twig_Node_Do');
PK��[;�h!
twig/src/Node/EmbedNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ConstantExpression;
/**
* Represents an embed node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EmbedNode extends IncludeNode
{
// we don't inject the module to avoid node visitors to traverse
it twice (as it will be already visited in the main module)
public function __construct($name, $index, AbstractExpression
$variables = null, $only = false, $ignoreMissing = false, $lineno, $tag =
null)
{
parent::__construct(new ConstantExpression('not_used',
$lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
$this->setAttribute('name', $name);
// to be removed in 2.0, used name instead
$this->setAttribute('filename', $name);
$this->setAttribute('index', $index);
}
protected function addGetTemplate(Compiler $compiler)
{
$compiler
->write('$this->loadTemplate(')
->string($this->getAttribute('name'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(', ')
->string($this->getAttribute('index'))
->raw(')')
;
}
}
class_alias('Twig\Node\EmbedNode', 'Twig_Node_Embed');
PK��[��/twig/src/Node/Expression/AbstractExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Node\Node;
/**
* Abstract class for all nodes that represents an expression.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class AbstractExpression extends Node
{
}
class_alias('Twig\Node\Expression\AbstractExpression',
'Twig_Node_Expression');
PK��[�:
,twig/src/Node/Expression/ArrayExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class ArrayExpression extends AbstractExpression
{
protected $index;
public function __construct(array $elements, $lineno)
{
parent::__construct($elements, [], $lineno);
$this->index = -1;
foreach ($this->getKeyValuePairs() as $pair) {
if ($pair['key'] instanceof ConstantExpression
&& ctype_digit((string)
$pair['key']->getAttribute('value')) &&
$pair['key']->getAttribute('value') >
$this->index) {
$this->index =
$pair['key']->getAttribute('value');
}
}
}
public function getKeyValuePairs()
{
$pairs = [];
foreach (array_chunk($this->nodes, 2) as $pair) {
$pairs[] = [
'key' => $pair[0],
'value' => $pair[1],
];
}
return $pairs;
}
public function hasElement(AbstractExpression $key)
{
foreach ($this->getKeyValuePairs() as $pair) {
// we compare the string representation of the keys
// to avoid comparing the line numbers which are not relevant
here.
if ((string) $key === (string) $pair['key']) {
return true;
}
}
return false;
}
public function addElement(AbstractExpression $value,
AbstractExpression $key = null)
{
if (null === $key) {
$key = new ConstantExpression(++$this->index,
$value->getTemplateLine());
}
array_push($this->nodes, $key, $value);
}
public function compile(Compiler $compiler)
{
$compiler->raw('[');
$first = true;
foreach ($this->getKeyValuePairs() as $pair) {
if (!$first) {
$compiler->raw(', ');
}
$first = false;
$compiler
->subcompile($pair['key'])
->raw(' => ')
->subcompile($pair['value'])
;
}
$compiler->raw(']');
}
}
class_alias('Twig\Node\Expression\ArrayExpression',
'Twig_Node_Expression_Array');
PK��[���(4twig/src/Node/Expression/ArrowFunctionExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents an arrow function.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ArrowFunctionExpression extends AbstractExpression
{
public function __construct(AbstractExpression $expr, Node $names,
$lineno, $tag = null)
{
parent::__construct(['expr' => $expr,
'names' => $names], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->raw('function (')
;
foreach ($this->getNode('names') as $i => $name) {
if ($i) {
$compiler->raw(', ');
}
$compiler
->raw('$__')
->raw($name->getAttribute('name'))
->raw('__')
;
}
$compiler
->raw(') use ($context) { ')
;
foreach ($this->getNode('names') as $name) {
$compiler
->raw('$context["')
->raw($name->getAttribute('name'))
->raw('"] = $__')
->raw($name->getAttribute('name'))
->raw('__; ')
;
}
$compiler
->raw('return ')
->subcompile($this->getNode('expr'))
->raw('; }')
;
}
}
PK��[�07Hii1twig/src/Node/Expression/AssignNameExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class AssignNameExpression extends NameExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('$context[')
->string($this->getAttribute('name'))
->raw(']')
;
}
}
class_alias('Twig\Node\Expression\AssignNameExpression',
'Twig_Node_Expression_AssignName');
PK��[rXe112twig/src/Node/Expression/Binary/AbstractBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
abstract class AbstractBinary extends AbstractExpression
{
public function __construct(\Twig_NodeInterface $left,
\Twig_NodeInterface $right, $lineno)
{
parent::__construct(['left' => $left,
'right' => $right], [], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('left'))
->raw(' ')
;
$this->operator($compiler);
$compiler
->raw(' ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
abstract public function operator(Compiler $compiler);
}
class_alias('Twig\Node\Expression\Binary\AbstractBinary',
'Twig_Node_Expression_Binary');
PK��[vr-twig/src/Node/Expression/Binary/AddBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class AddBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('+');
}
}
class_alias('Twig\Node\Expression\Binary\AddBinary',
'Twig_Node_Expression_Binary_Add');
PK��[�r}�-twig/src/Node/Expression/Binary/AndBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class AndBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('&&');
}
}
class_alias('Twig\Node\Expression\Binary\AndBinary',
'Twig_Node_Expression_Binary_And');
PK��[n(�4twig/src/Node/Expression/Binary/BitwiseAndBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class BitwiseAndBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('&');
}
}
class_alias('Twig\Node\Expression\Binary\BitwiseAndBinary',
'Twig_Node_Expression_Binary_BitwiseAnd');
PK��[��3twig/src/Node/Expression/Binary/BitwiseOrBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class BitwiseOrBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('|');
}
}
class_alias('Twig\Node\Expression\Binary\BitwiseOrBinary',
'Twig_Node_Expression_Binary_BitwiseOr');
PK��[�Y�W4twig/src/Node/Expression/Binary/BitwiseXorBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class BitwiseXorBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('^');
}
}
class_alias('Twig\Node\Expression\Binary\BitwiseXorBinary',
'Twig_Node_Expression_Binary_BitwiseXor');
PK��[���0twig/src/Node/Expression/Binary/ConcatBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class ConcatBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('.');
}
}
class_alias('Twig\Node\Expression\Binary\ConcatBinary',
'Twig_Node_Expression_Binary_Concat');
PK��[4ֽD-twig/src/Node/Expression/Binary/DivBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class DivBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('/');
}
}
class_alias('Twig\Node\Expression\Binary\DivBinary',
'Twig_Node_Expression_Binary_Div');
PK��[�����2twig/src/Node/Expression/Binary/EndsWithBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class EndsWithBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$left = $compiler->getVarName();
$right = $compiler->getVarName();
$compiler
->raw(sprintf('(is_string($%s = ', $left))
->subcompile($this->getNode('left'))
->raw(sprintf(') && is_string($%s = ',
$right))
->subcompile($this->getNode('right'))
->raw(sprintf(') && (\'\' === $%2$s
|| $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right))
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('');
}
}
class_alias('Twig\Node\Expression\Binary\EndsWithBinary',
'Twig_Node_Expression_Binary_EndsWith');
PK��[oI����/twig/src/Node/Expression/Binary/EqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class EqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('==');
}
}
class_alias('Twig\Node\Expression\Binary\EqualBinary',
'Twig_Node_Expression_Binary_Equal');
PK��[�'�)��2twig/src/Node/Expression/Binary/FloorDivBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class FloorDivBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler->raw('(int) floor(');
parent::compile($compiler);
$compiler->raw(')');
}
public function operator(Compiler $compiler)
{
return $compiler->raw('/');
}
}
class_alias('Twig\Node\Expression\Binary\FloorDivBinary',
'Twig_Node_Expression_Binary_FloorDiv');
PK��[���1twig/src/Node/Expression/Binary/GreaterBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class GreaterBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('>');
}
}
class_alias('Twig\Node\Expression\Binary\GreaterBinary',
'Twig_Node_Expression_Binary_Greater');
PK��[Lt1t6twig/src/Node/Expression/Binary/GreaterEqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class GreaterEqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('>=');
}
}
class_alias('Twig\Node\Expression\Binary\GreaterEqualBinary',
'Twig_Node_Expression_Binary_GreaterEqual');
PK��[���'��,twig/src/Node/Expression/Binary/InBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class InBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('twig_in_filter(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('in');
}
}
class_alias('Twig\Node\Expression\Binary\InBinary',
'Twig_Node_Expression_Binary_In');
PK��[�o#��.twig/src/Node/Expression/Binary/LessBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class LessBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('<');
}
}
class_alias('Twig\Node\Expression\Binary\LessBinary',
'Twig_Node_Expression_Binary_Less');
PK��[םz��3twig/src/Node/Expression/Binary/LessEqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class LessEqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('<=');
}
}
class_alias('Twig\Node\Expression\Binary\LessEqualBinary',
'Twig_Node_Expression_Binary_LessEqual');
PK��[L[��1twig/src/Node/Expression/Binary/MatchesBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class MatchesBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('preg_match(')
->subcompile($this->getNode('right'))
->raw(', ')
->subcompile($this->getNode('left'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('');
}
}
class_alias('Twig\Node\Expression\Binary\MatchesBinary',
'Twig_Node_Expression_Binary_Matches');
PK��[�>Ӗ-twig/src/Node/Expression/Binary/ModBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class ModBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('%');
}
}
class_alias('Twig\Node\Expression\Binary\ModBinary',
'Twig_Node_Expression_Binary_Mod');
PK��[51�-twig/src/Node/Expression/Binary/MulBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class MulBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('*');
}
}
class_alias('Twig\Node\Expression\Binary\MulBinary',
'Twig_Node_Expression_Binary_Mul');
PK��[��H���2twig/src/Node/Expression/Binary/NotEqualBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class NotEqualBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('!=');
}
}
class_alias('Twig\Node\Expression\Binary\NotEqualBinary',
'Twig_Node_Expression_Binary_NotEqual');
PK��[>�K/twig/src/Node/Expression/Binary/NotInBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class NotInBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('!twig_in_filter(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('not in');
}
}
class_alias('Twig\Node\Expression\Binary\NotInBinary',
'Twig_Node_Expression_Binary_NotIn');
PK��[�ך,twig/src/Node/Expression/Binary/OrBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class OrBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('||');
}
}
class_alias('Twig\Node\Expression\Binary\OrBinary',
'Twig_Node_Expression_Binary_Or');
PK��[6�TZZ/twig/src/Node/Expression/Binary/PowerBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class PowerBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
if (\PHP_VERSION_ID >= 50600) {
return parent::compile($compiler);
}
$compiler
->raw('pow(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('**');
}
}
class_alias('Twig\Node\Expression\Binary\PowerBinary',
'Twig_Node_Expression_Binary_Power');
PK��[��j���/twig/src/Node/Expression/Binary/RangeBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class RangeBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$compiler
->raw('range(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('..');
}
}
class_alias('Twig\Node\Expression\Binary\RangeBinary',
'Twig_Node_Expression_Binary_Range');
PK��[f����4twig/src/Node/Expression/Binary/StartsWithBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class StartsWithBinary extends AbstractBinary
{
public function compile(Compiler $compiler)
{
$left = $compiler->getVarName();
$right = $compiler->getVarName();
$compiler
->raw(sprintf('(is_string($%s = ', $left))
->subcompile($this->getNode('left'))
->raw(sprintf(') && is_string($%s = ',
$right))
->subcompile($this->getNode('right'))
->raw(sprintf(') && (\'\' === $%2$s
|| 0 === strpos($%1$s, $%2$s)))', $left, $right))
;
}
public function operator(Compiler $compiler)
{
return $compiler->raw('');
}
}
class_alias('Twig\Node\Expression\Binary\StartsWithBinary',
'Twig_Node_Expression_Binary_StartsWith');
PK��[�4�-twig/src/Node/Expression/Binary/SubBinary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Binary;
use Twig\Compiler;
class SubBinary extends AbstractBinary
{
public function operator(Compiler $compiler)
{
return $compiler->raw('-');
}
}
class_alias('Twig\Node\Expression\Binary\SubBinary',
'Twig_Node_Expression_Binary_Sub');
PK��[�H�
�
5twig/src/Node/Expression/BlockReferenceExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents a block call node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class BlockReferenceExpression extends AbstractExpression
{
/**
* @param Node|null $template
*/
public function __construct(\Twig_NodeInterface $name, $template =
null, $lineno, $tag = null)
{
if (\is_bool($template)) {
@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);
$template = null;
}
$nodes = ['name' => $name];
if (null !== $template) {
$nodes['template'] = $template;
}
parent::__construct($nodes, ['is_defined_test' =>
false, 'output' => false], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('is_defined_test')) {
$this->compileTemplateCall($compiler, 'hasBlock');
} else {
if ($this->getAttribute('output')) {
$compiler->addDebugInfo($this);
$this
->compileTemplateCall($compiler,
'displayBlock')
->raw(";\n");
} else {
$this->compileTemplateCall($compiler,
'renderBlock');
}
}
}
private function compileTemplateCall(Compiler $compiler, $method)
{
if (!$this->hasNode('template')) {
$compiler->write('$this');
} else {
$compiler
->write('$this->loadTemplate(')
->subcompile($this->getNode('template'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(')')
;
}
$compiler->raw(sprintf('->%s', $method));
$this->compileBlockArguments($compiler);
return $compiler;
}
private function compileBlockArguments(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('name'))
->raw(', $context');
if (!$this->hasNode('template')) {
$compiler->raw(', $blocks');
}
return $compiler->raw(')');
}
}
class_alias('Twig\Node\Expression\BlockReferenceExpression',
'Twig_Node_Expression_BlockReference');
PK��[�sa��-�-+twig/src/Node/Expression/CallExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Error\SyntaxError;
use Twig\Extension\ExtensionInterface;
use Twig\Node\Node;
abstract class CallExpression extends AbstractExpression
{
private $reflector;
protected function compileCallable(Compiler $compiler)
{
$closingParenthesis = false;
$isArray = false;
if ($this->hasAttribute('callable') &&
$callable = $this->getAttribute('callable')) {
if (\is_string($callable) && false ===
strpos($callable, '::')) {
$compiler->raw($callable);
} else {
list($r, $callable) = $this->reflectCallable($callable);
if ($r instanceof \ReflectionMethod &&
\is_string($callable[0])) {
if ($r->isStatic()) {
$compiler->raw(sprintf('%s::%s',
$callable[0], $callable[1]));
} else {
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s',
$callable[0], $callable[1]));
}
} elseif ($r instanceof \ReflectionMethod &&
$callable[0] instanceof ExtensionInterface) {
$compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s',
\get_class($callable[0]), $callable[1]));
} else {
$type =
ucfirst($this->getAttribute('type'));
$compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(),
', $type, $this->getAttribute('name')));
$closingParenthesis = true;
$isArray = true;
}
}
} else {
$compiler->raw($this->getAttribute('thing')->compile());
}
$this->compileArguments($compiler, $isArray);
if ($closingParenthesis) {
$compiler->raw(')');
}
}
protected function compileArguments(Compiler $compiler, $isArray =
false)
{
$compiler->raw($isArray ? '[' : '(');
$first = true;
if ($this->hasAttribute('needs_environment')
&& $this->getAttribute('needs_environment')) {
$compiler->raw('$this->env');
$first = false;
}
if ($this->hasAttribute('needs_context') &&
$this->getAttribute('needs_context')) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->raw('$context');
$first = false;
}
if ($this->hasAttribute('arguments')) {
foreach ($this->getAttribute('arguments') as
$argument) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->string($argument);
$first = false;
}
}
if ($this->hasNode('node')) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->subcompile($this->getNode('node'));
$first = false;
}
if ($this->hasNode('arguments')) {
$callable = $this->hasAttribute('callable') ?
$this->getAttribute('callable') : null;
$arguments = $this->getArguments($callable,
$this->getNode('arguments'));
foreach ($arguments as $node) {
if (!$first) {
$compiler->raw(', ');
}
$compiler->subcompile($node);
$first = false;
}
}
$compiler->raw($isArray ? ']' : ')');
}
protected function getArguments($callable, $arguments)
{
$callType = $this->getAttribute('type');
$callName = $this->getAttribute('name');
$parameters = [];
$named = false;
foreach ($arguments as $name => $node) {
if (!\is_int($name)) {
$named = true;
$name = $this->normalizeName($name);
} elseif ($named) {
throw new SyntaxError(sprintf('Positional arguments
cannot be used after named arguments for %s "%s".',
$callType, $callName), $this->getTemplateLine(),
$this->getSourceContext());
}
$parameters[$name] = $node;
}
$isVariadic = $this->hasAttribute('is_variadic')
&& $this->getAttribute('is_variadic');
if (!$named && !$isVariadic) {
return $parameters;
}
if (!$callable) {
if ($named) {
$message = sprintf('Named arguments are not supported
for %s "%s".', $callType, $callName);
} else {
$message = sprintf('Arbitrary positional arguments are
not supported for %s "%s".', $callType, $callName);
}
throw new \LogicException($message);
}
$callableParameters = $this->getCallableParameters($callable,
$isVariadic);
$arguments = [];
$names = [];
$missingArguments = [];
$optionalArguments = [];
$pos = 0;
foreach ($callableParameters as $callableParameter) {
$names[] = $name =
$this->normalizeName($callableParameter->name);
if (\array_key_exists($name, $parameters)) {
if (\array_key_exists($pos, $parameters)) {
throw new SyntaxError(sprintf('Argument
"%s" is defined twice for %s "%s".', $name,
$callType, $callName), $this->getTemplateLine(),
$this->getSourceContext());
}
if (\count($missingArguments)) {
throw new SyntaxError(sprintf(
'Argument "%s" could not be assigned
for %s "%s(%s)" because it is mapped to an internal PHP function
which cannot determine default value for optional argument%s
"%s".',
$name, $callType, $callName, implode(',
', $names), \count($missingArguments) > 1 ? 's' :
'', implode('", "', $missingArguments)
), $this->getTemplateLine(),
$this->getSourceContext());
}
$arguments = array_merge($arguments, $optionalArguments);
$arguments[] = $parameters[$name];
unset($parameters[$name]);
$optionalArguments = [];
} elseif (\array_key_exists($pos, $parameters)) {
$arguments = array_merge($arguments, $optionalArguments);
$arguments[] = $parameters[$pos];
unset($parameters[$pos]);
$optionalArguments = [];
++$pos;
} elseif ($callableParameter->isDefaultValueAvailable()) {
$optionalArguments[] = new
ConstantExpression($callableParameter->getDefaultValue(), -1);
} elseif ($callableParameter->isOptional()) {
if (empty($parameters)) {
break;
} else {
$missingArguments[] = $name;
}
} else {
throw new SyntaxError(sprintf('Value for argument
"%s" is required for %s "%s".', $name, $callType,
$callName), $this->getTemplateLine(), $this->getSourceContext());
}
}
if ($isVariadic) {
$arbitraryArguments = new ArrayExpression([], -1);
foreach ($parameters as $key => $value) {
if (\is_int($key)) {
$arbitraryArguments->addElement($value);
} else {
$arbitraryArguments->addElement($value, new
ConstantExpression($key, -1));
}
unset($parameters[$key]);
}
if ($arbitraryArguments->count()) {
$arguments = array_merge($arguments, $optionalArguments);
$arguments[] = $arbitraryArguments;
}
}
if (!empty($parameters)) {
$unknownParameter = null;
foreach ($parameters as $parameter) {
if ($parameter instanceof Node) {
$unknownParameter = $parameter;
break;
}
}
throw new SyntaxError(
sprintf(
'Unknown argument%s "%s" for %s
"%s(%s)".',
\count($parameters) > 1 ? 's' :
'', implode('", "', array_keys($parameters)),
$callType, $callName, implode(', ', $names)
),
$unknownParameter ? $unknownParameter->getTemplateLine()
: $this->getTemplateLine(),
$unknownParameter ?
$unknownParameter->getSourceContext() : $this->getSourceContext()
);
}
return $arguments;
}
protected function normalizeName($name)
{
return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/',
'/([a-z\d])([A-Z])/'], ['\\1_\\2',
'\\1_\\2'], $name));
}
private function getCallableParameters($callable, $isVariadic)
{
list($r) = $this->reflectCallable($callable);
if (null === $r) {
return [];
}
$parameters = $r->getParameters();
if ($this->hasNode('node')) {
array_shift($parameters);
}
if ($this->hasAttribute('needs_environment')
&& $this->getAttribute('needs_environment')) {
array_shift($parameters);
}
if ($this->hasAttribute('needs_context') &&
$this->getAttribute('needs_context')) {
array_shift($parameters);
}
if ($this->hasAttribute('arguments') && null
!== $this->getAttribute('arguments')) {
foreach ($this->getAttribute('arguments') as
$argument) {
array_shift($parameters);
}
}
if ($isVariadic) {
$argument = end($parameters);
if ($argument && $argument->isArray() &&
$argument->isDefaultValueAvailable() && [] ===
$argument->getDefaultValue()) {
array_pop($parameters);
} else {
$callableName = $r->name;
if ($r instanceof \ReflectionMethod) {
$callableName =
$r->getDeclaringClass()->name.'::'.$callableName;
}
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')));
}
}
return $parameters;
}
private function reflectCallable($callable)
{
if (null !== $this->reflector) {
return $this->reflector;
}
if (\is_array($callable)) {
if (!method_exists($callable[0], $callable[1])) {
// __call()
return [null, []];
}
$r = new \ReflectionMethod($callable[0], $callable[1]);
} elseif (\is_object($callable) && !$callable instanceof
\Closure) {
$r = new \ReflectionObject($callable);
$r = $r->getMethod('__invoke');
$callable = [$callable, '__invoke'];
} elseif (\is_string($callable) && false !== $pos =
strpos($callable, '::')) {
$class = substr($callable, 0, $pos);
$method = substr($callable, $pos + 2);
if (!method_exists($class, $method)) {
// __staticCall()
return [null, []];
}
$r = new \ReflectionMethod($callable);
$callable = [$class, $method];
} else {
$r = new \ReflectionFunction($callable);
}
return $this->reflector = [$r, $callable];
}
}
class_alias('Twig\Node\Expression\CallExpression',
'Twig_Node_Expression_Call');
PK��[Yz^���2twig/src/Node/Expression/ConditionalExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class ConditionalExpression extends AbstractExpression
{
public function __construct(AbstractExpression $expr1,
AbstractExpression $expr2, AbstractExpression $expr3, $lineno)
{
parent::__construct(['expr1' => $expr1,
'expr2' => $expr2, 'expr3' => $expr3], [],
$lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('((')
->subcompile($this->getNode('expr1'))
->raw(') ? (')
->subcompile($this->getNode('expr2'))
->raw(') : (')
->subcompile($this->getNode('expr3'))
->raw('))')
;
}
}
class_alias('Twig\Node\Expression\ConditionalExpression',
'Twig_Node_Expression_Conditional');
PK��[�7�˗�/twig/src/Node/Expression/ConstantExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class ConstantExpression extends AbstractExpression
{
public function __construct($value, $lineno)
{
parent::__construct([], ['value' => $value], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler->repr($this->getAttribute('value'));
}
}
class_alias('Twig\Node\Expression\ConstantExpression',
'Twig_Node_Expression_Constant');
PK��[��nn1twig/src/Node/Expression/Filter/DefaultFilter.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Filter;
use Twig\Compiler;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\Test\DefinedTest;
use Twig\Node\Node;
/**
* Returns the value or the default value when it is undefined or empty.
*
* {{ var.foo|default('foo item on var is not defined') }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DefaultFilter extends FilterExpression
{
public function __construct(\Twig_NodeInterface $node,
ConstantExpression $filterName, \Twig_NodeInterface $arguments, $lineno,
$tag = null)
{
$default = new FilterExpression($node, new
ConstantExpression('default', $node->getTemplateLine()),
$arguments, $node->getTemplateLine());
if ('default' ===
$filterName->getAttribute('value') && ($node
instanceof NameExpression || $node instanceof GetAttrExpression)) {
$test = new DefinedTest(clone $node, 'defined', new
Node(), $node->getTemplateLine());
$false = \count($arguments) ? $arguments->getNode(0) : new
ConstantExpression('', $node->getTemplateLine());
$node = new ConditionalExpression($test, $default, $false,
$node->getTemplateLine());
} else {
$node = $default;
}
parent::__construct($node, $filterName, $arguments, $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->subcompile($this->getNode('node'));
}
}
class_alias('Twig\Node\Expression\Filter\DefaultFilter',
'Twig_Node_Expression_Filter_Default');
PK��[�aGCC-twig/src/Node/Expression/FilterExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\TwigFilter;
class FilterExpression extends CallExpression
{
public function __construct(\Twig_NodeInterface $node,
ConstantExpression $filterName, \Twig_NodeInterface $arguments, $lineno,
$tag = null)
{
parent::__construct(['node' => $node,
'filter' => $filterName, 'arguments' =>
$arguments], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$name =
$this->getNode('filter')->getAttribute('value');
$filter = $compiler->getEnvironment()->getFilter($name);
$this->setAttribute('name', $name);
$this->setAttribute('type', 'filter');
$this->setAttribute('thing', $filter);
$this->setAttribute('needs_environment',
$filter->needsEnvironment());
$this->setAttribute('needs_context',
$filter->needsContext());
$this->setAttribute('arguments',
$filter->getArguments());
if ($filter instanceof \Twig_FilterCallableInterface || $filter
instanceof TwigFilter) {
$this->setAttribute('callable',
$filter->getCallable());
}
if ($filter instanceof TwigFilter) {
$this->setAttribute('is_variadic',
$filter->isVariadic());
}
$this->compileCallable($compiler);
}
}
class_alias('Twig\Node\Expression\FilterExpression',
'Twig_Node_Expression_Filter');
PK��[�Sqǵ�/twig/src/Node/Expression/FunctionExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\TwigFunction;
class FunctionExpression extends CallExpression
{
public function __construct($name, \Twig_NodeInterface $arguments,
$lineno)
{
parent::__construct(['arguments' => $arguments],
['name' => $name, 'is_defined_test' => false],
$lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$function = $compiler->getEnvironment()->getFunction($name);
$this->setAttribute('name', $name);
$this->setAttribute('type', 'function');
$this->setAttribute('thing', $function);
$this->setAttribute('needs_environment',
$function->needsEnvironment());
$this->setAttribute('needs_context',
$function->needsContext());
$this->setAttribute('arguments',
$function->getArguments());
if ($function instanceof \Twig_FunctionCallableInterface ||
$function instanceof TwigFunction) {
$callable = $function->getCallable();
if ('constant' === $name &&
$this->getAttribute('is_defined_test')) {
$callable = 'twig_constant_is_defined';
}
$this->setAttribute('callable', $callable);
}
if ($function instanceof TwigFunction) {
$this->setAttribute('is_variadic',
$function->isVariadic());
}
$this->compileCallable($compiler);
}
}
class_alias('Twig\Node\Expression\FunctionExpression',
'Twig_Node_Expression_Function');
PK��[\a��
�
.twig/src/Node/Expression/GetAttrExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Template;
class GetAttrExpression extends AbstractExpression
{
public function __construct(AbstractExpression $node,
AbstractExpression $attribute, AbstractExpression $arguments = null, $type,
$lineno)
{
$nodes = ['node' => $node, 'attribute' =>
$attribute];
if (null !== $arguments) {
$nodes['arguments'] = $arguments;
}
parent::__construct($nodes, ['type' => $type,
'is_defined_test' => false, 'ignore_strict_check'
=> false, 'disable_c_ext' => false], $lineno);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('disable_c_ext')) {
@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);
}
if (\function_exists('twig_template_get_attributes')
&& !$this->getAttribute('disable_c_ext')) {
$compiler->raw('twig_template_get_attributes($this,
');
} else {
$compiler->raw('$this->getAttribute(');
}
if ($this->getAttribute('ignore_strict_check')) {
$this->getNode('node')->setAttribute('ignore_strict_check',
true);
}
$compiler->subcompile($this->getNode('node'));
$compiler->raw(',
')->subcompile($this->getNode('attribute'));
// only generate optional arguments when needed (to make generated
code more readable)
$needFourth =
$this->getAttribute('ignore_strict_check');
$needThird = $needFourth ||
$this->getAttribute('is_defined_test');
$needSecond = $needThird || Template::ANY_CALL !==
$this->getAttribute('type');
$needFirst = $needSecond ||
$this->hasNode('arguments');
if ($needFirst) {
if ($this->hasNode('arguments')) {
$compiler->raw(',
')->subcompile($this->getNode('arguments'));
} else {
$compiler->raw(', []');
}
}
if ($needSecond) {
$compiler->raw(',
')->repr($this->getAttribute('type'));
}
if ($needThird) {
$compiler->raw(',
')->repr($this->getAttribute('is_defined_test'));
}
if ($needFourth) {
$compiler->raw(',
')->repr($this->getAttribute('ignore_strict_check'));
}
$compiler->raw(')');
}
}
class_alias('Twig\Node\Expression\GetAttrExpression',
'Twig_Node_Expression_GetAttr');
PK��[��jț�(twig/src/Node/Expression/InlinePrint.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Node;
/**
* @internal
*/
final class InlinePrint extends AbstractExpression
{
public function __construct(Node $node, $lineno)
{
parent::__construct(['node' => $node], [], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('print (')
->subcompile($this->getNode('node'))
->raw(')')
;
}
}
PK��[���1twig/src/Node/Expression/MethodCallExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class MethodCallExpression extends AbstractExpression
{
public function __construct(AbstractExpression $node, $method,
ArrayExpression $arguments, $lineno)
{
parent::__construct(['node' => $node,
'arguments' => $arguments], ['method' => $method,
'safe' => false], $lineno);
if ($node instanceof NameExpression) {
$node->setAttribute('always_defined', true);
}
}
public function compile(Compiler $compiler)
{
$compiler
->subcompile($this->getNode('node'))
->raw('->')
->raw($this->getAttribute('method'))
->raw('(')
;
$first = true;
foreach
($this->getNode('arguments')->getKeyValuePairs() as $pair)
{
if (!$first) {
$compiler->raw(', ');
}
$first = false;
$compiler->subcompile($pair['value']);
}
$compiler->raw(')');
}
}
class_alias('Twig\Node\Expression\MethodCallExpression',
'Twig_Node_Expression_MethodCall');
PK��[Q%?{{+twig/src/Node/Expression/NameExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class NameExpression extends AbstractExpression
{
protected $specialVars = [
'_self' => '$this',
'_context' => '$context',
'_charset' =>
'$this->env->getCharset()',
];
public function __construct($name, $lineno)
{
parent::__construct([], ['name' => $name,
'is_defined_test' => false, 'ignore_strict_check'
=> false, 'always_defined' => false], $lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$compiler->addDebugInfo($this);
if ($this->getAttribute('is_defined_test')) {
if ($this->isSpecial()) {
$compiler->repr(true);
} elseif (\PHP_VERSION_ID >= 700400) {
$compiler
->raw('array_key_exists(')
->string($name)
->raw(', $context)')
;
} else {
$compiler
->raw('(isset($context[')
->string($name)
->raw(']) || array_key_exists(')
->string($name)
->raw(', $context))')
;
}
} elseif ($this->isSpecial()) {
$compiler->raw($this->specialVars[$name]);
} elseif ($this->getAttribute('always_defined')) {
$compiler
->raw('$context[')
->string($name)
->raw(']')
;
} else {
if (\PHP_VERSION_ID >= 70000) {
// use PHP 7 null coalescing operator
$compiler
->raw('($context[')
->string($name)
->raw('] ?? ')
;
if ($this->getAttribute('ignore_strict_check')
|| !$compiler->getEnvironment()->isStrictVariables()) {
$compiler->raw('null)');
} else {
$compiler->raw('$this->getContext($context,
')->string($name)->raw('))');
}
} elseif (\PHP_VERSION_ID >= 50400) {
// PHP 5.4 ternary operator performance was optimized
$compiler
->raw('(isset($context[')
->string($name)
->raw(']) ? $context[')
->string($name)
->raw('] : ')
;
if ($this->getAttribute('ignore_strict_check')
|| !$compiler->getEnvironment()->isStrictVariables()) {
$compiler->raw('null)');
} else {
$compiler->raw('$this->getContext($context,
')->string($name)->raw('))');
}
} else {
$compiler
->raw('$this->getContext($context, ')
->string($name)
;
if
($this->getAttribute('ignore_strict_check')) {
$compiler->raw(', true');
}
$compiler
->raw(')')
;
}
}
}
public function isSpecial()
{
return
isset($this->specialVars[$this->getAttribute('name')]);
}
public function isSimple()
{
return !$this->isSpecial() &&
!$this->getAttribute('is_defined_test');
}
}
class_alias('Twig\Node\Expression\NameExpression',
'Twig_Node_Expression_Name');
PK��[T��o��3twig/src/Node/Expression/NullCoalesceExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\Node\Expression\Binary\AndBinary;
use Twig\Node\Expression\Test\DefinedTest;
use Twig\Node\Expression\Test\NullTest;
use Twig\Node\Expression\Unary\NotUnary;
use Twig\Node\Node;
class NullCoalesceExpression extends ConditionalExpression
{
public function __construct(\Twig_NodeInterface $left,
\Twig_NodeInterface $right, $lineno)
{
$test = new DefinedTest(clone $left, 'defined', new
Node(), $left->getTemplateLine());
// for "block()", we don't need the null test as the
return value is always a string
if (!$left instanceof BlockReferenceExpression) {
$test = new AndBinary(
$test,
new NotUnary(new NullTest($left, 'null', new
Node(), $left->getTemplateLine()), $left->getTemplateLine()),
$left->getTemplateLine()
);
}
parent::__construct($test, $left, $right, $lineno);
}
public function compile(Compiler $compiler)
{
/*
* This optimizes only one case. PHP 7 also supports more complex
expressions
* that can return null. So, for instance, if log is defined,
log("foo") ?? "..." works,
* but log($a["foo"]) ?? "..." does not if
$a["foo"] is not defined. More advanced
* cases might be implemented as an optimizer node visitor, but has
not been done
* as benefits are probably not worth the added complexity.
*/
if (\PHP_VERSION_ID >= 70000 &&
$this->getNode('expr2') instanceof NameExpression) {
$this->getNode('expr2')->setAttribute('always_defined',
true);
$compiler
->raw('((')
->subcompile($this->getNode('expr2'))
->raw(') ?? (')
->subcompile($this->getNode('expr3'))
->raw('))')
;
} else {
parent::compile($compiler);
}
}
}
class_alias('Twig\Node\Expression\NullCoalesceExpression',
'Twig_Node_Expression_NullCoalesce');
PK��[<O�n��-twig/src/Node/Expression/ParentExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
/**
* Represents a parent node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ParentExpression extends AbstractExpression
{
public function __construct($name, $lineno, $tag = null)
{
parent::__construct([], ['output' => false,
'name' => $name], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('output')) {
$compiler
->addDebugInfo($this)
->write('$this->displayParentBlock(')
->string($this->getAttribute('name'))
->raw(", \$context, \$blocks);\n")
;
} else {
$compiler
->raw('$this->renderParentBlock(')
->string($this->getAttribute('name'))
->raw(', $context, $blocks)')
;
}
}
}
class_alias('Twig\Node\Expression\ParentExpression',
'Twig_Node_Expression_Parent');
PK��[�/c��/twig/src/Node/Expression/TempNameExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
class TempNameExpression extends AbstractExpression
{
public function __construct($name, $lineno)
{
parent::__construct([], ['name' => $name], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->raw('$_')
->raw($this->getAttribute('name'))
->raw('_')
;
}
}
class_alias('Twig\Node\Expression\TempNameExpression',
'Twig_Node_Expression_TempName');
PK��[T�o��.twig/src/Node/Expression/Test/ConstantTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is the exact same value as a constant.
*
* {% if post.status is constant('Post::PUBLISHED') %}
* the status attribute is exactly the same as Post::PUBLISHED
* {% endif %}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ConstantTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' === constant(')
;
if ($this->getNode('arguments')->hasNode(1)) {
$compiler
->raw('get_class(')
->subcompile($this->getNode('arguments')->getNode(1))
->raw(')."::".')
;
}
$compiler
->subcompile($this->getNode('arguments')->getNode(0))
->raw('))')
;
}
}
class_alias('Twig\Node\Expression\Test\ConstantTest',
'Twig_Node_Expression_Test_Constant');
PK��[Q� � -twig/src/Node/Expression/Test/DefinedTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\ArrayExpression;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is defined in the current context.
*
* {# defined works with variable names and variable attributes #}
* {% if foo is defined %}
* {# ... #}
* {% endif %}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DefinedTest extends TestExpression
{
public function __construct(\Twig_NodeInterface $node, $name,
\Twig_NodeInterface $arguments = null, $lineno)
{
if ($node instanceof NameExpression) {
$node->setAttribute('is_defined_test', true);
} elseif ($node instanceof GetAttrExpression) {
$node->setAttribute('is_defined_test', true);
$this->changeIgnoreStrictCheck($node);
} elseif ($node instanceof BlockReferenceExpression) {
$node->setAttribute('is_defined_test', true);
} elseif ($node instanceof FunctionExpression &&
'constant' === $node->getAttribute('name')) {
$node->setAttribute('is_defined_test', true);
} elseif ($node instanceof ConstantExpression || $node instanceof
ArrayExpression) {
$node = new ConstantExpression(true,
$node->getTemplateLine());
} else {
throw new SyntaxError('The "defined" test only
works with simple variables.', $lineno);
}
parent::__construct($node, $name, $arguments, $lineno);
}
protected function changeIgnoreStrictCheck(GetAttrExpression $node)
{
$node->setAttribute('ignore_strict_check', true);
if ($node->getNode('node') instanceof
GetAttrExpression) {
$this->changeIgnoreStrictCheck($node->getNode('node'));
}
}
public function compile(Compiler $compiler)
{
$compiler->subcompile($this->getNode('node'));
}
}
class_alias('Twig\Node\Expression\Test\DefinedTest',
'Twig_Node_Expression_Test_Defined');
PK��[qC�uu1twig/src/Node/Expression/Test/DivisiblebyTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is divisible by a number.
*
* {% if loop.index is divisible by(3) %}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DivisiblebyTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(0 == ')
->subcompile($this->getNode('node'))
->raw(' % ')
->subcompile($this->getNode('arguments')->getNode(0))
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\DivisiblebyTest',
'Twig_Node_Expression_Test_Divisibleby');
PK��[�J����*twig/src/Node/Expression/Test/EvenTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a number is even.
*
* {{ var is even }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EvenTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' % 2 == 0')
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\EvenTest',
'Twig_Node_Expression_Test_Even');
PK��[!d����*twig/src/Node/Expression/Test/NullTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks that a variable is null.
*
* {{ var is none }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class NullTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(null === ')
->subcompile($this->getNode('node'))
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\NullTest',
'Twig_Node_Expression_Test_Null');
PK��[ja�c��)twig/src/Node/Expression/Test/OddTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a number is odd.
*
* {{ var is odd }}
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class OddTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' % 2 == 1')
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\OddTest',
'Twig_Node_Expression_Test_Odd');
PK��[���DD,twig/src/Node/Expression/Test/SameasTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Test;
use Twig\Compiler;
use Twig\Node\Expression\TestExpression;
/**
* Checks if a variable is the same as another one (=== in PHP).
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SameasTest extends TestExpression
{
public function compile(Compiler $compiler)
{
$compiler
->raw('(')
->subcompile($this->getNode('node'))
->raw(' === ')
->subcompile($this->getNode('arguments')->getNode(0))
->raw(')')
;
}
}
class_alias('Twig\Node\Expression\Test\SameasTest',
'Twig_Node_Expression_Test_Sameas');
PK��[�e���+twig/src/Node/Expression/TestExpression.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression;
use Twig\Compiler;
use Twig\TwigTest;
class TestExpression extends CallExpression
{
public function __construct(\Twig_NodeInterface $node, $name,
\Twig_NodeInterface $arguments = null, $lineno)
{
$nodes = ['node' => $node];
if (null !== $arguments) {
$nodes['arguments'] = $arguments;
}
parent::__construct($nodes, ['name' => $name],
$lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$test = $compiler->getEnvironment()->getTest($name);
$this->setAttribute('name', $name);
$this->setAttribute('type', 'test');
$this->setAttribute('thing', $test);
if ($test instanceof TwigTest) {
$this->setAttribute('arguments',
$test->getArguments());
}
if ($test instanceof \Twig_TestCallableInterface || $test
instanceof TwigTest) {
$this->setAttribute('callable',
$test->getCallable());
}
if ($test instanceof TwigTest) {
$this->setAttribute('is_variadic',
$test->isVariadic());
}
$this->compileCallable($compiler);
}
}
class_alias('Twig\Node\Expression\TestExpression',
'Twig_Node_Expression_Test');
PK��[s��ZZ0twig/src/Node/Expression/Unary/AbstractUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
abstract class AbstractUnary extends AbstractExpression
{
public function __construct(\Twig_NodeInterface $node, $lineno)
{
parent::__construct(['node' => $node], [], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler->raw(' ');
$this->operator($compiler);
$compiler->subcompile($this->getNode('node'));
}
abstract public function operator(Compiler $compiler);
}
class_alias('Twig\Node\Expression\Unary\AbstractUnary',
'Twig_Node_Expression_Unary');
PK��[�5���+twig/src/Node/Expression/Unary/NegUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
class NegUnary extends AbstractUnary
{
public function operator(Compiler $compiler)
{
$compiler->raw('-');
}
}
class_alias('Twig\Node\Expression\Unary\NegUnary',
'Twig_Node_Expression_Unary_Neg');
PK��[���+twig/src/Node/Expression/Unary/NotUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
class NotUnary extends AbstractUnary
{
public function operator(Compiler $compiler)
{
$compiler->raw('!');
}
}
class_alias('Twig\Node\Expression\Unary\NotUnary',
'Twig_Node_Expression_Unary_Not');
PK��['W���+twig/src/Node/Expression/Unary/PosUnary.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node\Expression\Unary;
use Twig\Compiler;
class PosUnary extends AbstractUnary
{
public function operator(Compiler $compiler)
{
$compiler->raw('+');
}
}
class_alias('Twig\Node\Expression\Unary\PosUnary',
'Twig_Node_Expression_Unary_Pos');
PK��[��ޱ�twig/src/Node/FlushNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a flush node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FlushNode extends Node
{
public function __construct($lineno, $tag)
{
parent::__construct([], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write("flush();\n")
;
}
}
class_alias('Twig\Node\FlushNode', 'Twig_Node_Flush');
PK��[I�j11twig/src/Node/ForLoopNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Internal node used by the for node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ForLoopNode extends Node
{
public function __construct($lineno, $tag = null)
{
parent::__construct([], ['with_loop' => false,
'ifexpr' => false, 'else' => false], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
if ($this->getAttribute('else')) {
$compiler->write("\$context['_iterated'] =
true;\n");
}
if ($this->getAttribute('with_loop')) {
$compiler
->write("++\$context['loop']['index0'];\n")
->write("++\$context['loop']['index'];\n")
->write("\$context['loop']['first'] =
false;\n")
;
if (!$this->getAttribute('ifexpr')) {
$compiler
->write("if
(isset(\$context['loop']['length'])) {\n")
->indent()
->write("--\$context['loop']['revindex0'];\n")
->write("--\$context['loop']['revindex'];\n")
->write("\$context['loop']['last'] = 0 ===
\$context['loop']['revindex0'];\n")
->outdent()
->write("}\n")
;
}
}
}
}
class_alias('Twig\Node\ForLoopNode',
'Twig_Node_ForLoop');
PK��[���twig/src/Node/ForNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\AssignNameExpression;
/**
* Represents a for node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ForNode extends Node
{
protected $loop;
public function __construct(AssignNameExpression $keyTarget,
AssignNameExpression $valueTarget, AbstractExpression $seq,
AbstractExpression $ifexpr = null, \Twig_NodeInterface $body,
\Twig_NodeInterface $else = null, $lineno, $tag = null)
{
$body = new Node([$body, $this->loop = new ForLoopNode($lineno,
$tag)]);
if (null !== $ifexpr) {
$body = new IfNode(new Node([$ifexpr, $body]), null, $lineno,
$tag);
}
$nodes = ['key_target' => $keyTarget,
'value_target' => $valueTarget, 'seq' => $seq,
'body' => $body];
if (null !== $else) {
$nodes['else'] = $else;
}
parent::__construct($nodes, ['with_loop' => true,
'ifexpr' => null !== $ifexpr], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write("\$context['_parent'] =
\$context;\n")
->write("\$context['_seq'] =
twig_ensure_traversable(")
->subcompile($this->getNode('seq'))
->raw(");\n")
;
if ($this->hasNode('else')) {
$compiler->write("\$context['_iterated'] =
false;\n");
}
if ($this->getAttribute('with_loop')) {
$compiler
->write("\$context['loop'] = [\n")
->write(" 'parent' =>
\$context['_parent'],\n")
->write(" 'index0' => 0,\n")
->write(" 'index' => 1,\n")
->write(" 'first' => true,\n")
->write("];\n")
;
if (!$this->getAttribute('ifexpr')) {
$compiler
->write("if
(is_array(\$context['_seq']) ||
(is_object(\$context['_seq']) &&
\$context['_seq'] instanceof \Countable)) {\n")
->indent()
->write("\$length =
count(\$context['_seq']);\n")
->write("\$context['loop']['revindex0'] =
\$length - 1;\n")
->write("\$context['loop']['revindex'] =
\$length;\n")
->write("\$context['loop']['length'] =
\$length;\n")
->write("\$context['loop']['last'] = 1 ===
\$length;\n")
->outdent()
->write("}\n")
;
}
}
$this->loop->setAttribute('else',
$this->hasNode('else'));
$this->loop->setAttribute('with_loop',
$this->getAttribute('with_loop'));
$this->loop->setAttribute('ifexpr',
$this->getAttribute('ifexpr'));
$compiler
->write("foreach (\$context['_seq'] as
")
->subcompile($this->getNode('key_target'))
->raw(' => ')
->subcompile($this->getNode('value_target'))
->raw(") {\n")
->indent()
->subcompile($this->getNode('body'))
->outdent()
->write("}\n")
;
if ($this->hasNode('else')) {
$compiler
->write("if (!\$context['_iterated'])
{\n")
->indent()
->subcompile($this->getNode('else'))
->outdent()
->write("}\n")
;
}
$compiler->write("\$_parent =
\$context['_parent'];\n");
// remove some "private" loop variables (needed for
nested loops)
$compiler->write('unset($context[\'_seq\'],
$context[\'_iterated\'],
$context[\''.$this->getNode('key_target')->getAttribute('name').'\'],
$context[\''.$this->getNode('value_target')->getAttribute('name').'\'],
$context[\'_parent\'],
$context[\'loop\']);'."\n");
// keep the values set in the inner context for variables defined
in the outer context
$compiler->write("\$context =
array_intersect_key(\$context, \$_parent) + \$_parent;\n");
}
}
class_alias('Twig\Node\ForNode', 'Twig_Node_For');
PK��[�X�m��twig/src/Node/IfNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents an if node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class IfNode extends Node
{
public function __construct(\Twig_NodeInterface $tests,
\Twig_NodeInterface $else = null, $lineno, $tag = null)
{
$nodes = ['tests' => $tests];
if (null !== $else) {
$nodes['else'] = $else;
}
parent::__construct($nodes, [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
for ($i = 0, $count = \count($this->getNode('tests'));
$i < $count; $i += 2) {
if ($i > 0) {
$compiler
->outdent()
->write('} elseif (')
;
} else {
$compiler
->write('if (')
;
}
$compiler
->subcompile($this->getNode('tests')->getNode($i))
->raw(") {\n")
->indent()
->subcompile($this->getNode('tests')->getNode($i + 1))
;
}
if ($this->hasNode('else')) {
$compiler
->outdent()
->write("} else {\n")
->indent()
->subcompile($this->getNode('else'))
;
}
$compiler
->outdent()
->write("}\n");
}
}
class_alias('Twig\Node\IfNode', 'Twig_Node_If');
PK��[2�x8��twig/src/Node/ImportNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\NameExpression;
/**
* Represents an import node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ImportNode extends Node
{
public function __construct(AbstractExpression $expr,
AbstractExpression $var, $lineno, $tag = null)
{
parent::__construct(['expr' => $expr, 'var'
=> $var], [], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('')
->subcompile($this->getNode('var'))
->raw(' = ')
;
if ($this->getNode('expr') instanceof NameExpression
&& '_self' ===
$this->getNode('expr')->getAttribute('name')) {
$compiler->raw('$this');
} else {
$compiler
->raw('$this->loadTemplate(')
->subcompile($this->getNode('expr'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(')->unwrap()')
;
}
$compiler->raw(";\n");
}
}
class_alias('Twig\Node\ImportNode',
'Twig_Node_Import');
PK��[��||twig/src/Node/IncludeNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Represents an include node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class IncludeNode extends Node implements NodeOutputInterface
{
public function __construct(AbstractExpression $expr,
AbstractExpression $variables = null, $only = false, $ignoreMissing =
false, $lineno, $tag = null)
{
$nodes = ['expr' => $expr];
if (null !== $variables) {
$nodes['variables'] = $variables;
}
parent::__construct($nodes, ['only' => (bool) $only,
'ignore_missing' => (bool) $ignoreMissing], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
if ($this->getAttribute('ignore_missing')) {
$template = $compiler->getVarName();
$compiler
->write(sprintf("$%s = null;\n", $template))
->write("try {\n")
->indent()
->write(sprintf('$%s = ', $template))
;
$this->addGetTemplate($compiler);
$compiler
->raw(";\n")
->outdent()
->write("} catch (LoaderError \$e) {\n")
->indent()
->write("// ignore missing template\n")
->outdent()
->write("}\n")
->write(sprintf("if ($%s) {\n", $template))
->indent()
->write(sprintf('$%s->display(',
$template))
;
$this->addTemplateArguments($compiler);
$compiler
->raw(");\n")
->outdent()
->write("}\n")
;
} else {
$this->addGetTemplate($compiler);
$compiler->raw('->display(');
$this->addTemplateArguments($compiler);
$compiler->raw(");\n");
}
}
protected function addGetTemplate(Compiler $compiler)
{
$compiler
->write('$this->loadTemplate(')
->subcompile($this->getNode('expr'))
->raw(', ')
->repr($this->getTemplateName())
->raw(', ')
->repr($this->getTemplateLine())
->raw(')')
;
}
protected function addTemplateArguments(Compiler $compiler)
{
if (!$this->hasNode('variables')) {
$compiler->raw(false ===
$this->getAttribute('only') ? '$context' :
'[]');
} elseif (false === $this->getAttribute('only')) {
$compiler
->raw('twig_array_merge($context, ')
->subcompile($this->getNode('variables'))
->raw(')')
;
} else {
$compiler->raw('twig_to_array(');
$compiler->subcompile($this->getNode('variables'));
$compiler->raw(')');
}
}
}
class_alias('Twig\Node\IncludeNode',
'Twig_Node_Include');
PK��[u�itwig/src/Node/MacroNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Error\SyntaxError;
/**
* Represents a macro node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class MacroNode extends Node
{
const VARARGS_NAME = 'varargs';
public function __construct($name, \Twig_NodeInterface $body,
\Twig_NodeInterface $arguments, $lineno, $tag = null)
{
foreach ($arguments as $argumentName => $argument) {
if (self::VARARGS_NAME === $argumentName) {
throw new SyntaxError(sprintf('The argument
"%s" in macro "%s" cannot be defined because the
variable "%s" is reserved for arbitrary arguments.',
self::VARARGS_NAME, $name, self::VARARGS_NAME),
$argument->getTemplateLine(), $argument->getSourceContext());
}
}
parent::__construct(['body' => $body,
'arguments' => $arguments], ['name' => $name],
$lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write(sprintf('public function get%s(',
$this->getAttribute('name')))
;
$count = \count($this->getNode('arguments'));
$pos = 0;
foreach ($this->getNode('arguments') as $name =>
$default) {
$compiler
->raw('$__'.$name.'__ = ')
->subcompile($default)
;
if (++$pos < $count) {
$compiler->raw(', ');
}
}
if (\PHP_VERSION_ID >= 50600) {
if ($count) {
$compiler->raw(', ');
}
$compiler->raw('...$__varargs__');
}
$compiler
->raw(")\n")
->write("{\n")
->indent()
;
$compiler
->write("\$context =
\$this->env->mergeGlobals([\n")
->indent()
;
foreach ($this->getNode('arguments') as $name =>
$default) {
$compiler
->write('')
->string($name)
->raw(' => $__'.$name.'__')
->raw(",\n")
;
}
$compiler
->write('')
->string(self::VARARGS_NAME)
->raw(' => ')
;
if (\PHP_VERSION_ID >= 50600) {
$compiler->raw("\$__varargs__,\n");
} else {
$compiler
->raw('func_num_args() > ')
->repr($count)
->raw(' ? array_slice(func_get_args(), ')
->repr($count)
->raw(") : [],\n")
;
}
$compiler
->outdent()
->write("]);\n\n")
->write("\$blocks = [];\n\n")
;
if ($compiler->getEnvironment()->isDebug()) {
$compiler->write("ob_start();\n");
} else {
$compiler->write("ob_start(function () { return
''; });\n");
}
$compiler
->write("try {\n")
->indent()
->subcompile($this->getNode('body'))
->outdent()
->write("} catch (\Exception \$e) {\n")
->indent()
->write("ob_end_clean();\n\n")
->write("throw \$e;\n")
->outdent()
->write("} catch (\Throwable \$e) {\n")
->indent()
->write("ob_end_clean();\n\n")
->write("throw \$e;\n")
->outdent()
->write("}\n\n")
->write("return ('' === \$tmp =
ob_get_clean()) ? '' : new Markup(\$tmp,
\$this->env->getCharset());\n")
->outdent()
->write("}\n\n")
;
}
}
class_alias('Twig\Node\MacroNode', 'Twig_Node_Macro');
PK��[&J�I??twig/src/Node/ModuleNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Source;
/**
* Represents a module node.
*
* Consider this class as being final. If you need to customize the
behavior of
* the generated class, consider adding nodes to the following nodes:
display_start,
* display_end, constructor_start, constructor_end, and class_end.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ModuleNode extends Node
{
public function __construct(\Twig_NodeInterface $body,
AbstractExpression $parent = null, \Twig_NodeInterface $blocks,
\Twig_NodeInterface $macros, \Twig_NodeInterface $traits,
$embeddedTemplates, $name, $source = '')
{
if (!$name instanceof Source) {
@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);
$source = new Source($source, $name);
} else {
$source = $name;
}
$nodes = [
'body' => $body,
'blocks' => $blocks,
'macros' => $macros,
'traits' => $traits,
'display_start' => new Node(),
'display_end' => new Node(),
'constructor_start' => new Node(),
'constructor_end' => new Node(),
'class_end' => new Node(),
];
if (null !== $parent) {
$nodes['parent'] = $parent;
}
// embedded templates are set as attributes so that they are only
visited once by the visitors
parent::__construct($nodes, [
// source to be remove in 2.0
'source' => $source->getCode(),
// filename to be remove in 2.0 (use getTemplateName() instead)
'filename' => $source->getName(),
'index' => null,
'embedded_templates' => $embeddedTemplates,
], 1);
// populate the template name of all node children
$this->setTemplateName($source->getName());
$this->setSourceContext($source);
}
public function setIndex($index)
{
$this->setAttribute('index', $index);
}
public function compile(Compiler $compiler)
{
$this->compileTemplate($compiler);
foreach ($this->getAttribute('embedded_templates') as
$template) {
$compiler->subcompile($template);
}
}
protected function compileTemplate(Compiler $compiler)
{
if (!$this->getAttribute('index')) {
$compiler->write('<?php');
}
$this->compileClassHeader($compiler);
if (
\count($this->getNode('blocks'))
|| \count($this->getNode('traits'))
|| !$this->hasNode('parent')
|| $this->getNode('parent') instanceof
ConstantExpression
|| \count($this->getNode('constructor_start'))
|| \count($this->getNode('constructor_end'))
) {
$this->compileConstructor($compiler);
}
$this->compileGetParent($compiler);
$this->compileDisplay($compiler);
$compiler->subcompile($this->getNode('blocks'));
$this->compileMacros($compiler);
$this->compileGetTemplateName($compiler);
$this->compileIsTraitable($compiler);
$this->compileDebugInfo($compiler);
$this->compileGetSource($compiler);
$this->compileGetSourceContext($compiler);
$this->compileClassFooter($compiler);
}
protected function compileGetParent(Compiler $compiler)
{
if (!$this->hasNode('parent')) {
return;
}
$parent = $this->getNode('parent');
$compiler
->write("protected function doGetParent(array
\$context)\n", "{\n")
->indent()
->addDebugInfo($parent)
->write('return ')
;
if ($parent instanceof ConstantExpression) {
$compiler->subcompile($parent);
} else {
$compiler
->raw('$this->loadTemplate(')
->subcompile($parent)
->raw(', ')
->repr($this->getSourceContext()->getName())
->raw(', ')
->repr($parent->getTemplateLine())
->raw(')')
;
}
$compiler
->raw(";\n")
->outdent()
->write("}\n\n")
;
}
protected function compileClassHeader(Compiler $compiler)
{
$compiler
->write("\n\n")
;
if (!$this->getAttribute('index')) {
$compiler
->write("use Twig\Environment;\n")
->write("use Twig\Error\LoaderError;\n")
->write("use Twig\Error\RuntimeError;\n")
->write("use Twig\Markup;\n")
->write("use Twig\Sandbox\SecurityError;\n")
->write("use
Twig\Sandbox\SecurityNotAllowedTagError;\n")
->write("use
Twig\Sandbox\SecurityNotAllowedFilterError;\n")
->write("use
Twig\Sandbox\SecurityNotAllowedFunctionError;\n")
->write("use Twig\Source;\n")
->write("use Twig\Template;\n\n")
;
}
$compiler
// if the template name contains */, add a blank to avoid a PHP
parse error
->write('/* '.str_replace('*/', '*
/', $this->getSourceContext()->getName())." */\n")
->write('class
'.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(),
$this->getAttribute('index')))
->raw(sprintf(" extends %s\n",
$compiler->getEnvironment()->getBaseTemplateClass()))
->write("{\n")
->indent()
;
}
protected function compileConstructor(Compiler $compiler)
{
$compiler
->write("public function __construct(Environment
\$env)\n", "{\n")
->indent()
->subcompile($this->getNode('constructor_start'))
->write("parent::__construct(\$env);\n\n")
;
// parent
if (!$this->hasNode('parent')) {
$compiler->write("\$this->parent =
false;\n\n");
}
$countTraits = \count($this->getNode('traits'));
if ($countTraits) {
// traits
foreach ($this->getNode('traits') as $i =>
$trait) {
$this->compileLoadTemplate($compiler,
$trait->getNode('template'), sprintf('$_trait_%s',
$i));
$node = $trait->getNode('template');
$compiler
->addDebugInfo($node)
->write(sprintf("if
(!\$_trait_%s->isTraitable()) {\n", $i))
->indent()
->write("throw new RuntimeError('Template
\"'.")
->subcompile($trait->getNode('template'))
->raw(".'\" cannot be used as a
trait.', ")
->repr($node->getTemplateLine())
->raw(",
\$this->getSourceContext());\n")
->outdent()
->write("}\n")
->write(sprintf("\$_trait_%s_blocks =
\$_trait_%s->getBlocks();\n\n", $i, $i))
;
foreach ($trait->getNode('targets') as $key
=> $value) {
$compiler
->write(sprintf('if
(!isset($_trait_%s_blocks[', $i))
->string($key)
->raw("])) {\n")
->indent()
->write("throw new
RuntimeError(sprintf('Block ")
->string($key)
->raw(' is not defined in trait ')
->subcompile($trait->getNode('template'))
->raw(".'), ")
->repr($node->getTemplateLine())
->raw(",
\$this->getSourceContext());\n")
->outdent()
->write("}\n\n")
->write(sprintf('$_trait_%s_blocks[',
$i))
->subcompile($value)
->raw(sprintf('] =
$_trait_%s_blocks[', $i))
->string($key)
->raw(sprintf('];
unset($_trait_%s_blocks[', $i))
->string($key)
->raw("]);\n\n")
;
}
}
if ($countTraits > 1) {
$compiler
->write("\$this->traits =
array_merge(\n")
->indent()
;
for ($i = 0; $i < $countTraits; ++$i) {
$compiler
->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ?
'' : ',')."\n", $i))
;
}
$compiler
->outdent()
->write(");\n\n")
;
} else {
$compiler
->write("\$this->traits =
\$_trait_0_blocks;\n\n")
;
}
$compiler
->write("\$this->blocks = array_merge(\n")
->indent()
->write("\$this->traits,\n")
->write("[\n")
;
} else {
$compiler
->write("\$this->blocks = [\n")
;
}
// blocks
$compiler
->indent()
;
foreach ($this->getNode('blocks') as $name =>
$node) {
$compiler
->write(sprintf("'%s' => [\$this,
'block_%s'],\n", $name, $name))
;
}
if ($countTraits) {
$compiler
->outdent()
->write("]\n")
->outdent()
->write(");\n")
;
} else {
$compiler
->outdent()
->write("];\n")
;
}
$compiler
->subcompile($this->getNode('constructor_end'))
->outdent()
->write("}\n\n")
;
}
protected function compileDisplay(Compiler $compiler)
{
$compiler
->write("protected function doDisplay(array \$context,
array \$blocks = [])\n", "{\n")
->indent()
->subcompile($this->getNode('display_start'))
->subcompile($this->getNode('body'))
;
if ($this->hasNode('parent')) {
$parent = $this->getNode('parent');
$compiler->addDebugInfo($parent);
if ($parent instanceof ConstantExpression) {
$compiler
->write('$this->parent =
$this->loadTemplate(')
->subcompile($parent)
->raw(', ')
->repr($this->getSourceContext()->getName())
->raw(', ')
->repr($parent->getTemplateLine())
->raw(");\n")
;
$compiler->write('$this->parent');
} else {
$compiler->write('$this->getParent($context)');
}
$compiler->raw("->display(\$context,
array_merge(\$this->blocks, \$blocks));\n");
}
$compiler
->subcompile($this->getNode('display_end'))
->outdent()
->write("}\n\n")
;
}
protected function compileClassFooter(Compiler $compiler)
{
$compiler
->subcompile($this->getNode('class_end'))
->outdent()
->write("}\n")
;
}
protected function compileMacros(Compiler $compiler)
{
$compiler->subcompile($this->getNode('macros'));
}
protected function compileGetTemplateName(Compiler $compiler)
{
$compiler
->write("public function getTemplateName()\n",
"{\n")
->indent()
->write('return ')
->repr($this->getSourceContext()->getName())
->raw(";\n")
->outdent()
->write("}\n\n")
;
}
protected function compileIsTraitable(Compiler $compiler)
{
// A template can be used as a trait if:
// * it has no parent
// * it has no macros
// * it has no body
//
// Put another way, a template can be used as a trait if it
// only contains blocks and use statements.
$traitable = !$this->hasNode('parent') && 0
=== \count($this->getNode('macros'));
if ($traitable) {
if ($this->getNode('body') instanceof BodyNode) {
$nodes =
$this->getNode('body')->getNode(0);
} else {
$nodes = $this->getNode('body');
}
if (!\count($nodes)) {
$nodes = new Node([$nodes]);
}
foreach ($nodes as $node) {
if (!\count($node)) {
continue;
}
if ($node instanceof TextNode &&
ctype_space($node->getAttribute('data'))) {
continue;
}
if ($node instanceof BlockReferenceNode) {
continue;
}
$traitable = false;
break;
}
}
if ($traitable) {
return;
}
$compiler
->write("public function isTraitable()\n",
"{\n")
->indent()
->write(sprintf("return %s;\n", $traitable ?
'true' : 'false'))
->outdent()
->write("}\n\n")
;
}
protected function compileDebugInfo(Compiler $compiler)
{
$compiler
->write("public function getDebugInfo()\n",
"{\n")
->indent()
->write(sprintf("return %s;\n",
str_replace("\n", '',
var_export(array_reverse($compiler->getDebugInfo(), true), true))))
->outdent()
->write("}\n\n")
;
}
protected function compileGetSource(Compiler $compiler)
{
$compiler
->write("/** @deprecated since 1.27 (to be removed in
2.0). Use getSourceContext() instead */\n")
->write("public function getSource()\n",
"{\n")
->indent()
->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")
->write('return
$this->getSourceContext()->getCode();')
->raw("\n")
->outdent()
->write("}\n\n")
;
}
protected function compileGetSourceContext(Compiler $compiler)
{
$compiler
->write("public function getSourceContext()\n",
"{\n")
->indent()
->write('return new Source(')
->string($compiler->getEnvironment()->isDebug() ?
$this->getSourceContext()->getCode() : '')
->raw(', ')
->string($this->getSourceContext()->getName())
->raw(', ')
->string($this->getSourceContext()->getPath())
->raw(");\n")
->outdent()
->write("}\n")
;
}
protected function compileLoadTemplate(Compiler $compiler, $node, $var)
{
if ($node instanceof ConstantExpression) {
$compiler
->write(sprintf('%s =
$this->loadTemplate(', $var))
->subcompile($node)
->raw(', ')
->repr($node->getTemplateName())
->raw(', ')
->repr($node->getTemplateLine())
->raw(");\n")
;
} else {
throw new \LogicException('Trait templates can only be
constant nodes.');
}
}
}
class_alias('Twig\Node\ModuleNode',
'Twig_Node_Module');
PK��[���eetwig/src/Node/Node.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Source;
/**
* Represents a node in the AST.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Node implements \Twig_NodeInterface
{
protected $nodes;
protected $attributes;
protected $lineno;
protected $tag;
private $name;
private $sourceContext;
/**
* @param array $nodes An array of named nodes
* @param array $attributes An array of attributes (should not be
nodes)
* @param int $lineno The line number
* @param string $tag The tag name associated with the Node
*/
public function __construct(array $nodes = [], array $attributes = [],
$lineno = 0, $tag = null)
{
foreach ($nodes as $name => $node) {
if (!$node instanceof \Twig_NodeInterface) {
@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, \get_class($this)), E_USER_DEPRECATED);
}
}
$this->nodes = $nodes;
$this->attributes = $attributes;
$this->lineno = $lineno;
$this->tag = $tag;
}
public function __toString()
{
$attributes = [];
foreach ($this->attributes as $name => $value) {
$attributes[] = sprintf('%s: %s', $name,
str_replace("\n", '', var_export($value, true)));
}
$repr = [\get_class($this).'('.implode(', ',
$attributes)];
if (\count($this->nodes)) {
foreach ($this->nodes as $name => $node) {
$len = \strlen($name) + 4;
$noderepr = [];
foreach (explode("\n", (string) $node) as $line)
{
$noderepr[] = str_repeat(' ', $len).$line;
}
$repr[] = sprintf(' %s: %s', $name,
ltrim(implode("\n", $noderepr)));
}
$repr[] = ')';
} else {
$repr[0] .= ')';
}
return implode("\n", $repr);
}
/**
* @deprecated since 1.16.1 (to be removed in 2.0)
*/
public function toXml($asDom = false)
{
@trigger_error(sprintf('%s is deprecated since version 1.16.1
and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED);
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$dom->appendChild($xml =
$dom->createElement('twig'));
$xml->appendChild($node =
$dom->createElement('node'));
$node->setAttribute('class', \get_class($this));
foreach ($this->attributes as $name => $value) {
$node->appendChild($attribute =
$dom->createElement('attribute'));
$attribute->setAttribute('name', $name);
$attribute->appendChild($dom->createTextNode($value));
}
foreach ($this->nodes as $name => $n) {
if (null === $n) {
continue;
}
$child =
$n->toXml(true)->getElementsByTagName('node')->item(0);
$child = $dom->importNode($child, true);
$child->setAttribute('name', $name);
$node->appendChild($child);
}
return $asDom ? $dom : $dom->saveXML();
}
public function compile(Compiler $compiler)
{
foreach ($this->nodes as $node) {
$node->compile($compiler);
}
}
public function getTemplateLine()
{
return $this->lineno;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getLine()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getTemplateLine() instead.', E_USER_DEPRECATED);
return $this->lineno;
}
public function getNodeTag()
{
return $this->tag;
}
/**
* @return bool
*/
public function hasAttribute($name)
{
return \array_key_exists($name, $this->attributes);
}
/**
* @return mixed
*/
public function getAttribute($name)
{
if (!\array_key_exists($name, $this->attributes)) {
throw new \LogicException(sprintf('Attribute
"%s" does not exist for Node "%s".', $name,
\get_class($this)));
}
return $this->attributes[$name];
}
/**
* @param string $name
* @param mixed $value
*/
public function setAttribute($name, $value)
{
$this->attributes[$name] = $value;
}
public function removeAttribute($name)
{
unset($this->attributes[$name]);
}
/**
* @return bool
*/
public function hasNode($name)
{
return \array_key_exists($name, $this->nodes);
}
/**
* @return Node
*/
public function getNode($name)
{
if (!\array_key_exists($name, $this->nodes)) {
throw new \LogicException(sprintf('Node "%s"
does not exist for Node "%s".', $name, \get_class($this)));
}
return $this->nodes[$name];
}
public function setNode($name, $node = null)
{
if (!$node instanceof \Twig_NodeInterface) {
@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,
\get_class($this)), E_USER_DEPRECATED);
}
$this->nodes[$name] = $node;
}
public function removeNode($name)
{
unset($this->nodes[$name]);
}
public function count()
{
return \count($this->nodes);
}
public function getIterator()
{
return new \ArrayIterator($this->nodes);
}
public function setTemplateName($name)
{
$this->name = $name;
foreach ($this->nodes as $node) {
if (null !== $node) {
$node->setTemplateName($name);
}
}
}
public function getTemplateName()
{
return $this->name;
}
public function setSourceContext(Source $source)
{
$this->sourceContext = $source;
foreach ($this->nodes as $node) {
if ($node instanceof Node) {
$node->setSourceContext($source);
}
}
}
public function getSourceContext()
{
return $this->sourceContext;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function setFilename($name)
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
setTemplateName() instead.', E_USER_DEPRECATED);
$this->setTemplateName($name);
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getFilename()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getTemplateName() instead.', E_USER_DEPRECATED);
return $this->name;
}
}
class_alias('Twig\Node\Node', 'Twig_Node');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Compiler');
PK��[��m��&twig/src/Node/NodeCaptureInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
/**
* Represents a node that captures any nested displayable nodes.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface NodeCaptureInterface
{
}
class_alias('Twig\Node\NodeCaptureInterface',
'Twig_NodeCaptureInterface');
PK��[
*����%twig/src/Node/NodeOutputInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
/**
* Represents a displayable node in the AST.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface NodeOutputInterface
{
}
class_alias('Twig\Node\NodeOutputInterface',
'Twig_NodeOutputInterface');
PK��[�����twig/src/Node/PrintNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
/**
* Represents a node that outputs an expression.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class PrintNode extends Node implements NodeOutputInterface
{
public function __construct(AbstractExpression $expr, $lineno, $tag =
null)
{
parent::__construct(['expr' => $expr], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('echo ')
->subcompile($this->getNode('expr'))
->raw(";\n")
;
}
}
class_alias('Twig\Node\PrintNode', 'Twig_Node_Print');
PK��[;r8�//$twig/src/Node/SandboxedPrintNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
/**
* Adds a check for the __toString() method when the variable is an object
and the sandbox is activated.
*
* When there is a simple Print statement, like {{ article }},
* and if the sandbox is enabled, we need to check that the __toString()
* method is allowed if 'article' is an object.
*
* Not used anymore, to be deprecated in 2.x and removed in 3.0
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SandboxedPrintNode extends PrintNode
{
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('echo ')
;
$expr = $this->getNode('expr');
if ($expr instanceof ConstantExpression) {
$compiler
->subcompile($expr)
->raw(";\n")
;
} else {
$compiler
->write('$this->env->getExtension(\'\Twig\Extension\SandboxExtension\')->ensureToStringAllowed(')
->subcompile($expr)
->raw(");\n")
;
}
}
/**
* Removes node filters.
*
* This is mostly needed when another visitor adds filters (like the
escaper one).
*
* @return Node
*/
protected function removeNodeFilter(Node $node)
{
if ($node instanceof FilterExpression) {
return
$this->removeNodeFilter($node->getNode('node'));
}
return $node;
}
}
class_alias('Twig\Node\SandboxedPrintNode',
'Twig_Node_SandboxedPrint');
PK��[���j��twig/src/Node/SandboxNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a sandbox node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SandboxNode extends Node
{
public function __construct(\Twig_NodeInterface $body, $lineno, $tag =
null)
{
parent::__construct(['body' => $body], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write("if (!\$alreadySandboxed =
\$this->sandbox->isSandboxed()) {\n")
->indent()
->write("\$this->sandbox->enableSandbox();\n")
->outdent()
->write("}\n")
->subcompile($this->getNode('body'))
->write("if (!\$alreadySandboxed) {\n")
->indent()
->write("\$this->sandbox->disableSandbox();\n")
->outdent()
->write("}\n")
;
}
}
class_alias('Twig\Node\SandboxNode',
'Twig_Node_Sandbox');
PK��[�(�|g
g
twig/src/Node/SetNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
use Twig\Node\Expression\ConstantExpression;
/**
* Represents a set node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SetNode extends Node implements NodeCaptureInterface
{
public function __construct($capture, \Twig_NodeInterface $names,
\Twig_NodeInterface $values, $lineno, $tag = null)
{
parent::__construct(['names' => $names,
'values' => $values], ['capture' => $capture,
'safe' => false], $lineno, $tag);
/*
* Optimizes the node when capture is used for a large block of
text.
*
* {% set foo %}foo{% endset %} is compiled to
$context['foo'] = new Twig\Markup("foo");
*/
if ($this->getAttribute('capture')) {
$this->setAttribute('safe', true);
$values = $this->getNode('values');
if ($values instanceof TextNode) {
$this->setNode('values', new
ConstantExpression($values->getAttribute('data'),
$values->getTemplateLine()));
$this->setAttribute('capture', false);
}
}
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
if (\count($this->getNode('names')) > 1) {
$compiler->write('list(');
foreach ($this->getNode('names') as $idx =>
$node) {
if ($idx) {
$compiler->raw(', ');
}
$compiler->subcompile($node);
}
$compiler->raw(')');
} else {
if ($this->getAttribute('capture')) {
if ($compiler->getEnvironment()->isDebug()) {
$compiler->write("ob_start();\n");
} else {
$compiler->write("ob_start(function () { return
''; });\n");
}
$compiler
->subcompile($this->getNode('values'))
;
}
$compiler->subcompile($this->getNode('names'),
false);
if ($this->getAttribute('capture')) {
$compiler->raw(" = ('' === \$tmp =
ob_get_clean()) ? '' : new Markup(\$tmp,
\$this->env->getCharset())");
}
}
if (!$this->getAttribute('capture')) {
$compiler->raw(' = ');
if (\count($this->getNode('names')) > 1) {
$compiler->write('[');
foreach ($this->getNode('values') as $idx
=> $value) {
if ($idx) {
$compiler->raw(', ');
}
$compiler->subcompile($value);
}
$compiler->raw(']');
} else {
if ($this->getAttribute('safe')) {
$compiler
->raw("('' === \$tmp = ")
->subcompile($this->getNode('values'))
->raw(") ? '' : new Markup(\$tmp,
\$this->env->getCharset())")
;
} else {
$compiler->subcompile($this->getNode('values'));
}
}
}
$compiler->raw(";\n");
}
}
class_alias('Twig\Node\SetNode', 'Twig_Node_Set');
PK��[�~`-��twig/src/Node/SetTempNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* @internal
*/
class SetTempNode extends Node
{
public function __construct($name, $lineno)
{
parent::__construct([], ['name' => $name], $lineno);
}
public function compile(Compiler $compiler)
{
$name = $this->getAttribute('name');
$compiler
->addDebugInfo($this)
->write('if (isset($context[')
->string($name)
->raw('])) { $_')
->raw($name)
->raw('_ = $context[')
->repr($name)
->raw(']; } else { $_')
->raw($name)
->raw("_ = null; }\n")
;
}
}
class_alias('Twig\Node\SetTempNode',
'Twig_Node_SetTemp');
PK��[��$�kktwig/src/Node/SpacelessNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a spaceless node.
*
* It removes spaces between HTML tags.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SpacelessNode extends Node
{
public function __construct(\Twig_NodeInterface $body, $lineno, $tag =
'spaceless')
{
parent::__construct(['body' => $body], [], $lineno,
$tag);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
;
if ($compiler->getEnvironment()->isDebug()) {
$compiler->write("ob_start();\n");
} else {
$compiler->write("ob_start(function () { return
''; });\n");
}
$compiler
->subcompile($this->getNode('body'))
->write("echo
trim(preg_replace('/>\s+</', '><',
ob_get_clean()));\n")
;
}
}
class_alias('Twig\Node\SpacelessNode',
'Twig_Node_Spaceless');
PK��[�e:422twig/src/Node/TextNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a text node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TextNode extends Node implements NodeOutputInterface
{
public function __construct($data, $lineno)
{
parent::__construct([], ['data' => $data], $lineno);
}
public function compile(Compiler $compiler)
{
$compiler
->addDebugInfo($this)
->write('echo ')
->string($this->getAttribute('data'))
->raw(";\n")
;
}
}
class_alias('Twig\Node\TextNode', 'Twig_Node_Text');
PK��[�e ��twig/src/Node/WithNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Node;
use Twig\Compiler;
/**
* Represents a nested "with" scope.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class WithNode extends Node
{
public function __construct(Node $body, Node $variables = null, $only =
false, $lineno, $tag = null)
{
$nodes = ['body' => $body];
if (null !== $variables) {
$nodes['variables'] = $variables;
}
parent::__construct($nodes, ['only' => (bool) $only],
$lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->addDebugInfo($this);
if ($this->hasNode('variables')) {
$node = $this->getNode('variables');
$varsName = $compiler->getVarName();
$compiler
->write(sprintf('$%s = ', $varsName))
->subcompile($node)
->raw(";\n")
->write(sprintf("if (!twig_test_iterable(\$%s))
{\n", $varsName))
->indent()
->write("throw new RuntimeError('Variables
passed to the \"with\" tag must be a hash.', ")
->repr($node->getTemplateLine())
->raw(", \$this->getSourceContext());\n")
->outdent()
->write("}\n")
->write(sprintf("\$%s =
twig_to_array(\$%s);\n", $varsName, $varsName))
;
if ($this->getAttribute('only')) {
$compiler->write("\$context = ['_parent'
=> \$context];\n");
} else {
$compiler->write("\$context['_parent'] =
\$context;\n");
}
$compiler->write(sprintf("\$context =
\$this->env->mergeGlobals(array_merge(\$context, \$%s));\n",
$varsName));
} else {
$compiler->write("\$context['_parent'] =
\$context;\n");
}
$compiler
->subcompile($this->getNode('body'))
->write("\$context =
\$context['_parent'];\n")
;
}
}
class_alias('Twig\Node\WithNode', 'Twig_Node_With');
PK��[��v&
twig/src/NodeTraverser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\NodeVisitor\NodeVisitorInterface;
/**
* A node traverser.
*
* It visits all nodes and their children and calls the given visitor for
each.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class NodeTraverser
{
protected $env;
protected $visitors = [];
/**
* @param NodeVisitorInterface[] $visitors
*/
public function __construct(Environment $env, array $visitors = [])
{
$this->env = $env;
foreach ($visitors as $visitor) {
$this->addVisitor($visitor);
}
}
public function addVisitor(NodeVisitorInterface $visitor)
{
$this->visitors[$visitor->getPriority()][] = $visitor;
}
/**
* Traverses a node and calls the registered visitors.
*
* @return \Twig_NodeInterface
*/
public function traverse(\Twig_NodeInterface $node)
{
ksort($this->visitors);
foreach ($this->visitors as $visitors) {
foreach ($visitors as $visitor) {
$node = $this->traverseForVisitor($visitor, $node);
}
}
return $node;
}
protected function traverseForVisitor(NodeVisitorInterface $visitor,
\Twig_NodeInterface $node = null)
{
if (null === $node) {
return;
}
$node = $visitor->enterNode($node, $this->env);
foreach ($node as $k => $n) {
if (null === $n) {
continue;
}
if (false !== ($m = $this->traverseForVisitor($visitor, $n))
&& null !== $m) {
if ($m !== $n) {
$node->setNode($k, $m);
}
} else {
$node->removeNode($k);
}
}
return $visitor->leaveNode($node, $this->env);
}
}
class_alias('Twig\NodeTraverser',
'Twig_NodeTraverser');
PK��[���#11,twig/src/NodeVisitor/AbstractNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\Node;
/**
* Used to make node visitors compatible with Twig 1.x and 2.x.
*
* To be removed in Twig 3.1.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class AbstractNodeVisitor implements NodeVisitorInterface
{
final public function enterNode(\Twig_NodeInterface $node, Environment
$env)
{
if (!$node instanceof Node) {
throw new \LogicException(sprintf('%s only supports
\Twig\Node\Node instances.', __CLASS__));
}
return $this->doEnterNode($node, $env);
}
final public function leaveNode(\Twig_NodeInterface $node, Environment
$env)
{
if (!$node instanceof Node) {
throw new \LogicException(sprintf('%s only supports
\Twig\Node\Node instances.', __CLASS__));
}
return $this->doLeaveNode($node, $env);
}
/**
* Called before child nodes are visited.
*
* @return Node The modified node
*/
abstract protected function doEnterNode(Node $node, Environment $env);
/**
* Called after child nodes are visited.
*
* @return Node|false|null The modified node or null if the node must
be removed
*/
abstract protected function doLeaveNode(Node $node, Environment $env);
}
class_alias('Twig\NodeVisitor\AbstractNodeVisitor',
'Twig_BaseNodeVisitor');
PK��[��,,+twig/src/NodeVisitor/EscaperNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\AutoEscapeNode;
use Twig\Node\BlockNode;
use Twig\Node\BlockReferenceNode;
use Twig\Node\DoNode;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\InlinePrint;
use Twig\Node\ImportNode;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\NodeTraverser;
/**
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EscaperNodeVisitor extends AbstractNodeVisitor
{
protected $statusStack = [];
protected $blocks = [];
protected $safeAnalysis;
protected $traverser;
protected $defaultStrategy = false;
protected $safeVars = [];
public function __construct()
{
$this->safeAnalysis = new SafeAnalysisNodeVisitor();
}
protected function doEnterNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
if
($env->hasExtension('\Twig\Extension\EscaperExtension')
&& $defaultStrategy =
$env->getExtension('\Twig\Extension\EscaperExtension')->getDefaultStrategy($node->getTemplateName()))
{
$this->defaultStrategy = $defaultStrategy;
}
$this->safeVars = [];
$this->blocks = [];
} elseif ($node instanceof AutoEscapeNode) {
$this->statusStack[] =
$node->getAttribute('value');
} elseif ($node instanceof BlockNode) {
$this->statusStack[] =
isset($this->blocks[$node->getAttribute('name')]) ?
$this->blocks[$node->getAttribute('name')] :
$this->needEscaping($env);
} elseif ($node instanceof ImportNode) {
$this->safeVars[] =
$node->getNode('var')->getAttribute('name');
}
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$this->defaultStrategy = false;
$this->safeVars = [];
$this->blocks = [];
} elseif ($node instanceof FilterExpression) {
return $this->preEscapeFilterNode($node, $env);
} elseif ($node instanceof PrintNode && false !== $type =
$this->needEscaping($env)) {
$expression = $node->getNode('expr');
if ($expression instanceof ConditionalExpression &&
$this->shouldUnwrapConditional($expression, $env, $type)) {
return new DoNode($this->unwrapConditional($expression,
$env, $type), $expression->getTemplateLine());
}
return $this->escapePrintNode($node, $env, $type);
}
if ($node instanceof AutoEscapeNode || $node instanceof BlockNode)
{
array_pop($this->statusStack);
} elseif ($node instanceof BlockReferenceNode) {
$this->blocks[$node->getAttribute('name')] =
$this->needEscaping($env);
}
return $node;
}
private function shouldUnwrapConditional(ConditionalExpression
$expression, Environment $env, $type)
{
$expr2Safe = $this->isSafeFor($type,
$expression->getNode('expr2'), $env);
$expr3Safe = $this->isSafeFor($type,
$expression->getNode('expr3'), $env);
return $expr2Safe !== $expr3Safe;
}
private function unwrapConditional(ConditionalExpression $expression,
Environment $env, $type)
{
// convert "echo a ? b : c" to "a ? echo b : echo
c" recursively
$expr2 = $expression->getNode('expr2');
if ($expr2 instanceof ConditionalExpression &&
$this->shouldUnwrapConditional($expr2, $env, $type)) {
$expr2 = $this->unwrapConditional($expr2, $env, $type);
} else {
$expr2 = $this->escapeInlinePrintNode(new
InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type);
}
$expr3 = $expression->getNode('expr3');
if ($expr3 instanceof ConditionalExpression &&
$this->shouldUnwrapConditional($expr3, $env, $type)) {
$expr3 = $this->unwrapConditional($expr3, $env, $type);
} else {
$expr3 = $this->escapeInlinePrintNode(new
InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type);
}
return new
ConditionalExpression($expression->getNode('expr1'), $expr2,
$expr3, $expression->getTemplateLine());
}
private function escapeInlinePrintNode(InlinePrint $node, Environment
$env, $type)
{
$expression = $node->getNode('node');
if ($this->isSafeFor($type, $expression, $env)) {
return $node;
}
return new InlinePrint($this->getEscaperFilter($type,
$expression), $node->getTemplateLine());
}
protected function escapePrintNode(PrintNode $node, Environment $env,
$type)
{
if (false === $type) {
return $node;
}
$expression = $node->getNode('expr');
if ($this->isSafeFor($type, $expression, $env)) {
return $node;
}
$class = \get_class($node);
return new $class($this->getEscaperFilter($type, $expression),
$node->getTemplateLine());
}
protected function preEscapeFilterNode(FilterExpression $filter,
Environment $env)
{
$name =
$filter->getNode('filter')->getAttribute('value');
$type = $env->getFilter($name)->getPreEscape();
if (null === $type) {
return $filter;
}
$node = $filter->getNode('node');
if ($this->isSafeFor($type, $node, $env)) {
return $filter;
}
$filter->setNode('node',
$this->getEscaperFilter($type, $node));
return $filter;
}
protected function isSafeFor($type, \Twig_NodeInterface $expression,
$env)
{
$safe = $this->safeAnalysis->getSafe($expression);
if (null === $safe) {
if (null === $this->traverser) {
$this->traverser = new NodeTraverser($env,
[$this->safeAnalysis]);
}
$this->safeAnalysis->setSafeVars($this->safeVars);
$this->traverser->traverse($expression);
$safe = $this->safeAnalysis->getSafe($expression);
}
return \in_array($type, $safe) || \in_array('all',
$safe);
}
protected function needEscaping(Environment $env)
{
if (\count($this->statusStack)) {
return $this->statusStack[\count($this->statusStack) -
1];
}
return $this->defaultStrategy ? $this->defaultStrategy :
false;
}
protected function getEscaperFilter($type, \Twig_NodeInterface $node)
{
$line = $node->getTemplateLine();
$name = new ConstantExpression('escape', $line);
$args = new Node([new ConstantExpression((string) $type, $line),
new ConstantExpression(null, $line), new ConstantExpression(true, $line)]);
return new FilterExpression($node, $name, $args, $line);
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\NodeVisitor\EscaperNodeVisitor',
'Twig_NodeVisitor_Escaper');
PK��[&� �-twig/src/NodeVisitor/NodeVisitorInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
/**
* Interface for node visitor classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface NodeVisitorInterface
{
/**
* Called before child nodes are visited.
*
* @return \Twig_NodeInterface The modified node
*/
public function enterNode(\Twig_NodeInterface $node, Environment $env);
/**
* Called after child nodes are visited.
*
* @return \Twig_NodeInterface|false|null The modified node or null if
the node must be removed
*/
public function leaveNode(\Twig_NodeInterface $node, Environment $env);
/**
* Returns the priority for this visitor.
*
* Priority should be between -10 and 10 (0 is the default).
*
* @return int The priority level
*/
public function getPriority();
}
class_alias('Twig\NodeVisitor\NodeVisitorInterface',
'Twig_NodeVisitorInterface');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Environment');
PK��[6$�"�"-twig/src/NodeVisitor/OptimizerNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\BlockReferenceNode;
use Twig\Node\BodyNode;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Expression\TempNameExpression;
use Twig\Node\ForNode;
use Twig\Node\IncludeNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Node\SetTempNode;
/**
* Tries to optimize the AST.
*
* This visitor is always the last registered one.
*
* You can configure which optimizations you want to activate via the
* optimizer mode.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class OptimizerNodeVisitor extends AbstractNodeVisitor
{
const OPTIMIZE_ALL = -1;
const OPTIMIZE_NONE = 0;
const OPTIMIZE_FOR = 2;
const OPTIMIZE_RAW_FILTER = 4;
const OPTIMIZE_VAR_ACCESS = 8;
protected $loops = [];
protected $loopsTargets = [];
protected $optimizers;
protected $prependedNodes = [];
protected $inABody = false;
/**
* @param int $optimizers The optimizer mode
*/
public function __construct($optimizers = -1)
{
if (!\is_int($optimizers) || $optimizers > (self::OPTIMIZE_FOR |
self::OPTIMIZE_RAW_FILTER | self::OPTIMIZE_VAR_ACCESS)) {
throw new \InvalidArgumentException(sprintf('Optimizer
mode "%s" is not valid.', $optimizers));
}
$this->optimizers = $optimizers;
}
protected function doEnterNode(Node $node, Environment $env)
{
if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR &
$this->optimizers)) {
$this->enterOptimizeFor($node, $env);
}
if (\PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS
=== (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) &&
!$env->isStrictVariables() &&
!$env->hasExtension('\Twig\Extension\SandboxExtension')) {
if ($this->inABody) {
if (!$node instanceof AbstractExpression) {
if ('Twig_Node' !== \get_class($node)) {
array_unshift($this->prependedNodes, []);
}
} else {
$node = $this->optimizeVariables($node, $env);
}
} elseif ($node instanceof BodyNode) {
$this->inABody = true;
}
}
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
$expression = $node instanceof AbstractExpression;
if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR &
$this->optimizers)) {
$this->leaveOptimizeFor($node, $env);
}
if (self::OPTIMIZE_RAW_FILTER === (self::OPTIMIZE_RAW_FILTER &
$this->optimizers)) {
$node = $this->optimizeRawFilter($node, $env);
}
$node = $this->optimizePrintNode($node, $env);
if (self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS &
$this->optimizers) && !$env->isStrictVariables() &&
!$env->hasExtension('\Twig\Extension\SandboxExtension')) {
if ($node instanceof BodyNode) {
$this->inABody = false;
} elseif ($this->inABody) {
if (!$expression && 'Twig_Node' !==
\get_class($node) && $prependedNodes =
array_shift($this->prependedNodes)) {
$nodes = [];
foreach (array_unique($prependedNodes) as $name) {
$nodes[] = new SetTempNode($name,
$node->getTemplateLine());
}
$nodes[] = $node;
$node = new Node($nodes);
}
}
}
return $node;
}
protected function optimizeVariables(\Twig_NodeInterface $node,
Environment $env)
{
if ('Twig_Node_Expression_Name' === \get_class($node)
&& $node->isSimple()) {
$this->prependedNodes[0][] =
$node->getAttribute('name');
return new
TempNameExpression($node->getAttribute('name'),
$node->getTemplateLine());
}
return $node;
}
/**
* Optimizes print nodes.
*
* It replaces:
*
* * "echo $this->render(Parent)Block()" with
"$this->display(Parent)Block()"
*
* @return \Twig_NodeInterface
*/
protected function optimizePrintNode(\Twig_NodeInterface $node,
Environment $env)
{
if (!$node instanceof PrintNode) {
return $node;
}
$exprNode = $node->getNode('expr');
if (
$exprNode instanceof BlockReferenceExpression ||
$exprNode instanceof ParentExpression
) {
$exprNode->setAttribute('output', true);
return $exprNode;
}
return $node;
}
/**
* Removes "raw" filters.
*
* @return \Twig_NodeInterface
*/
protected function optimizeRawFilter(\Twig_NodeInterface $node,
Environment $env)
{
if ($node instanceof FilterExpression && 'raw' ==
$node->getNode('filter')->getAttribute('value'))
{
return $node->getNode('node');
}
return $node;
}
/**
* Optimizes "for" tag by removing the "loop"
variable creation whenever possible.
*/
protected function enterOptimizeFor(\Twig_NodeInterface $node,
Environment $env)
{
if ($node instanceof ForNode) {
// disable the loop variable by default
$node->setAttribute('with_loop', false);
array_unshift($this->loops, $node);
array_unshift($this->loopsTargets,
$node->getNode('value_target')->getAttribute('name'));
array_unshift($this->loopsTargets,
$node->getNode('key_target')->getAttribute('name'));
} elseif (!$this->loops) {
// we are outside a loop
return;
}
// when do we need to add the loop variable back?
// the loop variable is referenced for the current loop
elseif ($node instanceof NameExpression && 'loop'
=== $node->getAttribute('name')) {
$node->setAttribute('always_defined', true);
$this->addLoopToCurrent();
}
// optimize access to loop targets
elseif ($node instanceof NameExpression &&
\in_array($node->getAttribute('name'),
$this->loopsTargets)) {
$node->setAttribute('always_defined', true);
}
// block reference
elseif ($node instanceof BlockReferenceNode || $node instanceof
BlockReferenceExpression) {
$this->addLoopToCurrent();
}
// include without the only attribute
elseif ($node instanceof IncludeNode &&
!$node->getAttribute('only')) {
$this->addLoopToAll();
}
// include function without the with_context=false parameter
elseif ($node instanceof FunctionExpression
&& 'include' ===
$node->getAttribute('name')
&&
(!$node->getNode('arguments')->hasNode('with_context')
|| false !==
$node->getNode('arguments')->getNode('with_context')->getAttribute('value')
)
) {
$this->addLoopToAll();
}
// the loop variable is referenced via an attribute
elseif ($node instanceof GetAttrExpression
&& (!$node->getNode('attribute')
instanceof ConstantExpression
|| 'parent' ===
$node->getNode('attribute')->getAttribute('value')
)
&& (true ===
$this->loops[0]->getAttribute('with_loop')
|| ($node->getNode('node') instanceof
NameExpression
&& 'loop' ===
$node->getNode('node')->getAttribute('name')
)
)
) {
$this->addLoopToAll();
}
}
/**
* Optimizes "for" tag by removing the "loop"
variable creation whenever possible.
*/
protected function leaveOptimizeFor(\Twig_NodeInterface $node,
Environment $env)
{
if ($node instanceof ForNode) {
array_shift($this->loops);
array_shift($this->loopsTargets);
array_shift($this->loopsTargets);
}
}
protected function addLoopToCurrent()
{
$this->loops[0]->setAttribute('with_loop', true);
}
protected function addLoopToAll()
{
foreach ($this->loops as $loop) {
$loop->setAttribute('with_loop', true);
}
}
public function getPriority()
{
return 255;
}
}
class_alias('Twig\NodeVisitor\OptimizerNodeVisitor',
'Twig_NodeVisitor_Optimizer');
PK��[p�0twig/src/NodeVisitor/SafeAnalysisNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConditionalExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\MethodCallExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Node;
/**
* @final
*/
class SafeAnalysisNodeVisitor extends AbstractNodeVisitor
{
protected $data = [];
protected $safeVars = [];
public function setSafeVars($safeVars)
{
$this->safeVars = $safeVars;
}
public function getSafe(\Twig_NodeInterface $node)
{
$hash = spl_object_hash($node);
if (!isset($this->data[$hash])) {
return;
}
foreach ($this->data[$hash] as $bucket) {
if ($bucket['key'] !== $node) {
continue;
}
if (\in_array('html_attr',
$bucket['value'])) {
$bucket['value'][] = 'html';
}
return $bucket['value'];
}
}
protected function setSafe(\Twig_NodeInterface $node, array $safe)
{
$hash = spl_object_hash($node);
if (isset($this->data[$hash])) {
foreach ($this->data[$hash] as &$bucket) {
if ($bucket['key'] === $node) {
$bucket['value'] = $safe;
return;
}
}
}
$this->data[$hash][] = [
'key' => $node,
'value' => $safe,
];
}
protected function doEnterNode(Node $node, Environment $env)
{
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ConstantExpression) {
// constants are marked safe for all
$this->setSafe($node, ['all']);
} elseif ($node instanceof BlockReferenceExpression) {
// blocks are safe by definition
$this->setSafe($node, ['all']);
} elseif ($node instanceof ParentExpression) {
// parent block is safe by definition
$this->setSafe($node, ['all']);
} elseif ($node instanceof ConditionalExpression) {
// intersect safeness of both operands
$safe =
$this->intersectSafe($this->getSafe($node->getNode('expr2')),
$this->getSafe($node->getNode('expr3')));
$this->setSafe($node, $safe);
} elseif ($node instanceof FilterExpression) {
// filter expression is safe when the filter is safe
$name =
$node->getNode('filter')->getAttribute('value');
$args = $node->getNode('arguments');
if (false !== $filter = $env->getFilter($name)) {
$safe = $filter->getSafe($args);
if (null === $safe) {
$safe =
$this->intersectSafe($this->getSafe($node->getNode('node')),
$filter->getPreservesSafety());
}
$this->setSafe($node, $safe);
} else {
$this->setSafe($node, []);
}
} elseif ($node instanceof FunctionExpression) {
// function expression is safe when the function is safe
$name = $node->getAttribute('name');
$args = $node->getNode('arguments');
$function = $env->getFunction($name);
if (false !== $function) {
$this->setSafe($node, $function->getSafe($args));
} else {
$this->setSafe($node, []);
}
} elseif ($node instanceof MethodCallExpression) {
if ($node->getAttribute('safe')) {
$this->setSafe($node, ['all']);
} else {
$this->setSafe($node, []);
}
} elseif ($node instanceof GetAttrExpression &&
$node->getNode('node') instanceof NameExpression) {
$name =
$node->getNode('node')->getAttribute('name');
// attributes on template instances are safe
if ('_self' == $name || \in_array($name,
$this->safeVars)) {
$this->setSafe($node, ['all']);
} else {
$this->setSafe($node, []);
}
} else {
$this->setSafe($node, []);
}
return $node;
}
protected function intersectSafe(array $a = null, array $b = null)
{
if (null === $a || null === $b) {
return [];
}
if (\in_array('all', $a)) {
return $b;
}
if (\in_array('all', $b)) {
return $a;
}
return array_intersect($a, $b);
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\NodeVisitor\SafeAnalysisNodeVisitor',
'Twig_NodeVisitor_SafeAnalysis');
PK��[��w��+twig/src/NodeVisitor/SandboxNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\NodeVisitor;
use Twig\Environment;
use Twig\Node\CheckSecurityNode;
use Twig\Node\CheckToStringNode;
use Twig\Node\Expression\Binary\ConcatBinary;
use Twig\Node\Expression\Binary\RangeBinary;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Node\SetNode;
/**
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SandboxNodeVisitor extends AbstractNodeVisitor
{
protected $inAModule = false;
protected $tags;
protected $filters;
protected $functions;
private $needsToStringWrap = false;
protected function doEnterNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$this->inAModule = true;
$this->tags = [];
$this->filters = [];
$this->functions = [];
return $node;
} elseif ($this->inAModule) {
// look for tags
if ($node->getNodeTag() &&
!isset($this->tags[$node->getNodeTag()])) {
$this->tags[$node->getNodeTag()] = $node;
}
// look for filters
if ($node instanceof FilterExpression &&
!isset($this->filters[$node->getNode('filter')->getAttribute('value')]))
{
$this->filters[$node->getNode('filter')->getAttribute('value')]
= $node;
}
// look for functions
if ($node instanceof FunctionExpression &&
!isset($this->functions[$node->getAttribute('name')])) {
$this->functions[$node->getAttribute('name')] = $node;
}
// the .. operator is equivalent to the range() function
if ($node instanceof RangeBinary &&
!isset($this->functions['range'])) {
$this->functions['range'] = $node;
}
if ($node instanceof PrintNode) {
$this->needsToStringWrap = true;
$this->wrapNode($node, 'expr');
}
if ($node instanceof SetNode &&
!$node->getAttribute('capture')) {
$this->needsToStringWrap = true;
}
// wrap outer nodes that can implicitly call __toString()
if ($this->needsToStringWrap) {
if ($node instanceof ConcatBinary) {
$this->wrapNode($node, 'left');
$this->wrapNode($node, 'right');
}
if ($node instanceof FilterExpression) {
$this->wrapNode($node, 'node');
$this->wrapArrayNode($node, 'arguments');
}
if ($node instanceof FunctionExpression) {
$this->wrapArrayNode($node, 'arguments');
}
}
}
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$this->inAModule = false;
$node->getNode('constructor_end')->setNode('_security_check',
new Node([new CheckSecurityNode($this->filters, $this->tags,
$this->functions), $node->getNode('display_start')]));
} elseif ($this->inAModule) {
if ($node instanceof PrintNode || $node instanceof SetNode) {
$this->needsToStringWrap = false;
}
}
return $node;
}
private function wrapNode(Node $node, $name)
{
$expr = $node->getNode($name);
if ($expr instanceof NameExpression || $expr instanceof
GetAttrExpression) {
$node->setNode($name, new CheckToStringNode($expr));
}
}
private function wrapArrayNode(Node $node, $name)
{
$args = $node->getNode($name);
foreach ($args as $name => $_) {
$this->wrapNode($args, $name);
}
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\NodeVisitor\SandboxNodeVisitor',
'Twig_NodeVisitor_Sandbox');
PK��[(�lt�5�5twig/src/Parser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
use Twig\Node\BlockNode;
use Twig\Node\BlockReferenceNode;
use Twig\Node\BodyNode;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\MacroNode;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\Node\NodeCaptureInterface;
use Twig\Node\NodeOutputInterface;
use Twig\Node\PrintNode;
use Twig\Node\TextNode;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\TokenParser\TokenParserInterface;
/**
* Default parser implementation.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Parser implements \Twig_ParserInterface
{
protected $stack = [];
protected $stream;
protected $parent;
protected $handlers;
protected $visitors;
protected $expressionParser;
protected $blocks;
protected $blockStack;
protected $macros;
protected $env;
protected $reservedMacroNames;
protected $importedSymbols;
protected $traits;
protected $embeddedTemplates = [];
private $varNameSalt = 0;
public function __construct(Environment $env)
{
$this->env = $env;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getEnvironment()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0.',
E_USER_DEPRECATED);
return $this->env;
}
public function getVarName()
{
return sprintf('__internal_%s', hash('sha256',
__METHOD__.$this->stream->getSourceContext()->getCode().$this->varNameSalt++));
}
/**
* @deprecated since 1.27 (to be removed in 2.0). Use
$parser->getStream()->getSourceContext()->getPath() instead.
*/
public function getFilename()
{
@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);
return $this->stream->getSourceContext()->getName();
}
public function parse(TokenStream $stream, $test = null, $dropNeedle =
false)
{
// push all variables into the stack to keep the current state of
the parser
// using get_object_vars() instead of foreach would lead to
https://bugs.php.net/71336
// This hack can be removed when min version if PHP 7.0
$vars = [];
foreach ($this as $k => $v) {
$vars[$k] = $v;
}
unset($vars['stack'], $vars['env'],
$vars['handlers'], $vars['visitors'],
$vars['expressionParser'],
$vars['reservedMacroNames']);
$this->stack[] = $vars;
// tag handlers
if (null === $this->handlers) {
$this->handlers = $this->env->getTokenParsers();
$this->handlers->setParser($this);
}
// node visitors
if (null === $this->visitors) {
$this->visitors = $this->env->getNodeVisitors();
}
if (null === $this->expressionParser) {
$this->expressionParser = new ExpressionParser($this,
$this->env);
}
$this->stream = $stream;
$this->parent = null;
$this->blocks = [];
$this->macros = [];
$this->traits = [];
$this->blockStack = [];
$this->importedSymbols = [[]];
$this->embeddedTemplates = [];
$this->varNameSalt = 0;
try {
$body = $this->subparse($test, $dropNeedle);
if (null !== $this->parent && null === $body =
$this->filterBodyNodes($body)) {
$body = new Node();
}
} catch (SyntaxError $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->stream->getSourceContext());
}
if (!$e->getTemplateLine()) {
$e->setTemplateLine($this->stream->getCurrent()->getLine());
}
throw $e;
}
$node = new ModuleNode(new BodyNode([$body]), $this->parent, new
Node($this->blocks), new Node($this->macros), new
Node($this->traits), $this->embeddedTemplates,
$stream->getSourceContext());
$traverser = new NodeTraverser($this->env, $this->visitors);
$node = $traverser->traverse($node);
// restore previous stack so previous parse() call can resume
working
foreach (array_pop($this->stack) as $key => $val) {
$this->$key = $val;
}
return $node;
}
public function subparse($test, $dropNeedle = false)
{
$lineno = $this->getCurrentToken()->getLine();
$rv = [];
while (!$this->stream->isEOF()) {
switch ($this->getCurrentToken()->getType()) {
case Token::TEXT_TYPE:
$token = $this->stream->next();
$rv[] = new TextNode($token->getValue(),
$token->getLine());
break;
case Token::VAR_START_TYPE:
$token = $this->stream->next();
$expr =
$this->expressionParser->parseExpression();
$this->stream->expect(Token::VAR_END_TYPE);
$rv[] = new PrintNode($expr, $token->getLine());
break;
case Token::BLOCK_START_TYPE:
$this->stream->next();
$token = $this->getCurrentToken();
if (Token::NAME_TYPE !== $token->getType()) {
throw new SyntaxError('A block must start with
a tag name.', $token->getLine(),
$this->stream->getSourceContext());
}
if (null !== $test && \call_user_func($test,
$token)) {
if ($dropNeedle) {
$this->stream->next();
}
if (1 === \count($rv)) {
return $rv[0];
}
return new Node($rv, [], $lineno);
}
$subparser =
$this->handlers->getTokenParser($token->getValue());
if (null === $subparser) {
if (null !== $test) {
$e = new SyntaxError(sprintf('Unexpected
"%s" tag', $token->getValue()), $token->getLine(),
$this->stream->getSourceContext());
if (\is_array($test) && isset($test[0])
&& $test[0] instanceof TokenParserInterface) {
$e->appendMessage(sprintf('
(expecting closing tag for the "%s" tag defined near line
%s).', $test[0]->getTag(), $lineno));
}
} else {
$e = new SyntaxError(sprintf('Unknown
"%s" tag.', $token->getValue()), $token->getLine(),
$this->stream->getSourceContext());
$e->addSuggestions($token->getValue(),
array_keys($this->env->getTags()));
}
throw $e;
}
$this->stream->next();
$node = $subparser->parse($token);
if (null !== $node) {
$rv[] = $node;
}
break;
default:
throw new SyntaxError('Lexer or parser ended up in
unsupported state.', $this->getCurrentToken()->getLine(),
$this->stream->getSourceContext());
}
}
if (1 === \count($rv)) {
return $rv[0];
}
return new Node($rv, [], $lineno);
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function addHandler($name, $class)
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0.',
E_USER_DEPRECATED);
$this->handlers[$name] = $class;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function addNodeVisitor(NodeVisitorInterface $visitor)
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0.',
E_USER_DEPRECATED);
$this->visitors[] = $visitor;
}
public function getBlockStack()
{
return $this->blockStack;
}
public function peekBlockStack()
{
return isset($this->blockStack[\count($this->blockStack) -
1]) ? $this->blockStack[\count($this->blockStack) - 1] : null;
}
public function popBlockStack()
{
array_pop($this->blockStack);
}
public function pushBlockStack($name)
{
$this->blockStack[] = $name;
}
public function hasBlock($name)
{
return isset($this->blocks[$name]);
}
public function getBlock($name)
{
return $this->blocks[$name];
}
public function setBlock($name, BlockNode $value)
{
$this->blocks[$name] = new BodyNode([$value], [],
$value->getTemplateLine());
}
public function hasMacro($name)
{
return isset($this->macros[$name]);
}
public function setMacro($name, MacroNode $node)
{
if ($this->isReservedMacroName($name)) {
throw new SyntaxError(sprintf('"%s" cannot be
used as a macro name as it is a reserved keyword.', $name),
$node->getTemplateLine(), $this->stream->getSourceContext());
}
$this->macros[$name] = $node;
}
public function isReservedMacroName($name)
{
if (null === $this->reservedMacroNames) {
$this->reservedMacroNames = [];
$r = new
\ReflectionClass($this->env->getBaseTemplateClass());
foreach ($r->getMethods() as $method) {
$methodName = strtr($method->getName(),
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz');
if ('get' === substr($methodName, 0, 3)
&& isset($methodName[3])) {
$this->reservedMacroNames[] = substr($methodName,
3);
}
}
}
return \in_array(strtr($name,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz'), $this->reservedMacroNames);
}
public function addTrait($trait)
{
$this->traits[] = $trait;
}
public function hasTraits()
{
return \count($this->traits) > 0;
}
public function embedTemplate(ModuleNode $template)
{
$template->setIndex(mt_rand());
$this->embeddedTemplates[] = $template;
}
public function addImportedSymbol($type, $alias, $name = null,
AbstractExpression $node = null)
{
$this->importedSymbols[0][$type][$alias] = ['name'
=> $name, 'node' => $node];
}
public function getImportedSymbol($type, $alias)
{
if (null !== $this->peekBlockStack()) {
foreach ($this->importedSymbols as $functions) {
if (isset($functions[$type][$alias])) {
if (\count($this->blockStack) > 1) {
return null;
}
return $functions[$type][$alias];
}
}
} else {
return isset($this->importedSymbols[0][$type][$alias]) ?
$this->importedSymbols[0][$type][$alias] : null;
}
}
public function isMainScope()
{
return 1 === \count($this->importedSymbols);
}
public function pushLocalScope()
{
array_unshift($this->importedSymbols, []);
}
public function popLocalScope()
{
array_shift($this->importedSymbols);
}
/**
* @return ExpressionParser
*/
public function getExpressionParser()
{
return $this->expressionParser;
}
public function getParent()
{
return $this->parent;
}
public function setParent($parent)
{
$this->parent = $parent;
}
/**
* @return TokenStream
*/
public function getStream()
{
return $this->stream;
}
/**
* @return Token
*/
public function getCurrentToken()
{
return $this->stream->getCurrent();
}
protected function filterBodyNodes(\Twig_NodeInterface $node)
{
// check that the body does not contain non-empty output nodes
if (
($node instanceof TextNode &&
!ctype_space($node->getAttribute('data')))
||
(!$node instanceof TextNode && !$node instanceof
BlockReferenceNode && $node instanceof NodeOutputInterface)
) {
if (false !== strpos((string) $node,
\chr(0xEF).\chr(0xBB).\chr(0xBF))) {
$t = substr($node->getAttribute('data'), 3);
if ('' === $t || ctype_space($t)) {
// bypass empty nodes starting with a BOM
return;
}
}
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());
}
// bypass nodes that will "capture" the output
if ($node instanceof NodeCaptureInterface) {
return $node;
}
if ($node instanceof NodeOutputInterface) {
return;
}
foreach ($node as $k => $n) {
if (null !== $n && null ===
$this->filterBodyNodes($n)) {
$node->removeNode($k);
}
}
return $node;
}
}
class_alias('Twig\Parser', 'Twig_Parser');
PK��[F�����'twig/src/Profiler/Dumper/BaseDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class BaseDumper
{
private $root;
public function dump(Profile $profile)
{
return $this->dumpProfile($profile);
}
abstract protected function formatTemplate(Profile $profile, $prefix);
abstract protected function formatNonTemplate(Profile $profile,
$prefix);
abstract protected function formatTime(Profile $profile, $percent);
private function dumpProfile(Profile $profile, $prefix = '',
$sibling = false)
{
if ($profile->isRoot()) {
$this->root = $profile->getDuration();
$start = $profile->getName();
} else {
if ($profile->isTemplate()) {
$start = $this->formatTemplate($profile, $prefix);
} else {
$start = $this->formatNonTemplate($profile, $prefix);
}
$prefix .= $sibling ? '│ ' : ' ';
}
$percent = $this->root ? $profile->getDuration() /
$this->root * 100 : 0;
if ($profile->getDuration() * 1000 < 1) {
$str = $start."\n";
} else {
$str = sprintf("%s %s\n", $start,
$this->formatTime($profile, $percent));
}
$nCount = \count($profile->getProfiles());
foreach ($profile as $i => $p) {
$str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount);
}
return $str;
}
}
class_alias('Twig\Profiler\Dumper\BaseDumper',
'Twig_Profiler_Dumper_Base');
PK��[6)P!,twig/src/Profiler/Dumper/BlackfireDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class BlackfireDumper
{
public function dump(Profile $profile)
{
$data = [];
$this->dumpProfile('main()', $profile, $data);
$this->dumpChildren('main()', $profile, $data);
$start = sprintf('%f', microtime(true));
$str = <<<EOF
file-format: BlackfireProbe
cost-dimensions: wt mu pmu
request-start: {$start}
EOF;
foreach ($data as $name => $values) {
$str .= "{$name}//{$values['ct']}
{$values['wt']} {$values['mu']}
{$values['pmu']}\n";
}
return $str;
}
private function dumpChildren($parent, Profile $profile, &$data)
{
foreach ($profile as $p) {
if ($p->isTemplate()) {
$name = $p->getTemplate();
} else {
$name = sprintf('%s::%s(%s)',
$p->getTemplate(), $p->getType(), $p->getName());
}
$this->dumpProfile(sprintf('%s==>%s', $parent,
$name), $p, $data);
$this->dumpChildren($name, $p, $data);
}
}
private function dumpProfile($edge, Profile $profile, &$data)
{
if (isset($data[$edge])) {
++$data[$edge]['ct'];
$data[$edge]['wt'] +=
floor($profile->getDuration() * 1000000);
$data[$edge]['mu'] += $profile->getMemoryUsage();
$data[$edge]['pmu'] +=
$profile->getPeakMemoryUsage();
} else {
$data[$edge] = [
'ct' => 1,
'wt' => floor($profile->getDuration() *
1000000),
'mu' => $profile->getMemoryUsage(),
'pmu' => $profile->getPeakMemoryUsage(),
];
}
}
}
class_alias('Twig\Profiler\Dumper\BlackfireDumper',
'Twig_Profiler_Dumper_Blackfire');
PK��[������'twig/src/Profiler/Dumper/HtmlDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class HtmlDumper extends BaseDumper
{
private static $colors = [
'block' => '#dfd',
'macro' => '#ddf',
'template' => '#ffd',
'big' => '#d44',
];
public function dump(Profile $profile)
{
return
'<pre>'.parent::dump($profile).'</pre>';
}
protected function formatTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ <span style="background-color:
%s">%s</span>', $prefix,
self::$colors['template'], $profile->getTemplate());
}
protected function formatNonTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ %s::%s(<span
style="background-color: %s">%s</span>)', $prefix,
$profile->getTemplate(), $profile->getType(),
isset(self::$colors[$profile->getType()]) ?
self::$colors[$profile->getType()] : 'auto',
$profile->getName());
}
protected function formatTime(Profile $profile, $percent)
{
return sprintf('<span style="color:
%s">%.2fms/%.0f%%</span>', $percent > 20 ?
self::$colors['big'] : 'auto',
$profile->getDuration() * 1000, $percent);
}
}
class_alias('Twig\Profiler\Dumper\HtmlDumper',
'Twig_Profiler_Dumper_Html');
PK��[�C��'twig/src/Profiler/Dumper/TextDumper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Dumper;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class TextDumper extends BaseDumper
{
protected function formatTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ %s', $prefix,
$profile->getTemplate());
}
protected function formatNonTemplate(Profile $profile, $prefix)
{
return sprintf('%s└ %s::%s(%s)', $prefix,
$profile->getTemplate(), $profile->getType(),
$profile->getName());
}
protected function formatTime(Profile $profile, $percent)
{
return sprintf('%.2fms/%.0f%%',
$profile->getDuration() * 1000, $percent);
}
}
class_alias('Twig\Profiler\Dumper\TextDumper',
'Twig_Profiler_Dumper_Text');
PK��[+twig/src/Profiler/Node/EnterProfileNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Node;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents a profile enter node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class EnterProfileNode extends Node
{
public function __construct($extensionName, $type, $name, $varName)
{
parent::__construct([], ['extension_name' =>
$extensionName, 'name' => $name, 'type' => $type,
'var_name' => $varName]);
}
public function compile(Compiler $compiler)
{
$compiler
->write(sprintf('$%s =
$this->env->getExtension(',
$this->getAttribute('var_name')))
->repr($this->getAttribute('extension_name'))
->raw(");\n")
->write(sprintf('$%s->enter($%s = new
\Twig\Profiler\Profile($this->getTemplateName(), ',
$this->getAttribute('var_name'),
$this->getAttribute('var_name').'_prof'))
->repr($this->getAttribute('type'))
->raw(', ')
->repr($this->getAttribute('name'))
->raw("));\n\n")
;
}
}
class_alias('Twig\Profiler\Node\EnterProfileNode',
'Twig_Profiler_Node_EnterProfile');
PK��[QH�VV+twig/src/Profiler/Node/LeaveProfileNode.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\Node;
use Twig\Compiler;
use Twig\Node\Node;
/**
* Represents a profile leave node.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class LeaveProfileNode extends Node
{
public function __construct($varName)
{
parent::__construct([], ['var_name' => $varName]);
}
public function compile(Compiler $compiler)
{
$compiler
->write("\n")
->write(sprintf("\$%s->leave(\$%s);\n\n",
$this->getAttribute('var_name'),
$this->getAttribute('var_name').'_prof'))
;
}
}
class_alias('Twig\Profiler\Node\LeaveProfileNode',
'Twig_Profiler_Node_LeaveProfile');
PK��[6��5s s 5twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler\NodeVisitor;
use Twig\Environment;
use Twig\Node\BlockNode;
use Twig\Node\BodyNode;
use Twig\Node\MacroNode;
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\NodeVisitor\AbstractNodeVisitor;
use Twig\Profiler\Node\EnterProfileNode;
use Twig\Profiler\Node\LeaveProfileNode;
use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class ProfilerNodeVisitor extends AbstractNodeVisitor
{
private $extensionName;
public function __construct($extensionName)
{
$this->extensionName = $extensionName;
}
protected function doEnterNode(Node $node, Environment $env)
{
return $node;
}
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof ModuleNode) {
$varName = $this->getVarName();
$node->setNode('display_start', new Node([new
EnterProfileNode($this->extensionName, Profile::TEMPLATE,
$node->getTemplateName(), $varName),
$node->getNode('display_start')]));
$node->setNode('display_end', new Node([new
LeaveProfileNode($varName), $node->getNode('display_end')]));
} elseif ($node instanceof BlockNode) {
$varName = $this->getVarName();
$node->setNode('body', new BodyNode([
new EnterProfileNode($this->extensionName,
Profile::BLOCK, $node->getAttribute('name'), $varName),
$node->getNode('body'),
new LeaveProfileNode($varName),
]));
} elseif ($node instanceof MacroNode) {
$varName = $this->getVarName();
$node->setNode('body', new BodyNode([
new EnterProfileNode($this->extensionName,
Profile::MACRO, $node->getAttribute('name'), $varName),
$node->getNode('body'),
new LeaveProfileNode($varName),
]));
}
return $node;
}
private function getVarName()
{
return sprintf('__internal_%s', hash('sha256',
$this->extensionName));
}
public function getPriority()
{
return 0;
}
}
class_alias('Twig\Profiler\NodeVisitor\ProfilerNodeVisitor',
'Twig_Profiler_NodeVisitor_Profiler');
PK��[����twig/src/Profiler/Profile.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Profiler;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Profile implements \IteratorAggregate, \Serializable
{
const ROOT = 'ROOT';
const BLOCK = 'block';
const TEMPLATE = 'template';
const MACRO = 'macro';
private $template;
private $name;
private $type;
private $starts = [];
private $ends = [];
private $profiles = [];
public function __construct($template = 'main', $type =
self::ROOT, $name = 'main')
{
$this->template = $template;
$this->type = $type;
$this->name = 0 === strpos($name, '__internal_') ?
'INTERNAL' : $name;
$this->enter();
}
public function getTemplate()
{
return $this->template;
}
public function getType()
{
return $this->type;
}
public function getName()
{
return $this->name;
}
public function isRoot()
{
return self::ROOT === $this->type;
}
public function isTemplate()
{
return self::TEMPLATE === $this->type;
}
public function isBlock()
{
return self::BLOCK === $this->type;
}
public function isMacro()
{
return self::MACRO === $this->type;
}
public function getProfiles()
{
return $this->profiles;
}
public function addProfile(self $profile)
{
$this->profiles[] = $profile;
}
/**
* Returns the duration in microseconds.
*
* @return float
*/
public function getDuration()
{
if ($this->isRoot() && $this->profiles) {
// for the root node with children, duration is the sum of all
child durations
$duration = 0;
foreach ($this->profiles as $profile) {
$duration += $profile->getDuration();
}
return $duration;
}
return isset($this->ends['wt']) &&
isset($this->starts['wt']) ? $this->ends['wt'] -
$this->starts['wt'] : 0;
}
/**
* Returns the memory usage in bytes.
*
* @return int
*/
public function getMemoryUsage()
{
return isset($this->ends['mu']) &&
isset($this->starts['mu']) ? $this->ends['mu'] -
$this->starts['mu'] : 0;
}
/**
* Returns the peak memory usage in bytes.
*
* @return int
*/
public function getPeakMemoryUsage()
{
return isset($this->ends['pmu']) &&
isset($this->starts['pmu']) ? $this->ends['pmu']
- $this->starts['pmu'] : 0;
}
/**
* Starts the profiling.
*/
public function enter()
{
$this->starts = [
'wt' => microtime(true),
'mu' => memory_get_usage(),
'pmu' => memory_get_peak_usage(),
];
}
/**
* Stops the profiling.
*/
public function leave()
{
$this->ends = [
'wt' => microtime(true),
'mu' => memory_get_usage(),
'pmu' => memory_get_peak_usage(),
];
}
public function reset()
{
$this->starts = $this->ends = $this->profiles = [];
$this->enter();
}
public function getIterator()
{
return new \ArrayIterator($this->profiles);
}
public function serialize()
{
return serialize($this->__serialize());
}
public function unserialize($data)
{
$this->__unserialize(unserialize($data));
}
/**
* @internal
*/
public function __serialize()
{
return [$this->template, $this->name, $this->type,
$this->starts, $this->ends, $this->profiles];
}
/**
* @internal
*/
public function __unserialize(array $data)
{
list($this->template, $this->name, $this->type,
$this->starts, $this->ends, $this->profiles) = $data;
}
}
class_alias('Twig\Profiler\Profile',
'Twig_Profiler_Profile');
PK��[����1twig/src/RuntimeLoader/ContainerRuntimeLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\RuntimeLoader;
use Psr\Container\ContainerInterface;
/**
* Lazily loads Twig runtime implementations from a PSR-11 container.
*
* Note that the runtime services MUST use their class names as
identifiers.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Robin Chalas <robin.chalas@gmail.com>
*/
class ContainerRuntimeLoader implements RuntimeLoaderInterface
{
private $container;
public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
public function load($class)
{
if ($this->container->has($class)) {
return $this->container->get($class);
}
}
}
class_alias('Twig\RuntimeLoader\ContainerRuntimeLoader',
'Twig_ContainerRuntimeLoader');
PK��[P͂���/twig/src/RuntimeLoader/FactoryRuntimeLoader.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\RuntimeLoader;
/**
* Lazy loads the runtime implementations for a Twig element.
*
* @author Robin Chalas <robin.chalas@gmail.com>
*/
class FactoryRuntimeLoader implements RuntimeLoaderInterface
{
private $map;
/**
* @param array $map An array where keys are class names and values
factory callables
*/
public function __construct($map = [])
{
$this->map = $map;
}
public function load($class)
{
if (isset($this->map[$class])) {
$runtimeFactory = $this->map[$class];
return $runtimeFactory();
}
}
}
class_alias('Twig\RuntimeLoader\FactoryRuntimeLoader',
'Twig_FactoryRuntimeLoader');
PK��[��ZW111twig/src/RuntimeLoader/RuntimeLoaderInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\RuntimeLoader;
/**
* Creates runtime implementations for Twig elements
(filters/functions/tests).
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface RuntimeLoaderInterface
{
/**
* Creates the runtime implementation of a Twig element
(filter/function/test).
*
* @param string $class A runtime class
*
* @return object|null The runtime instance or null if the loader does
not know how to create the runtime for this class
*/
public function load($class);
}
class_alias('Twig\RuntimeLoader\RuntimeLoaderInterface',
'Twig_RuntimeLoaderInterface');
PK��[�b����"twig/src/Sandbox/SecurityError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
use Twig\Error\Error;
/**
* Exception thrown when a security error occurs at runtime.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SecurityError extends Error
{
}
class_alias('Twig\Sandbox\SecurityError',
'Twig_Sandbox_SecurityError');
PK��[��Y�mm2twig/src/Sandbox/SecurityNotAllowedFilterError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed filter is used in a template.
*
* @author Martin Hasoň <martin.hason@gmail.com>
*/
class SecurityNotAllowedFilterError extends SecurityError
{
private $filterName;
public function __construct($message, $functionName, $lineno = -1,
$filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->filterName = $functionName;
}
public function getFilterName()
{
return $this->filterName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedFilterError',
'Twig_Sandbox_SecurityNotAllowedFilterError');
PK��[�RB�}}4twig/src/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed function is used in a template.
*
* @author Martin Hasoň <martin.hason@gmail.com>
*/
class SecurityNotAllowedFunctionError extends SecurityError
{
private $functionName;
public function __construct($message, $functionName, $lineno = -1,
$filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->functionName = $functionName;
}
public function getFunctionName()
{
return $this->functionName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedFunctionError',
'Twig_Sandbox_SecurityNotAllowedFunctionError');
PK��[�ý�2twig/src/Sandbox/SecurityNotAllowedMethodError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed class method is used in a template.
*
* @author Kit Burton-Senior <mail@kitbs.com>
*/
class SecurityNotAllowedMethodError extends SecurityError
{
private $className;
private $methodName;
public function __construct($message, $className, $methodName, $lineno
= -1, $filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->className = $className;
$this->methodName = $methodName;
}
public function getClassName()
{
return $this->className;
}
public function getMethodName()
{
return $this->methodName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedMethodError',
'Twig_Sandbox_SecurityNotAllowedMethodError');
PK��[X��Y4twig/src/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed class property is used in a
template.
*
* @author Kit Burton-Senior <mail@kitbs.com>
*/
class SecurityNotAllowedPropertyError extends SecurityError
{
private $className;
private $propertyName;
public function __construct($message, $className, $propertyName,
$lineno = -1, $filename = null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->className = $className;
$this->propertyName = $propertyName;
}
public function getClassName()
{
return $this->className;
}
public function getPropertyName()
{
return $this->propertyName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedPropertyError',
'Twig_Sandbox_SecurityNotAllowedPropertyError');
PK��[B��KK/twig/src/Sandbox/SecurityNotAllowedTagError.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Exception thrown when a not allowed tag is used in a template.
*
* @author Martin Hasoň <martin.hason@gmail.com>
*/
class SecurityNotAllowedTagError extends SecurityError
{
private $tagName;
public function __construct($message, $tagName, $lineno = -1, $filename
= null, \Exception $previous = null)
{
parent::__construct($message, $lineno, $filename, $previous);
$this->tagName = $tagName;
}
public function getTagName()
{
return $this->tagName;
}
}
class_alias('Twig\Sandbox\SecurityNotAllowedTagError',
'Twig_Sandbox_SecurityNotAllowedTagError');
PK��[�q�3��#twig/src/Sandbox/SecurityPolicy.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
use Twig\Markup;
/**
* Represents a security policy which need to be enforced when sandbox mode
is enabled.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SecurityPolicy implements SecurityPolicyInterface
{
protected $allowedTags;
protected $allowedFilters;
protected $allowedMethods;
protected $allowedProperties;
protected $allowedFunctions;
public function __construct(array $allowedTags = [], array
$allowedFilters = [], array $allowedMethods = [], array $allowedProperties
= [], array $allowedFunctions = [])
{
$this->allowedTags = $allowedTags;
$this->allowedFilters = $allowedFilters;
$this->setAllowedMethods($allowedMethods);
$this->allowedProperties = $allowedProperties;
$this->allowedFunctions = $allowedFunctions;
}
public function setAllowedTags(array $tags)
{
$this->allowedTags = $tags;
}
public function setAllowedFilters(array $filters)
{
$this->allowedFilters = $filters;
}
public function setAllowedMethods(array $methods)
{
$this->allowedMethods = [];
foreach ($methods as $class => $m) {
$this->allowedMethods[$class] = array_map(function ($value)
{ return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]);
}
}
public function setAllowedProperties(array $properties)
{
$this->allowedProperties = $properties;
}
public function setAllowedFunctions(array $functions)
{
$this->allowedFunctions = $functions;
}
public function checkSecurity($tags, $filters, $functions)
{
foreach ($tags as $tag) {
if (!\in_array($tag, $this->allowedTags)) {
throw new SecurityNotAllowedTagError(sprintf('Tag
"%s" is not allowed.', $tag), $tag);
}
}
foreach ($filters as $filter) {
if (!\in_array($filter, $this->allowedFilters)) {
throw new
SecurityNotAllowedFilterError(sprintf('Filter "%s" is not
allowed.', $filter), $filter);
}
}
foreach ($functions as $function) {
if (!\in_array($function, $this->allowedFunctions)) {
throw new
SecurityNotAllowedFunctionError(sprintf('Function "%s" is
not allowed.', $function), $function);
}
}
}
public function checkMethodAllowed($obj, $method)
{
if ($obj instanceof \Twig_TemplateInterface || $obj instanceof
Markup) {
return;
}
$allowed = false;
$method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz');
foreach ($this->allowedMethods as $class => $methods) {
if ($obj instanceof $class) {
$allowed = \in_array($method, $methods);
break;
}
}
if (!$allowed) {
$class = \get_class($obj);
throw new SecurityNotAllowedMethodError(sprintf('Calling
"%s" method on a "%s" object is not allowed.',
$method, $class), $class, $method);
}
}
public function checkPropertyAllowed($obj, $property)
{
$allowed = false;
foreach ($this->allowedProperties as $class => $properties) {
if ($obj instanceof $class) {
$allowed = \in_array($property, \is_array($properties) ?
$properties : [$properties]);
break;
}
}
if (!$allowed) {
$class = \get_class($obj);
throw new SecurityNotAllowedPropertyError(sprintf('Calling
"%s" property on a "%s" object is not allowed.',
$property, $class), $class, $property);
}
}
}
class_alias('Twig\Sandbox\SecurityPolicy',
'Twig_Sandbox_SecurityPolicy');
PK��[��"C��,twig/src/Sandbox/SecurityPolicyInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Sandbox;
/**
* Interface that all security policy classes must implements.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface SecurityPolicyInterface
{
public function checkSecurity($tags, $filters, $functions);
public function checkMethodAllowed($obj, $method);
public function checkPropertyAllowed($obj, $method);
}
class_alias('Twig\Sandbox\SecurityPolicyInterface',
'Twig_Sandbox_SecurityPolicyInterface');
PK��[���twig/src/Source.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Holds information about a non-compiled Twig template.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Source
{
private $code;
private $name;
private $path;
/**
* @param string $code The template source code
* @param string $name The template logical name
* @param string $path The filesystem path of the template if any
*/
public function __construct($code, $name, $path = '')
{
$this->code = $code;
$this->name = $name;
$this->path = $path;
}
public function getCode()
{
return $this->code;
}
public function getName()
{
return $this->name;
}
public function getPath()
{
return $this->path;
}
}
class_alias('Twig\Source', 'Twig_Source');
PK��[q�A3sdsdtwig/src/Template.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\Error;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
/**
* Default base class for compiled templates.
*
* This class is an implementation detail of how template compilation
currently
* works, which might change. It should never be used directly. Use
$twig->load()
* instead, which returns an instance of \Twig\TemplateWrapper.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @internal
*/
abstract class Template implements \Twig_TemplateInterface
{
/**
* @internal
*/
protected static $cache = [];
protected $parent;
protected $parents = [];
protected $env;
protected $blocks = [];
protected $traits = [];
protected $sandbox;
public function __construct(Environment $env)
{
$this->env = $env;
}
/**
* @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
*/
public function __toString()
{
return $this->getTemplateName();
}
/**
* Returns the template name.
*
* @return string The template name
*/
abstract public function getTemplateName();
/**
* Returns debug information about the template.
*
* @return array Debug information
*/
public function getDebugInfo()
{
return [];
}
/**
* Returns the template source code.
*
* @return string The template source code
*
* @deprecated since 1.27 (to be removed in 2.0). Use
getSourceContext() instead
*/
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.27 and will be removed in 2.0. Use
getSourceContext() instead.', E_USER_DEPRECATED);
return '';
}
/**
* Returns information about the original template source code.
*
* @return Source
*/
public function getSourceContext()
{
return new Source('', $this->getTemplateName());
}
/**
* @deprecated since 1.20 (to be removed in 2.0)
*/
public function getEnvironment()
{
@trigger_error('The '.__METHOD__.' method is
deprecated since version 1.20 and will be removed in 2.0.',
E_USER_DEPRECATED);
return $this->env;
}
/**
* Returns the parent template.
*
* This method is for internal use only and should never be called
* directly.
*
* @param array $context
*
* @return \Twig_TemplateInterface|TemplateWrapper|false The parent
template or false if there is no parent
*
* @internal
*/
public function getParent(array $context)
{
if (null !== $this->parent) {
return $this->parent;
}
try {
$parent = $this->doGetParent($context);
if (false === $parent) {
return false;
}
if ($parent instanceof self || $parent instanceof
TemplateWrapper) {
return
$this->parents[$parent->getSourceContext()->getName()] = $parent;
}
if (!isset($this->parents[$parent])) {
$this->parents[$parent] =
$this->loadTemplate($parent);
}
} catch (LoaderError $e) {
$e->setSourceContext(null);
$e->guess();
throw $e;
}
return $this->parents[$parent];
}
protected function doGetParent(array $context)
{
return false;
}
public function isTraitable()
{
return true;
}
/**
* Displays a parent block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to display from the parent
* @param array $context The context
* @param array $blocks The current set of blocks
*/
public function displayParentBlock($name, array $context, array $blocks
= [])
{
$name = (string) $name;
if (isset($this->traits[$name])) {
$this->traits[$name][0]->displayBlock($name, $context,
$blocks, false);
} elseif (false !== $parent = $this->getParent($context)) {
$parent->displayBlock($name, $context, $blocks, false);
} else {
throw new RuntimeError(sprintf('The template has no parent
and no traits defining the "%s" block.', $name), -1,
$this->getSourceContext());
}
}
/**
* Displays a block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to display
* @param array $context The context
* @param array $blocks The current set of blocks
* @param bool $useBlocks Whether to use the current set of blocks
*/
public function displayBlock($name, array $context, array $blocks = [],
$useBlocks = true)
{
$name = (string) $name;
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a
\Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError
exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been
thrown during the rendering of a template ("%s").',
$e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif (false !== $parent = $this->getParent($context)) {
$parent->displayBlock($name, $context,
array_merge($this->blocks, $blocks), false);
} else {
@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);
}
}
/**
* Renders a parent block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to render from the parent
* @param array $context The context
* @param array $blocks The current set of blocks
*
* @return string The rendered block
*/
public function renderParentBlock($name, array $context, array $blocks
= [])
{
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
$this->displayParentBlock($name, $context, $blocks);
return ob_get_clean();
}
/**
* Renders a block.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The block name to render
* @param array $context The context
* @param array $blocks The current set of blocks
* @param bool $useBlocks Whether to use the current set of blocks
*
* @return string The rendered block
*/
public function renderBlock($name, array $context, array $blocks = [],
$useBlocks = true)
{
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
$this->displayBlock($name, $context, $blocks, $useBlocks);
return ob_get_clean();
}
/**
* Returns whether a block exists or not in the current context of the
template.
*
* This method checks blocks defined in the current template
* or defined in "used" traits or defined in parent
templates.
*
* @param string $name The block name
* @param array $context The context
* @param array $blocks The current set of blocks
*
* @return bool true if the block exists, false otherwise
*/
public function hasBlock($name, array $context = null, array $blocks =
[])
{
if (null === $context) {
@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);
return isset($this->blocks[(string) $name]);
}
if (isset($blocks[$name])) {
return $blocks[$name][0] instanceof self;
}
if (isset($this->blocks[$name])) {
return true;
}
if (false !== $parent = $this->getParent($context)) {
return $parent->hasBlock($name, $context);
}
return false;
}
/**
* Returns all block names in the current context of the template.
*
* This method checks blocks defined in the current template
* or defined in "used" traits or defined in parent
templates.
*
* @param array $context The context
* @param array $blocks The current set of blocks
*
* @return array An array of block names
*/
public function getBlockNames(array $context = null, array $blocks =
[])
{
if (null === $context) {
@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);
return array_keys($this->blocks);
}
$names = array_merge(array_keys($blocks),
array_keys($this->blocks));
if (false !== $parent = $this->getParent($context)) {
$names = array_merge($names,
$parent->getBlockNames($context));
}
return array_unique($names);
}
/**
* @return Template|TemplateWrapper
*/
protected function loadTemplate($template, $templateName = null, $line
= null, $index = null)
{
try {
if (\is_array($template)) {
return $this->env->resolveTemplate($template);
}
if ($template instanceof self || $template instanceof
TemplateWrapper) {
return $template;
}
if ($template === $this->getTemplateName()) {
$class = \get_class($this);
if (false !== $pos = strrpos($class, '___', -1))
{
$class = substr($class, 0, $pos);
}
return $this->env->loadClass($class, $template,
$index);
}
return $this->env->loadTemplate($template, $index);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($templateName ? new
Source('', $templateName) : $this->getSourceContext());
}
if ($e->getTemplateLine() > 0) {
throw $e;
}
if (!$line) {
$e->guess();
} else {
$e->setTemplateLine($line);
}
throw $e;
}
}
/**
* @internal
*
* @return Template
*/
protected function unwrap()
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context),
array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array
$blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been
thrown during the rendering of a template ("%s").',
$e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/**
* Auto-generated method to display the template with the given
context.
*
* @param array $context An array of parameters to pass to the template
* @param array $blocks An array of blocks to pass to the template
*/
abstract protected function doDisplay(array $context, array $blocks =
[]);
/**
* Returns a variable from the context.
*
* This method is for internal use only and should never be called
* directly.
*
* This method should not be overridden in a sub-class as this is an
* implementation detail that has been introduced to optimize variable
* access for versions of PHP before 5.4. This is not a way to override
* the way to get a variable value.
*
* @param array $context The context
* @param string $item The variable to return from the
context
* @param bool $ignoreStrictCheck Whether to ignore the strict
variable check or not
*
* @return mixed The content of the context variable
*
* @throws RuntimeError if the variable does not exist and Twig is
running in strict mode
*
* @internal
*/
final protected function getContext($context, $item, $ignoreStrictCheck
= false)
{
if (!\array_key_exists($item, $context)) {
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
throw new RuntimeError(sprintf('Variable "%s"
does not exist.', $item), -1, $this->getSourceContext());
}
return $context[$item];
}
/**
* Returns the attribute value for a given array/object.
*
* @param mixed $object The object or array from where to
get the item
* @param mixed $item The item to get from the array or
object
* @param array $arguments An array of arguments to pass if
the item is an object method
* @param string $type The type of attribute (@see
\Twig\Template constants)
* @param bool $isDefinedTest Whether this is only a defined
check
* @param bool $ignoreStrictCheck Whether to ignore the strict
attribute check or not
*
* @return mixed The attribute value, or a Boolean when $isDefinedTest
is true, or null when the attribute is not set and $ignoreStrictCheck is
true
*
* @throws RuntimeError if the attribute does not exist and Twig is
running in strict mode and $isDefinedTest is false
*
* @internal
*/
protected function getAttribute($object, $item, array $arguments = [],
$type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false)
{
// array
if (self::METHOD_CALL !== $type) {
$arrayItem = \is_bool($item) || \is_float($item) ? (int) $item
: $item;
if (((\is_array($object) || $object instanceof \ArrayObject)
&& (isset($object[$arrayItem]) || \array_key_exists($arrayItem,
(array) $object)))
|| ($object instanceof \ArrayAccess &&
isset($object[$arrayItem]))
) {
if ($isDefinedTest) {
return true;
}
return $object[$arrayItem];
}
if (self::ARRAY_CALL === $type || !\is_object($object)) {
if ($isDefinedTest) {
return false;
}
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
if ($object instanceof \ArrayAccess) {
$message = sprintf('Key "%s" in object
with ArrayAccess of class "%s" does not exist.', $arrayItem,
\get_class($object));
} elseif (\is_object($object)) {
$message = sprintf('Impossible to access a key
"%s" on an object of class "%s" that does not implement
ArrayAccess interface.', $item, \get_class($object));
} elseif (\is_array($object)) {
if (empty($object)) {
$message = sprintf('Key "%s" does
not exist as the array is empty.', $arrayItem);
} else {
$message = sprintf('Key "%s" for
array with keys "%s" does not exist.', $arrayItem,
implode(', ', array_keys($object)));
}
} elseif (self::ARRAY_CALL === $type) {
if (null === $object) {
$message = sprintf('Impossible to access a key
("%s") on a null variable.', $item);
} else {
$message = sprintf('Impossible to access a key
("%s") on a %s variable ("%s").', $item,
\gettype($object), $object);
}
} elseif (null === $object) {
$message = sprintf('Impossible to access an
attribute ("%s") on a null variable.', $item);
} else {
$message = sprintf('Impossible to access an
attribute ("%s") on a %s variable ("%s").', $item,
\gettype($object), $object);
}
throw new RuntimeError($message, -1,
$this->getSourceContext());
}
}
if (!\is_object($object)) {
if ($isDefinedTest) {
return false;
}
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
if (null === $object) {
$message = sprintf('Impossible to invoke a method
("%s") on a null variable.', $item);
} elseif (\is_array($object)) {
$message = sprintf('Impossible to invoke a method
("%s") on an array.', $item);
} else {
$message = sprintf('Impossible to invoke a method
("%s") on a %s variable ("%s").', $item,
\gettype($object), $object);
}
throw new RuntimeError($message, -1,
$this->getSourceContext());
}
// object property
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
if (isset($object->$item) || \array_key_exists((string)
$item, (array) $object)) {
if ($isDefinedTest) {
return true;
}
if
($this->env->hasExtension('\Twig\Extension\SandboxExtension'))
{
$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkPropertyAllowed($object,
$item);
}
return $object->$item;
}
}
$class = \get_class($object);
// object method
if (!isset(self::$cache[$class])) {
// get_class_methods returns all methods accessible in the
scope, but we only want public ones to be accessible in templates
if ($object instanceof self) {
$ref = new \ReflectionClass($class);
$methods = [];
foreach ($ref->getMethods(\ReflectionMethod::IS_PUBLIC)
as $refMethod) {
// Accessing the environment from templates is
forbidden to prevent untrusted changes to the environment
if ('getenvironment' !==
strtr($refMethod->name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')) {
$methods[] = $refMethod->name;
}
}
} else {
$methods = get_class_methods($object);
}
// sort values to have consistent behavior, so that
"get" methods win precedence over "is" methods
sort($methods);
$cache = [];
foreach ($methods as $method) {
$cache[$method] = $method;
$cache[$lcName = strtr($method,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')] = $method;
if ('g' === $lcName[0] && 0 ===
strpos($lcName, 'get')) {
$name = substr($method, 3);
$lcName = substr($lcName, 3);
} elseif ('i' === $lcName[0] && 0 ===
strpos($lcName, 'is')) {
$name = substr($method, 2);
$lcName = substr($lcName, 2);
} else {
continue;
}
// skip get() and is() methods (in which case, $name is
empty)
if ($name) {
if (!isset($cache[$name])) {
$cache[$name] = $method;
}
if (!isset($cache[$lcName])) {
$cache[$lcName] = $method;
}
}
}
self::$cache[$class] = $cache;
}
$call = false;
if (isset(self::$cache[$class][$item])) {
$method = self::$cache[$class][$item];
} elseif (isset(self::$cache[$class][$lcItem = strtr($item,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')])) {
$method = self::$cache[$class][$lcItem];
} elseif (isset(self::$cache[$class]['__call'])) {
$method = $item;
$call = true;
} else {
if ($isDefinedTest) {
return false;
}
if ($ignoreStrictCheck ||
!$this->env->isStrictVariables()) {
return;
}
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());
}
if ($isDefinedTest) {
return true;
}
if
($this->env->hasExtension('\Twig\Extension\SandboxExtension'))
{
$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object,
$method);
}
// Some objects throw exceptions when they have __call, and the
method we try
// to call is not supported. If ignoreStrictCheck is true, we
should return null.
try {
if (!$arguments) {
$ret = $object->$method();
} else {
$ret = \call_user_func_array([$object, $method],
$arguments);
}
} catch (\BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck ||
!$this->env->isStrictVariables())) {
return;
}
throw $e;
}
// @deprecated in 1.28
if ($object instanceof \Twig_TemplateInterface) {
$self = $object->getTemplateName() ===
$this->getTemplateName();
$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());
if ('renderBlock' === $method ||
'displayBlock' === $method) {
$message .= sprintf(' Use block("%s"%s)
instead).', $arguments[0], $self ? '' : ',
template');
} elseif ('hasBlock' === $method) {
$message .= sprintf(' Use
"block("%s"%s) is defined" instead).',
$arguments[0], $self ? '' : ', template');
} elseif ('render' === $method || 'display'
=== $method) {
$message .= sprintf(' Use include("%s")
instead).', $object->getTemplateName());
}
@trigger_error($message, E_USER_DEPRECATED);
return '' === $ret ? '' : new Markup($ret,
$this->env->getCharset());
}
return $ret;
}
}
class_alias('Twig\Template', 'Twig_Template');
PK��[�P�՞�twig/src/TemplateWrapper.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Exposes a template to userland.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
final class TemplateWrapper
{
private $env;
private $template;
/**
* This method is for internal use only and should never be called
* directly (use Twig\Environment::load() instead).
*
* @internal
*/
public function __construct(Environment $env, Template $template)
{
$this->env = $env;
$this->template = $template;
}
/**
* Renders the template.
*
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*/
public function render($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_num_args()
> 1 ? func_get_arg(1) : []);
}
/**
* Displays the template.
*
* @param array $context An array of parameters to pass to the template
*/
public function display($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_num_args() > 1 ?
func_get_arg(1) : []);
}
/**
* Checks if a block is defined.
*
* @param string $name The block name
* @param array $context An array of parameters to pass to the
template
*
* @return bool
*/
public function hasBlock($name, $context = [])
{
return $this->template->hasBlock($name, $context);
}
/**
* Returns defined block names in the template.
*
* @param array $context An array of parameters to pass to the template
*
* @return string[] An array of defined template block names
*/
public function getBlockNames($context = [])
{
return $this->template->getBlockNames($context);
}
/**
* Renders a template block.
*
* @param string $name The block name to render
* @param array $context An array of parameters to pass to the
template
*
* @return string The rendered block
*/
public function renderBlock($name, $context = [])
{
$context = $this->env->mergeGlobals($context);
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->template->displayBlock($name, $context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
/**
* Displays a template block.
*
* @param string $name The block name to render
* @param array $context An array of parameters to pass to the
template
*/
public function displayBlock($name, $context = [])
{
$this->template->displayBlock($name,
$this->env->mergeGlobals($context));
}
/**
* @return Source
*/
public function getSourceContext()
{
return $this->template->getSourceContext();
}
/**
* @return string
*/
public function getTemplateName()
{
return $this->template->getTemplateName();
}
/**
* @internal
*
* @return Template
*/
public function unwrap()
{
return $this->template;
}
}
class_alias('Twig\TemplateWrapper',
'Twig_TemplateWrapper');
PK��[?yL!!%twig/src/Test/IntegrationTestCase.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Test;
use PHPUnit\Framework\TestCase;
use Twig\Environment;
use Twig\Error\Error;
use Twig\Extension\ExtensionInterface;
use Twig\Loader\ArrayLoader;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\RuntimeLoader\RuntimeLoaderInterface;
use Twig\Source;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\TwigTest;
/**
* Integration test helper.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Karma Dordrak <drak@zikula.org>
*/
abstract class IntegrationTestCase extends TestCase
{
/**
* @return string
*/
abstract protected function getFixturesDir();
/**
* @return RuntimeLoaderInterface[]
*/
protected function getRuntimeLoaders()
{
return [];
}
/**
* @return ExtensionInterface[]
*/
protected function getExtensions()
{
return [];
}
/**
* @return TwigFilter[]
*/
protected function getTwigFilters()
{
return [];
}
/**
* @return TwigFunction[]
*/
protected function getTwigFunctions()
{
return [];
}
/**
* @return TwigTest[]
*/
protected function getTwigTests()
{
return [];
}
/**
* @dataProvider getTests
*/
public function testIntegration($file, $message, $condition,
$templates, $exception, $outputs)
{
$this->doIntegrationTest($file, $message, $condition,
$templates, $exception, $outputs);
}
/**
* @dataProvider getLegacyTests
* @group legacy
*/
public function testLegacyIntegration($file, $message, $condition,
$templates, $exception, $outputs)
{
$this->doIntegrationTest($file, $message, $condition,
$templates, $exception, $outputs);
}
public function getTests($name, $legacyTests = false)
{
$fixturesDir = realpath($this->getFixturesDir());
$tests = [];
foreach (new \RecursiveIteratorIterator(new
\RecursiveDirectoryIterator($fixturesDir),
\RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
if (!preg_match('/\.test$/', $file)) {
continue;
}
if ($legacyTests xor false !== strpos($file->getRealpath(),
'.legacy.test')) {
continue;
}
$test = file_get_contents($file->getRealpath());
if
(preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx',
$test, $match)) {
$message = $match[1];
$condition = $match[2];
$templates = self::parseTemplates($match[3]);
$exception = $match[5];
$outputs = [[null, $match[4], null, '']];
} elseif
(preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s',
$test, $match)) {
$message = $match[1];
$condition = $match[2];
$templates = self::parseTemplates($match[3]);
$exception = false;
preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s',
$test, $outputs, PREG_SET_ORDER);
} else {
throw new \InvalidArgumentException(sprintf('Test
"%s" is not valid.', str_replace($fixturesDir.'/',
'', $file)));
}
$tests[] = [str_replace($fixturesDir.'/',
'', $file), $message, $condition, $templates, $exception,
$outputs];
}
if ($legacyTests && empty($tests)) {
// add a dummy test to avoid a PHPUnit message
return [['not', '-', '', [],
'', []]];
}
return $tests;
}
public function getLegacyTests()
{
return $this->getTests('testLegacyIntegration', true);
}
protected function doIntegrationTest($file, $message, $condition,
$templates, $exception, $outputs)
{
if (!$outputs) {
$this->markTestSkipped('no tests to run');
}
if ($condition) {
eval('$ret = '.$condition.';');
if (!$ret) {
$this->markTestSkipped($condition);
}
}
$loader = new ArrayLoader($templates);
foreach ($outputs as $i => $match) {
$config = array_merge([
'cache' => false,
'strict_variables' => true,
], $match[2] ? eval($match[2].';') : []);
$twig = new Environment($loader, $config);
$twig->addGlobal('global', 'global');
foreach ($this->getRuntimeLoaders() as $runtimeLoader) {
$twig->addRuntimeLoader($runtimeLoader);
}
foreach ($this->getExtensions() as $extension) {
$twig->addExtension($extension);
}
foreach ($this->getTwigFilters() as $filter) {
$twig->addFilter($filter);
}
foreach ($this->getTwigTests() as $test) {
$twig->addTest($test);
}
foreach ($this->getTwigFunctions() as $function) {
$twig->addFunction($function);
}
$p = new \ReflectionProperty($twig,
'templateClassPrefix');
$p->setAccessible(true);
$p->setValue($twig,
'__TwigTemplate_'.hash('sha256', uniqid(mt_rand(),
true), false).'_');
try {
$template = $twig->load('index.twig');
} catch (\Exception $e) {
if (false !== $exception) {
$message = $e->getMessage();
$this->assertSame(trim($exception),
trim(sprintf('%s: %s', \get_class($e), $message)));
$last = substr($message, \strlen($message) - 1);
$this->assertTrue('.' === $last ||
'?' === $last, 'Exception message must end with a dot or a
question mark.');
return;
}
throw new Error(sprintf('%s: %s', \get_class($e),
$e->getMessage()), -1, null, $e);
}
try {
$output =
trim($template->render(eval($match[1].';')), "\n ");
} catch (\Exception $e) {
if (false !== $exception) {
$this->assertSame(trim($exception),
trim(sprintf('%s: %s', \get_class($e), $e->getMessage())));
return;
}
$e = new Error(sprintf('%s: %s', \get_class($e),
$e->getMessage()), -1, null, $e);
$output = trim(sprintf('%s: %s', \get_class($e),
$e->getMessage()));
}
if (false !== $exception) {
list($class) = explode(':', $exception);
$constraintClass =
class_exists('PHPUnit\Framework\Constraint\Exception') ?
'PHPUnit\Framework\Constraint\Exception' :
'PHPUnit_Framework_Constraint_Exception';
$this->assertThat(null, new $constraintClass($class));
}
$expected = trim($match[3], "\n ");
if ($expected !== $output) {
printf("Compiled templates that failed on case
%d:\n", $i + 1);
foreach (array_keys($templates) as $name) {
echo "Template: $name\n";
$loader = $twig->getLoader();
if (!$loader instanceof SourceContextLoaderInterface) {
$source = new Source($loader->getSource($name),
$name);
} else {
$source = $loader->getSourceContext($name);
}
echo
$twig->compile($twig->parse($twig->tokenize($source)));
}
}
$this->assertEquals($expected, $output, $message.' (in
'.$file.')');
}
}
protected static function parseTemplates($test)
{
$templates = [];
preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s',
$test, $matches, PREG_SET_ORDER);
foreach ($matches as $match) {
$templates[($match[1] ? $match[1] : 'index.twig')] =
$match[2];
}
return $templates;
}
}
class_alias('Twig\Test\IntegrationTestCase',
'Twig_Test_IntegrationTestCase');
PK��[��N�jjtwig/src/Test/NodeTestCase.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Test;
use PHPUnit\Framework\TestCase;
use Twig\Compiler;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use Twig\Node\Node;
abstract class NodeTestCase extends TestCase
{
abstract public function getTests();
/**
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null,
$isPattern = false)
{
$this->assertNodeCompilation($source, $node, $environment,
$isPattern);
}
public function assertNodeCompilation($source, Node $node, Environment
$environment = null, $isPattern = false)
{
$compiler = $this->getCompiler($environment);
$compiler->compile($node);
if ($isPattern) {
$this->assertStringMatchesFormat($source,
trim($compiler->getSource()));
} else {
$this->assertEquals($source,
trim($compiler->getSource()));
}
}
protected function getCompiler(Environment $environment = null)
{
return new Compiler(null === $environment ?
$this->getEnvironment() : $environment);
}
protected function getEnvironment()
{
return new Environment(new ArrayLoader([]));
}
protected function getVariableGetter($name, $line = false)
{
$line = $line > 0 ? "// line {$line}\n" :
'';
if (\PHP_VERSION_ID >= 70000) {
return sprintf('%s($context["%s"] ??
null)', $line, $name);
}
if (\PHP_VERSION_ID >= 50400) {
return sprintf('%s(isset($context["%s"]) ?
$context["%s"] : null)', $line, $name, $name);
}
return sprintf('%s$this->getContext($context,
"%s")', $line, $name);
}
protected function getAttributeGetter()
{
if (\function_exists('twig_template_get_attributes')) {
return 'twig_template_get_attributes($this, ';
}
return '$this->getAttribute(';
}
}
class_alias('Twig\Test\NodeTestCase',
'Twig_Test_NodeTestCase');
PK��[�z�Siitwig/src/Token.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Represents a Token.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Token
{
protected $value;
protected $type;
protected $lineno;
const EOF_TYPE = -1;
const TEXT_TYPE = 0;
const BLOCK_START_TYPE = 1;
const VAR_START_TYPE = 2;
const BLOCK_END_TYPE = 3;
const VAR_END_TYPE = 4;
const NAME_TYPE = 5;
const NUMBER_TYPE = 6;
const STRING_TYPE = 7;
const OPERATOR_TYPE = 8;
const PUNCTUATION_TYPE = 9;
const INTERPOLATION_START_TYPE = 10;
const INTERPOLATION_END_TYPE = 11;
const ARROW_TYPE = 12;
/**
* @param int $type The type of the token
* @param string $value The token value
* @param int $lineno The line position in the source
*/
public function __construct($type, $value, $lineno)
{
$this->type = $type;
$this->value = $value;
$this->lineno = $lineno;
}
public function __toString()
{
return sprintf('%s(%s)',
self::typeToString($this->type, true), $this->value);
}
/**
* Tests the current token for a type and/or a value.
*
* Parameters may be:
* * just type
* * type and value (or array of possible values)
* * just value (or array of possible values) (NAME_TYPE is used as
type)
*
* @param array|string|int $type The type to test
* @param array|string|null $values The token value
*
* @return bool
*/
public function test($type, $values = null)
{
if (null === $values && !\is_int($type)) {
$values = $type;
$type = self::NAME_TYPE;
}
return ($this->type === $type) && (
null === $values ||
(\is_array($values) && \in_array($this->value,
$values)) ||
$this->value == $values
);
}
/**
* @return int
*/
public function getLine()
{
return $this->lineno;
}
/**
* @return int
*/
public function getType()
{
return $this->type;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* Returns the constant representation (internal) of a given type.
*
* @param int $type The type as an integer
* @param bool $short Whether to return a short representation or not
*
* @return string The string representation
*/
public static function typeToString($type, $short = false)
{
switch ($type) {
case self::EOF_TYPE:
$name = 'EOF_TYPE';
break;
case self::TEXT_TYPE:
$name = 'TEXT_TYPE';
break;
case self::BLOCK_START_TYPE:
$name = 'BLOCK_START_TYPE';
break;
case self::VAR_START_TYPE:
$name = 'VAR_START_TYPE';
break;
case self::BLOCK_END_TYPE:
$name = 'BLOCK_END_TYPE';
break;
case self::VAR_END_TYPE:
$name = 'VAR_END_TYPE';
break;
case self::NAME_TYPE:
$name = 'NAME_TYPE';
break;
case self::NUMBER_TYPE:
$name = 'NUMBER_TYPE';
break;
case self::STRING_TYPE:
$name = 'STRING_TYPE';
break;
case self::OPERATOR_TYPE:
$name = 'OPERATOR_TYPE';
break;
case self::PUNCTUATION_TYPE:
$name = 'PUNCTUATION_TYPE';
break;
case self::INTERPOLATION_START_TYPE:
$name = 'INTERPOLATION_START_TYPE';
break;
case self::INTERPOLATION_END_TYPE:
$name = 'INTERPOLATION_END_TYPE';
break;
case self::ARROW_TYPE:
$name = 'ARROW_TYPE';
break;
default:
throw new \LogicException(sprintf('Token of type
"%s" does not exist.', $type));
}
return $short ? $name : 'Twig\Token::'.$name;
}
/**
* Returns the English representation of a given type.
*
* @param int $type The type as an integer
*
* @return string The string representation
*/
public static function typeToEnglish($type)
{
switch ($type) {
case self::EOF_TYPE:
return 'end of template';
case self::TEXT_TYPE:
return 'text';
case self::BLOCK_START_TYPE:
return 'begin of statement block';
case self::VAR_START_TYPE:
return 'begin of print statement';
case self::BLOCK_END_TYPE:
return 'end of statement block';
case self::VAR_END_TYPE:
return 'end of print statement';
case self::NAME_TYPE:
return 'name';
case self::NUMBER_TYPE:
return 'number';
case self::STRING_TYPE:
return 'string';
case self::OPERATOR_TYPE:
return 'operator';
case self::PUNCTUATION_TYPE:
return 'punctuation';
case self::INTERPOLATION_START_TYPE:
return 'begin of string interpolation';
case self::INTERPOLATION_END_TYPE:
return 'end of string interpolation';
case self::ARROW_TYPE:
return 'arrow function';
default:
throw new \LogicException(sprintf('Token of type
"%s" does not exist.', $type));
}
}
}
class_alias('Twig\Token', 'Twig_Token');
PK��[L�芁�,twig/src/TokenParser/AbstractTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Parser;
/**
* Base class for all token parsers.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class AbstractTokenParser implements TokenParserInterface
{
/**
* @var Parser
*/
protected $parser;
public function setParser(Parser $parser)
{
$this->parser = $parser;
}
}
class_alias('Twig\TokenParser\AbstractTokenParser',
'Twig_TokenParser');
PK��[�Ҕ)��)twig/src/TokenParser/ApplyTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\Expression\TempNameExpression;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Node\SetNode;
use Twig\Token;
/**
* Applies filters on a section of a template.
*
* {% apply upper %}
* This text becomes uppercase
* {% endapplys %}
*/
final class ApplyTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$name = $this->parser->getVarName();
$ref = new TempNameExpression($name, $lineno);
$ref->setAttribute('always_defined', true);
$filter =
$this->parser->getExpressionParser()->parseFilterExpressionRaw($ref,
$this->getTag());
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideApplyEnd'], true);
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new Node([
new SetNode(true, $ref, $body, $lineno, $this->getTag()),
new PrintNode($filter, $lineno, $this->getTag()),
]);
}
public function decideApplyEnd(Token $token)
{
return $token->test('endapply');
}
public function getTag()
{
return 'apply';
}
}
PK��[�;Z
Z
.twig/src/TokenParser/AutoEscapeTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\AutoEscapeNode;
use Twig\Node\Expression\ConstantExpression;
use Twig\Token;
/**
* Marks a section of a template to be escaped or not.
*
* {% autoescape true %}
* Everything will be automatically escaped in this block
* {% endautoescape %}
*
* {% autoescape false %}
* Everything will be outputed as is in this block
* {% endautoescape %}
*
* {% autoescape true js %}
* Everything will be automatically escaped in this block
* using the js escaping strategy
* {% endautoescape %}
*
* @final
*/
class AutoEscapeTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
if ($stream->test(Token::BLOCK_END_TYPE)) {
$value = 'html';
} else {
$expr =
$this->parser->getExpressionParser()->parseExpression();
if (!$expr instanceof ConstantExpression) {
throw new SyntaxError('An escaping strategy must be a
string or a bool.', $stream->getCurrent()->getLine(),
$stream->getSourceContext());
}
$value = $expr->getAttribute('value');
$compat = true === $value || false === $value;
if (true === $value) {
$value = 'html';
}
if ($compat && $stream->test(Token::NAME_TYPE)) {
@trigger_error('Using the autoescape tag with
"true" or "false" before the strategy name is
deprecated since version 1.21.', E_USER_DEPRECATED);
if (false === $value) {
throw new SyntaxError('Unexpected escaping
strategy as you set autoescaping to false.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$value = $stream->next()->getValue();
}
}
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
return new AutoEscapeNode($value, $body, $lineno,
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endautoescape');
}
public function getTag()
{
return 'autoescape';
}
}
class_alias('Twig\TokenParser\AutoEscapeTokenParser',
'Twig_TokenParser_AutoEscape');
PK��[�e��� � )twig/src/TokenParser/BlockTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\BlockNode;
use Twig\Node\BlockReferenceNode;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Token;
/**
* Marks a section of a template as being reusable.
*
* {% block head %}
* <link rel="stylesheet" href="style.css" />
* <title>{% block title %}{% endblock %} - My
Webpage</title>
* {% endblock %}
*
* @final
*/
class BlockTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$name = $stream->expect(Token::NAME_TYPE)->getValue();
if ($this->parser->hasBlock($name)) {
throw new SyntaxError(sprintf("The block '%s'
has already been defined line %d.", $name,
$this->parser->getBlock($name)->getTemplateLine()),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$this->parser->setBlock($name, $block = new BlockNode($name,
new Node([]), $lineno));
$this->parser->pushLocalScope();
$this->parser->pushBlockStack($name);
if ($stream->nextIf(Token::BLOCK_END_TYPE)) {
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
$value = $token->getValue();
if ($value != $name) {
throw new SyntaxError(sprintf('Expected endblock
for block "%s" (but "%s" given).', $name, $value),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
}
} else {
$body = new Node([
new
PrintNode($this->parser->getExpressionParser()->parseExpression(),
$lineno),
]);
}
$stream->expect(Token::BLOCK_END_TYPE);
$block->setNode('body', $body);
$this->parser->popBlockStack();
$this->parser->popLocalScope();
return new BlockReferenceNode($name, $lineno, $this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endblock');
}
public function getTag()
{
return 'block';
}
}
class_alias('Twig\TokenParser\BlockTokenParser',
'Twig_TokenParser_Block');
PK��[�f��.twig/src/TokenParser/DeprecatedTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\DeprecatedNode;
use Twig\Token;
/**
* Deprecates a section of a template.
*
* {% deprecated 'The "base.twig" template is deprecated,
use "layout.twig" instead.' %}
* {% extends 'layout.html.twig' %}
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
*
* @final
*/
class DeprecatedTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$expr =
$this->parser->getExpressionParser()->parseExpression();
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new DeprecatedNode($expr, $token->getLine(),
$this->getTag());
}
public function getTag()
{
return 'deprecated';
}
}
class_alias('Twig\TokenParser\DeprecatedTokenParser',
'Twig_TokenParser_Deprecated');
PK��[�yb
&twig/src/TokenParser/DoTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\DoNode;
use Twig\Token;
/**
* Evaluates an expression, discarding the returned value.
*
* @final
*/
class DoTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$expr =
$this->parser->getExpressionParser()->parseExpression();
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new DoNode($expr, $token->getLine(), $this->getTag());
}
public function getTag()
{
return 'do';
}
}
class_alias('Twig\TokenParser\DoTokenParser',
'Twig_TokenParser_Do');
PK��[�w���)twig/src/TokenParser/EmbedTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\EmbedNode;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Token;
/**
* Embeds a template.
*
* @final
*/
class EmbedTokenParser extends IncludeTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
$parent =
$this->parser->getExpressionParser()->parseExpression();
list($variables, $only, $ignoreMissing) =
$this->parseArguments();
$parentToken = $fakeParentToken = new Token(Token::STRING_TYPE,
'__parent__', $token->getLine());
if ($parent instanceof ConstantExpression) {
$parentToken = new Token(Token::STRING_TYPE,
$parent->getAttribute('value'), $token->getLine());
} elseif ($parent instanceof NameExpression) {
$parentToken = new Token(Token::NAME_TYPE,
$parent->getAttribute('name'), $token->getLine());
}
// inject a fake parent to make the parent() function work
$stream->injectTokens([
new Token(Token::BLOCK_START_TYPE, '',
$token->getLine()),
new Token(Token::NAME_TYPE, 'extends',
$token->getLine()),
$parentToken,
new Token(Token::BLOCK_END_TYPE, '',
$token->getLine()),
]);
$module = $this->parser->parse($stream, [$this,
'decideBlockEnd'], true);
// override the parent with the correct one
if ($fakeParentToken === $parentToken) {
$module->setNode('parent', $parent);
}
$this->parser->embedTemplate($module);
$stream->expect(Token::BLOCK_END_TYPE);
return new EmbedNode($module->getTemplateName(),
$module->getAttribute('index'), $variables, $only,
$ignoreMissing, $token->getLine(), $this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endembed');
}
public function getTag()
{
return 'embed';
}
}
class_alias('Twig\TokenParser\EmbedTokenParser',
'Twig_TokenParser_Embed');
PK��[�^���+twig/src/TokenParser/ExtendsTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Node;
use Twig\Token;
/**
* Extends a template by another one.
*
* {% extends "base.html" %}
*
* @final
*/
class ExtendsTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
if ($this->parser->peekBlockStack()) {
throw new SyntaxError('Cannot use "extend" in a
block.', $token->getLine(), $stream->getSourceContext());
} elseif (!$this->parser->isMainScope()) {
throw new SyntaxError('Cannot use "extend" in a
macro.', $token->getLine(), $stream->getSourceContext());
}
if (null !== $this->parser->getParent()) {
throw new SyntaxError('Multiple extends tags are
forbidden.', $token->getLine(), $stream->getSourceContext());
}
$this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
$stream->expect(Token::BLOCK_END_TYPE);
return new Node();
}
public function getTag()
{
return 'extends';
}
}
class_alias('Twig\TokenParser\ExtendsTokenParser',
'Twig_TokenParser_Extends');
PK��[�@@*twig/src/TokenParser/FilterTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\BlockNode;
use Twig\Node\Expression\BlockReferenceExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\PrintNode;
use Twig\Token;
/**
* Filters a section of a template by applying filters.
*
* {% filter upper %}
* This text becomes uppercase
* {% endfilter %}
*
* @final
*/
class FilterTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$name = $this->parser->getVarName();
$ref = new BlockReferenceExpression(new ConstantExpression($name,
$token->getLine()), null, $token->getLine(), $this->getTag());
$filter =
$this->parser->getExpressionParser()->parseFilterExpressionRaw($ref,
$this->getTag());
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$block = new BlockNode($name, $body, $token->getLine());
$this->parser->setBlock($name, $block);
return new PrintNode($filter, $token->getLine(),
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endfilter');
}
public function getTag()
{
return 'filter';
}
}
class_alias('Twig\TokenParser\FilterTokenParser',
'Twig_TokenParser_Filter');
PK��[v����)twig/src/TokenParser/FlushTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\FlushNode;
use Twig\Token;
/**
* Flushes the output to the client.
*
* @see flush()
*
* @final
*/
class FlushTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new FlushNode($token->getLine(), $this->getTag());
}
public function getTag()
{
return 'flush';
}
}
class_alias('Twig\TokenParser\FlushTokenParser',
'Twig_TokenParser_Flush');
PK��[��Vjj'twig/src/TokenParser/ForTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\ForNode;
use Twig\Token;
use Twig\TokenStream;
/**
* Loops over each item of a sequence.
*
* <ul>
* {% for user in users %}
* <li>{{ user.username|e }}</li>
* {% endfor %}
* </ul>
*
* @final
*/
class ForTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$targets =
$this->parser->getExpressionParser()->parseAssignmentExpression();
$stream->expect(Token::OPERATOR_TYPE, 'in');
$seq =
$this->parser->getExpressionParser()->parseExpression();
$ifexpr = null;
if ($stream->nextIf(Token::NAME_TYPE, 'if')) {
$ifexpr =
$this->parser->getExpressionParser()->parseExpression();
}
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideForFork']);
if ('else' == $stream->next()->getValue()) {
$stream->expect(Token::BLOCK_END_TYPE);
$else = $this->parser->subparse([$this,
'decideForEnd'], true);
} else {
$else = null;
}
$stream->expect(Token::BLOCK_END_TYPE);
if (\count($targets) > 1) {
$keyTarget = $targets->getNode(0);
$keyTarget = new
AssignNameExpression($keyTarget->getAttribute('name'),
$keyTarget->getTemplateLine());
$valueTarget = $targets->getNode(1);
$valueTarget = new
AssignNameExpression($valueTarget->getAttribute('name'),
$valueTarget->getTemplateLine());
} else {
$keyTarget = new AssignNameExpression('_key',
$lineno);
$valueTarget = $targets->getNode(0);
$valueTarget = new
AssignNameExpression($valueTarget->getAttribute('name'),
$valueTarget->getTemplateLine());
}
if ($ifexpr) {
$this->checkLoopUsageCondition($stream, $ifexpr);
$this->checkLoopUsageBody($stream, $body);
}
return new ForNode($keyTarget, $valueTarget, $seq, $ifexpr, $body,
$else, $lineno, $this->getTag());
}
public function decideForFork(Token $token)
{
return $token->test(['else', 'endfor']);
}
public function decideForEnd(Token $token)
{
return $token->test('endfor');
}
// the loop variable cannot be used in the condition
protected function checkLoopUsageCondition(TokenStream $stream,
\Twig_NodeInterface $node)
{
if ($node instanceof GetAttrExpression &&
$node->getNode('node') instanceof NameExpression &&
'loop' ==
$node->getNode('node')->getAttribute('name')) {
throw new SyntaxError('The "loop" variable
cannot be used in a looping condition.', $node->getTemplateLine(),
$stream->getSourceContext());
}
foreach ($node as $n) {
if (!$n) {
continue;
}
$this->checkLoopUsageCondition($stream, $n);
}
}
// check usage of non-defined loop-items
// it does not catch all problems (for instance when a for is included
into another or when the variable is used in an include)
protected function checkLoopUsageBody(TokenStream $stream,
\Twig_NodeInterface $node)
{
if ($node instanceof GetAttrExpression &&
$node->getNode('node') instanceof NameExpression &&
'loop' ==
$node->getNode('node')->getAttribute('name')) {
$attribute = $node->getNode('attribute');
if ($attribute instanceof ConstantExpression &&
\in_array($attribute->getAttribute('value'),
['length', 'revindex0', 'revindex',
'last'])) {
throw new SyntaxError(sprintf('The "loop.%s"
variable is not defined when looping with a condition.',
$attribute->getAttribute('value')),
$node->getTemplateLine(), $stream->getSourceContext());
}
}
// should check for parent.loop.XXX usage
if ($node instanceof ForNode) {
return;
}
foreach ($node as $n) {
if (!$n) {
continue;
}
$this->checkLoopUsageBody($stream, $n);
}
}
public function getTag()
{
return 'for';
}
}
class_alias('Twig\TokenParser\ForTokenParser',
'Twig_TokenParser_For');
PK��[��xx(twig/src/TokenParser/FromTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\ImportNode;
use Twig\Token;
/**
* Imports macros.
*
* {% from 'forms.html' import forms %}
*
* @final
*/
class FromTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$macro =
$this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
$stream->expect(Token::NAME_TYPE, 'import');
$targets = [];
do {
$name = $stream->expect(Token::NAME_TYPE)->getValue();
$alias = $name;
if ($stream->nextIf('as')) {
$alias =
$stream->expect(Token::NAME_TYPE)->getValue();
}
$targets[$name] = $alias;
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
} while (true);
$stream->expect(Token::BLOCK_END_TYPE);
$var = new AssignNameExpression($this->parser->getVarName(),
$token->getLine());
$node = new ImportNode($macro, $var, $token->getLine(),
$this->getTag());
foreach ($targets as $name => $alias) {
if ($this->parser->isReservedMacroName($name)) {
throw new SyntaxError(sprintf('"%s" cannot
be an imported macro as it is a reserved keyword.', $name),
$token->getLine(), $stream->getSourceContext());
}
$this->parser->addImportedSymbol('function',
$alias, 'get'.$name, $var);
}
return $node;
}
public function getTag()
{
return 'from';
}
}
class_alias('Twig\TokenParser\FromTokenParser',
'Twig_TokenParser_From');
PK��[
B�� � &twig/src/TokenParser/IfTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\IfNode;
use Twig\Node\Node;
use Twig\Token;
/**
* Tests a condition.
*
* {% if users %}
* <ul>
* {% for user in users %}
* <li>{{ user.username|e }}</li>
* {% endfor %}
* </ul>
* {% endif %}
*
* @final
*/
class IfTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$expr =
$this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideIfFork']);
$tests = [$expr, $body];
$else = null;
$end = false;
while (!$end) {
switch ($stream->next()->getValue()) {
case 'else':
$stream->expect(Token::BLOCK_END_TYPE);
$else = $this->parser->subparse([$this,
'decideIfEnd']);
break;
case 'elseif':
$expr =
$this->parser->getExpressionParser()->parseExpression();
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideIfFork']);
$tests[] = $expr;
$tests[] = $body;
break;
case 'endif':
$end = true;
break;
default:
throw new SyntaxError(sprintf('Unexpected end of
template. Twig was looking for the following tags "else",
"elseif", or "endif" to close the "if" block
started at line %d).', $lineno),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
}
$stream->expect(Token::BLOCK_END_TYPE);
return new IfNode(new Node($tests), $else, $lineno,
$this->getTag());
}
public function decideIfFork(Token $token)
{
return $token->test(['elseif', 'else',
'endif']);
}
public function decideIfEnd(Token $token)
{
return $token->test(['endif']);
}
public function getTag()
{
return 'if';
}
}
class_alias('Twig\TokenParser\IfTokenParser',
'Twig_TokenParser_If');
PK��[mO/J��*twig/src/TokenParser/ImportTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\Expression\AssignNameExpression;
use Twig\Node\ImportNode;
use Twig\Token;
/**
* Imports macros.
*
* {% import 'forms.html' as forms %}
*
* @final
*/
class ImportTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$macro =
$this->parser->getExpressionParser()->parseExpression();
$this->parser->getStream()->expect(Token::NAME_TYPE,
'as');
$var = new
AssignNameExpression($this->parser->getStream()->expect(Token::NAME_TYPE)->getValue(),
$token->getLine());
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$this->parser->addImportedSymbol('template',
$var->getAttribute('name'));
return new ImportNode($macro, $var, $token->getLine(),
$this->getTag());
}
public function getTag()
{
return 'import';
}
}
class_alias('Twig\TokenParser\ImportTokenParser',
'Twig_TokenParser_Import');
PK��[r� �SS+twig/src/TokenParser/IncludeTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\IncludeNode;
use Twig\Token;
/**
* Includes a template.
*
* {% include 'header.html' %}
* Body
* {% include 'footer.html' %}
*/
class IncludeTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$expr =
$this->parser->getExpressionParser()->parseExpression();
list($variables, $only, $ignoreMissing) =
$this->parseArguments();
return new IncludeNode($expr, $variables, $only, $ignoreMissing,
$token->getLine(), $this->getTag());
}
protected function parseArguments()
{
$stream = $this->parser->getStream();
$ignoreMissing = false;
if ($stream->nextIf(Token::NAME_TYPE, 'ignore')) {
$stream->expect(Token::NAME_TYPE, 'missing');
$ignoreMissing = true;
}
$variables = null;
if ($stream->nextIf(Token::NAME_TYPE, 'with')) {
$variables =
$this->parser->getExpressionParser()->parseExpression();
}
$only = false;
if ($stream->nextIf(Token::NAME_TYPE, 'only')) {
$only = true;
}
$stream->expect(Token::BLOCK_END_TYPE);
return [$variables, $only, $ignoreMissing];
}
public function getTag()
{
return 'include';
}
}
class_alias('Twig\TokenParser\IncludeTokenParser',
'Twig_TokenParser_Include');
PK��[&nq�uu)twig/src/TokenParser/MacroTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\BodyNode;
use Twig\Node\MacroNode;
use Twig\Node\Node;
use Twig\Token;
/**
* Defines a macro.
*
* {% macro input(name, value, type, size) %}
* <input type="{{ type|default('text') }}"
name="{{ name }}" value="{{ value|e }}" size="{{
size|default(20) }}" />
* {% endmacro %}
*
* @final
*/
class MacroTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$name = $stream->expect(Token::NAME_TYPE)->getValue();
$arguments =
$this->parser->getExpressionParser()->parseArguments(true, true);
$stream->expect(Token::BLOCK_END_TYPE);
$this->parser->pushLocalScope();
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
$value = $token->getValue();
if ($value != $name) {
throw new SyntaxError(sprintf('Expected endmacro for
macro "%s" (but "%s" given).', $name, $value),
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
}
$this->parser->popLocalScope();
$stream->expect(Token::BLOCK_END_TYPE);
$this->parser->setMacro($name, new MacroNode($name, new
BodyNode([$body]), $arguments, $lineno, $this->getTag()));
return new Node();
}
public function decideBlockEnd(Token $token)
{
return $token->test('endmacro');
}
public function getTag()
{
return 'macro';
}
}
class_alias('Twig\TokenParser\MacroTokenParser',
'Twig_TokenParser_Macro');
PK��[���$$+twig/src/TokenParser/SandboxTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\IncludeNode;
use Twig\Node\SandboxNode;
use Twig\Node\TextNode;
use Twig\Token;
/**
* Marks a section of a template as untrusted code that must be evaluated
in the sandbox mode.
*
* {% sandbox %}
* {% include 'user.html' %}
* {% endsandbox %}
*
* @see https://twig.symfony.com/doc/api.html#sandbox-extension for details
*
* @final
*/
class SandboxTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
// in a sandbox tag, only include tags are allowed
if (!$body instanceof IncludeNode) {
foreach ($body as $node) {
if ($node instanceof TextNode &&
ctype_space($node->getAttribute('data'))) {
continue;
}
if (!$node instanceof IncludeNode) {
throw new SyntaxError('Only "include"
tags are allowed within a "sandbox" section.',
$node->getTemplateLine(), $stream->getSourceContext());
}
}
}
return new SandboxNode($body, $token->getLine(),
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endsandbox');
}
public function getTag()
{
return 'sandbox';
}
}
class_alias('Twig\TokenParser\SandboxTokenParser',
'Twig_TokenParser_Sandbox');
PK��["��'twig/src/TokenParser/SetTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\SetNode;
use Twig\Token;
/**
* Defines a variable.
*
* {% set foo = 'foo' %}
* {% set foo = [1, 2] %}
* {% set foo = {'foo': 'bar'} %}
* {% set foo = 'foo' ~ 'bar' %}
* {% set foo, bar = 'foo', 'bar' %}
* {% set foo %}Some content{% endset %}
*
* @final
*/
class SetTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$names =
$this->parser->getExpressionParser()->parseAssignmentExpression();
$capture = false;
if ($stream->nextIf(Token::OPERATOR_TYPE, '=')) {
$values =
$this->parser->getExpressionParser()->parseMultitargetExpression();
$stream->expect(Token::BLOCK_END_TYPE);
if (\count($names) !== \count($values)) {
throw new SyntaxError('When using set, you must have
the same number of variables and assignments.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
} else {
$capture = true;
if (\count($names) > 1) {
throw new SyntaxError('When using set with a block,
you cannot have a multi-target.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$stream->expect(Token::BLOCK_END_TYPE);
$values = $this->parser->subparse([$this,
'decideBlockEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
}
return new SetNode($capture, $names, $values, $lineno,
$this->getTag());
}
public function decideBlockEnd(Token $token)
{
return $token->test('endset');
}
public function getTag()
{
return 'set';
}
}
class_alias('Twig\TokenParser\SetTokenParser',
'Twig_TokenParser_Set');
PK��[�6�-twig/src/TokenParser/SpacelessTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\SpacelessNode;
use Twig\Token;
/**
* Remove whitespaces between HTML tags.
*
* {% spaceless %}
* <div>
* <strong>foo</strong>
* </div>
* {% endspaceless %}
* {# output will be
<div><strong>foo</strong></div> #}
*
* @final
*/
class SpacelessTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$lineno = $token->getLine();
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideSpacelessEnd'], true);
$this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
return new SpacelessNode($body, $lineno, $this->getTag());
}
public function decideSpacelessEnd(Token $token)
{
return $token->test('endspaceless');
}
public function getTag()
{
return 'spaceless';
}
}
class_alias('Twig\TokenParser\SpacelessTokenParser',
'Twig_TokenParser_Spaceless');
PK��[&�{Aqq-twig/src/TokenParser/TokenParserInterface.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Parser;
use Twig\Token;
/**
* Interface implemented by token parsers.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface TokenParserInterface
{
/**
* Sets the parser associated with this token parser.
*/
public function setParser(Parser $parser);
/**
* Parses a token and returns a node.
*
* @return \Twig_NodeInterface
*
* @throws SyntaxError
*/
public function parse(Token $token);
/**
* Gets the tag name associated with this token parser.
*
* @return string The tag name
*/
public function getTag();
}
class_alias('Twig\TokenParser\TokenParserInterface',
'Twig_TokenParserInterface');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Token');
class_exists('Twig\Parser');
PK��[}����'twig/src/TokenParser/UseTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Node;
use Twig\Token;
/**
* Imports blocks defined in another template into the current template.
*
* {% extends "base.html" %}
*
* {% use "blocks.html" %}
*
* {% block title %}{% endblock %}
* {% block content %}{% endblock %}
*
* @see https://twig.symfony.com/doc/templates.html#horizontal-reuse for
details.
*
* @final
*/
class UseTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$template =
$this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
if (!$template instanceof ConstantExpression) {
throw new SyntaxError('The template references in a
"use" statement must be a string.',
$stream->getCurrent()->getLine(), $stream->getSourceContext());
}
$targets = [];
if ($stream->nextIf('with')) {
do {
$name =
$stream->expect(Token::NAME_TYPE)->getValue();
$alias = $name;
if ($stream->nextIf('as')) {
$alias =
$stream->expect(Token::NAME_TYPE)->getValue();
}
$targets[$name] = new ConstantExpression($alias, -1);
if (!$stream->nextIf(Token::PUNCTUATION_TYPE,
',')) {
break;
}
} while (true);
}
$stream->expect(Token::BLOCK_END_TYPE);
$this->parser->addTrait(new Node(['template' =>
$template, 'targets' => new Node($targets)]));
return new Node();
}
public function getTag()
{
return 'use';
}
}
class_alias('Twig\TokenParser\UseTokenParser',
'Twig_TokenParser_Use');
PK��[
O`(twig/src/TokenParser/WithTokenParser.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\TokenParser;
use Twig\Node\WithNode;
use Twig\Token;
/**
* Creates a nested scope.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class WithTokenParser extends AbstractTokenParser
{
public function parse(Token $token)
{
$stream = $this->parser->getStream();
$variables = null;
$only = false;
if (!$stream->test(Token::BLOCK_END_TYPE)) {
$variables =
$this->parser->getExpressionParser()->parseExpression();
$only = $stream->nextIf(Token::NAME_TYPE, 'only');
}
$stream->expect(Token::BLOCK_END_TYPE);
$body = $this->parser->subparse([$this,
'decideWithEnd'], true);
$stream->expect(Token::BLOCK_END_TYPE);
return new WithNode($body, $variables, $only, $token->getLine(),
$this->getTag());
}
public function decideWithEnd(Token $token)
{
return $token->test('endwith');
}
public function getTag()
{
return 'with';
}
}
class_alias('Twig\TokenParser\WithTokenParser',
'Twig_TokenParser_With');
PK��[�N:otttwig/src/TokenStream.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Error\SyntaxError;
/**
* Represents a token stream.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TokenStream
{
protected $tokens;
protected $current = 0;
protected $filename;
private $source;
/**
* @param array $tokens An array of tokens
* @param string|null $name The name of the template which tokens are
associated with
* @param string|null $source The source code associated with the
tokens
*/
public function __construct(array $tokens, $name = null, $source =
null)
{
if (!$name instanceof Source) {
if (null !== $name || null !== $source) {
@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);
}
$this->source = new Source($source, $name);
} else {
$this->source = $name;
}
$this->tokens = $tokens;
// deprecated, not used anymore, to be removed in 2.0
$this->filename = $this->source->getName();
}
public function __toString()
{
return implode("\n", $this->tokens);
}
public function injectTokens(array $tokens)
{
$this->tokens = array_merge(\array_slice($this->tokens, 0,
$this->current), $tokens, \array_slice($this->tokens,
$this->current));
}
/**
* Sets the pointer to the next token and returns the old one.
*
* @return Token
*/
public function next()
{
if (!isset($this->tokens[++$this->current])) {
throw new SyntaxError('Unexpected end of template.',
$this->tokens[$this->current - 1]->getLine(), $this->source);
}
return $this->tokens[$this->current - 1];
}
/**
* Tests a token, sets the pointer to the next one and returns it or
throws a syntax error.
*
* @return Token|null The next token if the condition is true, null
otherwise
*/
public function nextIf($primary, $secondary = null)
{
if ($this->tokens[$this->current]->test($primary,
$secondary)) {
return $this->next();
}
}
/**
* Tests a token and returns it or throws a syntax error.
*
* @return Token
*/
public function expect($type, $value = null, $message = null)
{
$token = $this->tokens[$this->current];
if (!$token->test($type, $value)) {
$line = $token->getLine();
throw new SyntaxError(sprintf('%sUnexpected token
"%s"%s ("%s" expected%s).',
$message ? $message.'. ' : '',
Token::typeToEnglish($token->getType()),
$token->getValue() ? sprintf(' of value
"%s"', $token->getValue()) : '',
Token::typeToEnglish($type), $value ? sprintf(' with
value "%s"', $value) : ''),
$line,
$this->source
);
}
$this->next();
return $token;
}
/**
* Looks at the next token.
*
* @param int $number
*
* @return Token
*/
public function look($number = 1)
{
if (!isset($this->tokens[$this->current + $number])) {
throw new SyntaxError('Unexpected end of template.',
$this->tokens[$this->current + $number - 1]->getLine(),
$this->source);
}
return $this->tokens[$this->current + $number];
}
/**
* Tests the current token.
*
* @return bool
*/
public function test($primary, $secondary = null)
{
return $this->tokens[$this->current]->test($primary,
$secondary);
}
/**
* Checks if end of stream was reached.
*
* @return bool
*/
public function isEOF()
{
return Token::EOF_TYPE ===
$this->tokens[$this->current]->getType();
}
/**
* @return Token
*/
public function getCurrent()
{
return $this->tokens[$this->current];
}
/**
* Gets the name associated with this stream (null if not defined).
*
* @return string|null
*
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getFilename()
{
@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);
return $this->source->getName();
}
/**
* Gets the source code associated with this stream.
*
* @return string
*
* @internal Don't use this as it might be empty depending on the
environment configuration
*
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getSource()
{
@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);
return $this->source->getCode();
}
/**
* Gets the source associated with this stream.
*
* @return Source
*
* @internal
*/
public function getSourceContext()
{
return $this->source;
}
}
class_alias('Twig\TokenStream', 'Twig_TokenStream');
PK��[ӉX��
�
twig/src/TwigFilter.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Node\Node;
/**
* Represents a template filter.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TwigFilter
{
protected $name;
protected $callable;
protected $options;
protected $arguments = [];
public function __construct($name, $callable, array $options = [])
{
$this->name = $name;
$this->callable = $callable;
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'is_variadic' => false,
'is_safe' => null,
'is_safe_callback' => null,
'pre_escape' => null,
'preserves_safety' => null,
'node_class' =>
'\Twig\Node\Expression\FilterExpression',
'deprecated' => false,
'alternative' => null,
], $options);
}
public function getName()
{
return $this->name;
}
public function getCallable()
{
return $this->callable;
}
public function getNodeClass()
{
return $this->options['node_class'];
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $filterArgs)
{
if (null !== $this->options['is_safe']) {
return $this->options['is_safe'];
}
if (null !== $this->options['is_safe_callback']) {
return
\call_user_func($this->options['is_safe_callback'],
$filterArgs);
}
}
public function getPreservesSafety()
{
return $this->options['preserves_safety'];
}
public function getPreEscape()
{
return $this->options['pre_escape'];
}
public function isVariadic()
{
return $this->options['is_variadic'];
}
public function isDeprecated()
{
return (bool) $this->options['deprecated'];
}
public function getDeprecatedVersion()
{
return $this->options['deprecated'];
}
public function getAlternative()
{
return $this->options['alternative'];
}
}
class_alias('Twig\TwigFilter', 'Twig_SimpleFilter');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Node\Node');
PK��[����
twig/src/TwigFunction.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
use Twig\Node\Node;
/**
* Represents a template function.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TwigFunction
{
protected $name;
protected $callable;
protected $options;
protected $arguments = [];
public function __construct($name, $callable, array $options = [])
{
$this->name = $name;
$this->callable = $callable;
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'is_variadic' => false,
'is_safe' => null,
'is_safe_callback' => null,
'node_class' =>
'\Twig\Node\Expression\FunctionExpression',
'deprecated' => false,
'alternative' => null,
], $options);
}
public function getName()
{
return $this->name;
}
public function getCallable()
{
return $this->callable;
}
public function getNodeClass()
{
return $this->options['node_class'];
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $functionArgs)
{
if (null !== $this->options['is_safe']) {
return $this->options['is_safe'];
}
if (null !== $this->options['is_safe_callback']) {
return
\call_user_func($this->options['is_safe_callback'],
$functionArgs);
}
return [];
}
public function isVariadic()
{
return $this->options['is_variadic'];
}
public function isDeprecated()
{
return (bool) $this->options['deprecated'];
}
public function getDeprecatedVersion()
{
return $this->options['deprecated'];
}
public function getAlternative()
{
return $this->options['alternative'];
}
}
class_alias('Twig\TwigFunction',
'Twig_SimpleFunction');
// Ensure that the aliased name is loaded to keep BC for classes
implementing the typehint with the old aliased name.
class_exists('Twig\Node\Node');
PK��[�EVZ��twig/src/TwigTest.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig;
/**
* Represents a template test.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TwigTest
{
protected $name;
protected $callable;
protected $options;
private $arguments = [];
public function __construct($name, $callable, array $options = [])
{
$this->name = $name;
$this->callable = $callable;
$this->options = array_merge([
'is_variadic' => false,
'node_class' =>
'\Twig\Node\Expression\TestExpression',
'deprecated' => false,
'alternative' => null,
], $options);
}
public function getName()
{
return $this->name;
}
public function getCallable()
{
return $this->callable;
}
public function getNodeClass()
{
return $this->options['node_class'];
}
public function isVariadic()
{
return $this->options['is_variadic'];
}
public function isDeprecated()
{
return (bool) $this->options['deprecated'];
}
public function getDeprecatedVersion()
{
return $this->options['deprecated'];
}
public function getAlternative()
{
return $this->options['alternative'];
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
}
class_alias('Twig\TwigTest', 'Twig_SimpleTest');
PK��[+�=��&twig/src/Util/DeprecationCollector.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Util;
use Twig\Environment;
use Twig\Error\SyntaxError;
use Twig\Source;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class DeprecationCollector
{
private $twig;
private $deprecations;
public function __construct(Environment $twig)
{
$this->twig = $twig;
}
/**
* Returns deprecations for templates contained in a directory.
*
* @param string $dir A directory where templates are stored
* @param string $ext Limit the loaded templates by extension
*
* @return array An array of deprecations
*/
public function collectDir($dir, $ext = '.twig')
{
$iterator = new \RegexIterator(
new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($dir),
\RecursiveIteratorIterator::LEAVES_ONLY
), '{'.preg_quote($ext).'$}'
);
return $this->collect(new TemplateDirIterator($iterator));
}
/**
* Returns deprecations for passed templates.
*
* @param \Traversable $iterator An iterator of templates (where keys
are template names and values the contents of the template)
*
* @return array An array of deprecations
*/
public function collect(\Traversable $iterator)
{
$this->deprecations = [];
set_error_handler([$this, 'errorHandler']);
foreach ($iterator as $name => $contents) {
try {
$this->twig->parse($this->twig->tokenize(new
Source($contents, $name)));
} catch (SyntaxError $e) {
// ignore templates containing syntax errors
}
}
restore_error_handler();
$deprecations = $this->deprecations;
$this->deprecations = [];
return $deprecations;
}
/**
* @internal
*/
public function errorHandler($type, $msg)
{
if (E_USER_DEPRECATED === $type) {
$this->deprecations[] = $msg;
}
}
}
class_alias('Twig\Util\DeprecationCollector',
'Twig_Util_DeprecationCollector');
PK��[�~�NN%twig/src/Util/TemplateDirIterator.phpnu�[���<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Twig\Util;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class TemplateDirIterator extends \IteratorIterator
{
public function current()
{
return file_get_contents(parent::current());
}
public function key()
{
return (string) parent::key();
}
}
class_alias('Twig\Util\TemplateDirIterator',
'Twig_Util_TemplateDirIterator');
PK���[�ʺ9.php_cs.distnu�[���PK���[_P?>��
[composer.jsonnu�[���PK���[�g���klib/Twig/Autoloader.phpnu�[���PK���[&����zlib/Twig/BaseNodeVisitor.phpnu�[���PK���[Q������lib/Twig/Cache/Filesystem.phpnu�[���PK���[ ��ʑ�|lib/Twig/Cache/Null.phpnu�[���PK���[�=����Tlib/Twig/CacheInterface.phpnu�[���PK���[�Vv3��Clib/Twig/Compiler.phpnu�[���PK���[��R��lib/Twig/CompilerInterface.phpnu�[���PK���[ɻ�T��#�lib/Twig/ContainerRuntimeLoader.phpnu�[���PK���[��9���lib/Twig/Environment.phpnu�[���PK���[�
ei���lib/Twig/Error/Loader.phpnu�[���PK���[�#ڝ��lib/Twig/Error/Runtime.phpnu�[���PK���[d�˃���lib/Twig/Error/Syntax.phpnu�[���PK���[�Bڨ���lib/Twig/Error.phpnu�[���PK���[ð�=��"Vlib/Twig/ExistsLoaderInterface.phpnu�[���PK���[D;��jlib/Twig/ExpressionParser.phpnu�[���PK���["G���Wlib/Twig/Extension/Core.phpnu�[���PK���[:��e��Klib/Twig/Extension/Debug.phpnu�[���PK���[��Aٵ�Dlib/Twig/Extension/Escaper.phpnu�[���PK���[��I��'G
lib/Twig/Extension/GlobalsInterface.phpnu�[���PK���[�����+\!lib/Twig/Extension/InitRuntimeInterface.phpnu�[���PK���[n���
�"lib/Twig/Extension/Optimizer.phpnu�[���PK���[ѕu���#lib/Twig/Extension/Profiler.phpnu�[���PK���[��3����$lib/Twig/Extension/Sandbox.phpnu�[���PK���[P�El���%lib/Twig/Extension/Staging.phpnu�[���PK���[��"���#�&lib/Twig/Extension/StringLoader.phpnu�[���PK���[�����'lib/Twig/Extension.phpnu�[���PK���[�3����(lib/Twig/ExtensionInterface.phpnu�[���PK���[�<���!�)lib/Twig/FactoryRuntimeLoader.phpnu�[���PK���[�,L���*�*lib/Twig/FileExtensionEscapingStrategy.phpnu�[���PK���[�R��,lib/Twig/Filter/Function.phpnu�[���PK���[�M�MXX�/lib/Twig/Filter/Method.phpnu�[���PK���[��`pp{4lib/Twig/Filter/Node.phpnu�[���PK���[��k���38lib/Twig/Filter.phpnu�[���PK���[,ı+��$E@lib/Twig/FilterCallableInterface.phpnu�[���PK���[� �?[[oBlib/Twig/FilterInterface.phpnu�[���PK���[�Ὢ��Flib/Twig/Function/Function.phpnu�[���PK���[�a��{{Jlib/Twig/Function/Method.phpnu�[���PK���[ �|||�Nlib/Twig/Function/Node.phpnu�[���PK���[So�)���Rlib/Twig/Function.phpnu�[���PK���[d����&�Ylib/Twig/FunctionCallableInterface.phpnu�[���PK���[9t/,,�[lib/Twig/FunctionInterface.phpnu�[���PK���[��t�tto_lib/Twig/Lexer.phpnu�[���PK���[�Y�%`lib/Twig/LexerInterface.phpnu�[���PK���[�) ���clib/Twig/Loader/Array.phpnu�[���PK���[�#�ʛ�ndlib/Twig/Loader/Chain.phpnu�[���PK���[4`v˯�Relib/Twig/Loader/Filesystem.phpnu�[���PK���[T����Oflib/Twig/Loader/String.phpnu�[���PK���[7b�����mlib/Twig/LoaderInterface.phpnu�[���PK���[^�<�xx�nlib/Twig/Markup.phpnu�[���PK���[���Aolib/Twig/Node/AutoEscape.phpnu�[���PK���[V��~��0plib/Twig/Node/Block.phpnu�[���PK���[<B�G��
qlib/Twig/Node/BlockReference.phpnu�[���PK���[�Z�
�� rlib/Twig/Node/Body.phpnu�[���PK���[m8�2���rlib/Twig/Node/CheckSecurity.phpnu�[���PK���[c��ţ��slib/Twig/Node/Deprecated.phpnu�[���PK���[�a����tlib/Twig/Node/Do.phpnu�[���PK���[C��ԏ��ulib/Twig/Node/Embed.phpnu�[���PK���[����"dvlib/Twig/Node/Expression/Array.phpnu�[���PK���[B&���'xwlib/Twig/Node/Expression/AssignName.phpnu�[���PK���[2K����'�xlib/Twig/Node/Expression/Binary/Add.phpnu�[���PK���[�~����'�ylib/Twig/Node/Expression/Binary/And.phpnu�[���PK���[S
���.�zlib/Twig/Node/Expression/Binary/BitwiseAnd.phpnu�[���PK���[�ѣ���-|lib/Twig/Node/Expression/Binary/BitwiseOr.phpnu�[���PK���[���.N}lib/Twig/Node/Expression/Binary/BitwiseXor.phpnu�[���PK���[������*�~lib/Twig/Node/Expression/Binary/Concat.phpnu�[���PK���[(�B���'�lib/Twig/Node/Expression/Binary/Div.phpnu�[���PK���[W��G��,lib/Twig/Node/Expression/Binary/EndsWith.phpnu�[���PK���[}�n2��)�lib/Twig/Node/Expression/Binary/Equal.phpnu�[���PK���[�*�/��,%�lib/Twig/Node/Expression/Binary/FloorDiv.phpnu�[���PK���[-�Z��+X�lib/Twig/Node/Expression/Binary/Greater.phpnu�[���PK���[ߞ����0��lib/Twig/Node/Expression/Binary/GreaterEqual.phpnu�[���PK���[K�n���&͆lib/Twig/Node/Expression/Binary/In.phpnu�[���PK���[�w�~��(�lib/Twig/Node/Expression/Binary/Less.phpnu�[���PK���[�[�%��-�lib/Twig/Node/Expression/Binary/LessEqual.phpnu�[���PK���[�y����+9�lib/Twig/Node/Expression/Binary/Matches.phpnu�[���PK���[�aL���'g�lib/Twig/Node/Expression/Binary/Mod.phpnu�[���PK���[8Vd'��'��lib/Twig/Node/Expression/Binary/Mul.phpnu�[���PK���[DCO��,��lib/Twig/Node/Expression/Binary/NotEqual.phpnu�[���PK���[�ސB��)Ύlib/Twig/Node/Expression/Binary/NotIn.phpnu�[���PK���[�����&�lib/Twig/Node/Expression/Binary/Or.phpnu�[���PK���[�~u@��)�lib/Twig/Node/Expression/Binary/Power.phpnu�[���PK���[ٰ�w��)+�lib/Twig/Node/Expression/Binary/Range.phpnu�[���PK���[��s��.O�lib/Twig/Node/Expression/Binary/StartsWith.phpnu�[���PK���[�nڸ��'��lib/Twig/Node/Expression/Binary/Sub.phpnu�[���PK���[��q5��#��lib/Twig/Node/Expression/Binary.phpnu�[���PK���[(d���+ǖlib/Twig/Node/Expression/BlockReference.phpnu�[���PK���[p��,��!�lib/Twig/Node/Expression/Call.phpnu�[���PK���[�R�!��(�lib/Twig/Node/Expression/Conditional.phpnu�[���PK���[���T��%I�lib/Twig/Node/Expression/Constant.phpnu�[���PK���[����/l�lib/Twig/Node/Expression/ExtensionReference.phpnu�[���PK���[#�"0��+~�lib/Twig/Node/Expression/Filter/Default.phpnu�[���PK���[f��#��lib/Twig/Node/Expression/Filter.phpnu�[���PK���[��j!��%šlib/Twig/Node/Expression/Function.phpnu�[���PK���[����$�lib/Twig/Node/Expression/GetAttr.phpnu�[���PK���[�����'�lib/Twig/Node/Expression/MethodCall.phpnu�[���PK���[�c�Ѿ�!3�lib/Twig/Node/Expression/Name.phpnu�[���PK���[�=߲��)B�lib/Twig/Node/Expression/NullCoalesce.phpnu�[���PK���[4\3���#y�lib/Twig/Node/Expression/Parent.phpnu�[���PK���[�U��%��lib/Twig/Node/Expression/TempName.phpnu�[���PK���[�7o��*��lib/Twig/Node/Expression/Test/Constant.phpnu�[���PK���[��!%��)ڪlib/Twig/Node/Expression/Test/Defined.phpnu�[���PK���[�h�n��-��lib/Twig/Node/Expression/Test/Divisibleby.phpnu�[���PK���[�DLc��&.�lib/Twig/Node/Expression/Test/Even.phpnu�[���PK���[���&?�lib/Twig/Node/Expression/Test/Null.phpnu�[���PK���[��H��%P�lib/Twig/Node/Expression/Test/Odd.phpnu�[���PK���[b@R���(\�lib/Twig/Node/Expression/Test/Sameas.phpnu�[���PK���[��C��!w�lib/Twig/Node/Expression/Test.phpnu�[���PK���[��\C��&��lib/Twig/Node/Expression/Unary/Neg.phpnu�[���PK���[V�I��&��lib/Twig/Node/Expression/Unary/Not.phpnu�[���PK���[�P����&��lib/Twig/Node/Expression/Unary/Pos.phpnu�[���PK���[=��y��"��lib/Twig/Node/Expression/Unary.phpnu�[���PK���[b��d��ٶlib/Twig/Node/Expression.phpnu�[���PK���[FzP���lib/Twig/Node/Flush.phpnu�[���PK���[*�b����lib/Twig/Node/For.phpnu�[���PK���[�Nח���lib/Twig/Node/ForLoop.phpnu�[���PK���[w=����l�lib/Twig/Node/If.phpnu�[���PK���[��n��3�lib/Twig/Node/Import.phpnu�[���PK���[�0���lib/Twig/Node/Include.phpnu�[���PK���[��<A���lib/Twig/Node/Macro.phpnu�[���PK���[��禎�Ľlib/Twig/Node/Module.phpnu�[���PK���[ԡ�Ï���lib/Twig/Node/Print.phpnu�[���PK���[�~���u�lib/Twig/Node/Sandbox.phpnu�[���PK���[�y�@��
U�lib/Twig/Node/SandboxedPrint.phpnu�[���PK���[絡߇�X�lib/Twig/Node/Set.phpnu�[���PK���[0�f��$�lib/Twig/Node/SetTemp.phpnu�[���PK���[��͟��lib/Twig/Node/Spaceless.phpnu�[���PK���[5c�x����lib/Twig/Node/Text.phpnu�[���PK���[@3�&����lib/Twig/Node/With.phpnu�[���PK���[~ң�zz��lib/Twig/Node.phpnu�[���PK���[��N��!K�lib/Twig/NodeCaptureInterface.phpnu�[���PK���[br����V�lib/Twig/NodeInterface.phpnu�[���PK���[O�8��
A�lib/Twig/NodeOutputInterface.phpnu�[���PK���[��퓔�G�lib/Twig/NodeTraverser.phpnu�[���PK���[h��
%�lib/Twig/NodeVisitor/Escaper.phpnu�[���PK���[$�����"6�lib/Twig/NodeVisitor/Optimizer.phpnu�[���PK���[�����%Q�lib/Twig/NodeVisitor/SafeAnalysis.phpnu�[���PK���[�����
{�lib/Twig/NodeVisitor/Sandbox.phpnu�[���PK���[�N@��!��lib/Twig/NodeVisitorInterface.phpnu�[���PK���[�(%xx��lib/Twig/Parser.phpnu�[���PK���[L�E���`�lib/Twig/ParserInterface.phpnu�[���PK���[
��!q�lib/Twig/Profiler/Dumper/Base.phpnu�[���PK���[w���&t�lib/Twig/Profiler/Dumper/Blackfire.phpnu�[���PK���[X�f���!��lib/Twig/Profiler/Dumper/Html.phpnu�[���PK���[�����!��lib/Twig/Profiler/Dumper/Text.phpnu�[���PK���[d����'��lib/Twig/Profiler/Node/EnterProfile.phpnu�[���PK���[�����'��lib/Twig/Profiler/Node/LeaveProfile.phpnu�[���PK���[~�~��*��lib/Twig/Profiler/NodeVisitor/Profiler.phpnu�[���PK���[%V��
�lib/Twig/Profiler/Profile.phpnu�[���PK���[Stʼ��#��lib/Twig/RuntimeLoaderInterface.phpnu�[���PK���[
����"�lib/Twig/Sandbox/SecurityError.phpnu�[���PK���[�����2�lib/Twig/Sandbox/SecurityNotAllowedFilterError.phpnu�[���PK���[����4a�lib/Twig/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���PK���[y,����2��lib/Twig/Sandbox/SecurityNotAllowedMethodError.phpnu�[���PK���[PMQ��4�lib/Twig/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���PK���[�M����/_�lib/Twig/Sandbox/SecurityNotAllowedTagError.phpnu�[���PK���[�}@���#��lib/Twig/Sandbox/SecurityPolicy.phpnu�[���PK���[��W���,��lib/Twig/Sandbox/SecurityPolicyInterface.phpnu�[���PK���[�S���lib/Twig/SimpleFilter.phpnu�[���PK���[�\����lib/Twig/SimpleFunction.phpnu�[���PK���[���m����lib/Twig/SimpleTest.phpnu�[���PK���[��vxxJ�lib/Twig/Source.phpnu�[���PK���[�����)�lib/Twig/SourceContextLoaderInterface.phpnu�[���PK���[ֹ鈀�<�lib/Twig/Template.phpnu�[���PK���[�yv����lib/Twig/TemplateInterface.phpnu�[���PK���[������lib/Twig/TemplateWrapper.phpnu�[���PK���[i��WW�lib/Twig/Test/Function.phpnu�[���PK���[��U��%��lib/Twig/Test/IntegrationTestCase.phpnu�[���PK���[_�<**��lib/Twig/Test/Method.phpnu�[���PK���[�r�\&&%�lib/Twig/Test/Node.phpnu�[���PK���[��P^���lib/Twig/Test/NodeTestCase.phpnu�[���PK���[�@'tt~lib/Twig/Test.phpnu�[���PK���[�5}��"3lib/Twig/TestCallableInterface.phpnu�[���PK���[�J3��3lib/Twig/TestInterface.phpnu�[���PK���[�ttu lib/Twig/Token.phpnu�[���PK���[ ��R��#+
lib/Twig/TokenParser/AutoEscape.phpnu�[���PK���[���Klib/Twig/TokenParser/Block.phpnu�[���PK���[�+�b��#Rlib/Twig/TokenParser/Deprecated.phpnu�[���PK���[:IA[��r
lib/Twig/TokenParser/Do.phpnu�[���PK���[�!'�jlib/Twig/TokenParser/Embed.phpnu�[���PK���[�z���
qlib/Twig/TokenParser/Extends.phpnu�[���PK���[�UTK���lib/Twig/TokenParser/Filter.phpnu�[���PK���[������lib/Twig/TokenParser/Flush.phpnu�[���PK���[N
����lib/Twig/TokenParser/For.phpnu�[���PK���[e�mU���lib/Twig/TokenParser/From.phpnu�[���PK���[?_d`���lib/Twig/TokenParser/If.phpnu�[���PK���[�1 ���lib/Twig/TokenParser/Import.phpnu�[���PK���[�@�|��
�lib/Twig/TokenParser/Include.phpnu�[���PK���[Bl�
���lib/Twig/TokenParser/Macro.phpnu�[���PK���[�V̐��
�lib/Twig/TokenParser/Sandbox.phpnu�[���PK���[g�����lib/Twig/TokenParser/Set.phpnu�[���PK���[������"�lib/Twig/TokenParser/Spaceless.phpnu�[���PK���[A�[���lib/Twig/TokenParser/Use.phpnu�[���PK���[�ou���lib/Twig/TokenParser/With.phpnu�[���PK���[/u�:���lib/Twig/TokenParser.phpnu�[���PK���[��Z��lib/Twig/TokenParserBroker.phpnu�[���PK���[�@v#��'*-lib/Twig/TokenParserBrokerInterface.phpnu�[���PK���[����!P2lib/Twig/TokenParserInterface.phpnu�[���PK���[�ܚ��i3lib/Twig/TokenStream.phpnu�[���PK���["�ǿ�&=4lib/Twig/Util/DeprecationCollector.phpnu�[���PK���[Z8�Q��%R5lib/Twig/Util/TemplateDirIterator.phpnu�[���PK���[��P;��b6src/Cache/CacheInterface.phpnu�[���PK���[E���0
0
l<src/Cache/FilesystemCache.phpnu�[���PK���[�6T���Fsrc/Cache/NullCache.phpnu�[���PK���[:��Xzz�Isrc/Compiler.phpnu�[���PK���[��.�����fsrc/Environment.phpnu�[���PK���[���&�&�5src/Error/Error.phpnu�[���PK���[��T����\src/Error/LoaderError.phpnu�[���PK���[3%�����^src/Error/RuntimeError.phpnu�[���PK���[ث�6���`src/Error/SyntaxError.phpnu�[���PK���[��vw��gsrc/ExpressionParser.phpnu�[���PK���[HAAA#D�src/Extension/AbstractExtension.phpnu�[���PK���[��k?�?���src/Extension/CoreExtension.phpnu�[���PK���[6����
f�src/Extension/DebugExtension.phpnu�[���PK���[�%ϑ��"V�src/Extension/EscaperExtension.phpnu�[���PK���[Ϡ��B
B
$��src/Extension/ExtensionInterface.phpnu�[���PK���[{e�rr"�src/Extension/GlobalsInterface.phpnu�[���PK���[�Cˀ�&��src/Extension/InitRuntimeInterface.phpnu�[���PK���[yxD��$��src/Extension/OptimizerExtension.phpnu�[���PK���[Em
�__#��src/Extension/ProfilerExtension.phpnu�[���PK���[��FF+��src/Extension/RuntimeExtensionInterface.phpnu�[���PK���[c ��T T "<�src/Extension/SandboxExtension.phpnu�[���PK���[������"�src/Extension/StagingExtension.phpnu�[���PK���[�iy��'�src/Extension/StringLoaderExtension.phpnu�[���PK���[W���%src/FileExtensionEscapingStrategy.phpnu�[���PK���[z���dPdP
Fsrc/Lexer.phpnu�[���PK���[�i��
�
�bsrc/Loader/ArrayLoader.phpnu�[���PK���[]�O9)),nsrc/Loader/ChainLoader.phpnu�[���PK���[vH$��src/Loader/ExistsLoaderInterface.phpnu�[���PK���[�(��$�$�src/Loader/FilesystemLoader.phpnu�[���PK���[O(�##�src/Loader/LoaderInterface.phpnu�[���PK���[0ӗPP+y�src/Loader/SourceContextLoaderInterface.phpnu�[���PK���[��Rh22$�src/Markup.phpnu�[���PK���[鉅�����src/Node/AutoEscapeNode.phpnu�[���PK���[���v�src/Node/BlockNode.phpnu�[���PK���[���qq��src/Node/BlockReferenceNode.phpnu�[���PK���[_c������src/Node/BodyNode.phpnu�[���PK���[���S�src/Node/CheckSecurityNode.phpnu�[���PK���[� N�ss��src/Node/CheckToStringNode.phpnu�[���PK���[qS��w�src/Node/DeprecatedNode.phpnu�[���PK���[���BB\�src/Node/DoNode.phpnu�[���PK���[;�h!
��src/Node/EmbedNode.phpnu�[���PK���[��*4�src/Node/Expression/AbstractExpression.phpnu�[���PK���[�:
'��src/Node/Expression/ArrayExpression.phpnu�[���PK���[���(/�src/Node/Expression/ArrowFunctionExpression.phpnu�[���PK���[�07Hii,��src/Node/Expression/AssignNameExpression.phpnu�[���PK���[rXe11-G�src/Node/Expression/Binary/AbstractBinary.phpnu�[���PK���[vr(�src/Node/Expression/Binary/AddBinary.phpnu�[���PK���[�r}�(/src/Node/Expression/Binary/AndBinary.phpnu�[���PK���[n(�/�src/Node/Expression/Binary/BitwiseAndBinary.phpnu�[���PK���[��.src/Node/Expression/Binary/BitwiseOrBinary.phpnu�[���PK���[�Y�W/rsrc/Node/Expression/Binary/BitwiseXorBinary.phpnu�[���PK���[���+�
src/Node/Expression/Binary/ConcatBinary.phpnu�[���PK���[4ֽD(N
src/Node/Expression/Binary/DivBinary.phpnu�[���PK���[�����-�src/Node/Expression/Binary/EndsWithBinary.phpnu�[���PK���[oI����*�src/Node/Expression/Binary/EqualBinary.phpnu�[���PK���[�'�)��-=src/Node/Expression/Binary/FloorDivBinary.phpnu�[���PK���[���,;src/Node/Expression/Binary/GreaterBinary.phpnu�[���PK���[Lt1t1�src/Node/Expression/Binary/GreaterEqualBinary.phpnu�[���PK���[���'��'�src/Node/Expression/Binary/InBinary.phpnu�[���PK���[�o#��)I!src/Node/Expression/Binary/LessBinary.phpnu�[���PK���[םz��.�#src/Node/Expression/Binary/LessEqualBinary.phpnu�[���PK���[L[��,�%src/Node/Expression/Binary/MatchesBinary.phpnu�[���PK���[�>Ӗ(M)src/Node/Expression/Binary/ModBinary.phpnu�[���PK���[51�(�+src/Node/Expression/Binary/MulBinary.phpnu�[���PK���[��H���-.src/Node/Expression/Binary/NotEqualBinary.phpnu�[���PK���[>�K*Z0src/Node/Expression/Binary/NotInBinary.phpnu�[���PK���[�ך'�3src/Node/Expression/Binary/OrBinary.phpnu�[���PK���[6�TZZ*6src/Node/Expression/Binary/PowerBinary.phpnu�[���PK���[��j���*�9src/Node/Expression/Binary/RangeBinary.phpnu�[���PK���[f����/=src/Node/Expression/Binary/StartsWithBinary.phpnu�[���PK���[�4�(^Asrc/Node/Expression/Binary/SubBinary.phpnu�[���PK���[�H�
�
0�Csrc/Node/Expression/BlockReferenceExpression.phpnu�[���PK���[�sa��-�-&�Nsrc/Node/Expression/CallExpression.phpnu�[���PK���[Yz^���-�|src/Node/Expression/ConditionalExpression.phpnu�[���PK���[�7�˗�*%�src/Node/Expression/ConstantExpression.phpnu�[���PK���[��nn,�src/Node/Expression/Filter/DefaultFilter.phpnu�[���PK���[�aGCC(�src/Node/Expression/FilterExpression.phpnu�[���PK���[�Sqǵ�*{�src/Node/Expression/FunctionExpression.phpnu�[���PK���[\a��
�
)��src/Node/Expression/GetAttrExpression.phpnu�[���PK���[��jț�#��src/Node/Expression/InlinePrint.phpnu�[���PK���[���,{�src/Node/Expression/MethodCallExpression.phpnu�[���PK���[Q%?{{&�src/Node/Expression/NameExpression.phpnu�[���PK���[T��o��.��src/Node/Expression/NullCoalesceExpression.phpnu�[���PK���[<O�n��(��src/Node/Expression/ParentExpression.phpnu�[���PK���[�/c��*��src/Node/Expression/TempNameExpression.phpnu�[���PK���[T�o��)�src/Node/Expression/Test/ConstantTest.phpnu�[���PK���[QΫ� � (]�src/Node/Expression/Test/DefinedTest.phpnu�[���PK���[qC�uu,;�src/Node/Expression/Test/DivisiblebyTest.phpnu�[���PK���[�J����%�src/Node/Expression/Test/EvenTest.phpnu�[���PK���[!d����%X�src/Node/Expression/Test/NullTest.phpnu�[���PK���[ja�c��$��src/Node/Expression/Test/OddTest.phpnu�[���PK���[���DD'��src/Node/Expression/Test/SameasTest.phpnu�[���PK���[�e���&s�src/Node/Expression/TestExpression.phpnu�[���PK���[s��ZZ+��src/Node/Expression/Unary/AbstractUnary.phpnu�[���PK���[�5���&A�src/Node/Expression/Unary/NegUnary.phpnu�[���PK���[���&��src/Node/Expression/Unary/NotUnary.phpnu�[���PK���['W���&�src/Node/Expression/Unary/PosUnary.phpnu�[���PK���[��ޱ�"�src/Node/FlushNode.phpnu�[���PK���[I�j11src/Node/ForLoopNode.phpnu�[���PK���[����src/Node/ForNode.phpnu�[���PK���[�X�m���src/Node/IfNode.phpnu�[���PK���[2�x8���src/Node/ImportNode.phpnu�[���PK���[Ā��||�%src/Node/IncludeNode.phpnu�[���PK���[u�i�2src/Node/MacroNode.phpnu�[���PK���[&J�I??�Asrc/Node/ModuleNode.phpnu�[���PK���[���eeH�src/Node/Node.phpnu�[���PK���[��m��!�src/Node/NodeCaptureInterface.phpnu�[���PK���[
*����
�src/Node/NodeOutputInterface.phpnu�[���PK���[������src/Node/PrintNode.phpnu�[���PK���[;r8�//��src/Node/SandboxedPrintNode.phpnu�[���PK���[���j��s�src/Node/SandboxNode.phpnu�[���PK���[�(�|g
g
H�src/Node/SetNode.phpnu�[���PK���[�~`-���src/Node/SetTempNode.phpnu�[���PK���[��$�kk��src/Node/SpacelessNode.phpnu�[���PK���[�e:422��src/Node/TextNode.phpnu�[���PK���[�e ���src/Node/WithNode.phpnu�[���PK���[��v&
��src/NodeTraverser.phpnu�[���PK���[���#11'V�src/NodeVisitor/AbstractNodeVisitor.phpnu�[���PK���[��,,&��src/NodeVisitor/EscaperNodeVisitor.phpnu�[���PK���[&� �(`src/NodeVisitor/NodeVisitorInterface.phpnu�[���PK���[6$�"�"(�src/NodeVisitor/OptimizerNodeVisitor.phpnu�[���PK���[p�+*src/NodeVisitor/SafeAnalysisNodeVisitor.phpnu�[���PK���[��w��&t>src/NodeVisitor/SandboxNodeVisitor.phpnu�[���PK���[(�lt�5�5�Osrc/Parser.phpnu�[���PK���[F�����"q�src/Profiler/Dumper/BaseDumper.phpnu�[���PK���[6)P!'��src/Profiler/Dumper/BlackfireDumper.phpnu�[���PK���[������"�src/Profiler/Dumper/HtmlDumper.phpnu�[���PK���[�C��"7�src/Profiler/Dumper/TextDumper.phpnu�[���PK���[&F�src/Profiler/Node/EnterProfileNode.phpnu�[���PK���[QH�VV&��src/Profiler/Node/LeaveProfileNode.phpnu�[���PK���[6��5s s 0b�src/Profiler/NodeVisitor/ProfilerNodeVisitor.phpnu�[���PK���[��З��5�src/Profiler/Profile.phpnu�[���PK���[����,w�src/RuntimeLoader/ContainerRuntimeLoader.phpnu�[���PK���[P͂���*��src/RuntimeLoader/FactoryRuntimeLoader.phpnu�[���PK���[��ZW11,��src/RuntimeLoader/RuntimeLoaderInterface.phpnu�[���PK���[�b�����src/Sandbox/SecurityError.phpnu�[���PK���[��Y�mm-?�src/Sandbox/SecurityNotAllowedFilterError.phpnu�[���PK���[�RB�}}/ �src/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���PK���[�ý�-��src/Sandbox/SecurityNotAllowedMethodError.phpnu�[���PK���[X��Y/I�src/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���PK���[B��KK*��src/Sandbox/SecurityNotAllowedTagError.phpnu�[���PK���[�q�3��h�src/Sandbox/SecurityPolicy.phpnu�[���PK���[��"C��'��src/Sandbox/SecurityPolicyInterface.phpnu�[���PK���[���t�src/Source.phpnu�[���PK���[q�A3sdsd��src/Template.phpnu�[���PK���[�P�՞�j`src/TemplateWrapper.phpnu�[���PK���[?yL!!
Opsrc/Test/IntegrationTestCase.phpnu�[���PK���[��N�jj��src/Test/NodeTestCase.phpnu�[���PK���[�z�Sii
S�src/Token.phpnu�[���PK���[L�芁�'��src/TokenParser/AbstractTokenParser.phpnu�[���PK���[�Ҕ)��$Ѵsrc/TokenParser/ApplyTokenParser.phpnu�[���PK���[�;Z
Z
)ֺsrc/TokenParser/AutoEscapeTokenParser.phpnu�[���PK���[�e��� � $��src/TokenParser/BlockTokenParser.phpnu�[���PK���[�f��)��src/TokenParser/DeprecatedTokenParser.phpnu�[���PK���[�yb
!��src/TokenParser/DoTokenParser.phpnu�[���PK���[�w���$[�src/TokenParser/EmbedTokenParser.phpnu�[���PK���[�^���&s�src/TokenParser/ExtendsTokenParser.phpnu�[���PK���[�@@%M�src/TokenParser/FilterTokenParser.phpnu�[���PK���[v����$��src/TokenParser/FlushTokenParser.phpnu�[���PK���[��Vjj"�src/TokenParser/ForTokenParser.phpnu�[���PK���[��xx#� src/TokenParser/FromTokenParser.phpnu�[���PK���[
B�� � !�
src/TokenParser/IfTokenParser.phpnu�[���PK���[mO/J��%� src/TokenParser/ImportTokenParser.phpnu�[���PK���[r� �SS&� src/TokenParser/IncludeTokenParser.phpnu�[���PK���[&nq�uu$;
src/TokenParser/MacroTokenParser.phpnu�[���PK���[���$$&( src/TokenParser/SandboxTokenParser.phpnu�[���PK���["��"~/ src/TokenParser/SetTokenParser.phpnu�[���PK���[�6�(�7 src/TokenParser/SpacelessTokenParser.phpnu�[���PK���[&�{Aqq(�< src/TokenParser/TokenParserInterface.phpnu�[���PK���[}����"�A src/TokenParser/UseTokenParser.phpnu�[���PK���[
O`#�I src/TokenParser/WithTokenParser.phpnu�[���PK���[�N:ott9O src/TokenStream.phpnu�[���PK���[ӉX��
�
�d src/TwigFilter.phpnu�[���PK���[����
/p src/TwigFunction.phpnu�[���PK���[�EVZ���z src/TwigTest.phpnu�[���PK���[+�=��!Y� src/Util/DeprecationCollector.phpnu�[���PK���[�~�NN
�� src/Util/TemplateDirIterator.phpnu�[���PK��[ڷ�hSSG2� 0e/0ef561281ac8395b06643c2e01eb32fde86ef3066db7f9dab34ea5b4f71fd669.phpnu�[���PK��[���z*z*G�� 10/104915164c059efbbe2c091a499e5c27c419059e93ee00b24c37b02699fe39ad.phpnu�[���PK��[;��� � G�� 1a/1a064cbcf8150ae9fc3931f88e12793408d6db8cabea91f3cdb3cf1fcea8e284.phpnu�[���PK��[1H�(�
�
G!� 21/21fec46a98d0bc3f82a64b7cf12c1a4584517721999080f674ebda09c5c26491.phpnu�[���PK��[l��~�~�Gk� 2d/2db216535923aef9afb21cce83f7c36bbb6a4ffc307c5d55113ad1c374c54efc.phpnu�[���PK��[ ��x||G`t
30/303300669fef08c5309ee815f8346b4594ca82e99e49156d55f5935db59fb1be.phpnu�[���PK��[y|�+� � GS�
3d/3daff3cbc367d4e38a747778eed6573c102ef32c8eb995746928e528e03cbf42.phpnu�[���PK��[�u5���Gr�
3e/3ebf2485f976fa552110e652daee1bc4ed8cf13da75fe6660d91314386630c50.phpnu�[���PK��[aK��RRG��
41/41535bf8829067b7ec19b42e6bc86427ade264644e6d7fae7b8c2f220c340123.phpnu�[���PK��[lM���G�
62/620d844eeea56e7d6ebf655f7cc9d057cd72995254dad7aa9595c05345ede236.phpnu�[���PK��[1G��G��
62/62b6ca1742cce97bcc6dc3dd4d9953b5879bd55cfee7e704d5c1f2a961cb65a8.phpnu�[���PK��[�L�--G�
6e/6e63d514beace2a3b0db5df53c7a38fe9e9ead673d778b80c0f2d19af667ae7b.phpnu�[���PK��[;�ӕ� � G��
6e/6e422f821a039687a3ba6620670dce9b8fd373072eff52f5f69e9998499c7b5c.phpnu�[���PK��[�?To�<�<G�
6e/6ea8f10a91928ba862b628884405de1da28ac66858cbe247885d9a601cdf0e66.phpnu�[���PK��[T�yQ�<�<G/372/72ddd909dab036cf05b1b13f61139464d6811979681f81be3447af0a4537d41b.phpnu�[���PK��[�ɫk[�[�G�p72/727242122d506802cf7a5ee7a9007bc413f15fa7b56b6a6f85df9e2ef6438a1e.phpnu�[���PK��[�����Gh(8d/8d1e2e27b363c062bc68f59984997e4cc205334645fad9b305dfd66df69af559.phpnu�[���PK��[�:�KKG�4ab/ab04c6c6ad2f223d9486d2049e1c9d887a781c40367f218613eaf787f64a6ce5.phpnu�[���PK��[GUG�=ab/ab6861ce7e2d71e6e5dfc9055c0b4ed943358cd08a41bfc538be396ea6ab04d5.phpnu�[���PK��[�P�e�!�!GTb5/b5a59e7da43c3b2b60cbc7ea67f8143b79dfeb857d2982b67b70d3b339d52704.phpnu�[���PK��[�����G.vb5/b572db06c6b2f5a249eb7e8aec92fd8349303fabc4e12c1562f5c342c71f3fca.phpnu�[���PK��[-TR�Gl�b5/b5f5eb7d1b32b4772ad16d1914b1ba282fa6e35d6643b4bdfb0962922cc22ace.phpnu�[���PK��[l7�1++G�bb/bb65dda83a0b36274a29d3aeaed0ac2b568b111e48b016a7efa3da240d7c66dd.phpnu�[���PK��[�'�++G��bb/bb384bb14c936a91c9b04faa8a430951ab964557e9f1e9d2328384db5bc1e049.phpnu�[���PK��[.
�C**G6�c7/c7aa92411c9e3c9cee6e87f91d51e9844c70307748b258d1acef99f6ef7f7c77.phpnu�[���PK��[:w�ޮ�G��c9/c9253f9bfb0ea4b41296f41d3735d758eb761b286ab75379b11e34aef8a9eeff.phpnu�[���PK��[
����?�?G�
c9/c9d2b3f1eebc47c177d8161770ba8a71ba9a6cf16dfe4b89ab226be67194700e.phpnu�[���PK��[�.�{e�e�G9I
ca/ca4d127337303702ab5be71c00cf1d5a733cb1635da2dea4e6efc706821e269e.phpnu�[���PK��[q����G�
ca/caefb1c9b754c421d6972c3b0611f34abe7e81a7168a5da51008edfbf4bb24cf.phpnu�[���PK��[�B�
�
Gp�
e6/e665a8e590e8c3e47352f22706dbfddeecc71394fe6dd64fac2dcb57118d2dde.phpnu�[���PK��[�AjZZG�
f3/f3ecb0bd78930ab08eb0698ded282cac0f5115b29eaf81bd19460f73e6fc2301.phpnu�[���PK��[ק.tKKG�3b/3bdadf1f2169e866a53dd03abdd6d3dfe35adce8bf36a59ffb4080ecd65a9a07.phpnu�[���PK��[�]t�RRGt95/9528477540a8ac1360a1cb0aa4918347b6d1edc3d58c1769f2df14ea424bf966.phpnu�[���PK��[�@���<�<G=$df/dfcf5384620afc7817a3d02a810ad5a67ba0e74dc6eb545ddf4d3d436ff71294.phpnu�[���PK��[�\�_��G�adf/df3965345750a11df92022d8555ed37abebfda572c40e8c40e47d1c93b94b86d.phpnu�[���PK��[8Ď�--G�v46/4635e48fdc879ef4dc54d51ff176a8f6fbc05e8701afcaf3411ba335892b98c8.phpnu�[���PK��[VY8%++G�~0d/0dfa433fa67424e5684e22c4a3db4a7edffc14f58fe32691a1a3393afdca3f29.phpnu�[���PK��[�]�Mz*z*G.�5e/5e55b3e3c807ca3ec7ca3f0bc8799a36eb3713561abe8e27a600f30926a19cac.phpnu�[���PK��[l���G�5e/5effd6f2d422ab060391646fb6b2bd1860cb7715f14ef34d9506fd72fe215290.phpnu�[���PK��[τ�ZZGw�dd/dda012abb7a94bab81315f28fbc258fca2848243c8e9439f724a1a82c4bbf2a8.phpnu�[���PK��[��+ISSGH�1e/1e21767c2acdbe272cbdff71613d2550e6432944e923f8373436a155d8fe5d2b.phpnu�[���PK��[и}�||G�a4/a419775fcaba4b9cbccea99a77e78ab233e7aab21cb7ce3f5df30964c221cfcc.phpnu�[���PK��[��j~�~�G8a/8a12351abc93acd5f7bdb8d01290543756b0a4801ec58d392eef0c6f9ebca535.phpnu�[���PK��[|NZ�� � G��32/329a5314289cc7cfe0f062960968c380231dd3a21b4089485f68380d647135f6.phpnu�[���PK��[c�6E�
�
G.�e0/e000359b54d4cbf1fc38f6b3a7f141d0480147e17a2fbc6cf6fb7cde871a90a4.phpnu�[���PK��[I���
�
Gx�9d/9d717f779b9ed4051069eca472d5a18e81b23726ea23ed379abf59821479f195.phpnu�[���PK��[�9�G��04/048dea81b11b99d884e31f3bc5b20eb759a4bc05d0cb04ce21ef95bca2c9f198.phpnu�[���PK��[��X���Gy�d3/d3a1f4059fc256c8ec94f356a8fb56b0c90bedaa4f252773e49b15c7ad4b4cfd.phpnu�[���PK��[��UUG��d3/d38ef5923e3193d8cbfd7aa8c155f18e8f8ee45c209dec9b1d84cdd4b4e60bfe.phpnu�[���PK��[/5B�!�!G�0c/0c653fa1a50c05f26907ffd3b617779c099ee34ad7dbfb609342426561d18dd1.phpnu�[���PK��[�G�**G�$8b/8bd4c47fc72b774df13ff44255dc05a88c2cf4b2ecf63abaaab27f7957f17238.phpnu�[���PK��[�����GF68b/8b5870b278108c0950a5aa61cb03a7cda21e5f3ffb8f04ec57d0781faa9843cf.phpnu�[���PK��[x%ZK��G�Md5/d55c4a49a2f3f763198d5b14efa1581ae2ee0553ccde718b35a13e59aeace43b.phpnu�[���PK��[1`��z*z*G�Vd5/d59dd56ec4483cd6b8e31ceea1b0510fdf3834409ad1f4bd94f4f642d50a0805.phpnu�[���PK��[�'a��G��65/65dc801652613681c0ecc10cadc2ef6db35f2c8cc2195344f06e86e2eb158720.phpnu�[���PK��[3�R� I IG�82/8210214024b6af062dc67ddd8bf47c299d7807664949fa758ff36eaed971c760.phpnu�[���PK��[�����G��82/8212841ef8206b44f0efaa7c2f9288d1a621d90787efe093cb4d04de707a3a05.phpnu�[���PK��[��5��G��ba/ba2a7bfe9fda8155b9ebabbab30080bcf014aa3d4f7e2d45be3449d7fbad829a.phpnu�[���PK��[&W�m�!�!G�19/197fba050253da6965fb4a984f2c55edf97173bdbbd171147e7d6ccbe4f13f12.phpnu�[���PK��[)�00G 48/48be3769bb9c3b1fee5e81ca8633d2c0ec2ff2a053149e7291df8da8b39e9103.phpnu�[���PK��[�(S�k
k
G�M1b/1b0a9664cf85979a94a0c905b7c269638fe57a766097cd94aa4f648359436f81.phpnu�[���PK��[��}TTG�X9f/9f2a8e05bed25129d43185f02de0793a54c99ac281d01327e07cee5bd3d20c72.phpnu�[���PK��[�\�_��G�j9f/9f942c664018f7610e720ccca20430f7244c2f3272b8f395aee9793d1e2ab972.phpnu�[���PK��[뎜4y
y
G�fa/fa3329c64975d29fdec41cf42087a8cc369489529b33ca8da362f48965d9bc2c.phpnu�[���PK��[3$>���G�3c/3c6e07a11e32ecadc617954602a47254cc343887357975ee8f1930ea014cfc2d.phpnu�[���PK��[{_W�
�
GGCe5/e54e5df792a589c9d7008994dd6e9cdae7829c6fa8d04ce12f3bf5d0f5d9b8f1.phpnu�[���PK��[QH#u G[Nad/ad5f6f1298ab395a8d4bfc67c53695c2382e434f02818f777f791f02ace846a9.phpnu�[���PK��[sG�k��G�Z7e/7ee72e62bd8dee3bc73b3dd4cf4f85d3dd2605cc45579675a9b45a9be5fa3c3f.phpnu�[���PK��[j�y
G�s81/81add79269728220ece7bf856eb26aa51efbaf28022eb5eb5da2a29eaf24a449.phpnu�[���PK��[����;;G��52/52fdc7f13ab019077c35a3cdf941e572b29f31ded364ad53ff4ee3ddf3b78363.phpnu�[���PK��[+�?�L�LG=�52/52068858242f0911b11c3a6c5081761778f2655e15fbc7ce1de05801e8f52f4a.phpnu�[���PK��[\�'�**G��52/527663362d14b9f8c97f186ac2970a7568b0a4b13ae2c5c5c3f7edf45a4b232c.phpnu�[���PK��[�]��2
2
G852/5295898b25f4d379b52a555c02a843cf7a7e30cc4616178980646de4bd7dc343.phpnu�[���PK��[K�%��&�&G�97/97f60424b593c7ebbf2f385ccd3d19830a849c8880dac8851afcd1ea104de93d.phpnu�[���PK��[1�
��GG:7d/7dac5917f08bee97ce6611da19d56e19c695064aaf9e998a8025959df5db72f4.phpnu�[���PK��[��P���G�N0a/0a602671d552891b6dcabe648224a01913e5bdcebb9ac1b7904c7b151ded58b7.phpnu�[���PK��[Q���e�e�G�Z8c/8c1e7e1867368624ff33e1a15ddc672ed186797ee90582d84dddbdc26bec8ed9.phpnu�[���PK��[/����G��cc/ccf987f534eeeb320947004cb3e4620321de7e80e2add0c449ba64675381d697.phpnu�[���PK��[NW ��
�
G+cc/cc38de9d68675bd0a0fde21c07a3f881ad59d52c5500dd6871f5ad7e15eedab2.phpnu�[���PK��[�j��?�?G713/13a4c282e70c479bc170622525cf48bdd917f84398ad22ba0e40a7c2c8ed9437.phpnu�[���PK��[Y�vgz*z*GtT13/13786c88ba4a9df36125013430f1c137702666e21644e0024221c82dbe0d8815.phpnu�[���PK��[���E E Ge89/8956e7738893168bda68445ee1e0190c1722ffe32880687ed9c9d0c7857238be.phpnu�[���PK��[�"
�2
2
G!�7f/7f1781a3f1e3d99a22c0f8947864231c2fd948d23ee61edb37b2f2c8c49d4e41.phpnu�[���PK��[�^,2�
�
Gʓ71/71b01c47d74012abe393a30f30c1df395c83502821fbb399e10fba48ddf65e25.phpnu�[���PK��[&˯%�
�
G�71/71fb8bdc8c1fe036bc7724c7988ae4147fb365b0687502e53af19e5ae649ef50.phpnu�[���PK��[\�'�**G{�71/71aa50c5b75f72793da5bf076634e579268b13c292505256d6a016673f9b0e6e.phpnu�[���PK��[B0ۚ�?�?G�84/84dafdd409b9ded5cbfb6f661ee52a328aa4569fc8cde8731dbcc1af9daeea26.phpnu�[���PK��[$�CRRGG�7c/7c1db36dc353e520853af7d315954de078a89b336c08cee39ee1b1fa4fba6a38.phpnu�[���PK��[�c�??G29/29d4555bc75a12f05c040d0fcb4fdde5551d9a77370c9e8c31060a0d4c1894f5.phpnu�[���PK��[.�m� � G�-94/94d559c4e1a70284c733716c192e98d78a75c8dc1544bf19199ad1205bf4cdd8.phpnu�[���PK��[�{}�++G6856/56e01df8b1615c5b7dde5905a0033ca9f07e7eacc41b4db73965298891533714.phpnu�[���PK��[�h�J��G�Cb8/b8230364a3ee2f99e284f11600b42b6da543a6713c9afee82408dbab0bd19c5c.phpnu�[���PK��[�j�
�
GT68/688d04c5d0f4bd58319e5a3c4369075b95c92e22e9095779fc39e086adcb9e6c.phpnu�[���PK��[��5RRG�_fc/fc33865e18ed059f77ead14bbc35a3f9d27f1256b0e5c3a076c0f05a27c085d8.phpnu�[���PK��[S��)�<�<GThbc/bc66d9ab8ccfbebd39f65b1ea09fff56ec375f1fd1dc8b1a16c06f09fcbe7f9e.phpnu�[���PK��[
� --G��b0/b0369b6fe8485298426ff5a11f3ea6f068db06448fce43e0299431b1d5b84063.phpnu�[���PK��[�U�||G_�ef/ef5674fb101b4072f719628d11d9931ce79881c1213f152ef0244877e0e48f6d.phpnu�[���PK��[gE�SSGR�63/63b8cd0e8fb7a57f71d22b35c030b6a0b3aba70f90fbed38b9d3604b66719673.phpnu�[���PK��[�/����G�7a/7aed9bdcbe4ad0be361e314239dd14c49642f7860e62d07d3cd0342e66744837.phpnu�[���PK��[8#�~�~�Gt�07/07f0baa7e6bf45fea603bb3400383da91fdc63ae035a0f78ab029da05caf204e.phpnu�[���PK��[W��FZZGiz61/6144baffe3b459d119d06d467e8dc709a5e7c0d5ffdff7d71435fe23480212e8.phpnu�[���PK��[� 6� � G:�d8/d87b6008543e6dd2de9a2e995980c60bf442d899c119320ee20fb08cd5383244.phpnu�[���PK��[�[�
�
GY�33/331ad0e829f38af4c644801d75ee115f856ce79ce367cee80dc617044bde90b4.phpnu�[���PK��[]��)E E Ge�9c/9c1b14d571671fc8c1648b07fe804228852e0de3cf83f267f69ba46537aa3bf9.phpnu�[���PK��[B�/dG!�9c/9ce56fe63ceb3bc0eec8358b885564512f145ed733609466eaf42238aab8d354.phpnu�[���PK��[�]��2
2
G��f8/f837ecfee3b45dbde2c139e17f26a679c0df5a53b5a6f51a7ad77de02a9888a8.phpnu�[���PK��[B�/dGZ�35/3545c0479649b40af1378230a192943cd42281a9aed2fe6e2c71e207c6a954bf.phpnu�[���PK��[d'����G��de/de5ecb97f24644d343af1cd155b6fe911701ed030968998532cddea98f7ff670.phpnu�[���PK��[�qk�!�!G55/5597cef4fdde325f7b39a565f5ae98c1c4232537051ecb25b24141e8c9822405.phpnu�[���PK��[w��wG+*55/5573cfc8db9cb53a84128578cfceeaefbaf11872d835b71045aa62110aefce25.phpnu�[���PK��[rlaF�?�?G!D55/559c4fcee465d02c2d323d76e20b7d39e0d522638b117d1159010c7f474778d7.phpnu�[���PK��[�����
�
G^�2c/2c326277ada22a978ccb40d94414e863502f27d1a5c12d688b2d889b21abea55.phpnu�[���PK��[�L'���G��14/148def269a01d1bd2093d0a244216542314a99a7c81c6e6e92e7def4a7a43883.phpnu�[���PK��[rlaF�?�?G��fb/fbcd80f2a7d906d223fdcf31dd45fdabe83792edb2d2f4554df8af67baa6b99e.phpnu�[���PK��[��<�<G9�80/803165c8dd9f5808f90f799d6829e282cd3ff71dcadd0eefb94bd70e6160a423.phpnu�[���PK��[eak�00G�#f1/f12747840de6303a541b29a72bec94a2ad9b58a5959332374012371ae4821314.phpnu�[���PK��[|�:�..GJ+6a/6aa551e1bbe68ad4a57acc08ab25faa7e2c7add43370d3ad02a3e011e4b388a2.phpnu�[���PK��[�"��}*}*G�Gb3/b3fb731d7330ce0a9cabbe19c78f8561ce76a8eb71d7595c25d304541b5b92ce.phpnu�[���PK��[����VVG�rfe/fea335a779d9bb4fda1bd17f9517d4ac5dc64e9439fa60ca1b8bfc0181bc6758.phpnu�[���PK��[aR������G��be/be8565ba64a093351aa59b9eb75fda833de2a5fc243b8686a99310780d9cb351.phpnu�[���PK��[W��FZZG�67/67fa2020d0e6e34857cf46cff5745c6e7170653d21fce25fa5d5bbdd439b7a3f.phpnu�[���PK��[� 6� � Gy301/0199d7cc2e334d94e0cba0989deffdf79285691dc2334177aa3580ecfe830365.phpnu�[���PK��[�[�
�
G�=64/648ff221bcdedd27677285b2d05338ff16f7b10be2d85b8d4771dc5bdea6c1cb.phpnu�[���PK��[]��)E E G�K93/93f69c2de7c7dd5dc8cb7f48212f8a84d3fd4bb76b758987e96f481153297c70.phpnu�[���PK��[d'����G`U6c/6caaadc3671e1d1a628eb326d77df0e25a72291914e189e94ca645cfd9d93b2a.phpnu�[���PK��[�qk�!�!G�o22/224cbf6eb62f19df79ede505aa756674e377358244ebcfd9be378ad9a27cccaa.phpnu�[���PK��[�����
�
G��d9/d93dc4fd7bf0e5bbe20056eddc5effe5213f176c6e3a3f403f2a3200e859a8a2.phpnu�[���PK��[�L'���Gޟf5/f5b0c2914fc05749ddeb728df8cbeb852a105cb6701c311e5b4fa0b76d16b2e1.phpnu�[���PK��[�z&�
�
G?�cf/cf4370298d0433a4ea201205c02654bc9f83e5e8789eddfa8ed8cf78564a6b31.phpnu�[���PK��[��jRRG��79/792111a238f91ef295af6aae9a74faadde6ee49c217c18944fc35fc4a2947904.phpnu�[���PK��[��_--Gy�c5/c561188e6bbdba85209a3584ba9deb194071a3595d5e6d8a3e7624c0b35fca04.phpnu�[���PK��[��Z++G�d7/d7a0bf0fc62442da637f6e9eb8bcb34fb11f559ab7ff98411adf15e3b2b47762.phpnu�[���PK��[=||G��42/42cb7f7461d4e9db9032539eed17f61d1d9d3ac06c559d4572dd53a37e038049.phpnu�[���PK��[�N��SSG�f0/f0cdc5d5c360a2da8c3af85fb0bc292586174c6feabcfb15a631a578721a49d4.phpnu�[���PK��[>L����G|50/50449965f5824704f402bc59ffd7d86b0afecdc6e1dfad741b5a136412559540.phpnu�[���PK��[�I|~�~�G�"87/87b839f42f3ea20f1a3ba065dcce5553a4005633920fd59cf0c62020043e29c0.phpnu�[���PK��[�ʺ9ɸtwig/.php_cs.distnu�[���PK��[_P?>��)�twig/composer.jsonnu�[���PK��[�g���>�twig/lib/Twig/Autoloader.phpnu�[���PK��[&����!R�twig/lib/Twig/BaseNodeVisitor.phpnu�[���PK��[Q�����"c�twig/lib/Twig/Cache/Filesystem.phpnu�[���PK��[ ��ʑ�^�twig/lib/Twig/Cache/Null.phpnu�[���PK��[�=����
;�twig/lib/Twig/CacheInterface.phpnu�[���PK��[�Vv3��/�twig/lib/Twig/Compiler.phpnu�[���PK��[��R��#��twig/lib/Twig/CompilerInterface.phpnu�[���PK��[ɻ�T��(��twig/lib/Twig/ContainerRuntimeLoader.phpnu�[���PK��[��9����twig/lib/Twig/Environment.phpnu�[���PK��[�
ei����twig/lib/Twig/Error/Loader.phpnu�[���PK��[�#ڝ���twig/lib/Twig/Error/Runtime.phpnu�[���PK��[d�˃����twig/lib/Twig/Error/Syntax.phpnu�[���PK��[�Bڨ����twig/lib/Twig/Error.phpnu�[���PK��[ð�=��'j�twig/lib/Twig/ExistsLoaderInterface.phpnu�[���PK��[D;��"��twig/lib/Twig/ExpressionParser.phpnu�[���PK��["G���
u�twig/lib/Twig/Extension/Core.phpnu�[���PK��[:��e��!n�twig/lib/Twig/Extension/Debug.phpnu�[���PK��[��Aٵ�#l�twig/lib/Twig/Extension/Escaper.phpnu�[���PK��[��I��,t�twig/lib/Twig/Extension/GlobalsInterface.phpnu�[���PK��[�����0��twig/lib/Twig/Extension/InitRuntimeInterface.phpnu�[���PK��[n���%��twig/lib/Twig/Extension/Optimizer.phpnu�[���PK��[ѕu��$��twig/lib/Twig/Extension/Profiler.phpnu�[���PK��[��3���#��twig/lib/Twig/Extension/Sandbox.phpnu�[���PK��[P�El��#��twig/lib/Twig/Extension/Staging.phpnu�[���PK��[��"���(��twig/lib/Twig/Extension/StringLoader.phpnu�[���PK��[�����twig/lib/Twig/Extension.phpnu�[���PK��[�3���$�twig/lib/Twig/ExtensionInterface.phpnu�[���PK��[�<���&�twig/lib/Twig/FactoryRuntimeLoader.phpnu�[���PK��[�,L���/9�twig/lib/Twig/FileExtensionEscapingStrategy.phpnu�[���PK��[�R��!l�twig/lib/Twig/Filter/Function.phpnu�[���PK��[�M�MXXB�twig/lib/Twig/Filter/Method.phpnu�[���PK��[��`pp��twig/lib/Twig/Filter/Node.phpnu�[���PK��[��k�����twig/lib/Twig/Filter.phpnu�[���PK��[,ı+��)��twig/lib/Twig/FilterCallableInterface.phpnu�[���PK��[� �?[[!�twig/lib/Twig/FilterInterface.phpnu�[���PK��[�Ὢ��#��twig/lib/Twig/Function/Function.phpnu�[���PK��[�a��{{!�twig/lib/Twig/Function/Method.phpnu�[���PK��[ �|||_twig/lib/Twig/Function/Node.phpnu�[���PK��[So�)��*twig/lib/Twig/Function.phpnu�[���PK��[d����+Ytwig/lib/Twig/FunctionCallableInterface.phpnu�[���PK��[9t/,,#�twig/lib/Twig/FunctionInterface.phpnu�[���PK��[��t�tttwig/lib/Twig/Lexer.phpnu�[���PK��[�Y�
�twig/lib/Twig/LexerInterface.phpnu�[���PK��[�) ��4twig/lib/Twig/Loader/Array.phpnu�[���PK��[�#�ʛ�twig/lib/Twig/Loader/Chain.phpnu�[���PK��[4`v˯�#twig/lib/Twig/Loader/Filesystem.phpnu�[���PK��[T����
twig/lib/Twig/Loader/String.phpnu�[���PK��[7b����!N'twig/lib/Twig/LoaderInterface.phpnu�[���PK��[^�<�xxI(twig/lib/Twig/Markup.phpnu�[���PK��[���! )twig/lib/Twig/Node/AutoEscape.phpnu�[���PK��[V��~���)twig/lib/Twig/Node/Block.phpnu�[���PK��[<B�G��%�*twig/lib/Twig/Node/BlockReference.phpnu�[���PK��[�Z�
���+twig/lib/Twig/Node/Body.phpnu�[���PK��[m8�2��$�,twig/lib/Twig/Node/CheckSecurity.phpnu�[���PK��[c��ţ�!�-twig/lib/Twig/Node/Deprecated.phpnu�[���PK��[�a����.twig/lib/Twig/Node/Do.phpnu�[���PK��[C��ԏ�y/twig/lib/Twig/Node/Embed.phpnu�[���PK��[����'T0twig/lib/Twig/Node/Expression/Array.phpnu�[���PK��[B&���,m1twig/lib/Twig/Node/Expression/AssignName.phpnu�[���PK��[2K����,�2twig/lib/Twig/Node/Expression/Binary/Add.phpnu�[���PK��[�~����,�3twig/lib/Twig/Node/Expression/Binary/And.phpnu�[���PK��[S
���3�4twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.phpnu�[���PK��[�ѣ���26twig/lib/Twig/Node/Expression/Binary/BitwiseOr.phpnu�[���PK��[���3\7twig/lib/Twig/Node/Expression/Binary/BitwiseXor.phpnu�[���PK��[������/�8twig/lib/Twig/Node/Expression/Binary/Concat.phpnu�[���PK��[(�B���,�9twig/lib/Twig/Node/Expression/Binary/Div.phpnu�[���PK��[W��G��1�:twig/lib/Twig/Node/Expression/Binary/EndsWith.phpnu�[���PK��[}�n2��.#<twig/lib/Twig/Node/Expression/Binary/Equal.phpnu�[���PK��[�*�/��1L=twig/lib/Twig/Node/Expression/Binary/FloorDiv.phpnu�[���PK��[-�Z��0�>twig/lib/Twig/Node/Expression/Binary/Greater.phpnu�[���PK��[ߞ����5�?twig/lib/Twig/Node/Expression/Binary/GreaterEqual.phpnu�[���PK��[K�n���+Atwig/lib/Twig/Node/Expression/Binary/In.phpnu�[���PK��[�w�~��-Btwig/lib/Twig/Node/Expression/Binary/Less.phpnu�[���PK��[�[�%��2ACtwig/lib/Twig/Node/Expression/Binary/LessEqual.phpnu�[���PK��[�y����0~Dtwig/lib/Twig/Node/Expression/Binary/Matches.phpnu�[���PK��[�aL���,�Etwig/lib/Twig/Node/Expression/Binary/Mod.phpnu�[���PK��[8Vd'��,�Ftwig/lib/Twig/Node/Expression/Binary/Mul.phpnu�[���PK��[DCO��1�Gtwig/lib/Twig/Node/Expression/Binary/NotEqual.phpnu�[���PK��[�ސB��.'Itwig/lib/Twig/Node/Expression/Binary/NotIn.phpnu�[���PK��[�����+PJtwig/lib/Twig/Node/Expression/Binary/Or.phpnu�[���PK��[�~u@��.jKtwig/lib/Twig/Node/Expression/Binary/Power.phpnu�[���PK��[ٰ�w��.�Ltwig/lib/Twig/Node/Expression/Binary/Range.phpnu�[���PK��[��s��3�Mtwig/lib/Twig/Node/Expression/Binary/StartsWith.phpnu�[���PK��[�nڸ��,�Ntwig/lib/Twig/Node/Expression/Binary/Sub.phpnu�[���PK��[��q5��(Ptwig/lib/Twig/Node/Expression/Binary.phpnu�[���PK��[(d���0CQtwig/lib/Twig/Node/Expression/BlockReference.phpnu�[���PK��[p��,��&�Rtwig/lib/Twig/Node/Expression/Call.phpnu�[���PK��[�R�!��-�Stwig/lib/Twig/Node/Expression/Conditional.phpnu�[���PK��[���T��*�Ttwig/lib/Twig/Node/Expression/Constant.phpnu�[���PK��[����4�Utwig/lib/Twig/Node/Expression/ExtensionReference.phpnu�[���PK��[#�"0��0Ztwig/lib/Twig/Node/Expression/Filter/Default.phpnu�[���PK��[f��(F[twig/lib/Twig/Node/Expression/Filter.phpnu�[���PK��[��j!��*d\twig/lib/Twig/Node/Expression/Function.phpnu�[���PK��[����)�]twig/lib/Twig/Node/Expression/GetAttr.phpnu�[���PK��[�����,�^twig/lib/Twig/Node/Expression/MethodCall.phpnu�[���PK��[�c�Ѿ�&�_twig/lib/Twig/Node/Expression/Name.phpnu�[���PK��[�=߲��.�`twig/lib/Twig/Node/Expression/NullCoalesce.phpnu�[���PK��[4\3���(1btwig/lib/Twig/Node/Expression/Parent.phpnu�[���PK��[�U��*Octwig/lib/Twig/Node/Expression/TempName.phpnu�[���PK��[�7o��/wdtwig/lib/Twig/Node/Expression/Test/Constant.phpnu�[���PK��[��!%��.�etwig/lib/Twig/Node/Expression/Test/Defined.phpnu�[���PK��[�h�n��2�ftwig/lib/Twig/Node/Expression/Test/Divisibleby.phpnu�[���PK��[�DLc��+�gtwig/lib/Twig/Node/Expression/Test/Even.phpnu�[���PK��[���+itwig/lib/Twig/Node/Expression/Test/Null.phpnu�[���PK��[��H��*+jtwig/lib/Twig/Node/Expression/Test/Odd.phpnu�[���PK��[b@R���-<ktwig/lib/Twig/Node/Expression/Test/Sameas.phpnu�[���PK��[��C��&\ltwig/lib/Twig/Node/Expression/Test.phpnu�[���PK��[��\C��+pmtwig/lib/Twig/Node/Expression/Unary/Neg.phpnu�[���PK��[V�I��+�ntwig/lib/Twig/Node/Expression/Unary/Not.phpnu�[���PK��[�P����+�otwig/lib/Twig/Node/Expression/Unary/Pos.phpnu�[���PK��[=��y��'�ptwig/lib/Twig/Node/Expression/Unary.phpnu�[���PK��[b��d��!�qtwig/lib/Twig/Node/Expression.phpnu�[���PK��[FzP���rtwig/lib/Twig/Node/Flush.phpnu�[���PK��[*�b���stwig/lib/Twig/Node/For.phpnu�[���PK��[�Nח��ttwig/lib/Twig/Node/ForLoop.phpnu�[���PK��[w=����~utwig/lib/Twig/Node/If.phpnu�[���PK��[��n��Jvtwig/lib/Twig/Node/Import.phpnu�[���PK��[�0��*wtwig/lib/Twig/Node/Include.phpnu�[���PK��[��<A��xtwig/lib/Twig/Node/Macro.phpnu�[���PK��[��禎��xtwig/lib/Twig/Node/Module.phpnu�[���PK��[ԡ�Ï��ytwig/lib/Twig/Node/Print.phpnu�[���PK��[�~����ztwig/lib/Twig/Node/Sandbox.phpnu�[���PK��[�y�@��%�{twig/lib/Twig/Node/SandboxedPrint.phpnu�[���PK��[絡߇��|twig/lib/Twig/Node/Set.phpnu�[���PK��[0�f��c}twig/lib/Twig/Node/SetTemp.phpnu�[���PK��[��͟�
H~twig/lib/Twig/Node/Spaceless.phpnu�[���PK��[5c�x��7twig/lib/Twig/Node/Text.phpnu�[���PK��[@3�&��
�twig/lib/Twig/Node/With.phpnu�[���PK��[~ң�zz�twig/lib/Twig/Node.phpnu�[���PK��[��N��&��twig/lib/Twig/NodeCaptureInterface.phpnu�[���PK��[br������twig/lib/Twig/NodeInterface.phpnu�[���PK��[O�8��%��twig/lib/Twig/NodeOutputInterface.phpnu�[���PK��[��퓔���twig/lib/Twig/NodeTraverser.phpnu�[���PK��[h��%��twig/lib/Twig/NodeVisitor/Escaper.phpnu�[���PK��[$�����'��twig/lib/Twig/NodeVisitor/Optimizer.phpnu�[���PK��[�����*ljtwig/lib/Twig/NodeVisitor/SafeAnalysis.phpnu�[���PK��[�����%��twig/lib/Twig/NodeVisitor/Sandbox.phpnu�[���PK��[�N@��&�twig/lib/Twig/NodeVisitorInterface.phpnu�[���PK��[�(%xx*�twig/lib/Twig/Parser.phpnu�[���PK��[L�E���!�twig/lib/Twig/ParserInterface.phpnu�[���PK��[
��&�twig/lib/Twig/Profiler/Dumper/Base.phpnu�[���PK��[w���+�twig/lib/Twig/Profiler/Dumper/Blackfire.phpnu�[���PK��[X�f���&)�twig/lib/Twig/Profiler/Dumper/Html.phpnu�[���PK��[�����&1�twig/lib/Twig/Profiler/Dumper/Text.phpnu�[���PK��[d����,9�twig/lib/Twig/Profiler/Node/EnterProfile.phpnu�[���PK��[�����,[�twig/lib/Twig/Profiler/Node/LeaveProfile.phpnu�[���PK��[~�~��/}�twig/lib/Twig/Profiler/NodeVisitor/Profiler.phpnu�[���PK��[%V��"��twig/lib/Twig/Profiler/Profile.phpnu�[���PK��[Stʼ��(��twig/lib/Twig/RuntimeLoaderInterface.phpnu�[���PK��[
����'њtwig/lib/Twig/Sandbox/SecurityError.phpnu�[���PK��[�����7ԛtwig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.phpnu�[���PK��[����9'�twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���PK��[y,����7��twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.phpnu�[���PK��[PMQ��9ןtwig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���PK��[�M����44�twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.phpnu�[���PK��[�}@���(x�twig/lib/Twig/Sandbox/SecurityPolicy.phpnu�[���PK��[��W���1��twig/lib/Twig/Sandbox/SecurityPolicyInterface.phpnu�[���PK��[�S���twig/lib/Twig/SimpleFilter.phpnu�[���PK��[�\��
��twig/lib/Twig/SimpleFunction.phpnu�[���PK��[���m��o�twig/lib/Twig/SimpleTest.phpnu�[���PK��[��vxx=�twig/lib/Twig/Source.phpnu�[���PK��[�����.��twig/lib/Twig/SourceContextLoaderInterface.phpnu�[���PK��[ֹ鈀�9�twig/lib/Twig/Template.phpnu�[���PK��[�yv���#�twig/lib/Twig/TemplateInterface.phpnu�[���PK��[�����!!�twig/lib/Twig/TemplateWrapper.phpnu�[���PK��[i��WW�twig/lib/Twig/Test/Function.phpnu�[���PK��[��U��*��twig/lib/Twig/Test/IntegrationTestCase.phpnu�[���PK��[_�<**ɴtwig/lib/Twig/Test/Method.phpnu�[���PK��[�r�\&&@�twig/lib/Twig/Test/Node.phpnu�[���PK��[��P^��#��twig/lib/Twig/Test/NodeTestCase.phpnu�[���PK��[�@'tt��twig/lib/Twig/Test.phpnu�[���PK��[�5}��']�twig/lib/Twig/TestCallableInterface.phpnu�[���PK��[�J3��b�twig/lib/Twig/TestInterface.phpnu�[���PK��[�tt��twig/lib/Twig/Token.phpnu�[���PK��[ ��R��(d�twig/lib/Twig/TokenParser/AutoEscape.phpnu�[���PK��[���#��twig/lib/Twig/TokenParser/Block.phpnu�[���PK��[�+�b��(��twig/lib/Twig/TokenParser/Deprecated.phpnu�[���PK��[:IA[��
��twig/lib/Twig/TokenParser/Do.phpnu�[���PK��[�!'�#��twig/lib/Twig/TokenParser/Embed.phpnu�[���PK��[�z���%��twig/lib/Twig/TokenParser/Extends.phpnu�[���PK��[�UTK��$��twig/lib/Twig/TokenParser/Filter.phpnu�[���PK��[�����#��twig/lib/Twig/TokenParser/Flush.phpnu�[���PK��[N
���!��twig/lib/Twig/TokenParser/For.phpnu�[���PK��[e�mU��"��twig/lib/Twig/TokenParser/From.phpnu�[���PK��[?_d`��
��twig/lib/Twig/TokenParser/If.phpnu�[���PK��[�1 ��$��twig/lib/Twig/TokenParser/Import.phpnu�[���PK��[�@�|��%
�twig/lib/Twig/TokenParser/Include.phpnu�[���PK��[Bl�
��##�twig/lib/Twig/TokenParser/Macro.phpnu�[���PK��[�V̐��%/�twig/lib/Twig/TokenParser/Sandbox.phpnu�[���PK��[g����!E�twig/lib/Twig/TokenParser/Set.phpnu�[���PK��[������'G�twig/lib/Twig/TokenParser/Spaceless.phpnu�[���PK��[A�[��!g�twig/lib/Twig/TokenParser/Use.phpnu�[���PK��[�ou��"i�twig/lib/Twig/TokenParser/With.phpnu�[���PK��[/u�:��p�twig/lib/Twig/TokenParser.phpnu�[���PK��[��Z�#y�twig/lib/Twig/TokenParserBroker.phpnu�[���PK��[�@v#��,��twig/lib/Twig/TokenParserBrokerInterface.phpnu�[���PK��[����&��twig/lib/Twig/TokenParserInterface.phpnu�[���PK��[�ܚ���twig/lib/Twig/TokenStream.phpnu�[���PK��["�ǿ�+��twig/lib/Twig/Util/DeprecationCollector.phpnu�[���PK��[Z8�Q��*�twig/lib/Twig/Util/TemplateDirIterator.phpnu�[���PK��[��P;��!�twig/src/Cache/CacheInterface.phpnu�[���PK��[E���0
0
",�twig/src/Cache/FilesystemCache.phpnu�[���PK��[�6T���twig/src/Cache/NullCache.phpnu�[���PK��[:��Xzz�twig/src/Compiler.phpnu�[���PK��[��.����h#twig/src/Environment.phpnu�[���PK��[���&�&��twig/src/Error/Error.phpnu�[���PK��[��T����twig/src/Error/LoaderError.phpnu�[���PK��[3%�����twig/src/Error/RuntimeError.phpnu�[���PK��[ث�6���twig/src/Error/SyntaxError.phpnu�[���PK��[��vw���#twig/src/ExpressionParser.phpnu�[���PK��[HAAA(1�twig/src/Extension/AbstractExtension.phpnu�[���PK��[��k?�?�$ʩtwig/src/Extension/CoreExtension.phpnu�[���PK��[6����%]�twig/src/Extension/DebugExtension.phpnu�[���PK��[�%ϑ��'R�twig/src/Extension/EscaperExtension.phpnu�[���PK��[Ϡ��B
B
)��twig/src/Extension/ExtensionInterface.phpnu�[���PK��[{e�rr'�twig/src/Extension/GlobalsInterface.phpnu�[���PK��[�Cˀ�+�twig/src/Extension/InitRuntimeInterface.phpnu�[���PK��[yxD��)��twig/src/Extension/OptimizerExtension.phpnu�[���PK��[Em
�__(��twig/src/Extension/ProfilerExtension.phpnu�[���PK��[��FF0��twig/src/Extension/RuntimeExtensionInterface.phpnu�[���PK��[c ��T T '[�twig/src/Extension/SandboxExtension.phpnu�[���PK��[������'�twig/src/Extension/StagingExtension.phpnu�[���PK��[�iy��,�twig/src/Extension/StringLoaderExtension.phpnu�[���PK��[W���*.�twig/src/FileExtensionEscapingStrategy.phpnu�[���PK��[z���dPdPy�twig/src/Lexer.phpnu�[���PK��[�i��
�
twig/src/Loader/ArrayLoader.phpnu�[���PK��[]�O9))i+twig/src/Loader/ChainLoader.phpnu�[���PK��[vH)�=twig/src/Loader/ExistsLoaderInterface.phpnu�[���PK��[�(��$�$$MAtwig/src/Loader/FilesystemLoader.phpnu�[���PK��[O(�###Tftwig/src/Loader/LoaderInterface.phpnu�[���PK��[0ӗPP0�ltwig/src/Loader/SourceContextLoaderInterface.phpnu�[���PK��[��Rh22zptwig/src/Markup.phpnu�[���PK��[鉅���
�stwig/src/Node/AutoEscapeNode.phpnu�[���PK��[����wtwig/src/Node/BlockNode.phpnu�[���PK��[���qq$&|twig/src/Node/BlockReferenceNode.phpnu�[���PK��[_c�����twig/src/Node/BodyNode.phpnu�[���PK��[���#twig/src/Node/CheckSecurityNode.phpnu�[���PK��[� N�ss#*�twig/src/Node/CheckToStringNode.phpnu�[���PK��[qS��
�twig/src/Node/DeprecatedNode.phpnu�[���PK��[���BBژtwig/src/Node/DoNode.phpnu�[���PK��[;�h!
d�twig/src/Node/EmbedNode.phpnu�[���PK��[��/��twig/src/Node/Expression/AbstractExpression.phpnu�[���PK��[�:
,0�twig/src/Node/Expression/ArrayExpression.phpnu�[���PK��[���(4��twig/src/Node/Expression/ArrowFunctionExpression.phpnu�[���PK��[�07Hii1�twig/src/Node/Expression/AssignNameExpression.phpnu�[���PK��[rXe112�twig/src/Node/Expression/Binary/AbstractBinary.phpnu�[���PK��[vr-v�twig/src/Node/Expression/Binary/AddBinary.phpnu�[���PK��[�r}�-վtwig/src/Node/Expression/Binary/AndBinary.phpnu�[���PK��[n(�45�twig/src/Node/Expression/Binary/BitwiseAndBinary.phpnu�[���PK��[��3��twig/src/Node/Expression/Binary/BitwiseOrBinary.phpnu�[���PK��[�Y�W4'�twig/src/Node/Expression/Binary/BitwiseXorBinary.phpnu�[���PK��[���0��twig/src/Node/Expression/Binary/ConcatBinary.phpnu�[���PK��[4ֽD-
�twig/src/Node/Expression/Binary/DivBinary.phpnu�[���PK��[�����2l�twig/src/Node/Expression/Binary/EndsWithBinary.phpnu�[���PK��[oI����/��twig/src/Node/Expression/Binary/EqualBinary.phpnu�[���PK��[�'�)��2�twig/src/Node/Expression/Binary/FloorDivBinary.phpnu�[���PK��[���1�twig/src/Node/Expression/Binary/GreaterBinary.phpnu�[���PK��[Lt1t6g�twig/src/Node/Expression/Binary/GreaterEqualBinary.phpnu�[���PK��[���'��,��twig/src/Node/Expression/Binary/InBinary.phpnu�[���PK��[�o#��.+�twig/src/Node/Expression/Binary/LessBinary.phpnu�[���PK��[םz��3x�twig/src/Node/Expression/Binary/LessEqualBinary.phpnu�[���PK��[L[��1��twig/src/Node/Expression/Binary/MatchesBinary.phpnu�[���PK��[�>Ӗ->�twig/src/Node/Expression/Binary/ModBinary.phpnu�[���PK��[51�-��twig/src/Node/Expression/Binary/MulBinary.phpnu�[���PK��[��H���2��twig/src/Node/Expression/Binary/NotEqualBinary.phpnu�[���PK��[>�K/Z�twig/src/Node/Expression/Binary/NotInBinary.phpnu�[���PK��[�ך,��twig/src/Node/Expression/Binary/OrBinary.phpnu�[���PK��[6�TZZ/�twig/src/Node/Expression/Binary/PowerBinary.phpnu�[���PK��[��j���/�twig/src/Node/Expression/Binary/RangeBinary.phpnu�[���PK��[f����4/�twig/src/Node/Expression/Binary/StartsWithBinary.phpnu�[���PK��[�4�-w�twig/src/Node/Expression/Binary/SubBinary.phpnu�[���PK��[�H�
�
5�
twig/src/Node/Expression/BlockReferenceExpression.phpnu�[���PK��[�sa��-�-+�
twig/src/Node/Expression/CallExpression.phpnu�[���PK��[Yz^���2;
twig/src/Node/Expression/ConditionalExpression.phpnu�[���PK��[�7�˗�/R?
twig/src/Node/Expression/ConstantExpression.phpnu�[���PK��[��nn1HB
twig/src/Node/Expression/Filter/DefaultFilter.phpnu�[���PK��[�aGCC-J
twig/src/Node/Expression/FilterExpression.phpnu�[���PK��[�Sqǵ�/�P
twig/src/Node/Expression/FunctionExpression.phpnu�[���PK��[\a��
�
.�W
twig/src/Node/Expression/GetAttrExpression.phpnu�[���PK��[��jț�(�b
twig/src/Node/Expression/InlinePrint.phpnu�[���PK��[���1�e
twig/src/Node/Expression/MethodCallExpression.phpnu�[���PK��[Q%?{{+5k
twig/src/Node/Expression/NameExpression.phpnu�[���PK��[T��o��3z
twig/src/Node/Expression/NullCoalesceExpression.phpnu�[���PK��[<O�n��-6�
twig/src/Node/Expression/ParentExpression.phpnu�[���PK��[�/c��/U�
twig/src/Node/Expression/TempNameExpression.phpnu�[���PK��[T�o��.u�
twig/src/Node/Expression/Test/ConstantTest.phpnu�[���PK��[QΫ� � -Ɛ
twig/src/Node/Expression/Test/DefinedTest.phpnu�[���PK��[qC�uu1��
twig/src/Node/Expression/Test/DivisiblebyTest.phpnu�[���PK��[�J����*�
twig/src/Node/Expression/Test/EvenTest.phpnu�[���PK��[!d����*С
twig/src/Node/Expression/Test/NullTest.phpnu�[���PK��[ja�c��)�
twig/src/Node/Expression/Test/OddTest.phpnu�[���PK��[���DD,Z�
twig/src/Node/Expression/Test/SameasTest.phpnu�[���PK��[�e���+��
twig/src/Node/Expression/TestExpression.phpnu�[���PK��[s��ZZ0�
twig/src/Node/Expression/Unary/AbstractUnary.phpnu�[���PK��[�5���+ҵ
twig/src/Node/Expression/Unary/NegUnary.phpnu�[���PK��[���+"�
twig/src/Node/Expression/Unary/NotUnary.phpnu�[���PK��['W���+r�
twig/src/Node/Expression/Unary/PosUnary.phpnu�[���PK��[��ޱ�¼
twig/src/Node/FlushNode.phpnu�[���PK��[I�j11��
twig/src/Node/ForLoopNode.phpnu�[���PK��[���<�
twig/src/Node/ForNode.phpnu�[���PK��[�X�m��z�
twig/src/Node/IfNode.phpnu�[���PK��[2�x8��}�
twig/src/Node/ImportNode.phpnu�[���PK��[��||��
twig/src/Node/IncludeNode.phpnu�[���PK��[u�iX�
twig/src/Node/MacroNode.phpnu�[���PK��[&J�I??�!twig/src/Node/ModuleNode.phpnu�[���PK��[���ee@!twig/src/Node/Node.phpnu�[���PK��[��m��&�]!twig/src/Node/NodeCaptureInterface.phpnu�[���PK��[
*����%�_!twig/src/Node/NodeOutputInterface.phpnu�[���PK��[������a!twig/src/Node/PrintNode.phpnu�[���PK��[;r8�//$�e!twig/src/Node/SandboxedPrintNode.phpnu�[���PK��[���j��Tm!twig/src/Node/SandboxNode.phpnu�[���PK��[�(�|g
g
.r!twig/src/Node/SetNode.phpnu�[���PK��[�~`-���!twig/src/Node/SetTempNode.phpnu�[���PK��[��$�kkσ!twig/src/Node/SpacelessNode.phpnu�[���PK��[�e:422��!twig/src/Node/TextNode.phpnu�[���PK��[�e ���!twig/src/Node/WithNode.phpnu�[���PK��[��v&
�!twig/src/NodeTraverser.phpnu�[���PK��[���#11,Z�!twig/src/NodeVisitor/AbstractNodeVisitor.phpnu�[���PK��[��,,+�!twig/src/NodeVisitor/EscaperNodeVisitor.phpnu�[���PK��[&� �-n�!twig/src/NodeVisitor/NodeVisitorInterface.phpnu�[���PK��[6$�"�"-��!twig/src/NodeVisitor/OptimizerNodeVisitor.phpnu�[���PK��[p�0#�!twig/src/NodeVisitor/SafeAnalysisNodeVisitor.phpnu�[���PK��[��w��+��!twig/src/NodeVisitor/SandboxNodeVisitor.phpnu�[���PK��[(�lt�5�5�"twig/src/Parser.phpnu�[���PK��[F�����'�D"twig/src/Profiler/Dumper/BaseDumper.phpnu�[���PK��[6)P!,�K"twig/src/Profiler/Dumper/BlackfireDumper.phpnu�[���PK��[������'?T"twig/src/Profiler/Dumper/HtmlDumper.phpnu�[���PK��[�C��'mZ"twig/src/Profiler/Dumper/TextDumper.phpnu�[���PK��[+�^"twig/src/Profiler/Node/EnterProfileNode.phpnu�[���PK��[QH�VV+�c"twig/src/Profiler/Node/LeaveProfileNode.phpnu�[���PK��[6��5s s 5�g"twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.phpnu�[���PK��[��З��q"twig/src/Profiler/Profile.phpnu�[���PK��[����1Ɓ"twig/src/RuntimeLoader/ContainerRuntimeLoader.phpnu�[���PK��[P͂���/��"twig/src/RuntimeLoader/FactoryRuntimeLoader.phpnu�[���PK��[��ZW111ۉ"twig/src/RuntimeLoader/RuntimeLoaderInterface.phpnu�[���PK��[�b����"m�"twig/src/Sandbox/SecurityError.phpnu�[���PK��[��Y�mm2��"twig/src/Sandbox/SecurityNotAllowedFilterError.phpnu�[���PK��[�RB�}}4q�"twig/src/Sandbox/SecurityNotAllowedFunctionError.phpnu�[���PK��[�ý�2R�"twig/src/Sandbox/SecurityNotAllowedMethodError.phpnu�[���PK��[X��Y4��"twig/src/Sandbox/SecurityNotAllowedPropertyError.phpnu�[���PK��[B��KK/:�"twig/src/Sandbox/SecurityNotAllowedTagError.phpnu�[���PK��[�q�3��#�"twig/src/Sandbox/SecurityPolicy.phpnu�[���PK��[��"C��,
�"twig/src/Sandbox/SecurityPolicyInterface.phpnu�[���PK��[�����"twig/src/Source.phpnu�[���PK��[q�A3sdsdB�"twig/src/Template.phpnu�[���PK��[�P�՞��#twig/src/TemplateWrapper.phpnu�[���PK��[?yL!!%�/#twig/src/Test/IntegrationTestCase.phpnu�[���PK��[��N�jj:Q#twig/src/Test/NodeTestCase.phpnu�[���PK��[�z�Sii�Y#twig/src/Token.phpnu�[���PK��[L�芁�,�q#twig/src/TokenParser/AbstractTokenParser.phpnu�[���PK��[�Ҕ)��)zt#twig/src/TokenParser/ApplyTokenParser.phpnu�[���PK��[�;Z
Z
.�z#twig/src/TokenParser/AutoEscapeTokenParser.phpnu�[���PK��[�e��� � )<�#twig/src/TokenParser/BlockTokenParser.phpnu�[���PK��[�f��.T�#twig/src/TokenParser/DeprecatedTokenParser.phpnu�[���PK��[�yb
&��#twig/src/TokenParser/DoTokenParser.phpnu�[���PK��[�w���)�#twig/src/TokenParser/EmbedTokenParser.phpnu�[���PK��[�^���+:�#twig/src/TokenParser/ExtendsTokenParser.phpnu�[���PK��[�@@*�#twig/src/TokenParser/FilterTokenParser.phpnu�[���PK��[v����)��#twig/src/TokenParser/FlushTokenParser.phpnu�[���PK��[��Vjj'�#twig/src/TokenParser/ForTokenParser.phpnu�[���PK��[��xx(��#twig/src/TokenParser/FromTokenParser.phpnu�[���PK��[
B�� � &{�#twig/src/TokenParser/IfTokenParser.phpnu�[���PK��[mO/J��*��#twig/src/TokenParser/ImportTokenParser.phpnu�[���PK��[r� �SS+|�#twig/src/TokenParser/IncludeTokenParser.phpnu�[���PK��[&nq�uu)*�#twig/src/TokenParser/MacroTokenParser.phpnu�[���PK��[���$$+��#twig/src/TokenParser/SandboxTokenParser.phpnu�[���PK��["��'w�#twig/src/TokenParser/SetTokenParser.phpnu�[���PK��[�6�-�#twig/src/TokenParser/SpacelessTokenParser.phpnu�[���PK��[&�{Aqq-��#twig/src/TokenParser/TokenParserInterface.phpnu�[���PK��[}����'�$twig/src/TokenParser/UseTokenParser.phpnu�[���PK��[
O`(� $twig/src/TokenParser/WithTokenParser.phpnu�[���PK��[�N:ottK$twig/src/TokenStream.phpnu�[���PK��[ӉX��
�
%$twig/src/TwigFilter.phpnu�[���PK��[����
K0$twig/src/TwigFunction.phpnu�[���PK��[�EVZ���:$twig/src/TwigTest.phpnu�[���PK��[+�=��&A$twig/src/Util/DeprecationCollector.phpnu�[���PK��[�~�NN%�J$twig/src/Util/TemplateDirIterator.phpnu�[���PK~~unbM$