diff --git a/composer.lock b/composer.lock
index af8d667..874bf14 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1560,6 +1560,65 @@
"time": "2015-10-27 19:07:21"
},
{
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "1289d16209491b584839022f29257ad859b8532d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d",
+ "reference": "1289d16209491b584839022f29257ad859b8532d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2016-01-20 09:13:37"
+ },
+ {
"name": "symfony/process",
"version": "v2.7.6",
"source": {
@@ -1967,20 +2026,21 @@
},
{
"name": "twig/twig",
- "version": "v1.23.1",
+ "version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6"
+ "reference": "2ed184ec2df1c05eb1935b13b01280965bd2c856"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/d9b6333ae8dd2c8e3fd256e127548def0bc614c6",
- "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/2ed184ec2df1c05eb1935b13b01280965bd2c856",
+ "reference": "2ed184ec2df1c05eb1935b13b01280965bd2c856",
"shasum": ""
},
"require": {
- "php": ">=5.2.7"
+ "php": ">=5.5",
+ "symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"symfony/debug": "~2.7",
@@ -1989,7 +2049,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.23-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -2024,7 +2084,7 @@
"keywords": [
"templating"
],
- "time": "2015-11-05 12:49:06"
+ "time": "2016-01-31 08:00:54"
},
{
"name": "wikimedia/composer-merge-plugin",
@@ -3787,7 +3847,9 @@
],
"aliases": [],
"minimum-stability": "dev",
- "stability-flags": [],
+ "stability-flags": {
+ "twig/twig": 20
+ },
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
diff --git a/core/composer.json b/core/composer.json
index dd5e958..c80c93c 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -17,7 +17,7 @@
"symfony/validator": "2.7.*",
"symfony/process": "2.7.*",
"symfony/yaml": "2.7.*",
- "twig/twig": "^1.23.1",
+ "twig/twig": "2.0.x-dev",
"doctrine/common": "2.5.*",
"doctrine/annotations": "1.2.*",
"guzzlehttp/guzzle": "~6.1",
diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
index 3a3d002..58deff1 100644
--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
@@ -27,6 +27,8 @@ class TwigEnvironment extends \Twig_Environment {
*/
protected $templateClasses;
+ protected $templateClassPrefix = '__TwigTemplate_';
+
/**
* Constructs a TwigEnvironment object and stores cache and storage
* internally.
@@ -43,10 +45,6 @@ class TwigEnvironment extends \Twig_Environment {
* The options for the Twig environment.
*/
public function __construct($root, CacheBackendInterface $cache, $twig_extension_hash, \Twig_LoaderInterface $loader = NULL, $options = array()) {
- // Ensure that twig.engine is loaded, given that it is needed to render a
- // template because functions like TwigExtension::escapeFilter() are called.
- require_once $root . '/core/themes/engines/twig/twig.engine';
-
$this->templateClasses = array();
$options += array(
@@ -66,8 +64,8 @@ public function __construct($root, CacheBackendInterface $cache, $twig_extension
$options['cache'] = new TwigPhpStorageCache($cache, $twig_extension_hash);
}
- $this->loader = $loader;
- parent::__construct($this->loader, $options);
+ $this->setLoader($loader);
+ parent::__construct($this->getLoader(), $options);
}
/**
@@ -88,7 +86,7 @@ public function getTemplateClass($name, $index = NULL) {
// node.html.twig for the output of each node and the same compiled class.
$cache_index = $name . (NULL === $index ? '' : '_' . $index);
if (!isset($this->templateClasses[$cache_index])) {
- $this->templateClasses[$cache_index] = $this->templateClassPrefix . hash('sha256', $this->loader->getCacheKey($name)) . (NULL === $index ? '' : '_' . $index);
+ $this->templateClasses[$cache_index] = $this->templateClassPrefix . hash('sha256', $this->getLoader()->getCacheKey($name)) . (NULL === $index ? '' : '_' . $index);
}
return $this->templateClasses[$cache_index];
}
diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php
index 0632db5..676641b 100644
--- a/core/lib/Drupal/Core/Template/TwigExtension.php
+++ b/core/lib/Drupal/Core/Template/TwigExtension.php
@@ -168,7 +168,7 @@ public function getFilters() {
new \Twig_SimpleFilter('safe_join', [$this, 'safeJoin'], ['needs_environment' => true, 'is_safe' => ['html']]),
// Array filters.
- new \Twig_SimpleFilter('without', 'twig_without'),
+ new \Twig_SimpleFilter('without', [$this, 'withoutFilter']),
// CSS class and ID filters.
new \Twig_SimpleFilter('clean_class', '\Drupal\Component\Utility\Html::getClass'),
@@ -557,4 +557,37 @@ public function safeJoin(\Twig_Environment $env, $value, $glue = '') {
}, (array) $value));
}
+ /**
+ * Removes child elements from a copy of the original array.
+ *
+ * Creates a copy of the renderable array and removes child elements by key
+ * specified through filter's arguments. The copy can be printed without these
+ * elements. The original renderable array is still available and can be used
+ * to print child elements in their entirety in the twig template.
+ *
+ * @param array|object $element
+ * The parent renderable array to exclude the child items.
+ * @param string[] $args, ...
+ * The string keys of $element to prevent printing.
+ *
+ * @return array
+ * The filtered renderable array.
+ */
+ public function withoutFilter($element) {
+ if ($element instanceof \ArrayAccess) {
+ $filtered_element = clone $element;
+ }
+ else {
+ $filtered_element = $element;
+ }
+ $args = func_get_args();
+ unset($args[0]);
+ foreach ($args as $arg) {
+ if (isset($filtered_element[$arg])) {
+ unset($filtered_element[$arg]);
+ }
+ }
+ return $filtered_element;
+ }
+
}
diff --git a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
index 0bc52d0..f818637 100644
--- a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
+++ b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
@@ -120,13 +120,18 @@ public function testCacheFilename() {
// Note: Later we refetch the twig service in order to bypass its internal
// static cache.
$environment = \Drupal::service('twig');
+ $template_path = 'core/modules/system/templates/container.html.twig';
- $original_filename = $environment->getCacheFilename('core/modules/system/templates/container.html.twig');
+ $cache = $environment->getCache();
+ $class = $environment->getTemplateClass($template_path);
+ $original_filename = $cache->generateKey($template_path, $class);
\Drupal::getContainer()->set('twig', NULL);
\Drupal::service('module_installer')->install(['twig_extension_test']);
$environment = \Drupal::service('twig');
- $new_extension_filename = $environment->getCacheFilename('core/modules/system/templates/container.html.twig');
+ $cache = $environment->getCache();
+ $class = $environment->getTemplateClass($template_path);
+ $new_extension_filename = $cache->generateKey($template_path, $class);
\Drupal::getContainer()->set('twig', NULL);
$this->assertNotEqual($new_extension_filename, $original_filename);
diff --git a/core/modules/system/src/Tests/Theme/TwigSettingsTest.php b/core/modules/system/src/Tests/Theme/TwigSettingsTest.php
index f581fa62..74a517b 100644
--- a/core/modules/system/src/Tests/Theme/TwigSettingsTest.php
+++ b/core/modules/system/src/Tests/Theme/TwigSettingsTest.php
@@ -101,7 +101,11 @@ function testTwigCacheOverride() {
// theme_test.template_test.html.twig.
$info = $templates->get('theme_test_template_test');
$template_filename = $info['path'] . '/' . $info['template'] . $extension;
- $cache_filename = $this->container->get('twig')->getCacheFilename($template_filename);
+
+ $environment = $this->container->get('twig');
+ $cache = $environment->getCache();
+ $class = $environment->getTemplateClass($template_filename);
+ $cache_filename = $cache->generateKey($template_filename, $class);
// Navigate to the page and make sure the template gets cached.
$this->drupalGet('theme-test/template-test');
diff --git a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php
index 3c2b851..5383fab 100644
--- a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php
+++ b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php
@@ -7,12 +7,10 @@
namespace Drupal\twig_extension_test\TwigExtension;
-use Drupal\Core\Template\TwigExtension;
-
/**
* A test Twig extension that adds a custom function and a custom filter.
*/
-class TestExtension extends TwigExtension {
+class TestExtension extends \TwigExtension {
/**
* Generates a list of all Twig functions that this extension defines.
@@ -27,9 +25,9 @@ class TestExtension extends TwigExtension {
* The value is a standard PHP callback that defines what the function does.
*/
public function getFunctions() {
- return array(
- 'testfunc' => new \Twig_Function_Function(array('Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFunction')),
- );
+ return [
+ new \Twig_SimpleFunction('testfunc', [$this, 'testFunction']),
+ ];
}
/**
@@ -45,9 +43,9 @@ public function getFunctions() {
* The value is a standard PHP callback that defines what the filter does.
*/
public function getFilters() {
- return array(
- 'testfilter' => new \Twig_Filter_Function(array('Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFilter')),
- );
+ return [
+ new \Twig_SimpleFilter('testfilter', [$this, 'testFilter']),
+ ];
}
/**
diff --git a/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.services.yml b/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.services.yml
index 491d1e8..8784c0f 100644
--- a/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.services.yml
+++ b/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.services.yml
@@ -1,6 +1,5 @@
services:
twig_extension_test.twig.test_extension:
- arguments: ['@renderer']
class: Drupal\twig_extension_test\TwigExtension\TestExtension
tags:
- { name: twig.extension }
diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
index 69941a9..3f7a5f1 100644
--- a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
@@ -12,6 +12,7 @@
use Drupal\Core\Template\Attribute;
use Drupal\Core\Template\AttributeArray;
use Drupal\Core\Template\AttributeString;
+use Drupal\Core\Template\Loader\StringLoader;
use Drupal\Tests\UnitTestCase;
use Drupal\Component\Render\MarkupInterface;
@@ -268,7 +269,7 @@ public function testChainAddRemoveClasses() {
* @covers ::addClass
*/
public function testTwigAddRemoveClasses($template, $expected, $seed_attributes = array()) {
- $loader = new \Twig_Loader_String();
+ $loader = new StringLoader();
$twig = new \Twig_Environment($loader);
$data = array('attributes' => new Attribute($seed_attributes));
$result = $twig->render($template, $data);
diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
index cb09022..d8adbc7 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
@@ -5,7 +5,7 @@
* Contains \Drupal\Tests\Core\Template\TwigExtensionTest.
*/
-namespace Drupal\Tests\Core\Template;
+namespace Drupal\Tests\Core\Template {
use Drupal\Core\Render\RenderableInterface;
use Drupal\Core\Render\RendererInterface;
@@ -31,11 +31,12 @@ class TwigExtensionTest extends UnitTestCase {
*/
public function testEscaping($template, $expected) {
$renderer = $this->getMock('\Drupal\Core\Render\RendererInterface');
- $twig = new \Twig_Environment(NULL, array(
+ $loader = new \Twig_Loader_Filesystem();
+ $twig = new \Twig_Environment($loader, array(
'debug' => TRUE,
'cache' => FALSE,
'autoescape' => 'html',
- 'optimizations' => 0
+ 'optimizations' => 0,
));
$twig->addExtension((new TwigExtension($renderer))->setUrlGenerator($this->getMock('Drupal\Core\Routing\UrlGeneratorInterface')));
@@ -97,7 +98,7 @@ public function testActiveTheme() {
->willReturn($active_theme);
$extension->setThemeManager($theme_manager);
- $loader = new \Twig_Loader_String();
+ $loader = new StringLoader();
$twig = new \Twig_Environment($loader);
$twig->addExtension($extension);
$result = $twig->render('{{ active_theme() }}');
@@ -145,7 +146,7 @@ public function testActiveThemePath() {
->willReturn($active_theme);
$extension->setThemeManager($theme_manager);
- $loader = new \Twig_Loader_String();
+ $loader = new StringLoader();
$twig = new \Twig_Environment($loader);
$twig->addExtension($extension);
$result = $twig->render('{{ active_theme_path() }}');
@@ -159,11 +160,12 @@ public function testActiveThemePath() {
*/
public function testSafeStringEscaping() {
$renderer = $this->getMock('\Drupal\Core\Render\RendererInterface');
- $twig = new \Twig_Environment(NULL, array(
+ $loader = new \Twig_Loader_Filesystem();
+ $twig = new \Twig_Environment($loader, array(
'debug' => TRUE,
'cache' => FALSE,
'autoescape' => 'html',
- 'optimizations' => 0
+ 'optimizations' => 0,
));
$twig_extension = new TwigExtension($renderer);
@@ -242,6 +244,7 @@ public function providerTestRenderVar() {
}
+
class TwigExtensionTestString {
protected $string;
@@ -255,3 +258,15 @@ public function __toString() {
}
}
+}
+
+namespace {
+ if (!function_exists('t')) {
+ function t($string, array $args = []) {
+ return strtr($string, $args);
+ }
+ }
+ if (!function_exists('file_create_url')) {
+ function file_create_url() {}
+ }
+}
diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index f4e18f5..df1baaa 100644
--- a/core/themes/engines/twig/twig.engine
+++ b/core/themes/engines/twig/twig.engine
@@ -121,35 +121,3 @@ function twig_render_template($template_file, array $variables) {
return Markup::create(implode('', $output));
}
-/**
- * Removes child elements from a copy of the original array.
- *
- * Creates a copy of the renderable array and removes child elements by key
- * specified through filter's arguments. The copy can be printed without these
- * elements. The original renderable array is still available and can be used
- * to print child elements in their entirety in the twig template.
- *
- * @param array|object $element
- * The parent renderable array to exclude the child items.
- * @param string[] $args, ...
- * The string keys of $element to prevent printing.
- *
- * @return array
- * The filtered renderable array.
- */
-function twig_without($element) {
- if ($element instanceof ArrayAccess) {
- $filtered_element = clone $element;
- }
- else {
- $filtered_element = $element;
- }
- $args = func_get_args();
- unset($args[0]);
- foreach ($args as $arg) {
- if (isset($filtered_element[$arg])) {
- unset($filtered_element[$arg]);
- }
- }
- return $filtered_element;
-}
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index 9a2fb75..7219ea7 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -9,6 +9,7 @@
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
+ '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
'454414594637b9dd94a19af83f56f1a2' => $baseDir . '/core/lib/Drupal.php',
);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 030a0de..85bdc46 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -14,6 +14,7 @@
'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper/src'),
'Zend\\Diactoros\\' => array($vendorDir . '/zendframework/zend-diactoros/src'),
'Wikimedia\\Composer\\' => array($vendorDir . '/wikimedia/composer-merge-plugin/src'),
+ 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
'Symfony\\Component\\Validator\\' => array($vendorDir . '/symfony/validator'),
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 1db6cbc..973d061 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -3623,69 +3623,6 @@
"homepage": "https://symfony.com"
},
{
- "name": "twig/twig",
- "version": "v1.23.1",
- "version_normalized": "1.23.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/twigphp/Twig.git",
- "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/d9b6333ae8dd2c8e3fd256e127548def0bc614c6",
- "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6",
- "shasum": ""
- },
- "require": {
- "php": ">=5.2.7"
- },
- "require-dev": {
- "symfony/debug": "~2.7",
- "symfony/phpunit-bridge": "~2.7"
- },
- "time": "2015-11-05 12:49:06",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.23-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "Twig_": "lib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
- },
- {
- "name": "Armin Ronacher",
- "email": "armin.ronacher@active-4.com",
- "role": "Project Founder"
- },
- {
- "name": "Twig Team",
- "homepage": "http://twig.sensiolabs.org/contributors",
- "role": "Contributors"
- }
- ],
- "description": "Twig, the flexible, fast, and secure template language for PHP",
- "homepage": "http://twig.sensiolabs.org",
- "keywords": [
- "templating"
- ]
- },
- {
"name": "wikimedia/composer-merge-plugin",
"version": "v1.3.0",
"version_normalized": "1.3.0.0",
@@ -3907,5 +3844,130 @@
"headless",
"phantomjs"
]
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "1289d16209491b584839022f29257ad859b8532d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d",
+ "reference": "1289d16209491b584839022f29257ad859b8532d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "time": "2016-01-20 09:13:37",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ]
+ },
+ {
+ "name": "twig/twig",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/twigphp/Twig.git",
+ "reference": "2ed184ec2df1c05eb1935b13b01280965bd2c856"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/2ed184ec2df1c05eb1935b13b01280965bd2c856",
+ "reference": "2ed184ec2df1c05eb1935b13b01280965bd2c856",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "require-dev": {
+ "symfony/debug": "~2.7",
+ "symfony/phpunit-bridge": "~2.7"
+ },
+ "time": "2016-01-31 08:00:54",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Twig_": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Armin Ronacher",
+ "email": "armin.ronacher@active-4.com",
+ "role": "Project Founder"
+ },
+ {
+ "name": "Twig Team",
+ "homepage": "http://twig.sensiolabs.org/contributors",
+ "role": "Contributors"
+ }
+ ],
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
+ "homepage": "http://twig.sensiolabs.org",
+ "keywords": [
+ "templating"
+ ]
}
]
diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE
new file mode 100644
index 0000000..39fa189
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014-2016 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php
new file mode 100644
index 0000000..31f678b
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Mbstring.php
@@ -0,0 +1,604 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Mbstring;
+
+/**
+ * Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
+ *
+ * Implemented:
+ * - mb_convert_encoding - Convert character encoding
+ * - mb_convert_variables - Convert character code in variable(s)
+ * - mb_decode_mimeheader - Decode string in MIME header field
+ * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED
+ * - mb_convert_case - Perform case folding on a string
+ * - mb_get_info - Get internal settings of mbstring
+ * - mb_http_input - Detect HTTP input character encoding
+ * - mb_http_output - Set/Get HTTP output character encoding
+ * - mb_internal_encoding - Set/Get internal character encoding
+ * - mb_list_encodings - Returns an array of all supported encodings
+ * - mb_output_handler - Callback function converts character encoding in output buffer
+ * - mb_strlen - Get string length
+ * - mb_strpos - Find position of first occurrence of string in a string
+ * - mb_strrpos - Find position of last occurrence of a string in a string
+ * - mb_strtolower - Make a string lowercase
+ * - mb_strtoupper - Make a string uppercase
+ * - mb_substitute_character - Set/Get substitution character
+ * - mb_substr - Get part of string
+ * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive
+ * - mb_stristr - Finds first occurrence of a string within another, case insensitive
+ * - mb_strrchr - Finds the last occurrence of a character in a string within another
+ * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
+ * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive
+ * - mb_strstr - Finds first occurrence of a string within anothers
+ * - mb_strwidth - Return width of string
+ * - mb_substr_count - Count the number of substring occurrences
+ *
+ * Not implemented:
+ * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
+ * - mb_decode_numericentity - Decode HTML numeric string reference to character
+ * - mb_encode_numericentity - Encode character to HTML numeric string reference
+ * - mb_ereg_* - Regular expression with multibyte support
+ * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable
+ * - mb_preferred_mime_name - Get MIME charset string
+ * - mb_regex_encoding - Returns current encoding for multibyte regex as string
+ * - mb_regex_set_options - Set/Get the default options for mbregex functions
+ * - mb_send_mail - Send encoded mail
+ * - mb_split - Split multibyte string using regular expression
+ * - mb_strcut - Get part of string
+ * - mb_strimwidth - Get truncated string with specified width
+ *
+ * @author Nicolas Grekas
+ *
+ * @internal
+ */
+final class Mbstring
+{
+ const MB_CASE_FOLD = PHP_INT_MAX;
+
+ private static $encodingList = array('ASCII', 'UTF-8');
+ private static $language = 'neutral';
+ private static $internalEncoding = 'UTF-8';
+ private static $caseFold = array(
+ array('µ','ſ',"\xCD\x85",'ς',"\xCF\x90","\xCF\x91","\xCF\x95","\xCF\x96","\xCF\xB0","\xCF\xB1","\xCF\xB5","\xE1\xBA\x9B","\xE1\xBE\xBE"),
+ array('μ','s','ι', 'σ','β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1",'ι'),
+ );
+
+ public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
+ {
+ if (is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) {
+ $fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
+ } else {
+ $fromEncoding = self::getEncoding($fromEncoding);
+ }
+
+ $toEncoding = self::getEncoding($toEncoding);
+
+ if ('BASE64' === $fromEncoding) {
+ $s = base64_decode($s);
+ $fromEncoding = $toEncoding;
+ }
+
+ if ('BASE64' === $toEncoding) {
+ return base64_encode($s);
+ }
+
+ if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) {
+ if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) {
+ $fromEncoding = 'Windows-1252';
+ }
+ if ('UTF-8' !== $fromEncoding) {
+ $s = iconv($fromEncoding, 'UTF-8', $s);
+ }
+
+ return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s);
+ }
+
+ if ('HTML-ENTITIES' === $fromEncoding) {
+ $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');
+ $fromEncoding = 'UTF-8';
+ }
+
+ return iconv($fromEncoding, $toEncoding, $s);
+ }
+
+ public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
+ {
+ $vars = array(&$a, &$b, &$c, &$d, &$e, &$f);
+
+ $ok = true;
+ array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
+ if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
+ $ok = false;
+ }
+ });
+
+ return $ok ? $fromEncoding : false;
+ }
+
+ public static function mb_decode_mimeheader($s)
+ {
+ return iconv_mime_decode($s, 2, self::$internalEncoding);
+ }
+
+ public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
+ {
+ trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING);
+ }
+
+ public static function mb_convert_case($s, $mode, $encoding = null)
+ {
+ if ('' === $s .= '') {
+ return '';
+ }
+
+ $encoding = self::getEncoding($encoding);
+
+ if ('UTF-8' === $encoding) {
+ $encoding = null;
+ } else {
+ $s = iconv($encoding, 'UTF-8', $s);
+ }
+
+ if (MB_CASE_TITLE == $mode) {
+ $s = preg_replace_callback('/\b\p{Ll}/u', array(__CLASS__, 'title_case_upper'), $s);
+ $s = preg_replace_callback('/\B[\p{Lu}\p{Lt}]+/u', array(__CLASS__, 'title_case_lower'), $s);
+ } else {
+ if (MB_CASE_UPPER == $mode) {
+ static $upper = null;
+ if (null === $upper) {
+ $upper = self::getData('upperCase');
+ }
+ $map = $upper;
+ } else {
+ if (self::MB_CASE_FOLD === $mode) {
+ $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s);
+ }
+
+ static $lower = null;
+ if (null === $lower) {
+ $lower = self::getData('lowerCase');
+ }
+ $map = $lower;
+ }
+
+ static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4);
+
+ $i = 0;
+ $len = strlen($s);
+
+ while ($i < $len) {
+ $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
+ $uchr = substr($s, $i, $ulen);
+ $i += $ulen;
+
+ if (isset($map[$uchr])) {
+ $uchr = $map[$uchr];
+ $nlen = strlen($uchr);
+
+ if ($nlen == $ulen) {
+ $nlen = $i;
+ do {
+ $s[--$nlen] = $uchr[--$ulen];
+ } while ($ulen);
+ } else {
+ $s = substr_replace($s, $uchr, $i - $ulen, $ulen);
+ $len += $nlen - $ulen;
+ $i += $nlen - $ulen;
+ }
+ }
+ }
+ }
+
+ if (null === $encoding) {
+ return $s;
+ }
+
+ return iconv('UTF-8', $encoding, $s);
+ }
+
+ public static function mb_internal_encoding($encoding = null)
+ {
+ if (null === $encoding) {
+ return self::$internalEncoding;
+ }
+
+ $encoding = self::getEncoding($encoding);
+
+ if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) {
+ self::$internalEncoding = $encoding;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ public static function mb_language($lang = null)
+ {
+ if (null === $lang) {
+ return self::$language;
+ }
+
+ switch ($lang = strtolower($lang)) {
+ case 'uni':
+ case 'neutral':
+ self::$language = $lang;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ public static function mb_list_encodings()
+ {
+ return array('UTF-8');
+ }
+
+ public static function mb_encoding_aliases($encoding)
+ {
+ switch (strtoupper($encoding)) {
+ case 'UTF8':
+ case 'UTF-8':
+ return array('utf8');
+ }
+
+ return false;
+ }
+
+ public static function mb_check_encoding($var = null, $encoding = null)
+ {
+ if (null === $encoding) {
+ if (null === $var) {
+ return false;
+ }
+ $encoding = self::$internalEncoding;
+ }
+
+ return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var);
+ }
+
+ public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
+ {
+ if (null === $encodingList) {
+ $encodingList = self::$encodingList;
+ } else {
+ if (!is_array($encodingList)) {
+ $encodingList = array_map('trim', explode(',', $encodingList));
+ }
+ $encodingList = array_map('strtoupper', $encodingList);
+ }
+
+ foreach ($encodingList as $enc) {
+ switch ($enc) {
+ case 'ASCII':
+ if (!preg_match('/[\x80-\xFF]/', $str)) {
+ return $enc;
+ }
+ break;
+
+ case 'UTF8':
+ case 'UTF-8':
+ if (preg_match('//u', $str)) {
+ return 'UTF-8';
+ }
+ break;
+
+ default:
+ if (0 === strncmp($enc, 'ISO-8859-', 9)) {
+ return $enc;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public static function mb_detect_order($encodingList = null)
+ {
+ if (null === $encodingList) {
+ return self::$encodingList;
+ }
+
+ if (!is_array($encodingList)) {
+ $encodingList = array_map('trim', explode(',', $encodingList));
+ }
+ $encodingList = array_map('strtoupper', $encodingList);
+
+ foreach ($encodingList as $enc) {
+ switch ($enc) {
+ default:
+ if (strncmp($enc, 'ISO-8859-', 9)) {
+ return false;
+ }
+ case 'ASCII':
+ case 'UTF8':
+ case 'UTF-8':
+ }
+ }
+
+ self::$encodingList = $encodingList;
+
+ return true;
+ }
+
+ public static function mb_strlen($s, $encoding = null)
+ {
+ $encoding = self::getEncoding($encoding);
+
+ return iconv_strlen($s, $encoding);
+ }
+
+ public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
+ {
+ $encoding = self::getEncoding($encoding);
+
+ if ('' === $needle .= '') {
+ trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING);
+
+ return false;
+ }
+
+ return iconv_strpos($haystack, $needle, $offset, $encoding);
+ }
+
+ public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
+ {
+ $encoding = self::getEncoding($encoding);
+
+ if ($offset != (int) $offset) {
+ $offset = 0;
+ } elseif ($offset = (int) $offset) {
+ if ($offset < 0) {
+ $haystack = self::mb_substr($haystack, 0, $offset, $encoding);
+ $offset = 0;
+ } else {
+ $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
+ }
+ }
+
+ $pos = iconv_strrpos($haystack, $needle, $encoding);
+
+ return false !== $pos ? $offset + $pos : false;
+ }
+
+ public static function mb_strtolower($s, $encoding = null)
+ {
+ return self::mb_convert_case($s, MB_CASE_LOWER, $encoding);
+ }
+
+ public static function mb_strtoupper($s, $encoding = null)
+ {
+ return self::mb_convert_case($s, MB_CASE_UPPER, $encoding);
+ }
+
+ public static function mb_substitute_character($c = null)
+ {
+ if (0 === strcasecmp($c, 'none')) {
+ return true;
+ }
+
+ return null !== $c ? false : 'none';
+ }
+
+ public static function mb_substr($s, $start, $length = null, $encoding = null)
+ {
+ $encoding = self::getEncoding($encoding);
+
+ if ($start < 0) {
+ $start = iconv_strlen($s, $encoding) + $start;
+ if ($start < 0) {
+ $start = 0;
+ }
+ }
+
+ if (null === $length) {
+ $length = 2147483647;
+ } elseif ($length < 0) {
+ $length = iconv_strlen($s, $encoding) + $length - $start;
+ if ($length < 0) {
+ return '';
+ }
+ }
+
+ return iconv_substr($s, $start, $length, $encoding).'';
+ }
+
+ public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
+ {
+ $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
+ $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
+
+ return self::mb_strpos($haystack, $needle, $offset, $encoding);
+ }
+
+ public static function mb_stristr($haystack, $needle, $part = false, $encoding = null)
+ {
+ $pos = self::mb_stripos($haystack, $needle, 0, $encoding);
+
+ return self::getSubpart($pos, $part, $haystack, $encoding);
+ }
+
+ public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null)
+ {
+ $encoding = self::getEncoding($encoding);
+ $needle = self::mb_substr($needle, 0, 1, $encoding);
+ $pos = iconv_strrpos($haystack, $needle, $encoding);
+
+ return self::getSubpart($pos, $part, $haystack, $encoding);
+ }
+
+ public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null)
+ {
+ $needle = self::mb_substr($needle, 0, 1, $encoding);
+ $pos = self::mb_strripos($haystack, $needle, $encoding);
+
+ return self::getSubpart($pos, $part, $haystack, $encoding);
+ }
+
+ public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
+ {
+ $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
+ $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
+
+ return self::mb_strrpos($haystack, $needle, $offset, $encoding);
+ }
+
+ public static function mb_strstr($haystack, $needle, $part = false, $encoding = null)
+ {
+ $pos = strpos($haystack, $needle);
+ if (false === $pos) {
+ return false;
+ }
+ if ($part) {
+ return substr($haystack, 0, $pos);
+ }
+
+ return substr($haystack, $pos);
+ }
+
+ public static function mb_get_info($type = 'all')
+ {
+ $info = array(
+ 'internal_encoding' => self::$internalEncoding,
+ 'http_output' => 'pass',
+ 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)',
+ 'func_overload' => 0,
+ 'func_overload_list' => 'no overload',
+ 'mail_charset' => 'UTF-8',
+ 'mail_header_encoding' => 'BASE64',
+ 'mail_body_encoding' => 'BASE64',
+ 'illegal_chars' => 0,
+ 'encoding_translation' => 'Off',
+ 'language' => self::$language,
+ 'detect_order' => self::$encodingList,
+ 'substitute_character' => 'none',
+ 'strict_detection' => 'Off',
+ );
+
+ if ('all' === $type) {
+ return $info;
+ }
+ if (isset($info[$type])) {
+ return $info[$type];
+ }
+
+ return false;
+ }
+
+ public static function mb_http_input($type = '')
+ {
+ return false;
+ }
+
+ public static function mb_http_output($encoding = null)
+ {
+ return null !== $encoding ? 'pass' === $encoding : 'pass';
+ }
+
+ public static function mb_strwidth($s, $encoding = null)
+ {
+ $encoding = self::getEncoding($encoding);
+
+ if ('UTF-8' !== $encoding) {
+ $s = iconv($encoding, 'UTF-8', $s);
+ }
+
+ $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
+
+ return ($wide << 1) + iconv_strlen($s, 'UTF-8');
+ }
+
+ public static function mb_substr_count($haystack, $needle, $encoding = null)
+ {
+ return substr_count($haystack, $needle);
+ }
+
+ public static function mb_output_handler($contents, $status)
+ {
+ return $contents;
+ }
+
+ private static function getSubpart($pos, $part, $haystack, $encoding)
+ {
+ if (false === $pos) {
+ return false;
+ }
+ if ($part) {
+ return self::mb_substr($haystack, 0, $pos, $encoding);
+ }
+
+ return self::mb_substr($haystack, $pos, null, $encoding);
+ }
+
+ private static function html_encoding_callback($m)
+ {
+ $i = 1;
+ $entities = '';
+ $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8'));
+
+ while (isset($m[$i])) {
+ if (0x80 > $m[$i]) {
+ $entities .= chr($m[$i++]);
+ continue;
+ }
+ if (0xF0 <= $m[$i]) {
+ $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
+ } elseif (0xE0 <= $m[$i]) {
+ $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
+ } else {
+ $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80;
+ }
+
+ $entities .= ''.$c.';';
+ }
+
+ return $entities;
+ }
+
+ private static function title_case_lower($s)
+ {
+ return self::mb_convert_case($s[0], MB_CASE_LOWER, 'UTF-8');
+ }
+
+ private static function title_case_upper($s)
+ {
+ return self::mb_convert_case($s[0], MB_CASE_UPPER, 'UTF-8');
+ }
+
+ private static function getData($file)
+ {
+ if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.ser')) {
+ return unserialize(file_get_contents($file));
+ }
+
+ return false;
+ }
+
+ private static function getEncoding($encoding)
+ {
+ if (null === $encoding) {
+ return self::$internalEncoding;
+ }
+
+ $encoding = strtoupper($encoding);
+
+ if ('8BIT' === $encoding || 'BINARY' === $encoding) {
+ return 'CP850';
+ }
+ if ('UTF8' === $encoding) {
+ return 'UTF-8';
+ }
+
+ return $encoding;
+ }
+}
diff --git a/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md
new file mode 100644
index 0000000..342e828
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/README.md
@@ -0,0 +1,13 @@
+Symfony Polyfill / Mbstring
+===========================
+
+This component provides a partial, native PHP implementation for the
+[Mbstring](http://php.net/mbstring) extension.
+
+More information can be found in the
+[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
+
+License
+=======
+
+This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.ser b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.ser
new file mode 100644
index 0000000..13dabdd
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.ser
@@ -0,0 +1 @@
+a:1092:{s:1:"A";s:1:"a";s:1:"B";s:1:"b";s:1:"C";s:1:"c";s:1:"D";s:1:"d";s:1:"E";s:1:"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ⴔ";s:3:"Ⴕ";s:3:"ⴕ";s:3:"Ⴖ";s:3:"ⴖ";s:3:"Ⴗ";s:3:"ⴗ";s:3:"Ⴘ";s:3:"ⴘ";s:3:"Ⴙ";s:3:"ⴙ";s:3:"Ⴚ";s:3:"ⴚ";s:3:"Ⴛ";s:3:"ⴛ";s:3:"Ⴜ";s:3:"ⴜ";s:3:"Ⴝ";s:3:"ⴝ";s:3:"Ⴞ";s:3:"ⴞ";s:3:"Ⴟ";s:3:"ⴟ";s:3:"Ⴠ";s:3:"ⴠ";s:3:"Ⴡ";s:3:"ⴡ";s:3:"Ⴢ";s:3:"ⴢ";s:3:"Ⴣ";s:3:"ⴣ";s:3:"Ⴤ";s:3:"ⴤ";s:3:"Ⴥ";s:3:"ⴥ";s:3:"Ⴧ";s:3:"ⴧ";s:3:"Ⴭ";s:3:"ⴭ";s:3:"Ḁ";s:3:"ḁ";s:3:"Ḃ";s:3:"ḃ";s:3:"Ḅ";s:3:"ḅ";s:3:"Ḇ";s:3:"ḇ";s:3:"Ḉ";s:3:"ḉ";s:3:"Ḋ";s:3:"ḋ";s:3:"Ḍ";s:3:"ḍ";s:3:"Ḏ";s:3:"ḏ";s:3:"Ḑ";s:3:"ḑ";s:3:"Ḓ";s:3:"ḓ";s:3:"Ḕ";s:3:"ḕ";s:3:"Ḗ";s:3:"ḗ";s:3:"Ḙ";s:3:"ḙ";s:3:"Ḛ";s:3:"ḛ";s:3:"Ḝ";s:3:"ḝ";s:3:"Ḟ";s:3:"ḟ";s:3:"Ḡ";s:3:"ḡ";s:3:"Ḣ";s:3:"ḣ";s:3:"Ḥ";s:3:"ḥ";s:3:"Ḧ";s:3:"ḧ";s:3:"Ḩ";s:3:"ḩ";s:3:"Ḫ";s:3:"ḫ";s:3:"Ḭ";s:3:"ḭ";s:3:"Ḯ";s:3:"ḯ";s:3:"Ḱ";s:3:"ḱ";s:3:"Ḳ";s:3:"ḳ";s:3:"Ḵ";s:3:"ḵ";s:3:"Ḷ";s:3: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:"ạ";s:3:"Ả";s:3:"ả";s:3:"Ấ";s:3:"ấ";s:3:"Ầ";s:3:"ầ";s:3:"Ẩ";s:3:"ẩ";s:3:"Ẫ";s:3:"ẫ";s:3:"Ậ";s:3:"ậ";s:3:"Ắ";s:3:"ắ";s:3:"Ằ";s:3:"ằ";s:3:"Ẳ";s:3:"ẳ";s:3:"Ẵ";s:3:"ẵ";s:3:"Ặ";s:3:"ặ";s:3:"Ẹ";s:3:"ẹ";s:3:"Ẻ";s:3:"ẻ";s:3:"Ẽ";s:3:"ẽ";s:3:"Ế";s:3:"ế";s:3:"Ề";s:3:"ề";s:3:"Ể";s:3:"ể";s:3:"Ễ";s:3:"ễ";s:3:"Ệ";s:3:"ệ";s:3:"Ỉ";s:3:"ỉ";s:3:"Ị";s:3:"ị";s:3:"Ọ";s:3:"ọ";s:3:"Ỏ";s:3:"ỏ";s:3:"Ố";s:3:"ố";s:3:"Ồ";s:3:"ồ";s:3:"Ổ";s:3:"ổ";s:3:"Ỗ";s:3:"ỗ";s:3:"Ộ";s:3:"ộ";s:3:"Ớ";s:3:"ớ";s:3:"Ờ";s:3:"ờ";s:3:"Ở";s:3:"ở";s:3:"Ỡ";s:3:"ỡ";s:3:"Ợ";s:3:"ợ";s:3:"Ụ";s:3:"ụ";s:3:"Ủ";s:3:"ủ";s:3:"Ứ";s:3:"ứ";s:3:"Ừ";s:3:"ừ";s:3:"Ử";s:3:"ử";s:3:"Ữ";s:3:"ữ";s:3:"Ự";s:3:"ự";s:3:"Ỳ";s:3:"ỳ";s:3:"Ỵ";s:3:"ỵ";s:3:"Ỷ";s:3:"ỷ";s:3:"Ỹ";s:3:"ỹ";s:3:"Ỻ";s:3:"ỻ";s:3:"Ỽ";s:3:"ỽ";s:3:"Ỿ";s:3:"ỿ";s:3:"Ἀ";s:3:"ἀ";s:3:"Ἁ";s:3:"ἁ";s:3:"Ἂ";s:3:"ἂ";s:3:"Ἃ";s:3:"ἃ";s:3:"Ἄ";s:3:"ἄ";s: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:3:"R";s:3:"r";s:3:"S";s:3:"s";s:3:"T";s:3:"t";s:3:"U";s:3:"u";s:3:"V";s:3:"v";s:3:"W";s:3:"w";s:3:"X";s:3:"x";s:3:"Y";s:3:"y";s:3:"Z";s:3:"z";s:4:"𐐀";s:4:"𐐨";s:4:"𐐁";s:4:"𐐩";s:4:"𐐂";s:4:"𐐪";s:4:"𐐃";s:4:"𐐫";s:4:"𐐄";s:4:"𐐬";s:4:"𐐅";s:4:"𐐭";s:4:"𐐆";s:4:"𐐮";s:4:"𐐇";s:4:"𐐯";s:4:"𐐈";s:4:"𐐰";s:4:"𐐉";s:4:"𐐱";s:4:"𐐊";s:4:"𐐲";s:4:"𐐋";s:4:"𐐳";s:4:"𐐌";s:4:"𐐴";s:4:"𐐍";s:4:"𐐵";s:4:"𐐎";s:4:"𐐶";s:4:"𐐏";s:4:"𐐷";s:4:"𐐐";s:4:"𐐸";s:4:"𐐑";s:4:"𐐹";s:4:"𐐒";s:4:"𐐺";s:4:"𐐓";s:4:"𐐻";s:4:"𐐔";s:4:"𐐼";s:4:"𐐕";s:4:"𐐽";s:4:"𐐖";s:4:"𐐾";s:4:"𐐗";s:4:"𐐿";s:4:"𐐘";s:4:"𐑀";s:4:"𐐙";s:4:"𐑁";s:4:"𐐚";s:4:"𐑂";s:4:"𐐛";s:4:"𐑃";s:4:"𐐜";s:4:"𐑄";s:4:"𐐝";s:4:"𐑅";s:4:"𐐞";s:4:"𐑆";s:4:"𐐟";s:4:"𐑇";s:4:"𐐠";s:4:"𐑈";s:4:"𐐡";s:4:"𐑉";s:4:"𐐢";s:4:"𐑊";s:4:"𐐣";s:4:"𐑋";s:4:"𐐤";s:4:"𐑌";s:4:"𐐥";s:4:"𐑍";s:4:"𐐦";s:4:"𐑎";s:4:"𐐧";s:4:"𐑏";s:4:"𑢠";s:4:"𑣀";s:4:"𑢡";s:4:"𑣁";s:4:"𑢢";s:4:"𑣂";s:4:"𑢣";s:4:"𑣃";s:4:"𑢤";s:4:"𑣄";s:4:"𑢥";s:4:"𑣅";s:4:"𑢦";s:4:"𑣆";s:4:"𑢧";s:4:"𑣇";s:4:"𑢨";s:4:"𑣈";s:4:"𑢩";s:4:"𑣉";s:4:"𑢪";s:4:"𑣊";s:4:"𑢫";s:4:"𑣋";s:4:"𑢬";s:4:"𑣌";s:4:"𑢭";s:4:"𑣍";s:4:"𑢮";s:4:"𑣎";s:4:"𑢯";s:4:"𑣏";s:4:"𑢰";s:4:"𑣐";s:4:"𑢱";s:4:"𑣑";s:4:"𑢲";s:4:"𑣒";s:4:"𑢳";s:4:"𑣓";s:4:"𑢴";s:4:"𑣔";s:4:"𑢵";s:4:"𑣕";s:4:"𑢶";s:4:"𑣖";s:4:"𑢷";s:4:"𑣗";s:4:"𑢸";s:4:"𑣘";s:4:"𑢹";s:4:"𑣙";s:4:"𑢺";s:4:"𑣚";s:4:"𑢻";s:4:"𑣛";s:4:"𑢼";s:4:"𑣜";s:4:"𑢽";s:4:"𑣝";s:4:"𑢾";s:4:"𑣞";s:4:"𑢿";s:4:"𑣟";}
\ No newline at end of file
diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.ser b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.ser
new file mode 100644
index 0000000..e9e0ec2
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.ser
@@ -0,0 +1 @@
+a:1100:{s:1:"a";s:1:"A";s:1:"b";s:1:"B";s:1:"c";s:1:"C";s:1:"d";s:1:"D";s:1:"e";s:1:"E";s:1:"f";s:1:"F";s:1:"g";s:1:"G";s:1:"h";s:1:"H";s:1:"i";s:1:"I";s:1:"j";s:1:"J";s:1:"k";s:1:"K";s:1:"l";s:1:"L";s:1:"m";s:1:"M";s:1:"n";s:1:"N";s:1:"o";s:1:"O";s:1:"p";s:1:"P";s:1:"q";s:1:"Q";s:1:"r";s:1:"R";s:1:"s";s:1:"S";s:1:"t";s:1:"T";s:1:"u";s:1:"U";s:1:"v";s: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ṵ";s:3:"ṷ";s:3:"Ṷ";s:3:"ṹ";s:3:"Ṹ";s:3:"ṻ";s:3:"Ṻ";s:3:"ṽ";s:3:"Ṽ";s:3:"ṿ";s:3:"Ṿ";s:3:"ẁ";s:3:"Ẁ";s:3:"ẃ";s:3:"Ẃ";s:3:"ẅ";s:3:"Ẅ";s:3:"ẇ";s:3:"Ẇ";s:3:"ẉ";s:3:"Ẉ";s:3:"ẋ";s:3:"Ẋ";s:3:"ẍ";s:3:"Ẍ";s:3:"ẏ";s:3:"Ẏ";s:3:"ẑ";s:3:"Ẑ";s:3:"ẓ";s:3:"Ẓ";s:3:"ẕ";s:3:"Ẕ";s:3:"ẛ";s:3:"Ṡ";s:3:"ạ";s:3:"Ạ";s:3:"ả";s:3:"Ả";s:3:"ấ";s:3:"Ấ";s:3:"ầ";s:3:"Ầ";s:3:"ẩ";s:3:"Ẩ";s:3:"ẫ";s:3:"Ẫ";s:3:"ậ";s:3:"Ậ";s:3:"ắ";s:3:"Ắ";s:3:"ằ";s:3:"Ằ";s:3:"ẳ";s:3:"Ẳ";s:3:"ẵ";s:3:"Ẵ";s:3:"ặ";s:3:"Ặ";s:3:"ẹ";s:3:"Ẹ";s:3:"ẻ";s:3:"Ẻ";s:3:"ẽ";s:3:"Ẽ";s:3:"ế";s:3:"Ế";s:3:"ề";s:3:"Ề";s:3:"ể";s:3:"Ể";s:3:"ễ";s:3:"Ễ";s:3:"ệ";s:3:"Ệ";s:3:"ỉ";s:3:"Ỉ";s:3:"ị";s:3:"Ị";s:3:"ọ";s:3:"Ọ";s:3:"ỏ";s:3:"Ỏ";s:3:"ố";s:3:"Ố";s:3:"ồ";s:3:"Ồ";s:3:"ổ";s:3:"Ổ";s:3:"ỗ";s:3:"Ỗ";s:3:"ộ";s:3:"Ộ";s:3:"ớ";s:3:"Ớ";s:3:"ờ";s:3:"Ờ";s:3:"ở";s:3:"Ở";s:3:"ỡ";s:3:"Ỡ";s:3:"ợ";s:3:"Ợ";s:3:"ụ";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w";s:3:"W";s:3:"x";s:3:"X";s:3:"y";s:3:"Y";s:3:"z";s:3:"Z";s:4:"𐐨";s:4:"𐐀";s:4:"𐐩";s:4:"𐐁";s:4:"𐐪";s:4:"𐐂";s:4:"𐐫";s:4:"𐐃";s:4:"𐐬";s:4:"𐐄";s:4:"𐐭";s:4:"𐐅";s:4:"𐐮";s:4:"𐐆";s:4:"𐐯";s:4:"𐐇";s:4:"𐐰";s:4:"𐐈";s:4:"𐐱";s:4:"𐐉";s:4:"𐐲";s:4:"𐐊";s:4:"𐐳";s:4:"𐐋";s:4:"𐐴";s:4:"𐐌";s:4:"𐐵";s:4:"𐐍";s:4:"𐐶";s:4:"𐐎";s:4:"𐐷";s:4:"𐐏";s:4:"𐐸";s:4:"𐐐";s:4:"𐐹";s:4:"𐐑";s:4:"𐐺";s:4:"𐐒";s:4:"𐐻";s:4:"𐐓";s:4:"𐐼";s:4:"𐐔";s:4:"𐐽";s:4:"𐐕";s:4:"𐐾";s:4:"𐐖";s:4:"𐐿";s:4:"𐐗";s:4:"𐑀";s:4:"𐐘";s:4:"𐑁";s:4:"𐐙";s:4:"𐑂";s:4:"𐐚";s:4:"𐑃";s:4:"𐐛";s:4:"𐑄";s:4:"𐐜";s:4:"𐑅";s:4:"𐐝";s:4:"𐑆";s:4:"𐐞";s:4:"𐑇";s:4:"𐐟";s:4:"𐑈";s:4:"𐐠";s:4:"𐑉";s:4:"𐐡";s:4:"𐑊";s:4:"𐐢";s:4:"𐑋";s:4:"𐐣";s:4:"𐑌";s:4:"𐐤";s:4:"𐑍";s:4:"𐐥";s:4:"𐑎";s:4:"𐐦";s:4:"𐑏";s:4:"𐐧";s:4:"𑣀";s:4:"𑢠";s:4:"𑣁";s:4:"𑢡";s:4:"𑣂";s:4:"𑢢";s:4:"𑣃";s:4:"𑢣";s:4:"𑣄";s:4:"𑢤";s:4:"𑣅";s:4:"𑢥";s:4:"𑣆";s:4:"𑢦";s:4:"𑣇";s:4:"𑢧";s:4:"𑣈";s:4:"𑢨";s:4:"𑣉";s:4:"𑢩";s:4:"𑣊";s:4:"𑢪";s:4:"𑣋";s:4:"𑢫";s:4:"𑣌";s:4:"𑢬";s:4:"𑣍";s:4:"𑢭";s:4:"𑣎";s:4:"𑢮";s:4:"𑣏";s:4:"𑢯";s:4:"𑣐";s:4:"𑢰";s:4:"𑣑";s:4:"𑢱";s:4:"𑣒";s:4:"𑢲";s:4:"𑣓";s:4:"𑢳";s:4:"𑣔";s:4:"𑢴";s:4:"𑣕";s:4:"𑢵";s:4:"𑣖";s:4:"𑢶";s:4:"𑣗";s:4:"𑢷";s:4:"𑣘";s:4:"𑢸";s:4:"𑣙";s:4:"𑢹";s:4:"𑣚";s:4:"𑢺";s:4:"𑣛";s:4:"𑢻";s:4:"𑣜";s:4:"𑢼";s:4:"𑣝";s:4:"𑢽";s:4:"𑣞";s:4:"𑢾";s:4:"𑣟";s:4:"𑢿";}
\ No newline at end of file
diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php
new file mode 100644
index 0000000..4b01b61
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/bootstrap.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Mbstring as p;
+
+if (!function_exists('mb_strlen')) {
+ define('MB_CASE_UPPER', 0);
+ define('MB_CASE_LOWER', 1);
+ define('MB_CASE_TITLE', 2);
+
+ function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
+ function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
+ function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
+ function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
+ function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
+ function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
+ function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
+ function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
+ function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
+ function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
+ function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
+ function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
+ function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
+ function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
+ function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
+ function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
+ function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
+ function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
+ function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
+ function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
+ function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
+ function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
+ function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
+ function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
+ function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
+ function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
+ function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
+ function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
+ function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
+ function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
+ function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
+ function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $v0, $a, $b, $c, $d, $e, $f); }
+}
diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json
new file mode 100644
index 0000000..ef9f323
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/composer.json
@@ -0,0 +1,34 @@
+{
+ "name": "symfony/polyfill-mbstring",
+ "type": "library",
+ "description": "Symfony polyfill for the Mbstring extension",
+ "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
+ "files": [ "bootstrap.php" ]
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ }
+}
diff --git a/vendor/twig/twig/.travis.yml b/vendor/twig/twig/.travis.yml
index 37262da..b3effbc 100644
--- a/vendor/twig/twig/.travis.yml
+++ b/vendor/twig/twig/.travis.yml
@@ -8,9 +8,6 @@ cache:
- $HOME/.composer/cache
php:
- - 5.2
- - 5.3
- - 5.4
- 5.5
- 5.6
- 7.0
@@ -21,13 +18,11 @@ env:
- TWIG_EXT=yes
install:
- # Composer is not available on PHP 5.2
- - if [ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]; then travis_retry composer install; fi
+ - travis_retry composer install
before_script:
- if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && make install"; fi
- if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
- - if [ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]; then sed -i.bak "s|vendor/autoload.php|test/bootstrap.php|" phpunit.xml.dist; fi
matrix:
fast_finish: true
diff --git a/vendor/twig/twig/CHANGELOG b/vendor/twig/twig/CHANGELOG
index e8f9da0..86068b5 100644
--- a/vendor/twig/twig/CHANGELOG
+++ b/vendor/twig/twig/CHANGELOG
@@ -1,4 +1,45 @@
-* 1.23.1 (2015-XX-XX)
+* 2.0.0 (2016-XX-XX)
+
+ * added hasser support in Twig_Template::getAttribute()
+ * sped up the json_encode filter
+ * removed reserved macro names; all names can be used as macro
+ * removed Twig_Template::getEnvironment()
+ * changed _self variable to return the current template name
+ * made the loader a required argument of Twig_Environment constructor
+ * removed Twig_Environment::clearTemplateCache()
+ * removed Twig_Autoloader (use Composer instead)
+ * removed `true` as an equivalent to `html` for the auto-escaping strategy
+ * removed pre-1.8 autoescape tag syntax
+ * dropped support for PHP 5.2, 5.3, and 5.4
+ * removed the ability to register a global variable after the runtime or the extensions have been initialized
+ * improved the performance of the filesystem loader
+ * removed features that were deprecated in 1.x
+
+* 1.24.1 (2016-XX-XX)
+
+ * marked the following methods as being internals on Twig_Environment:
+ getFunctions(), getFilters(), getTests(), getFunction(), getFilter(), getTest(),
+ getTokenParsers(), getTags(), getNodeVisitors(), getUnaryOperators(), getBinaryOperators(),
+ getFunctions(), getFilters(), getGlobals(), initGlobals(), initExtensions(), and initExtension()
+
+* 1.24.0 (2016-01-25)
+
+ * adding support for the ?? operator
+ * fixed the defined test when used on a constant, a map, or a sequence
+ * undeprecated _self (should only be used to get the template name, not the template instance)
+ * fixed parsing on PHP7
+
+* 1.23.3 (2016-01-11)
+
+ * fixed typo
+
+* 1.23.2 (2015-01-11)
+
+ * added versions in deprecated messages
+ * made file cache tolerant for trailing (back)slashes on directory configuration
+ * deprecated unused Twig_Node_Expression_ExtensionReference class
+
+* 1.23.1 (2015-11-05)
* fixed some exception messages which triggered PHP warnings
* fixed BC on Twig_Test_NodeTestCase
@@ -60,7 +101,7 @@
* fixed limited RCEs when in sandbox mode
* deprecated Twig_Template::getEnvironment()
* deprecated the _self variable for usage outside of the from and import tags
- * added Twig_BaseNodeVisitor to ease the compatibility of node visitors
+ * added Twig_BaseNodeVisitor to ease the compatibility of node visitors
between 1.x and 2.x
* 1.19.0 (2015-07-31)
diff --git a/vendor/twig/twig/LICENSE b/vendor/twig/twig/LICENSE
index a470002..cc74f81 100644
--- a/vendor/twig/twig/LICENSE
+++ b/vendor/twig/twig/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009-2014 by the Twig Team.
+Copyright (c) 2009-2016 by the Twig Team.
Some rights reserved.
diff --git a/vendor/twig/twig/composer.json b/vendor/twig/twig/composer.json
index 339a5d4..98d83a2 100644
--- a/vendor/twig/twig/composer.json
+++ b/vendor/twig/twig/composer.json
@@ -27,7 +27,8 @@
"forum": "https://groups.google.com/forum/#!forum/twig-users"
},
"require": {
- "php": ">=5.2.7"
+ "php": ">=5.5",
+ "symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
@@ -38,9 +39,15 @@
"Twig_" : "lib/"
}
},
+ "autoload-dev": {
+ "psr-0" : {
+ "Twig_Tests_" : "test/"
+ }
+ },
"extra": {
"branch-alias": {
- "dev-master": "1.23-dev"
+ "dev-master": "2.0-dev"
}
- }
+ },
+ "minimum-stability": "dev"
}
diff --git a/vendor/twig/twig/lib/Twig/Autoloader.php b/vendor/twig/twig/lib/Twig/Autoloader.php
deleted file mode 100644
index d47583f..0000000
--- a/vendor/twig/twig/lib/Twig/Autoloader.php
+++ /dev/null
@@ -1,54 +0,0 @@
-
- *
- * @deprecated Use Composer instead. Will be removed in Twig 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. Use Composer instead.', E_USER_DEPRECATED);
-
- if (PHP_VERSION_ID < 50300) {
- spl_autoload_register(array(__CLASS__, 'autoload'));
- } else {
- spl_autoload_register(array(__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 = dirname(__FILE__).'/../'.str_replace(array('_', "\0"), array('/', ''), $class).'.php')) {
- require $file;
- }
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php b/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php
index 3c6ef66..9ba3342 100644
--- a/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php
+++ b/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php
@@ -19,24 +19,16 @@
/**
* {@inheritdoc}
*/
- final public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
+ final public function enterNode(Twig_Node $node, Twig_Environment $env)
{
- if (!$node instanceof Twig_Node) {
- throw new LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.');
- }
-
return $this->doEnterNode($node, $env);
}
/**
* {@inheritdoc}
*/
- final public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
+ final public function leaveNode(Twig_Node $node, Twig_Environment $env)
{
- if (!$node instanceof Twig_Node) {
- throw new LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.');
- }
-
return $this->doLeaveNode($node, $env);
}
diff --git a/vendor/twig/twig/lib/Twig/Cache/Filesystem.php b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php
index 2c2182a..bebc2bf 100644
--- a/vendor/twig/twig/lib/Twig/Cache/Filesystem.php
+++ b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php
@@ -27,7 +27,7 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface
*/
public function __construct($directory, $options = 0)
{
- $this->directory = $directory;
+ $this->directory = rtrim($directory, '\/').'/';
$this->options = $options;
}
@@ -38,7 +38,7 @@ public function generateKey($name, $className)
{
$hash = hash('sha256', $className);
- return $this->directory.'/'.$hash[0].$hash[1].'/'.$hash.'.php';
+ return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
}
/**
diff --git a/vendor/twig/twig/lib/Twig/Compiler.php b/vendor/twig/twig/lib/Twig/Compiler.php
index abea3aa..0636f1b 100644
--- a/vendor/twig/twig/lib/Twig/Compiler.php
+++ b/vendor/twig/twig/lib/Twig/Compiler.php
@@ -15,16 +15,16 @@
*
* @author Fabien Potencier
*/
-class Twig_Compiler implements Twig_CompilerInterface
+class Twig_Compiler
{
- protected $lastLine;
- protected $source;
- protected $indentation;
- protected $env;
- protected $debugInfo = array();
- protected $sourceOffset;
- protected $sourceLine;
- protected $filename;
+ private $lastLine;
+ private $source;
+ private $indentation;
+ private $env;
+ private $debugInfo = array();
+ private $sourceOffset;
+ private $sourceLine;
+ private $filename;
/**
* Constructor.
@@ -64,12 +64,12 @@ public function getSource()
/**
* Compiles a node.
*
- * @param Twig_NodeInterface $node The node to compile
- * @param int $indentation The current indentation
+ * @param Twig_Node $node The node to compile
+ * @param int $indentation The current indentation
*
* @return Twig_Compiler The current compiler instance
*/
- public function compile(Twig_NodeInterface $node, $indentation = 0)
+ public function compile(Twig_Node $node, $indentation = 0)
{
$this->lastLine = null;
$this->source = '';
@@ -88,7 +88,7 @@ public function compile(Twig_NodeInterface $node, $indentation = 0)
return $this;
}
- public function subcompile(Twig_NodeInterface $node, $raw = true)
+ public function subcompile(Twig_Node $node, $raw = true)
{
if (false === $raw) {
$this->addIndentation();
@@ -201,11 +201,11 @@ public function repr($value)
/**
* Adds debugging information.
*
- * @param Twig_NodeInterface $node The related twig node
+ * @param Twig_Node $node The related twig node
*
* @return Twig_Compiler The current compiler instance
*/
- public function addDebugInfo(Twig_NodeInterface $node)
+ public function addDebugInfo(Twig_Node $node)
{
if ($node->getLine() != $this->lastLine) {
$this->write(sprintf("// line %d\n", $node->getLine()));
diff --git a/vendor/twig/twig/lib/Twig/CompilerInterface.php b/vendor/twig/twig/lib/Twig/CompilerInterface.php
deleted file mode 100644
index 272c767..0000000
--- a/vendor/twig/twig/lib/Twig/CompilerInterface.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 3.0)
- */
-interface Twig_CompilerInterface
-{
- /**
- * Compiles a node.
- *
- * @param Twig_NodeInterface $node The node to compile
- *
- * @return Twig_CompilerInterface The current compiler instance
- */
- public function compile(Twig_NodeInterface $node);
-
- /**
- * Gets the current PHP code after compilation.
- *
- * @return string The PHP code
- */
- public function getSource();
-}
diff --git a/vendor/twig/twig/lib/Twig/Environment.php b/vendor/twig/twig/lib/Twig/Environment.php
index 99a6b01..96e746b 100644
--- a/vendor/twig/twig/lib/Twig/Environment.php
+++ b/vendor/twig/twig/lib/Twig/Environment.php
@@ -16,38 +16,35 @@
*/
class Twig_Environment
{
- const VERSION = '1.23.1';
-
- 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 = array();
- protected $filterCallbacks = array();
- protected $staging;
-
+ const VERSION = '2.0.0-DEV';
+
+ private $charset;
+ private $loader;
+ private $debug;
+ private $autoReload;
+ private $cache;
+ private $lexer;
+ private $parser;
+ private $compiler;
+ private $baseTemplateClass;
+ private $extensions;
+ private $parsers;
+ private $visitors;
+ private $filters;
+ private $tests;
+ private $functions;
+ private $globals;
+ private $runtimeInitialized = false;
+ private $extensionInitialized = false;
+ private $loadedTemplates;
+ private $strictVariables;
+ private $unaryOperators;
+ private $binaryOperators;
+ private $templateClassPrefix = '__TwigTemplate_';
+ private $functionCallbacks = array();
+ private $filterCallbacks = array();
+ private $staging;
private $originalCache;
- private $bcWriteCacheFile = false;
- private $bcGetCacheFilename = false;
private $lastModifiedExtension = 0;
/**
@@ -76,7 +73,6 @@ class Twig_Environment
*
* * 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
* * filename: set the autoescaping strategy based on the template filename extension
* * PHP callback: a PHP callback that returns an escaping strategy based on the template "filename"
@@ -88,13 +84,9 @@ class Twig_Environment
* @param Twig_LoaderInterface $loader A Twig_LoaderInterface instance
* @param array $options An array of options
*/
- public function __construct(Twig_LoaderInterface $loader = null, $options = array())
+ public function __construct(Twig_LoaderInterface $loader, $options = array())
{
- if (null !== $loader) {
- $this->setLoader($loader);
- } else {
- @trigger_error('Not passing a Twig_LoaderInterface as the first constructor argument of Twig_Environment is deprecated.', E_USER_DEPRECATED);
- }
+ $this->setLoader($loader);
$options = array_merge(array(
'debug' => false,
@@ -108,7 +100,7 @@ public function __construct(Twig_LoaderInterface $loader = null, $options = arra
), $options);
$this->debug = (bool) $options['debug'];
- $this->charset = strtoupper($options['charset']);
+ $this->setCharset($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'];
@@ -118,23 +110,6 @@ public function __construct(Twig_LoaderInterface $loader = null, $options = arra
$this->addExtension(new Twig_Extension_Escaper($options['autoescape']));
$this->addExtension(new Twig_Extension_Optimizer($options['optimizations']));
$this->staging = new Twig_Extension_Staging();
-
- // For BC
- if (is_string($this->originalCache)) {
- $r = new ReflectionMethod($this, 'writeCacheFile');
- if ($r->getDeclaringClass()->getName() !== __CLASS__) {
- @trigger_error('The Twig_Environment::writeCacheFile method is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED);
-
- $this->bcWriteCacheFile = true;
- }
-
- $r = new ReflectionMethod($this, 'getCacheFilename');
- if ($r->getDeclaringClass()->getName() !== __CLASS__) {
- @trigger_error('The Twig_Environment::getCacheFilename method is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED);
-
- $this->bcGetCacheFilename = true;
- }
- }
}
/**
@@ -264,10 +239,6 @@ public function setCache($cache)
} elseif (false === $cache) {
$this->originalCache = $cache;
$this->cache = new Twig_Cache_Null();
- } elseif (null === $cache) {
- @trigger_error('Using "null" as the cache strategy is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED);
- $this->originalCache = false;
- $this->cache = new Twig_Cache_Null();
} elseif ($cache instanceof Twig_CacheInterface) {
$this->originalCache = $this->cache = $cache;
} else {
@@ -276,24 +247,6 @@ public function setCache($cache)
}
/**
- * 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 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:
@@ -317,20 +270,6 @@ public function getTemplateClass($name, $index = null)
}
/**
- * 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 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
-
- return $this->templateClassPrefix;
- }
-
- /**
* Renders a template.
*
* @param string $name The template name
@@ -368,7 +307,7 @@ public function display($name, array $context = array())
* @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
+ * @return Twig_Template A template instance representing the given template name
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
@@ -382,11 +321,7 @@ public function loadTemplate($name, $index = null)
}
if (!class_exists($cls, false)) {
- if ($this->bcGetCacheFilename) {
- $key = $this->getCacheFilename($name);
- } else {
- $key = $this->cache->generateKey($name, $cls);
- }
+ $key = $this->cache->generateKey($name, $cls);
if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
$this->cache->load($key);
@@ -394,11 +329,7 @@ public function loadTemplate($name, $index = null)
if (!class_exists($cls, false)) {
$content = $this->compileSource($this->getLoader()->getSource($name), $name);
- if ($this->bcWriteCacheFile) {
- $this->writeCacheFile($key, $content);
- } else {
- $this->cache->write($key, $content);
- }
+ $this->cache->write($key, $content);
eval('?>'.$content);
}
@@ -435,12 +366,9 @@ public function createTemplate($template)
$this->setLoader($loader);
try {
$template = $this->loadTemplate($name);
- } catch (Exception $e) {
+ } finally {
$this->setLoader($current);
-
- throw $e;
}
- $this->setLoader($current);
return $template;
}
@@ -474,7 +402,7 @@ public function isTemplateFresh($name, $time)
/**
* Tries to load a template consecutively from an array.
*
- * Similar to loadTemplate() but it also accepts Twig_TemplateInterface instances and an array
+ * Similar to loadTemplate() but it also accepts Twig_Template instances and an array
* of templates where each is tried to be loaded.
*
* @param string|Twig_Template|array $names A template or an array of templates to try consecutively
@@ -509,39 +437,9 @@ public function resolveTemplate($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 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
-
- $this->loadedTemplates = array();
- }
-
- /**
- * 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 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 A Twig_LexerInterface instance
+ * @return Twig_Lexer A Twig_Lexer instance
*/
public function getLexer()
{
@@ -555,9 +453,9 @@ public function getLexer()
/**
* Sets the Lexer instance.
*
- * @param Twig_LexerInterface $lexer A Twig_LexerInterface instance
+ * @param Twig_Lexer $lexer A Twig_Lexer instance
*/
- public function setLexer(Twig_LexerInterface $lexer)
+ public function setLexer(Twig_Lexer $lexer)
{
$this->lexer = $lexer;
}
@@ -580,7 +478,7 @@ public function tokenize($source, $name = null)
/**
* Gets the Parser instance.
*
- * @return Twig_ParserInterface A Twig_ParserInterface instance
+ * @return Twig_Parser A Twig_Parser instance
*/
public function getParser()
{
@@ -594,9 +492,9 @@ public function getParser()
/**
* Sets the Parser instance.
*
- * @param Twig_ParserInterface $parser A Twig_ParserInterface instance
+ * @param Twig_Parser $parser A Twig_Parser instance
*/
- public function setParser(Twig_ParserInterface $parser)
+ public function setParser(Twig_Parser $parser)
{
$this->parser = $parser;
}
@@ -618,7 +516,7 @@ public function parse(Twig_TokenStream $stream)
/**
* Gets the Compiler instance.
*
- * @return Twig_CompilerInterface A Twig_CompilerInterface instance
+ * @return Twig_Compiler A Twig_Compiler instance
*/
public function getCompiler()
{
@@ -632,9 +530,9 @@ public function getCompiler()
/**
* Sets the Compiler instance.
*
- * @param Twig_CompilerInterface $compiler A Twig_CompilerInterface instance
+ * @param Twig_Compiler $compiler A Twig_Compiler instance
*/
- public function setCompiler(Twig_CompilerInterface $compiler)
+ public function setCompiler(Twig_Compiler $compiler)
{
$this->compiler = $compiler;
}
@@ -642,11 +540,11 @@ public function setCompiler(Twig_CompilerInterface $compiler)
/**
* Compiles a node and returns the PHP code.
*
- * @param Twig_NodeInterface $node A Twig_NodeInterface instance
+ * @param Twig_Node $node A Twig_Node instance
*
* @return string The compiled PHP source code
*/
- public function compile(Twig_NodeInterface $node)
+ public function compile(Twig_Node $node)
{
return $this->getCompiler()->compile($node)->getSource();
}
@@ -696,10 +594,6 @@ public function setLoader(Twig_LoaderInterface $loader)
*/
public function getLoader()
{
- if (null === $this->loader) {
- throw new LogicException('You must set a loader first.');
- }
-
return $this->loader;
}
@@ -710,7 +604,12 @@ public function getLoader()
*/
public function setCharset($charset)
{
- $this->charset = strtoupper($charset);
+ if ('UTF8' === $charset = strtoupper($charset)) {
+ // iconv on Windows requires "UTF-8" instead of "UTF8"
+ $charset = 'UTF-8';
+ }
+
+ $this->charset = $charset;
}
/**
@@ -725,23 +624,15 @@ public function getCharset()
/**
* 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 Twig_Extension_InitRuntimeInterface) {
- $m = new ReflectionMethod($extension, 'initRuntime');
-
- if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) {
- @trigger_error(sprintf('Defining the initRuntime() method in the "%s" extension is deprecated. 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);
- }
+ foreach ($this->getExtensions() as $extension) {
+ if ($extension instanceof Twig_Extension_InitRuntimeInterface) {
+ $extension->initRuntime($this);
}
-
- $extension->initRuntime($this);
}
}
@@ -787,7 +678,7 @@ public function addExtension(Twig_ExtensionInterface $extension)
}
if (isset($this->extensions[$name])) {
- @trigger_error(sprintf('The possibility to register the same extension twice ("%s") is deprecated and will be removed in Twig 2.0. Use proper PHP inheritance instead.', $name), E_USER_DEPRECATED);
+ throw new LogicException(sprintf('Unable to register extension "%s" as it is already registered.', $name));
}
$this->lastModifiedExtension = 0;
@@ -796,26 +687,6 @@ public function addExtension(Twig_ExtensionInterface $extension)
}
/**
- * 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 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));
- }
-
- unset($this->extensions[$name]);
- }
-
- /**
* Registers an array of extensions.
*
* @param array $extensions An array of extensions
@@ -854,7 +725,9 @@ public function addTokenParser(Twig_TokenParserInterface $parser)
/**
* Gets the registered Token Parsers.
*
- * @return Twig_TokenParserBrokerInterface A broker containing token parsers
+ * @return Twig_TokenParserInterface[] An array of Twig_TokenParserInterface
+ *
+ * @internal
*/
public function getTokenParsers()
{
@@ -868,17 +741,15 @@ public function getTokenParsers()
/**
* Gets registered tags.
*
- * Be warned that this method cannot return tags defined by Twig_TokenParserBrokerInterface classes.
- *
* @return Twig_TokenParserInterface[] An array of Twig_TokenParserInterface instances
+ *
+ * @internal
*/
public function getTags()
{
$tags = array();
- foreach ($this->getTokenParsers()->getParsers() as $parser) {
- if ($parser instanceof Twig_TokenParserInterface) {
- $tags[$parser->getTag()] = $parser;
- }
+ foreach ($this->getTokenParsers() as $parser) {
+ $tags[$parser->getTag()] = $parser;
}
return $tags;
@@ -902,6 +773,8 @@ public function addNodeVisitor(Twig_NodeVisitorInterface $visitor)
* Gets the registered Node Visitors.
*
* @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
+ *
+ * @internal
*/
public function getNodeVisitors()
{
@@ -915,27 +788,15 @@ public function getNodeVisitors()
/**
* Registers a Filter.
*
- * @param string|Twig_SimpleFilter $name The filter name or a Twig_SimpleFilter instance
- * @param Twig_FilterInterface|Twig_SimpleFilter $filter A Twig_FilterInterface instance or a Twig_SimpleFilter instance
+ * @param Twig_Filter $filter A Twig_Filter instance
*/
- public function addFilter($name, $filter = null)
+ public function addFilter(Twig_Filter $filter)
{
- if (!$name instanceof Twig_SimpleFilter && !($filter instanceof Twig_SimpleFilter || $filter instanceof Twig_FilterInterface)) {
- throw new LogicException('A filter must be an instance of Twig_FilterInterface or Twig_SimpleFilter');
- }
-
- if ($name instanceof Twig_SimpleFilter) {
- $filter = $name;
- $name = $filter->getName();
- } else {
- @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. 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));
+ throw new LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $filter->getName()));
}
- $this->staging->addFilter($name, $filter);
+ $this->staging->addFilter($filter);
}
/**
@@ -947,6 +808,8 @@ public function addFilter($name, $filter = null)
* @param string $name The filter name
*
* @return Twig_Filter|false A Twig_Filter instance or false if the filter does not exist
+ *
+ * @internal
*/
public function getFilter($name)
{
@@ -972,7 +835,7 @@ public function getFilter($name)
}
foreach ($this->filterCallbacks as $callback) {
- if (false !== $filter = call_user_func($callback, $name)) {
+ if (false !== $filter = $callback($name)) {
return $filter;
}
}
@@ -980,7 +843,7 @@ public function getFilter($name)
return false;
}
- public function registerUndefinedFilterCallback($callable)
+ public function registerUndefinedFilterCallback(callable $callable)
{
$this->filterCallbacks[] = $callable;
}
@@ -988,11 +851,13 @@ public function registerUndefinedFilterCallback($callable)
/**
* Gets the registered Filters.
*
- * Be warned that this method cannot return filters defined with registerUndefinedFunctionCallback.
+ * Be warned that this method cannot return filters defined with registerUndefinedFilterCallback.
*
- * @return Twig_FilterInterface[] An array of Twig_FilterInterface instances
+ * @return Twig_Filter[] An array of Twig_Filter instances
*
* @see registerUndefinedFilterCallback
+ *
+ * @internal
*/
public function getFilters()
{
@@ -1006,33 +871,23 @@ public function getFilters()
/**
* Registers a Test.
*
- * @param string|Twig_SimpleTest $name The test name or a Twig_SimpleTest instance
- * @param Twig_TestInterface|Twig_SimpleTest $test A Twig_TestInterface instance or a Twig_SimpleTest instance
+ * @param Twig_Test $test A Twig_Test instance
*/
- public function addTest($name, $test = null)
+ public function addTest(Twig_Test $test)
{
- if (!$name instanceof Twig_SimpleTest && !($test instanceof Twig_SimpleTest || $test instanceof Twig_TestInterface)) {
- throw new LogicException('A test must be an instance of Twig_TestInterface or Twig_SimpleTest');
- }
-
- if ($name instanceof Twig_SimpleTest) {
- $test = $name;
- $name = $test->getName();
- } else {
- @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. 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));
+ throw new LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $test->getName()));
}
- $this->staging->addTest($name, $test);
+ $this->staging->addTest($test);
}
/**
* Gets the registered Tests.
*
- * @return Twig_TestInterface[] An array of Twig_TestInterface instances
+ * @return Twig_Test[] An array of Twig_Test instances
+ *
+ * @internal
*/
public function getTests()
{
@@ -1049,6 +904,8 @@ public function getTests()
* @param string $name The test name
*
* @return Twig_Test|false A Twig_Test instance or false if the test does not exist
+ *
+ * @internal
*/
public function getTest($name)
{
@@ -1066,27 +923,15 @@ public function getTest($name)
/**
* Registers a Function.
*
- * @param string|Twig_SimpleFunction $name The function name or a Twig_SimpleFunction instance
- * @param Twig_FunctionInterface|Twig_SimpleFunction $function A Twig_FunctionInterface instance or a Twig_SimpleFunction instance
+ * @param Twig_Function $function A Twig_Function instance
*/
- public function addFunction($name, $function = null)
+ public function addFunction(Twig_Function $function)
{
- if (!$name instanceof Twig_SimpleFunction && !($function instanceof Twig_SimpleFunction || $function instanceof Twig_FunctionInterface)) {
- throw new LogicException('A function must be an instance of Twig_FunctionInterface or Twig_SimpleFunction');
- }
-
- if ($name instanceof Twig_SimpleFunction) {
- $function = $name;
- $name = $function->getName();
- } else {
- @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. 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));
+ throw new LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $function->getName()));
}
- $this->staging->addFunction($name, $function);
+ $this->staging->addFunction($function);
}
/**
@@ -1098,6 +943,8 @@ public function addFunction($name, $function = null)
* @param string $name function name
*
* @return Twig_Function|false A Twig_Function instance or false if the function does not exist
+ *
+ * @internal
*/
public function getFunction($name)
{
@@ -1123,7 +970,7 @@ public function getFunction($name)
}
foreach ($this->functionCallbacks as $callback) {
- if (false !== $function = call_user_func($callback, $name)) {
+ if (false !== $function = $callback($name)) {
return $function;
}
}
@@ -1131,7 +978,7 @@ public function getFunction($name)
return false;
}
- public function registerUndefinedFunctionCallback($callable)
+ public function registerUndefinedFunctionCallback(callable $callable)
{
$this->functionCallbacks[] = $callable;
}
@@ -1141,9 +988,11 @@ public function registerUndefinedFunctionCallback($callable)
*
* Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback.
*
- * @return Twig_FunctionInterface[] An array of Twig_FunctionInterface instances
+ * @return Twig_Function[] An array of Twig_Function instances
*
* @see registerUndefinedFunctionCallback
+ *
+ * @internal
*/
public function getFunctions()
{
@@ -1171,13 +1020,9 @@ public function addGlobal($name, $value)
}
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.', $name), E_USER_DEPRECATED);
- //throw new LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name));
+ 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 {
@@ -1189,6 +1034,8 @@ public function addGlobal($name, $value)
* Gets the registered Globals.
*
* @return array An array of globals
+ *
+ * @internal
*/
public function getGlobals()
{
@@ -1227,6 +1074,8 @@ public function mergeGlobals(array $context)
* Gets the registered unary Operators.
*
* @return array An array of unary operators
+ *
+ * @internal
*/
public function getUnaryOperators()
{
@@ -1241,6 +1090,8 @@ public function getUnaryOperators()
* Gets the registered binary Operators.
*
* @return array An array of binary operators
+ *
+ * @internal
*/
public function getBinaryOperators()
{
@@ -1251,26 +1102,12 @@ public function getBinaryOperators()
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 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
-
- return Twig_Error_Syntax::computeAlternatives($name, $items);
- }
-
- protected function initGlobals()
+ private function initGlobals()
{
$globals = array();
foreach ($this->extensions as $name => $extension) {
if (!$extension instanceof Twig_Extension_GlobalsInterface) {
- $m = new ReflectionMethod($extension, 'getGlobals');
-
- if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) {
- @trigger_error(sprintf('Defining the getGlobals() method in the "%s" extension is deprecated without explicitly implementing Twig_Extension_GlobalsInterface.', $name), E_USER_DEPRECATED);
- }
+ continue;
}
$extGlob = $extension->getGlobals();
@@ -1286,14 +1123,14 @@ protected function initGlobals()
return call_user_func_array('array_merge', $globals);
}
- protected function initExtensions()
+ private function initExtensions()
{
if ($this->extensionInitialized) {
return;
}
$this->extensionInitialized = true;
- $this->parsers = new Twig_TokenParserBroker(array(), array(), false);
+ $this->parsers = array();
$this->filters = array();
$this->functions = array();
$this->tests = array();
@@ -1307,52 +1144,30 @@ protected function initExtensions()
$this->initExtension($this->staging);
}
- protected function initExtension(Twig_ExtensionInterface $extension)
+ private function initExtension(Twig_ExtensionInterface $extension)
{
// filters
- foreach ($extension->getFilters() as $name => $filter) {
- if ($filter instanceof Twig_SimpleFilter) {
- $name = $filter->getName();
- } else {
- @trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated. Use Twig_SimpleFilter instead.', get_class($filter), $name), E_USER_DEPRECATED);
- }
-
- $this->filters[$name] = $filter;
+ foreach ($extension->getFilters() as $filter) {
+ $this->filters[$filter->getName()] = $filter;
}
// functions
- foreach ($extension->getFunctions() as $name => $function) {
- if ($function instanceof Twig_SimpleFunction) {
- $name = $function->getName();
- } else {
- @trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated. Use Twig_SimpleFunction instead.', get_class($function), $name), E_USER_DEPRECATED);
- }
-
- $this->functions[$name] = $function;
+ foreach ($extension->getFunctions() as $function) {
+ $this->functions[$function->getName()] = $function;
}
// tests
- foreach ($extension->getTests() as $name => $test) {
- if ($test instanceof Twig_SimpleTest) {
- $name = $test->getName();
- } else {
- @trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated. Use Twig_SimpleTest instead.', get_class($test), $name), E_USER_DEPRECATED);
- }
-
- $this->tests[$name] = $test;
+ foreach ($extension->getTests() as $test) {
+ $this->tests[$test->getName()] = $test;
}
// token parsers
foreach ($extension->getTokenParsers() as $parser) {
- if ($parser instanceof Twig_TokenParserInterface) {
- $this->parsers->addTokenParser($parser);
- } elseif ($parser instanceof Twig_TokenParserBrokerInterface) {
- @trigger_error('Registering a Twig_TokenParserBrokerInterface instance is deprecated.', E_USER_DEPRECATED);
-
- $this->parsers->addTokenParserBroker($parser);
- } else {
- throw new LogicException('getTokenParsers() must return an array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances');
+ if (!$parser instanceof Twig_TokenParserInterface) {
+ throw new LogicException('getTokenParsers() must return an array of Twig_TokenParserInterface');
}
+
+ $this->parsers[] = $parser;
}
// node visitors
@@ -1370,12 +1185,4 @@ protected function initExtension(Twig_ExtensionInterface $extension)
$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);
- }
}
diff --git a/vendor/twig/twig/lib/Twig/Error.php b/vendor/twig/twig/lib/Twig/Error.php
index 37c7435..b7797ea 100644
--- a/vendor/twig/twig/lib/Twig/Error.php
+++ b/vendor/twig/twig/lib/Twig/Error.php
@@ -33,10 +33,9 @@
*/
class Twig_Error extends Exception
{
- protected $lineno;
- protected $filename;
- protected $rawMessage;
- protected $previous;
+ private $lineno;
+ private $filename;
+ private $rawMessage;
/**
* Constructor.
@@ -57,12 +56,7 @@ class Twig_Error extends Exception
*/
public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null)
{
- if (PHP_VERSION_ID < 50300) {
- $this->previous = $previous;
- parent::__construct('');
- } else {
- parent::__construct('', 0, $previous);
- }
+ parent::__construct('', 0, $previous);
$this->lineno = $lineno;
$this->filename = $filename;
@@ -161,10 +155,7 @@ public function appendMessage($rawMessage)
$this->updateRepr();
}
- /**
- * @internal
- */
- protected function updateRepr()
+ private function updateRepr()
{
$this->message = $this->rawMessage;
@@ -202,20 +193,12 @@ protected function updateRepr()
}
}
- /**
- * @internal
- */
- protected function guessTemplateInfo()
+ private function guessTemplateInfo()
{
$template = null;
$templateClass = null;
- if (PHP_VERSION_ID >= 50306) {
- $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT);
- } else {
- $backtrace = debug_backtrace();
- }
-
+ $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT);
foreach ($backtrace as $trace) {
if (isset($trace['object']) && $trace['object'] instanceof Twig_Template && 'Twig_Template' !== get_class($trace['object'])) {
$currentClass = get_class($trace['object']);
@@ -245,7 +228,7 @@ protected function guessTemplateInfo()
}
$exceptions = array($e = $this);
- while (($e instanceof self || method_exists($e, 'getPrevious')) && $e = $e->getPrevious()) {
+ while ($e = $e->getPrevious()) {
$exceptions[] = $e;
}
diff --git a/vendor/twig/twig/lib/Twig/Error/Syntax.php b/vendor/twig/twig/lib/Twig/Error/Syntax.php
index f73730a..7ae5112 100644
--- a/vendor/twig/twig/lib/Twig/Error/Syntax.php
+++ b/vendor/twig/twig/lib/Twig/Error/Syntax.php
@@ -25,20 +25,6 @@ class Twig_Error_Syntax extends Twig_Error
*/
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 = array();
foreach ($items as $item) {
$lev = levenshtein($name, $item);
@@ -46,8 +32,13 @@ public static function computeAlternatives($name, $items)
$alternatives[$item] = $lev;
}
}
+
+ if (!$alternatives) {
+ return;
+ }
+
asort($alternatives);
- return array_keys($alternatives);
+ $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', array_keys($alternatives))));
}
}
diff --git a/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php b/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php
index b168c3c..a4fb500 100644
--- a/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php
+++ b/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php
@@ -10,20 +10,10 @@
*/
/**
- * Adds an exists() method for loaders.
+ * Empty interface for Twig 1.x compatibility.
*
- * @author Florin Patan
- *
- * @deprecated since 1.12 (to be removed in 3.0)
+ * @deprecated to be removed in 3.0
*/
-interface Twig_ExistsLoaderInterface
+interface Twig_ExistsLoaderInterface extends Twig_LoaderInterface
{
- /**
- * 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);
}
diff --git a/vendor/twig/twig/lib/Twig/ExpressionParser.php b/vendor/twig/twig/lib/Twig/ExpressionParser.php
index cad11af..96ededa 100644
--- a/vendor/twig/twig/lib/Twig/ExpressionParser.php
+++ b/vendor/twig/twig/lib/Twig/ExpressionParser.php
@@ -25,9 +25,9 @@ class Twig_ExpressionParser
const OPERATOR_LEFT = 1;
const OPERATOR_RIGHT = 2;
- protected $parser;
- protected $unaryOperators;
- protected $binaryOperators;
+ private $parser;
+ private $unaryOperators;
+ private $binaryOperators;
public function __construct(Twig_Parser $parser, array $unaryOperators, array $binaryOperators)
{
@@ -45,7 +45,7 @@ public function parseExpression($precedence = 0)
$this->parser->getStream()->next();
if (isset($op['callable'])) {
- $expr = call_user_func($op['callable'], $this->parser, $expr);
+ $expr = $op['callable']($this->parser, $expr);
} else {
$expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']);
$class = $op['class'];
@@ -62,7 +62,7 @@ public function parseExpression($precedence = 0)
return $expr;
}
- protected function getPrimary()
+ private function getPrimary()
{
$token = $this->parser->getCurrentToken();
@@ -84,7 +84,7 @@ protected function getPrimary()
return $this->parsePrimaryExpression();
}
- protected function parseConditionalExpression($expr)
+ private function parseConditionalExpression($expr)
{
while ($this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, '?')) {
if (!$this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, ':')) {
@@ -105,12 +105,12 @@ protected function parseConditionalExpression($expr)
return $expr;
}
- protected function isUnary(Twig_Token $token)
+ private function isUnary(Twig_Token $token)
{
return $token->test(Twig_Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->getValue()]);
}
- protected function isBinary(Twig_Token $token)
+ private function isBinary(Twig_Token $token)
{
return $token->test(Twig_Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->getValue()]);
}
@@ -373,7 +373,7 @@ public function parseSubscriptExpression($node)
$arg = new Twig_Node_Expression_Constant($token->getValue(), $lineno);
if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) {
- $type = Twig_TemplateInterface::METHOD_CALL;
+ $type = Twig_Template::METHOD_CALL;
foreach ($this->parseArguments() as $n) {
$arguments->addElement($n);
}
@@ -389,11 +389,7 @@ public function parseSubscriptExpression($node)
$name = $arg->getAttribute('value');
- if ($this->parser->isReservedMacroName($name)) {
- throw new Twig_Error_Syntax(sprintf('"%s" cannot be called as macro as it is a reserved keyword.', $name), $token->getLine(), $this->parser->getFilename());
- }
-
- $node = new Twig_Node_Expression_MethodCall($node, 'get'.$name, $arguments, $lineno);
+ $node = new Twig_Node_Expression_MethodCall($node, 'macro_'.$name, $arguments, $lineno);
$node->setAttribute('safe', true);
return $node;
@@ -565,7 +561,7 @@ public function parseMultitargetExpression()
return new Twig_Node($targets);
}
- protected function getFunctionNodeClass($name, $line)
+ private function getFunctionNodeClass($name, $line)
{
$env = $this->parser->getEnvironment();
@@ -576,8 +572,11 @@ protected function getFunctionNodeClass($name, $line)
throw $e;
}
- if ($function instanceof Twig_SimpleFunction && $function->isDeprecated()) {
+ if ($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());
}
@@ -586,14 +585,10 @@ protected function getFunctionNodeClass($name, $line)
@trigger_error($message, E_USER_DEPRECATED);
}
- if ($function instanceof Twig_SimpleFunction) {
- return $function->getNodeClass();
- }
-
- return $function instanceof Twig_Function_Node ? $function->getClass() : 'Twig_Node_Expression_Function';
+ return $function->getNodeClass();
}
- protected function getFilterNodeClass($name, $line)
+ private function getFilterNodeClass($name, $line)
{
$env = $this->parser->getEnvironment();
@@ -604,8 +599,11 @@ protected function getFilterNodeClass($name, $line)
throw $e;
}
- if ($filter instanceof Twig_SimpleFilter && $filter->isDeprecated()) {
+ if ($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());
}
@@ -614,15 +612,11 @@ protected function getFilterNodeClass($name, $line)
@trigger_error($message, E_USER_DEPRECATED);
}
- if ($filter instanceof Twig_SimpleFilter) {
- return $filter->getNodeClass();
- }
-
- return $filter instanceof Twig_Filter_Node ? $filter->getClass() : 'Twig_Node_Expression_Filter';
+ return $filter->getNodeClass();
}
// checks that the node only contains "constant" elements
- protected function checkConstantExpression(Twig_NodeInterface $node)
+ private function checkConstantExpression(Twig_Node $node)
{
if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array
|| $node instanceof Twig_Node_Expression_Unary_Neg || $node instanceof Twig_Node_Expression_Unary_Pos
diff --git a/vendor/twig/twig/lib/Twig/Extension.php b/vendor/twig/twig/lib/Twig/Extension.php
index cb03b3d..2b4bd5d 100644
--- a/vendor/twig/twig/lib/Twig/Extension.php
+++ b/vendor/twig/twig/lib/Twig/Extension.php
@@ -12,15 +12,6 @@
{
/**
* {@inheritdoc}
- *
- * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterface instead
- */
- public function initRuntime(Twig_Environment $environment)
- {
- }
-
- /**
- * {@inheritdoc}
*/
public function getTokenParsers()
{
@@ -66,14 +57,4 @@ public function getOperators()
{
return array();
}
-
- /**
- * {@inheritdoc}
- *
- * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_GlobalsInterface instead
- */
- public function getGlobals()
- {
- return array();
- }
}
diff --git a/vendor/twig/twig/lib/Twig/Extension/Core.php b/vendor/twig/twig/lib/Twig/Extension/Core.php
index 0aed990..99310f5 100644
--- a/vendor/twig/twig/lib/Twig/Extension/Core.php
+++ b/vendor/twig/twig/lib/Twig/Extension/Core.php
@@ -15,10 +15,10 @@
*/
class Twig_Extension_Core extends Twig_Extension
{
- protected $dateFormats = array('F j, Y H:i', '%d days');
- protected $numberFormat = array(0, '.', ',');
- protected $timezone = null;
- protected $escapers = array();
+ private $dateFormats = array('F j, Y H:i', '%d days');
+ private $numberFormat = array(0, '.', ',');
+ private $timezone = null;
+ private $escapers = array();
/**
* Defines a new escaper to be used via the escape filter.
@@ -26,7 +26,7 @@ class Twig_Extension_Core extends Twig_Extension
* @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)
+ public function setEscaper($strategy, callable $callable)
{
$this->escapers[$strategy] = $callable;
}
@@ -34,7 +34,7 @@ public function setEscaper($strategy, $callable)
/**
* Gets all defined escapers.
*
- * @return array An array of escapers
+ * @return callable[] An array of escapers
*/
public function getEscapers()
{
@@ -137,91 +137,82 @@ public function getTokenParsers()
public function getFilters()
{
- $filters = array(
+ return array(
// formatting filters
- new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('format', 'sprintf'),
- new Twig_SimpleFilter('replace', 'twig_replace_filter'),
- new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('abs', 'abs'),
- new Twig_SimpleFilter('round', 'twig_round'),
+ new Twig_Filter('date', 'twig_date_format_filter', array('needs_environment' => true)),
+ new Twig_Filter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)),
+ new Twig_Filter('format', 'sprintf'),
+ new Twig_Filter('replace', 'twig_replace_filter'),
+ new Twig_Filter('number_format', 'twig_number_format_filter', array('needs_environment' => true)),
+ new Twig_Filter('abs', 'abs'),
+ new Twig_Filter('round', 'twig_round'),
// encoding
- new Twig_SimpleFilter('url_encode', 'twig_urlencode_filter'),
- new Twig_SimpleFilter('json_encode', 'twig_jsonencode_filter'),
- new Twig_SimpleFilter('convert_encoding', 'twig_convert_encoding'),
+ new Twig_Filter('url_encode', 'twig_urlencode_filter'),
+ new Twig_Filter('json_encode', 'json_encode'),
+ new Twig_Filter('convert_encoding', 'twig_convert_encoding'),
// string filters
- new Twig_SimpleFilter('title', 'twig_title_string_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('upper', 'strtoupper'),
- new Twig_SimpleFilter('lower', 'strtolower'),
- new Twig_SimpleFilter('striptags', 'strip_tags'),
- new Twig_SimpleFilter('trim', 'trim'),
- new Twig_SimpleFilter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),
+ new Twig_Filter('title', 'twig_title_string_filter', array('needs_environment' => true)),
+ new Twig_Filter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)),
+ new Twig_Filter('upper', 'twig_upper_filter', array('needs_environment' => true)),
+ new Twig_Filter('lower', 'twig_lower_filter', array('needs_environment' => true)),
+ new Twig_Filter('striptags', 'strip_tags'),
+ new Twig_Filter('trim', 'trim'),
+ new Twig_Filter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),
// array helpers
- new Twig_SimpleFilter('join', 'twig_join_filter'),
- new Twig_SimpleFilter('split', 'twig_split_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('sort', 'twig_sort_filter'),
- new Twig_SimpleFilter('merge', 'twig_array_merge'),
- new Twig_SimpleFilter('batch', 'twig_array_batch'),
+ new Twig_Filter('join', 'twig_join_filter'),
+ new Twig_Filter('split', 'twig_split_filter', array('needs_environment' => true)),
+ new Twig_Filter('sort', 'twig_sort_filter'),
+ new Twig_Filter('merge', 'twig_array_merge'),
+ new Twig_Filter('batch', 'twig_array_batch'),
// string/array filters
- new Twig_SimpleFilter('reverse', 'twig_reverse_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('length', 'twig_length_filter', array('needs_environment' => true)),
- new Twig_SimpleFilter('slice', 'twig_slice', array('needs_environment' => true)),
- new Twig_SimpleFilter('first', 'twig_first', array('needs_environment' => true)),
- new Twig_SimpleFilter('last', 'twig_last', array('needs_environment' => true)),
+ new Twig_Filter('reverse', 'twig_reverse_filter', array('needs_environment' => true)),
+ new Twig_Filter('length', 'twig_length_filter', array('needs_environment' => true)),
+ new Twig_Filter('slice', 'twig_slice', array('needs_environment' => true)),
+ new Twig_Filter('first', 'twig_first', array('needs_environment' => true)),
+ new Twig_Filter('last', 'twig_last', array('needs_environment' => true)),
// iteration and runtime
- new Twig_SimpleFilter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')),
- new Twig_SimpleFilter('keys', 'twig_get_array_keys_filter'),
+ new Twig_Filter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')),
+ new Twig_Filter('keys', 'twig_get_array_keys_filter'),
// escaping
- new Twig_SimpleFilter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),
- new Twig_SimpleFilter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),
+ new Twig_Filter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),
+ new Twig_Filter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),
);
-
- if (function_exists('mb_get_info')) {
- $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', array('needs_environment' => true));
- $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', array('needs_environment' => true));
- }
-
- return $filters;
}
public function getFunctions()
{
return array(
- new Twig_SimpleFunction('max', 'max'),
- new Twig_SimpleFunction('min', 'min'),
- new Twig_SimpleFunction('range', 'range'),
- new Twig_SimpleFunction('constant', 'twig_constant'),
- new Twig_SimpleFunction('cycle', 'twig_cycle'),
- new Twig_SimpleFunction('random', 'twig_random', array('needs_environment' => true)),
- new Twig_SimpleFunction('date', 'twig_date_converter', array('needs_environment' => true)),
- new Twig_SimpleFunction('include', 'twig_include', array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))),
- new Twig_SimpleFunction('source', 'twig_source', array('needs_environment' => true, 'is_safe' => array('all'))),
+ new Twig_Function('max', 'max'),
+ new Twig_Function('min', 'min'),
+ new Twig_Function('range', 'range'),
+ new Twig_Function('constant', 'twig_constant'),
+ new Twig_Function('cycle', 'twig_cycle'),
+ new Twig_Function('random', 'twig_random', array('needs_environment' => true)),
+ new Twig_Function('date', 'twig_date_converter', array('needs_environment' => true)),
+ new Twig_Function('include', 'twig_include', array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))),
+ new Twig_Function('source', 'twig_source', array('needs_environment' => true, 'is_safe' => array('all'))),
);
}
public function getTests()
{
return array(
- new Twig_SimpleTest('even', null, array('node_class' => 'Twig_Node_Expression_Test_Even')),
- new Twig_SimpleTest('odd', null, array('node_class' => 'Twig_Node_Expression_Test_Odd')),
- new Twig_SimpleTest('defined', null, array('node_class' => 'Twig_Node_Expression_Test_Defined')),
- new Twig_SimpleTest('sameas', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas', 'deprecated' => true, 'alternative' => 'same as')),
- new Twig_SimpleTest('same as', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')),
- new Twig_SimpleTest('none', null, array('node_class' => 'Twig_Node_Expression_Test_Null')),
- new Twig_SimpleTest('null', null, array('node_class' => 'Twig_Node_Expression_Test_Null')),
- new Twig_SimpleTest('divisibleby', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby', 'deprecated' => true, 'alternative' => 'divisible by')),
- new Twig_SimpleTest('divisible by', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')),
- new Twig_SimpleTest('constant', null, array('node_class' => 'Twig_Node_Expression_Test_Constant')),
- new Twig_SimpleTest('empty', 'twig_test_empty'),
- new Twig_SimpleTest('iterable', 'twig_test_iterable'),
+ new Twig_Test('even', null, array('node_class' => 'Twig_Node_Expression_Test_Even')),
+ new Twig_Test('odd', null, array('node_class' => 'Twig_Node_Expression_Test_Odd')),
+ new Twig_Test('defined', null, array('node_class' => 'Twig_Node_Expression_Test_Defined')),
+ new Twig_Test('same as', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')),
+ new Twig_Test('none', null, array('node_class' => 'Twig_Node_Expression_Test_Null')),
+ new Twig_Test('null', null, array('node_class' => 'Twig_Node_Expression_Test_Null')),
+ new Twig_Test('divisible by', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')),
+ new Twig_Test('constant', null, array('node_class' => 'Twig_Node_Expression_Test_Constant')),
+ new Twig_Test('empty', 'twig_test_empty'),
+ new Twig_Test('iterable', 'twig_test_iterable'),
);
}
@@ -261,47 +252,37 @@ public function getOperators()
'is' => array('precedence' => 100, 'callable' => array($this, 'parseTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
'is not' => array('precedence' => 100, 'callable' => array($this, 'parseNotTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
'**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT),
+ '??' => array('precedence' => 300, 'class' => 'Twig_Node_Expression_NullCoalesce', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT),
),
);
}
- public function parseNotTestExpression(Twig_Parser $parser, Twig_NodeInterface $node)
+ public function parseNotTestExpression(Twig_Parser $parser, Twig_Node $node)
{
return new Twig_Node_Expression_Unary_Not($this->parseTestExpression($parser, $node), $parser->getCurrentToken()->getLine());
}
- public function parseTestExpression(Twig_Parser $parser, Twig_NodeInterface $node)
+ public function parseTestExpression(Twig_Parser $parser, Twig_Node $node)
{
$stream = $parser->getStream();
- list($name, $test) = $this->getTest($parser, $node->getLine());
-
- if ($test instanceof Twig_SimpleTest && $test->isDeprecated()) {
- $message = sprintf('Twig Test "%s" is deprecated', $name);
- if ($test->getAlternative()) {
- $message .= sprintf('. Use "%s" instead', $test->getAlternative());
- }
- $message .= sprintf(' in %s at line %d.', $stream->getFilename(), $stream->getCurrent()->getLine());
-
- @trigger_error($message, E_USER_DEPRECATED);
- }
-
- $class = $this->getTestNodeClass($parser, $test);
+ $test = $this->getTest($parser, $node->getLine());
+ $class = $test->getNodeClass();
$arguments = null;
if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) {
$arguments = $parser->getExpressionParser()->parseArguments(true);
}
- return new $class($node, $name, $arguments, $parser->getCurrentToken()->getLine());
+ return new $class($node, $test->getName(), $arguments, $parser->getCurrentToken()->getLine());
}
- protected function getTest(Twig_Parser $parser, $line)
+ private function getTest(Twig_Parser $parser, $line)
{
$stream = $parser->getStream();
$name = $stream->expect(Twig_Token::NAME_TYPE)->getValue();
$env = $parser->getEnvironment();
if ($test = $env->getTest($name)) {
- return array($name, $test);
+ return $test;
}
if ($stream->test(Twig_Token::NAME_TYPE)) {
@@ -311,7 +292,7 @@ protected function getTest(Twig_Parser $parser, $line)
if ($test = $env->getTest($name)) {
$parser->getStream()->next();
- return array($name, $test);
+ return $test;
}
}
@@ -321,15 +302,6 @@ protected function getTest(Twig_Parser $parser, $line)
throw $e;
}
- protected function getTestNodeClass(Twig_Parser $parser, $test)
- {
- if ($test instanceof Twig_SimpleTest) {
- return $test->getNodeClass();
- }
-
- return $test instanceof Twig_Test_Node ? $test->getClass() : 'Twig_Node_Expression_Test';
- }
-
public function getName()
{
return 'core';
@@ -382,22 +354,21 @@ function twig_random(Twig_Environment $env, $values = null)
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('/(?getCharset();
- if ('UTF-8' != $charset) {
- foreach ($values as $i => $value) {
- $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8');
- }
+ if ('UTF-8' !== $charset) {
+ $values = iconv($charset, 'UTF-8', $values);
+ }
+
+ // unicode version of str_split()
+ // split at all positions, but not after the start and not before the end
+ $values = preg_split('/(? $value) {
+ $values[$i] = iconv('UTF-8', $charset, $value);
}
- } else {
- return $values[mt_rand(0, strlen($values) - 1)];
}
}
@@ -419,10 +390,10 @@ function twig_random(Twig_Environment $env, $values = null)
* {{ post.published_at|date("m/d/Y") }}
*
*
- * @param Twig_Environment $env A Twig_Environment instance
- * @param DateTime|DateTimeInterface|DateInterval|string $date A date
- * @param string|null $format The target format, null to use the default
- * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param DateTimeInterface|DateInterval|string $date A date
+ * @param string|null $format The target format, null to use the default
+ * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged
*
* @return string The formatted date
*/
@@ -447,21 +418,17 @@ function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $
* {{ post.published_at|date_modify("-1day")|date("m/d/Y") }}
*
*
- * @param Twig_Environment $env A Twig_Environment instance
- * @param DateTime|string $date A date
- * @param string $modifier A modifier string
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param DateTimeInterface|string $date A date
+ * @param string $modifier A modifier string
*
- * @return DateTime A new date object
+ * @return DateTimeInterface A new date object
*/
function twig_date_modify_filter(Twig_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;
+ return $date->modify($modifier);
}
/**
@@ -473,9 +440,9 @@ function twig_date_modify_filter(Twig_Environment $env, $date, $modifier)
* {% endif %}
*
*
- * @param Twig_Environment $env A Twig_Environment instance
- * @param DateTime|DateTimeInterface|string|null $date A date
- * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param DateTimeInterface|string|null $date A date or null to use the current time
+ * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged
*
* @return DateTime A DateTime instance
*/
@@ -527,18 +494,13 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
*
* @param string $str String to replace in
* @param array|Traversable $from Replace values
- * @param string|null $to Replace to, deprecated (@see http://php.net/manual/en/function.strtr.php)
*
* @return string
*/
-function twig_replace_filter($str, $from, $to = null)
+function twig_replace_filter($str, $from)
{
if ($from instanceof Traversable) {
$from = iterator_to_array($from);
- } elseif (is_string($from) && is_string($to)) {
- @trigger_error('Using "replace" with character by character replacement is deprecated and will be removed in Twig 2.0', E_USER_DEPRECATED);
-
- return strtr($str, $from, $to);
} elseif (!is_array($from)) {
throw new Twig_Error_Runtime(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".',is_object($from) ? get_class($from) : gettype($from)));
}
@@ -621,53 +583,6 @@ function twig_urlencode_filter($url)
return rawurlencode($url);
}
-if (PHP_VERSION_ID < 50300) {
- /**
- * JSON encodes a variable.
- *
- * @param mixed $value The value to encode.
- * @param int $options Not used on PHP 5.2.x
- *
- * @return mixed The JSON encoded value
- */
- function twig_jsonencode_filter($value, $options = 0)
- {
- if ($value instanceof Twig_Markup) {
- $value = (string) $value;
- } elseif (is_array($value)) {
- array_walk_recursive($value, '_twig_markup2string');
- }
-
- return json_encode($value);
- }
-} else {
- /**
- * 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 Twig_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 Twig_Markup) {
- $value = (string) $value;
- }
-}
-
/**
* Merges an array with another one.
*
@@ -736,11 +651,7 @@ function twig_slice(Twig_Environment $env, $item, $start, $length = null, $prese
$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));
+ return (string) mb_substr($item, $start, null === $length ? mb_strlen($item, $env->getCharset()) - $start : $length, $env->getCharset());
}
/**
@@ -830,22 +741,18 @@ function twig_split_filter(Twig_Environment $env, $value, $delimiter, $limit = n
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('/(?getCharset());
if ($length < $limit) {
return array($value);
}
$r = array();
for ($i = 0; $i < $length; $i += $limit) {
- $r[] = mb_substr($value, $i, $limit, $charset);
+ $r[] = mb_substr($value, $i, $limit, $env->getCharset());
}
return $r;
@@ -913,25 +820,23 @@ function twig_reverse_filter(Twig_Environment $env, $item, $preserveKeys = false
return array_reverse($item, $preserveKeys);
}
- if (null !== $charset = $env->getCharset()) {
- $string = (string) $item;
+ $string = (string) $item;
- if ('UTF-8' != $charset) {
- $item = twig_convert_encoding($string, 'UTF-8', $charset);
- }
+ $charset = $env->getCharset();
- preg_match_all('/./us', $item, $matches);
+ if ('UTF-8' !== $charset) {
+ $item = iconv($charset, 'UTF-8', $string);
+ }
- $string = implode('', array_reverse($matches[0]));
+ preg_match_all('/./us', $item, $matches);
- if ('UTF-8' != $charset) {
- $string = twig_convert_encoding($string, $charset, 'UTF-8');
- }
+ $string = implode('', array_reverse($matches[0]));
- return $string;
+ if ('UTF-8' !== $charset) {
+ $string = iconv('UTF-8', $charset, $string);
}
- return strrev((string) $item);
+ return $string;
}
/**
@@ -1042,69 +947,146 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, $charset);
}
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
+ $string = iconv($charset, 'UTF-8', $string);
$string = htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
- return twig_convert_encoding($string, $charset, 'UTF-8');
+ return iconv('UTF-8', $charset, $string);
case 'js':
// escape all non-alphanumeric characters
// into their \xHH or \uHHHH representations
- if ('UTF-8' != $charset) {
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
+ if ('UTF-8' !== $charset) {
+ $string = iconv($charset, 'UTF-8', $string);
}
if (0 == strlen($string) ? false : (1 == preg_match('/^./su', $string) ? false : true)) {
throw new Twig_Error_Runtime('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);
+ $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', function ($matches) {
+ $char = $matches[0];
+
+ // \xHH
+ if (!isset($char[1])) {
+ return '\\x'.strtoupper(substr('00'.bin2hex($char), -2));
+ }
+
+ // \uHHHH
+ $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8');
+
+ return '\\u'.strtoupper(substr('0000'.bin2hex($char), -4));
+ }, $string);
- if ('UTF-8' != $charset) {
- $string = twig_convert_encoding($string, $charset, 'UTF-8');
+ if ('UTF-8' !== $charset) {
+ $string = iconv('UTF-8', $charset, $string);
}
return $string;
case 'css':
- if ('UTF-8' != $charset) {
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
+ if ('UTF-8' !== $charset) {
+ $string = iconv($charset, 'UTF-8', $string);
}
if (0 == strlen($string) ? false : (1 == preg_match('/^./su', $string) ? false : true)) {
throw new Twig_Error_Runtime('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);
+ $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', function ($matches) {
+ $char = $matches[0];
- if ('UTF-8' != $charset) {
- $string = twig_convert_encoding($string, $charset, 'UTF-8');
+ // \xHH
+ if (!isset($char[1])) {
+ $hex = ltrim(strtoupper(bin2hex($char)), '0');
+ if (0 === strlen($hex)) {
+ $hex = '0';
+ }
+
+ return '\\'.$hex.' ';
+ }
+
+ // \uHHHH
+ $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8');
+
+ return '\\'.ltrim(strtoupper(bin2hex($char)), '0').' ';
+ }, $string);
+
+ if ('UTF-8' !== $charset) {
+ $string = iconv('UTF-8', $charset, $string);
}
return $string;
case 'html_attr':
- if ('UTF-8' != $charset) {
- $string = twig_convert_encoding($string, 'UTF-8', $charset);
+ if ('UTF-8' !== $charset) {
+ $string = iconv($charset, 'UTF-8', $string);
}
if (0 == strlen($string) ? false : (1 == preg_match('/^./su', $string) ? false : true)) {
throw new Twig_Error_Runtime('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);
+ $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', function ($matches) {
+ /**
+ * This function is adapted from code coming from Zend Framework.
+ *
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+ /*
+ * 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 = array(
+ 34 => 'quot', /* quotation mark */
+ 38 => 'amp', /* ampersand */
+ 60 => 'lt', /* less-than sign */
+ 62 => 'gt', /* greater-than sign */
+ );
+
+ $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 && $chr != "\t" && $chr != "\n" && $chr != "\r") || ($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 (strlen($chr) == 1) {
+ $hex = strtoupper(substr('00'.bin2hex($chr), -2));
+ } else {
+ $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');
+ $hex = strtoupper(substr('0000'.bin2hex($chr), -4));
+ }
+
+ $int = hexdec($hex);
+ if (array_key_exists($int, $entityMap)) {
+ return sprintf('&%s;', $entityMap[$int]);
+ }
+
+ /*
+ * Per OWASP recommendations, we'll use hex entities for any other
+ * characters where a named entity does not exist.
+ */
+ return sprintf('%s;', $hex);
+ }, $string);
- if ('UTF-8' != $charset) {
- $string = twig_convert_encoding($string, $charset, 'UTF-8');
+ if ('UTF-8' !== $charset) {
+ $string = iconv('UTF-8', $charset, $string);
}
return $string;
case 'url':
- if (PHP_VERSION_ID < 50300) {
- return str_replace('%7E', '~', rawurlencode($string));
- }
-
return rawurlencode($string);
default:
@@ -1115,7 +1097,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
}
if (isset($escapers[$strategy])) {
- return call_user_func($escapers[$strategy], $env, $string, $charset);
+ return $escapers[$strategy]($env, $string, $charset);
}
$validStrategies = implode(', ', array_merge(array('html', 'js', 'url', 'css', 'html_attr'), array_keys($escapers)));
@@ -1140,236 +1122,76 @@ function twig_escape_filter_is_safe(Twig_Node $filterArgs)
return array('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 Twig_Error_Runtime('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).');
- }
+function twig_convert_encoding($string, $to, $from)
+{
+ return iconv($from, $to, $string);
}
-function _twig_escape_js_callback($matches)
+/**
+ * Returns the length of a variable.
+ *
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param mixed $thing A variable
+ *
+ * @return int The length of the value
+ */
+function twig_length_filter(Twig_Environment $env, $thing)
{
- $char = $matches[0];
-
- // \xHH
- if (!isset($char[1])) {
- return '\\x'.strtoupper(substr('00'.bin2hex($char), -2));
- }
-
- // \uHHHH
- $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8');
-
- return '\\u'.strtoupper(substr('0000'.bin2hex($char), -4));
+ return is_scalar($thing) ? mb_strlen($thing, $env->getCharset()) : count($thing);
}
-function _twig_escape_css_callback($matches)
+/**
+ * Converts a string to uppercase.
+ *
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param string $string A string
+ *
+ * @return string The uppercased string
+ */
+function twig_upper_filter(Twig_Environment $env, $string)
{
- $char = $matches[0];
-
- // \xHH
- if (!isset($char[1])) {
- $hex = ltrim(strtoupper(bin2hex($char)), '0');
- if (0 === strlen($hex)) {
- $hex = '0';
- }
-
- return '\\'.$hex.' ';
- }
-
- // \uHHHH
- $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8');
-
- return '\\'.ltrim(strtoupper(bin2hex($char)), '0').' ';
+ return mb_strtoupper($string, $env->getCharset());
}
/**
- * This function is adapted from code coming from Zend Framework.
+ * Converts a string to lowercase.
*
- * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param string $string A string
+ *
+ * @return string The lowercased string
*/
-function _twig_escape_html_attr_callback($matches)
+function twig_lower_filter(Twig_Environment $env, $string)
{
- /*
- * 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 = array(
- 34 => 'quot', /* quotation mark */
- 38 => 'amp', /* ampersand */
- 60 => 'lt', /* less-than sign */
- 62 => 'gt', /* greater-than sign */
- );
-
- $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 && $chr != "\t" && $chr != "\n" && $chr != "\r") || ($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 (strlen($chr) == 1) {
- $hex = strtoupper(substr('00'.bin2hex($chr), -2));
- } else {
- $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');
- $hex = strtoupper(substr('0000'.bin2hex($chr), -4));
- }
-
- $int = hexdec($hex);
- if (array_key_exists($int, $entityMap)) {
- return sprintf('&%s;', $entityMap[$int]);
- }
-
- /*
- * Per OWASP recommendations, we'll use hex entities for any other
- * characters where a named entity does not exist.
- */
- return sprintf('%s;', $hex);
+ return mb_strtolower($string, $env->getCharset());
}
-// add multibyte extensions if possible
-if (function_exists('mb_get_info')) {
- /**
- * Returns the length of a variable.
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param mixed $thing A variable
- *
- * @return int The length of the value
- */
- function twig_length_filter(Twig_Environment $env, $thing)
- {
- return is_scalar($thing) ? mb_strlen($thing, $env->getCharset()) : count($thing);
- }
-
- /**
- * Converts a string to uppercase.
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param string $string A string
- *
- * @return string The uppercased string
- */
- function twig_upper_filter(Twig_Environment $env, $string)
- {
- if (null !== ($charset = $env->getCharset())) {
- return mb_strtoupper($string, $charset);
- }
-
- return strtoupper($string);
- }
-
- /**
- * Converts a string to lowercase.
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param string $string A string
- *
- * @return string The lowercased string
- */
- function twig_lower_filter(Twig_Environment $env, $string)
- {
- if (null !== ($charset = $env->getCharset())) {
- return mb_strtolower($string, $charset);
- }
-
- return strtolower($string);
- }
-
- /**
- * Returns a titlecased string.
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param string $string A string
- *
- * @return string The titlecased string
- */
- function twig_title_string_filter(Twig_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 Twig_Environment $env A Twig_Environment instance
- * @param string $string A string
- *
- * @return string The capitalized string
- */
- function twig_capitalize_string_filter(Twig_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));
- }
+/**
+ * Returns a titlecased string.
+ *
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param string $string A string
+ *
+ * @return string The titlecased string
+ */
+function twig_title_string_filter(Twig_Environment $env, $string)
+{
+ return mb_convert_case($string, MB_CASE_TITLE, $env->getCharset());
}
-// and byte fallback
-else {
- /**
- * Returns the length of a variable.
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param mixed $thing A variable
- *
- * @return int The length of the value
- */
- function twig_length_filter(Twig_Environment $env, $thing)
- {
- return is_scalar($thing) ? strlen($thing) : count($thing);
- }
- /**
- * Returns a titlecased string.
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param string $string A string
- *
- * @return string The titlecased string
- */
- function twig_title_string_filter(Twig_Environment $env, $string)
- {
- return ucwords(strtolower($string));
- }
+/**
+ * Returns a capitalized string.
+ *
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param string $string A string
+ *
+ * @return string The capitalized string
+ */
+function twig_capitalize_string_filter(Twig_Environment $env, $string)
+{
+ $charset = $env->getCharset();
- /**
- * Returns a capitalized string.
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param string $string A string
- *
- * @return string The capitalized string
- */
- function twig_capitalize_string_filter(Twig_Environment $env, $string)
- {
- return ucfirst(strtolower($string));
- }
+ return mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset).mb_strtolower(mb_substr($string, 1, 2147483647, $charset), $charset);
}
/**
diff --git a/vendor/twig/twig/lib/Twig/Extension/Debug.php b/vendor/twig/twig/lib/Twig/Extension/Debug.php
index 42fdb1e..53580d3 100644
--- a/vendor/twig/twig/lib/Twig/Extension/Debug.php
+++ b/vendor/twig/twig/lib/Twig/Extension/Debug.php
@@ -23,7 +23,7 @@ public function getFunctions()
;
return array(
- new Twig_SimpleFunction('dump', 'twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)),
+ new Twig_Function('dump', 'twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)),
);
}
diff --git a/vendor/twig/twig/lib/Twig/Extension/Escaper.php b/vendor/twig/twig/lib/Twig/Extension/Escaper.php
index 0e06693..a01ff3c 100644
--- a/vendor/twig/twig/lib/Twig/Extension/Escaper.php
+++ b/vendor/twig/twig/lib/Twig/Extension/Escaper.php
@@ -10,7 +10,7 @@
*/
class Twig_Extension_Escaper extends Twig_Extension
{
- protected $defaultStrategy;
+ private $defaultStrategy;
/**
* Constructor.
@@ -37,7 +37,7 @@ public function getNodeVisitors()
public function getFilters()
{
return array(
- new Twig_SimpleFilter('raw', 'twig_raw_filter', array('is_safe' => array('all'))),
+ new Twig_Filter('raw', 'twig_raw_filter', array('is_safe' => array('all'))),
);
}
@@ -51,13 +51,6 @@ public function getFilters()
*/
public function setDefaultStrategy($defaultStrategy)
{
- // for BC
- if (true === $defaultStrategy) {
- @trigger_error('Using "true" as the default strategy is deprecated. Use "html" instead.', E_USER_DEPRECATED);
-
- $defaultStrategy = 'html';
- }
-
if ('filename' === $defaultStrategy) {
$defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess');
}
diff --git a/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php b/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php
index 5370b8e..90e12b9 100644
--- a/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php
+++ b/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php
@@ -19,4 +19,11 @@
*/
interface Twig_Extension_GlobalsInterface
{
+
+ /**
+ * Returns a list of global variables to add to the existing list.
+ *
+ * @return array An array of global variables
+ */
+ public function getGlobals();
}
diff --git a/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php b/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php
index 7a07582..d4d993c 100644
--- a/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php
+++ b/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php
@@ -16,7 +16,17 @@
* deprecated initRuntime() method in your extensions.
*
* @author Fabien Potencier
+ *
+ * @deprecated to be removed in 3.0
*/
interface Twig_Extension_InitRuntimeInterface
{
+ /**
+ * Initializes the runtime environment.
+ *
+ * This is where you can load some file that contains filter functions for instance.
+ *
+ * @param Twig_Environment $environment The current Twig_Environment instance
+ */
+ public function initRuntime(Twig_Environment $environment);
}
diff --git a/vendor/twig/twig/lib/Twig/Extension/Optimizer.php b/vendor/twig/twig/lib/Twig/Extension/Optimizer.php
index 5a64a1a..fdf7e5e 100644
--- a/vendor/twig/twig/lib/Twig/Extension/Optimizer.php
+++ b/vendor/twig/twig/lib/Twig/Extension/Optimizer.php
@@ -10,7 +10,7 @@
*/
class Twig_Extension_Optimizer extends Twig_Extension
{
- protected $optimizers;
+ private $optimizers;
public function __construct($optimizers = -1)
{
diff --git a/vendor/twig/twig/lib/Twig/Extension/Sandbox.php b/vendor/twig/twig/lib/Twig/Extension/Sandbox.php
index 760d123..a452250 100644
--- a/vendor/twig/twig/lib/Twig/Extension/Sandbox.php
+++ b/vendor/twig/twig/lib/Twig/Extension/Sandbox.php
@@ -10,9 +10,9 @@
*/
class Twig_Extension_Sandbox extends Twig_Extension
{
- protected $sandboxedGlobally;
- protected $sandboxed;
- protected $policy;
+ private $sandboxedGlobally;
+ private $sandboxed;
+ private $policy;
public function __construct(Twig_Sandbox_SecurityPolicyInterface $policy, $sandboxed = false)
{
diff --git a/vendor/twig/twig/lib/Twig/Extension/Staging.php b/vendor/twig/twig/lib/Twig/Extension/Staging.php
index d21004d..0efc9a6 100644
--- a/vendor/twig/twig/lib/Twig/Extension/Staging.php
+++ b/vendor/twig/twig/lib/Twig/Extension/Staging.php
@@ -10,26 +10,24 @@
*/
/**
- * Internal class.
- *
- * This class is used by Twig_Environment as a staging area and must not be used directly.
+ * Used by Twig_Environment as a staging area.
*
* @author Fabien Potencier
*
* @internal
*/
-class Twig_Extension_Staging extends Twig_Extension
+final class Twig_Extension_Staging extends Twig_Extension
{
- protected $functions = array();
- protected $filters = array();
- protected $visitors = array();
- protected $tokenParsers = array();
- protected $globals = array();
- protected $tests = array();
+ private $functions = array();
+ private $filters = array();
+ private $visitors = array();
+ private $tokenParsers = array();
+ private $globals = array();
+ private $tests = array();
- public function addFunction($name, $function)
+ public function addFunction(Twig_Function $function)
{
- $this->functions[$name] = $function;
+ $this->functions[$function->getName()] = $function;
}
public function getFunctions()
@@ -37,9 +35,9 @@ public function getFunctions()
return $this->functions;
}
- public function addFilter($name, $filter)
+ public function addFilter(Twig_Filter $filter)
{
- $this->filters[$name] = $filter;
+ $this->filters[$filter->getName()] = $filter;
}
public function getFilters()
@@ -77,9 +75,9 @@ public function getGlobals()
return $this->globals;
}
- public function addTest($name, $test)
+ public function addTest(Twig_Test $test)
{
- $this->tests[$name] = $test;
+ $this->tests[$test->getName()] = $test;
}
public function getTests()
diff --git a/vendor/twig/twig/lib/Twig/Extension/StringLoader.php b/vendor/twig/twig/lib/Twig/Extension/StringLoader.php
index 2a3ddb6..3ef39ca 100644
--- a/vendor/twig/twig/lib/Twig/Extension/StringLoader.php
+++ b/vendor/twig/twig/lib/Twig/Extension/StringLoader.php
@@ -13,7 +13,7 @@ class Twig_Extension_StringLoader extends Twig_Extension
public function getFunctions()
{
return array(
- new Twig_SimpleFunction('template_from_string', 'twig_template_from_string', array('needs_environment' => true)),
+ new Twig_Function('template_from_string', 'twig_template_from_string', array('needs_environment' => true)),
);
}
diff --git a/vendor/twig/twig/lib/Twig/ExtensionInterface.php b/vendor/twig/twig/lib/Twig/ExtensionInterface.php
index 5cf3f46..e06b940 100644
--- a/vendor/twig/twig/lib/Twig/ExtensionInterface.php
+++ b/vendor/twig/twig/lib/Twig/ExtensionInterface.php
@@ -17,17 +17,6 @@
interface Twig_ExtensionInterface
{
/**
- * Initializes the runtime environment.
- *
- * This is where you can load some file that contains filter functions for instance.
- *
- * @param Twig_Environment $environment The current Twig_Environment instance
- *
- * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterace instead
- */
- public function initRuntime(Twig_Environment $environment);
-
- /**
* Returns the token parser instances to add to the existing list.
*
* @return Twig_TokenParserInterface[]
@@ -70,15 +59,6 @@ public function getFunctions();
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
diff --git a/vendor/twig/twig/lib/Twig/Filter.php b/vendor/twig/twig/lib/Twig/Filter.php
index 101d2e7..4464120 100644
--- a/vendor/twig/twig/lib/Twig/Filter.php
+++ b/vendor/twig/twig/lib/Twig/Filter.php
@@ -3,39 +3,71 @@
/*
* This file is part of Twig.
*
- * (c) 2009 Fabien Potencier
+ * (c) 2009-2012 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 class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED);
-
/**
* Represents a template filter.
*
- * Use Twig_SimpleFilter instead.
- *
* @author Fabien Potencier
*
- * @deprecated since 1.12 (to be removed in 2.0)
+ * @see http://twig.sensiolabs.org/doc/templates.html#filters
*/
-abstract class Twig_Filter implements Twig_FilterInterface, Twig_FilterCallableInterface
+class Twig_Filter
{
- protected $options;
- protected $arguments = array();
+ private $name;
+ private $callable;
+ private $options;
+ private $arguments = array();
- public function __construct(array $options = array())
+ /**
+ * Creates a template filter.
+ *
+ * @param string $name Name of this filter
+ * @param callable|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation.
+ * @param array $options Options array
+ */
+ public function __construct($name, callable $callable = null, array $options = array())
{
+ $this->name = $name;
+ $this->callable = $callable;
$this->options = array_merge(array(
'needs_environment' => false,
'needs_context' => false,
+ 'is_variadic' => false,
+ 'is_safe' => null,
+ 'is_safe_callback' => null,
'pre_escape' => null,
'preserves_safety' => null,
- 'callable' => null,
+ 'node_class' => 'Twig_Node_Expression_Filter',
+ 'deprecated' => false,
+ 'alternative' => null,
), $options);
}
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Returns the callable to execute for this filter.
+ *
+ * @return callable|null
+ */
+ public function getCallable()
+ {
+ return $this->callable;
+ }
+
+ public function getNodeClass()
+ {
+ return $this->options['node_class'];
+ }
+
public function setArguments($arguments)
{
$this->arguments = $arguments;
@@ -58,12 +90,12 @@ public function needsContext()
public function getSafe(Twig_Node $filterArgs)
{
- if (isset($this->options['is_safe'])) {
+ if (null !== $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);
+ if (null !== $this->options['is_safe_callback']) {
+ return $this->options['is_safe_callback']($filterArgs);
}
}
@@ -77,8 +109,23 @@ public function getPreEscape()
return $this->options['pre_escape'];
}
- public function getCallable()
+ 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['callable'];
+ return $this->options['alternative'];
}
}
diff --git a/vendor/twig/twig/lib/Twig/Filter/Function.php b/vendor/twig/twig/lib/Twig/Filter/Function.php
deleted file mode 100644
index d679cab..0000000
--- a/vendor/twig/twig/lib/Twig/Filter/Function.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * @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 = array())
- {
- $options['callable'] = $function;
-
- parent::__construct($options);
-
- $this->function = $function;
- }
-
- public function compile()
- {
- return $this->function;
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Filter/Method.php b/vendor/twig/twig/lib/Twig/Filter/Method.php
deleted file mode 100644
index 655aab4..0000000
--- a/vendor/twig/twig/lib/Twig/Filter/Method.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 2.0)
- */
-class Twig_Filter_Method extends Twig_Filter
-{
- protected $extension;
- protected $method;
-
- public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array())
- {
- $options['callable'] = array($extension, $method);
-
- parent::__construct($options);
-
- $this->extension = $extension;
- $this->method = $method;
- }
-
- public function compile()
- {
- return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension->getName(), $this->method);
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Filter/Node.php b/vendor/twig/twig/lib/Twig/Filter/Node.php
deleted file mode 100644
index a922f50..0000000
--- a/vendor/twig/twig/lib/Twig/Filter/Node.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * @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 = array())
- {
- parent::__construct($options);
-
- $this->class = $class;
- }
-
- public function getClass()
- {
- return $this->class;
- }
-
- public function compile()
- {
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/FilterCallableInterface.php b/vendor/twig/twig/lib/Twig/FilterCallableInterface.php
deleted file mode 100644
index 5679861..0000000
--- a/vendor/twig/twig/lib/Twig/FilterCallableInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 2.0)
- */
-interface Twig_FilterCallableInterface
-{
- public function getCallable();
-}
diff --git a/vendor/twig/twig/lib/Twig/FilterInterface.php b/vendor/twig/twig/lib/Twig/FilterInterface.php
deleted file mode 100644
index 6b0be0e..0000000
--- a/vendor/twig/twig/lib/Twig/FilterInterface.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- *
- * @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(Twig_Node $filterArgs);
-
- public function getPreservesSafety();
-
- public function getPreEscape();
-
- public function setArguments($arguments);
-
- public function getArguments();
-}
diff --git a/vendor/twig/twig/lib/Twig/Function.php b/vendor/twig/twig/lib/Twig/Function.php
index 9fc76a8..adc890c 100644
--- a/vendor/twig/twig/lib/Twig/Function.php
+++ b/vendor/twig/twig/lib/Twig/Function.php
@@ -3,37 +3,69 @@
/*
* This file is part of Twig.
*
- * (c) 2010 Fabien Potencier
+ * (c) 2010-2012 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 class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.', E_USER_DEPRECATED);
-
/**
* Represents a template function.
*
- * Use Twig_SimpleFunction instead.
- *
* @author Fabien Potencier
*
- * @deprecated since 1.12 (to be removed in 2.0)
+ * @see http://twig.sensiolabs.org/doc/templates.html#functions
*/
-abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCallableInterface
+class Twig_Function
{
- protected $options;
- protected $arguments = array();
+ private $name;
+ private $callable;
+ private $options;
+ private $arguments = array();
- public function __construct(array $options = array())
+ /**
+ * Creates a template function.
+ *
+ * @param string $name Name of this function
+ * @param callable|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation.
+ * @param array $options Options array
+ */
+ public function __construct($name, callable $callable = null, array $options = array())
{
+ $this->name = $name;
+ $this->callable = $callable;
$this->options = array_merge(array(
'needs_environment' => false,
'needs_context' => false,
- 'callable' => null,
+ 'is_variadic' => false,
+ 'is_safe' => null,
+ 'is_safe_callback' => null,
+ 'node_class' => 'Twig_Node_Expression_Function',
+ 'deprecated' => false,
+ 'alternative' => null,
), $options);
}
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Returns the callable to execute for this function.
+ *
+ * @return callable|null
+ */
+ public function getCallable()
+ {
+ return $this->callable;
+ }
+
+ public function getNodeClass()
+ {
+ return $this->options['node_class'];
+ }
+
public function setArguments($arguments)
{
$this->arguments = $arguments;
@@ -56,19 +88,34 @@ public function needsContext()
public function getSafe(Twig_Node $functionArgs)
{
- if (isset($this->options['is_safe'])) {
+ if (null !== $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);
+ if (null !== $this->options['is_safe_callback']) {
+ return $this->options['is_safe_callback']($functionArgs);
}
return array();
}
- public function getCallable()
+ 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['callable'];
+ return $this->options['alternative'];
}
}
diff --git a/vendor/twig/twig/lib/Twig/Function/Function.php b/vendor/twig/twig/lib/Twig/Function/Function.php
deleted file mode 100644
index ae83e15..0000000
--- a/vendor/twig/twig/lib/Twig/Function/Function.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- *
- * @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 = array())
- {
- $options['callable'] = $function;
-
- parent::__construct($options);
-
- $this->function = $function;
- }
-
- public function compile()
- {
- return $this->function;
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Function/Method.php b/vendor/twig/twig/lib/Twig/Function/Method.php
deleted file mode 100644
index ba9945e..0000000
--- a/vendor/twig/twig/lib/Twig/Function/Method.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 2.0)
- */
-class Twig_Function_Method extends Twig_Function
-{
- protected $extension;
- protected $method;
-
- public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array())
- {
- $options['callable'] = array($extension, $method);
-
- parent::__construct($options);
-
- $this->extension = $extension;
- $this->method = $method;
- }
-
- public function compile()
- {
- return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension->getName(), $this->method);
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Function/Node.php b/vendor/twig/twig/lib/Twig/Function/Node.php
deleted file mode 100644
index 118b0ba..0000000
--- a/vendor/twig/twig/lib/Twig/Function/Node.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * @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 = array())
- {
- parent::__construct($options);
-
- $this->class = $class;
- }
-
- public function getClass()
- {
- return $this->class;
- }
-
- public function compile()
- {
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php b/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php
deleted file mode 100644
index 87d795e..0000000
--- a/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 2.0)
- */
-interface Twig_FunctionCallableInterface
-{
- public function getCallable();
-}
diff --git a/vendor/twig/twig/lib/Twig/FunctionInterface.php b/vendor/twig/twig/lib/Twig/FunctionInterface.php
deleted file mode 100644
index f449234..0000000
--- a/vendor/twig/twig/lib/Twig/FunctionInterface.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * @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(Twig_Node $filterArgs);
-
- public function setArguments($arguments);
-
- public function getArguments();
-}
diff --git a/vendor/twig/twig/lib/Twig/Lexer.php b/vendor/twig/twig/lib/Twig/Lexer.php
index 575b4f3..7aba324 100644
--- a/vendor/twig/twig/lib/Twig/Lexer.php
+++ b/vendor/twig/twig/lib/Twig/Lexer.php
@@ -15,23 +15,23 @@
*
* @author Fabien Potencier
*/
-class Twig_Lexer implements Twig_LexerInterface
+class Twig_Lexer
{
- protected $tokens;
- protected $code;
- protected $cursor;
- protected $lineno;
- protected $end;
- protected $state;
- protected $states;
- protected $brackets;
- protected $env;
- protected $filename;
- protected $options;
- protected $regexes;
- protected $position;
- protected $positions;
- protected $currentVarBlockLine;
+ private $tokens;
+ private $code;
+ private $cursor;
+ private $lineno;
+ private $end;
+ private $state;
+ private $states;
+ private $brackets;
+ private $env;
+ private $filename;
+ private $options;
+ private $regexes;
+ private $position;
+ private $positions;
+ private $currentVarBlockLine;
const STATE_DATA = 0;
const STATE_BLOCK = 1;
@@ -61,10 +61,10 @@ public function __construct(Twig_Environment $env, array $options = array())
$this->regexes = array(
'lex_var' => '/\s*'.preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_variable'][1], '/').'/A',
'lex_block' => '/\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')\n?/A',
- 'lex_raw_data' => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:end%s)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s',
+ 'lex_raw_data' => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:endverbatim)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s',
'operator' => $this->getOperatorRegex(),
'lex_comment' => '/(?:'.preg_quote($this->options['whitespace_trim'], '/').preg_quote($this->options['tag_comment'][1], '/').'\s*|'.preg_quote($this->options['tag_comment'][1], '/').')\n?/s',
- 'lex_block_raw' => '/\s*(raw|verbatim)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/As',
+ 'lex_block_raw' => '/\s*verbatim\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/As',
'lex_block_line' => '/\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '/').'/As',
'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'], '/').')?/s',
'interpolation_start' => '/'.preg_quote($this->options['interpolation'][0], '/').'\s*/A',
@@ -77,7 +77,7 @@ public function __construct(Twig_Environment $env, array $options = array())
*/
public function tokenize($code, $filename = null)
{
- if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) {
+ if (((int) ini_get('mbstring.func_overload')) & 2) {
$mbEncoding = mb_internal_encoding();
mb_internal_encoding('ASCII');
} else {
@@ -139,7 +139,7 @@ public function tokenize($code, $filename = null)
return new Twig_TokenStream($this->tokens, $this->filename);
}
- protected function lexData()
+ private 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) {
@@ -175,7 +175,7 @@ protected function lexData()
// raw data?
if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, null, $this->cursor)) {
$this->moveCursor($match[0]);
- $this->lexRawData($match[1]);
+ $this->lexRawData();
// {% line \d+ %}
} elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, null, $this->cursor)) {
$this->moveCursor($match[0]);
@@ -195,7 +195,7 @@ protected function lexData()
}
}
- protected function lexBlock()
+ private function lexBlock()
{
if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, null, $this->cursor)) {
$this->pushToken(Twig_Token::BLOCK_END_TYPE);
@@ -206,7 +206,7 @@ protected function lexBlock()
}
}
- protected function lexVar()
+ private function lexVar()
{
if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, null, $this->cursor)) {
$this->pushToken(Twig_Token::VAR_END_TYPE);
@@ -217,7 +217,7 @@ protected function lexVar()
}
}
- protected function lexExpression()
+ private function lexExpression()
{
// whitespace
if (preg_match('/\s+/A', $this->code, $match, null, $this->cursor)) {
@@ -285,14 +285,10 @@ protected function lexExpression()
}
}
- protected function lexRawData($tag)
+ private function lexRawData()
{
- if ('raw' === $tag) {
- @trigger_error(sprintf('Twig Tag "raw" is deprecated. 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 Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "%s" block.', $tag), $this->lineno, $this->filename);
+ if (!preg_match($this->regexes['lex_raw_data'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
+ throw new Twig_Error_Syntax('Unexpected end of file: Unclosed "verbatim" block.', $this->lineno, $this->filename);
}
$text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);
@@ -305,7 +301,7 @@ protected function lexRawData($tag)
$this->pushToken(Twig_Token::TEXT_TYPE, $text);
}
- protected function lexComment()
+ private function lexComment()
{
if (!preg_match($this->regexes['lex_comment'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
throw new Twig_Error_Syntax('Unclosed comment.', $this->lineno, $this->filename);
@@ -314,7 +310,7 @@ protected function lexComment()
$this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]);
}
- protected function lexString()
+ private function lexString()
{
if (preg_match($this->regexes['interpolation_start'], $this->code, $match, null, $this->cursor)) {
$this->brackets[] = array($this->options['interpolation'][0], $this->lineno);
@@ -335,7 +331,7 @@ protected function lexString()
}
}
- protected function lexInterpolation()
+ private function lexInterpolation()
{
$bracket = end($this->brackets);
if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, null, $this->cursor)) {
@@ -348,7 +344,7 @@ protected function lexInterpolation()
}
}
- protected function pushToken($type, $value = '')
+ private function pushToken($type, $value = '')
{
// do not push empty text tokens
if (Twig_Token::TEXT_TYPE === $type && '' === $value) {
@@ -358,13 +354,13 @@ protected function pushToken($type, $value = '')
$this->tokens[] = new Twig_Token($type, $value, $this->lineno);
}
- protected function moveCursor($text)
+ private function moveCursor($text)
{
$this->cursor += strlen($text);
$this->lineno += substr_count($text, "\n");
}
- protected function getOperatorRegex()
+ private function getOperatorRegex()
{
$operators = array_merge(
array('='),
@@ -394,13 +390,13 @@ protected function getOperatorRegex()
return '/'.implode('|', $regex).'/A';
}
- protected function pushState($state)
+ private function pushState($state)
{
$this->states[] = $this->state;
$this->state = $state;
}
- protected function popState()
+ private function popState()
{
if (0 === count($this->states)) {
throw new Exception('Cannot pop state without a previous state');
diff --git a/vendor/twig/twig/lib/Twig/LexerInterface.php b/vendor/twig/twig/lib/Twig/LexerInterface.php
deleted file mode 100644
index 24a9478..0000000
--- a/vendor/twig/twig/lib/Twig/LexerInterface.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 3.0)
- */
-interface Twig_LexerInterface
-{
- /**
- * Tokenizes a source code.
- *
- * @param string $code The source code
- * @param string $filename A unique identifier for the source code
- *
- * @return Twig_TokenStream A token stream instance
- *
- * @throws Twig_Error_Syntax When the code is syntactically wrong
- */
- public function tokenize($code, $filename = null);
-}
diff --git a/vendor/twig/twig/lib/Twig/Loader/Array.php b/vendor/twig/twig/lib/Twig/Loader/Array.php
index 90221d5..56070af 100644
--- a/vendor/twig/twig/lib/Twig/Loader/Array.php
+++ b/vendor/twig/twig/lib/Twig/Loader/Array.php
@@ -23,7 +23,7 @@
*/
class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
{
- protected $templates = array();
+ private $templates = array();
/**
* Constructor.
@@ -43,7 +43,7 @@ public function __construct(array $templates)
*/
public function setTemplate($name, $template)
{
- $this->templates[(string) $name] = $template;
+ $this->templates[$name] = $template;
}
/**
@@ -51,7 +51,6 @@ public function setTemplate($name, $template)
*/
public function getSource($name)
{
- $name = (string) $name;
if (!isset($this->templates[$name])) {
throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
}
@@ -64,7 +63,7 @@ public function getSource($name)
*/
public function exists($name)
{
- return isset($this->templates[(string) $name]);
+ return isset($this->templates[$name]);
}
/**
@@ -72,7 +71,6 @@ public function exists($name)
*/
public function getCacheKey($name)
{
- $name = (string) $name;
if (!isset($this->templates[$name])) {
throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
}
@@ -85,7 +83,6 @@ public function getCacheKey($name)
*/
public function isFresh($name, $time)
{
- $name = (string) $name;
if (!isset($this->templates[$name])) {
throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
}
diff --git a/vendor/twig/twig/lib/Twig/Loader/Chain.php b/vendor/twig/twig/lib/Twig/Loader/Chain.php
index 81d57ad..d0b2808 100644
--- a/vendor/twig/twig/lib/Twig/Loader/Chain.php
+++ b/vendor/twig/twig/lib/Twig/Loader/Chain.php
@@ -17,7 +17,7 @@
class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
{
private $hasSourceCache = array();
- protected $loaders = array();
+ private $loaders = array();
/**
* Constructor.
@@ -49,7 +49,7 @@ public function getSource($name)
{
$exceptions = array();
foreach ($this->loaders as $loader) {
- if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) {
+ if (!$loader->exists($name)) {
continue;
}
@@ -68,26 +68,13 @@ public function getSource($name)
*/
public function exists($name)
{
- $name = (string) $name;
-
if (isset($this->hasSourceCache[$name])) {
return $this->hasSourceCache[$name];
}
foreach ($this->loaders as $loader) {
- if ($loader instanceof Twig_ExistsLoaderInterface) {
- if ($loader->exists($name)) {
- return $this->hasSourceCache[$name] = true;
- }
-
- continue;
- }
-
- try {
- $loader->getSource($name);
-
+ if ($loader->exists($name)) {
return $this->hasSourceCache[$name] = true;
- } catch (Twig_Error_Loader $e) {
}
}
@@ -101,7 +88,7 @@ public function getCacheKey($name)
{
$exceptions = array();
foreach ($this->loaders as $loader) {
- if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) {
+ if (!$loader->exists($name)) {
continue;
}
@@ -122,7 +109,7 @@ public function isFresh($name, $time)
{
$exceptions = array();
foreach ($this->loaders as $loader) {
- if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) {
+ if (!$loader->exists($name)) {
continue;
}
diff --git a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
index 1bc75a1..e1ba2fd 100644
--- a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
+++ b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
@@ -165,9 +165,16 @@ public function isFresh($name, $time)
return filemtime($this->findTemplate($name)) <= $time;
}
- protected function findTemplate($name)
+ /**
+ * Checks if the template can be found.
+ *
+ * @param string $name The template name
+ * @param Boolean $throw Whether to throw an exception when an error occurs
+ *
+ * @return string|false The template name or false
+ */
+ protected function findTemplate($name, $throw = true)
{
- $throw = func_num_args() > 1 ? func_get_arg(1) : true;
$name = $this->normalizeName($name);
if (isset($this->cache[$name])) {
@@ -215,7 +222,12 @@ protected function findTemplate($name)
throw new Twig_Error_Loader($this->errorCache[$name]);
}
- protected function parseName($name, $default = self::MAIN_NAMESPACE)
+ private function normalizeName($name)
+ {
+ return preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name));
+ }
+
+ private function parseName($name, $default = self::MAIN_NAMESPACE)
{
if (isset($name[0]) && '@' == $name[0]) {
if (false === $pos = strpos($name, '/')) {
@@ -231,12 +243,7 @@ protected function parseName($name, $default = self::MAIN_NAMESPACE)
return array($default, $name);
}
- protected function normalizeName($name)
- {
- return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name));
- }
-
- protected function validateName($name)
+ private function validateName($name)
{
if (false !== strpos($name, "\0")) {
throw new Twig_Error_Loader('A template name cannot contain NUL bytes.');
diff --git a/vendor/twig/twig/lib/Twig/Loader/String.php b/vendor/twig/twig/lib/Twig/Loader/String.php
deleted file mode 100644
index 00f507a..0000000
--- a/vendor/twig/twig/lib/Twig/Loader/String.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- */
-class Twig_Loader_String implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
-{
- /**
- * {@inheritdoc}
- */
- public function getSource($name)
- {
- return $name;
- }
-
- /**
- * {@inheritdoc}
- */
- public function exists($name)
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getCacheKey($name)
- {
- return $name;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isFresh($name, $time)
- {
- return true;
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/LoaderInterface.php b/vendor/twig/twig/lib/Twig/LoaderInterface.php
index 544ea4e..a1ee0ae 100644
--- a/vendor/twig/twig/lib/Twig/LoaderInterface.php
+++ b/vendor/twig/twig/lib/Twig/LoaderInterface.php
@@ -50,4 +50,13 @@ public function getCacheKey($name);
* @throws Twig_Error_Loader When $name is not found
*/
public function isFresh($name, $time);
+
+ /**
+ * 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);
}
diff --git a/vendor/twig/twig/lib/Twig/Markup.php b/vendor/twig/twig/lib/Twig/Markup.php
index 69871fc..8c8741e 100644
--- a/vendor/twig/twig/lib/Twig/Markup.php
+++ b/vendor/twig/twig/lib/Twig/Markup.php
@@ -14,10 +14,10 @@
*
* @author Fabien Potencier
*/
-class Twig_Markup implements Countable
+class Twig_Markup implements Countable, JsonSerializable
{
- protected $content;
- protected $charset;
+ private $content;
+ private $charset;
public function __construct($content, $charset)
{
@@ -32,6 +32,11 @@ public function __toString()
public function count()
{
- return function_exists('mb_get_info') ? mb_strlen($this->content, $this->charset) : strlen($this->content);
+ return mb_strlen($this->content, $this->charset);
+ }
+
+ public function jsonSerialize()
+ {
+ return $this->content;
}
}
diff --git a/vendor/twig/twig/lib/Twig/Node.php b/vendor/twig/twig/lib/Twig/Node.php
index 45a8976..a3e067d 100644
--- a/vendor/twig/twig/lib/Twig/Node.php
+++ b/vendor/twig/twig/lib/Twig/Node.php
@@ -15,7 +15,7 @@
*
* @author Fabien Potencier
*/
-class Twig_Node implements Twig_NodeInterface
+class Twig_Node implements Countable, IteratorAggregate
{
protected $nodes;
protected $attributes;
@@ -69,41 +69,6 @@ public function __toString()
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.', __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(Twig_Compiler $compiler)
{
foreach ($this->nodes as $node) {
diff --git a/vendor/twig/twig/lib/Twig/Node/AutoEscape.php b/vendor/twig/twig/lib/Twig/Node/AutoEscape.php
index 47cc998..397d3d8 100644
--- a/vendor/twig/twig/lib/Twig/Node/AutoEscape.php
+++ b/vendor/twig/twig/lib/Twig/Node/AutoEscape.php
@@ -22,7 +22,7 @@
*/
class Twig_Node_AutoEscape extends Twig_Node
{
- public function __construct($value, Twig_NodeInterface $body, $lineno, $tag = 'autoescape')
+ public function __construct($value, Twig_Node $body, $lineno, $tag = 'autoescape')
{
parent::__construct(array('body' => $body), array('value' => $value), $lineno, $tag);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Block.php b/vendor/twig/twig/lib/Twig/Node/Block.php
index a05af6f..7130a6d 100644
--- a/vendor/twig/twig/lib/Twig/Node/Block.php
+++ b/vendor/twig/twig/lib/Twig/Node/Block.php
@@ -17,7 +17,7 @@
*/
class Twig_Node_Block extends Twig_Node
{
- public function __construct($name, Twig_NodeInterface $body, $lineno, $tag = null)
+ public function __construct($name, Twig_Node $body, $lineno, $tag = null)
{
parent::__construct(array('body' => $body), array('name' => $name), $lineno, $tag);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php b/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php
index b4a436a..3583fc7 100644
--- a/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php
+++ b/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php
@@ -14,9 +14,9 @@
*/
class Twig_Node_CheckSecurity extends Twig_Node
{
- protected $usedFilters;
- protected $usedTags;
- protected $usedFunctions;
+ private $usedFilters;
+ private $usedTags;
+ private $usedFunctions;
public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
{
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Array.php b/vendor/twig/twig/lib/Twig/Node/Expression/Array.php
index 83e583b..27b960b 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Array.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Array.php
@@ -10,7 +10,7 @@
*/
class Twig_Node_Expression_Array extends Twig_Node_Expression
{
- protected $index;
+ private $index;
public function __construct(array $elements, $lineno)
{
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php
index c821db5..0f1f9e0 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php
@@ -11,7 +11,7 @@
*/
abstract class Twig_Node_Expression_Binary extends Twig_Node_Expression
{
- public function __construct(Twig_NodeInterface $left, Twig_NodeInterface $right, $lineno)
+ public function __construct(Twig_Node $left, Twig_Node $right, $lineno)
{
parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php b/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php
index f6ed6ff..cd052f6 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php
@@ -17,7 +17,7 @@
*/
class Twig_Node_Expression_BlockReference extends Twig_Node_Expression
{
- public function __construct(Twig_NodeInterface $name, $asString = false, $lineno, $tag = null)
+ public function __construct(Twig_Node $name, $asString = false, $lineno, $tag = null)
{
parent::__construct(array('name' => $name), array('as_string' => $asString, 'output' => false), $lineno, $tag);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php
index 51e2cac..50bc652 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php
@@ -12,19 +12,22 @@
{
protected function compileCallable(Twig_Compiler $compiler)
{
+ $callable = $this->getAttribute('callable');
+
$closingParenthesis = false;
- if ($this->hasAttribute('callable') && $callable = $this->getAttribute('callable')) {
- if (is_string($callable)) {
- $compiler->raw($callable);
- } elseif (is_array($callable) && $callable[0] instanceof Twig_ExtensionInterface) {
- $compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s', $callable[0]->getName(), $callable[1]));
- } else {
- $type = ucfirst($this->getAttribute('type'));
- $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), array', $type, $this->getAttribute('name')));
- $closingParenthesis = true;
- }
+ if (is_string($callable)) {
+ $compiler->raw($callable);
+ } elseif (is_array($callable) && $callable[0] instanceof Twig_ExtensionInterface) {
+ $compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s', $callable[0]->getName(), $callable[1]));
+ } elseif (null !== $callable) {
+ $closingParenthesis = true;
+ $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), array', ucfirst($this->getAttribute('type')), $this->getAttribute('name')));
} else {
- $compiler->raw($this->getAttribute('thing')->compile());
+ throw new LogicException(sprintf(
+ '%s "%s" cannot be compiled because it does not define a callable to execute. Maybe you want to change compilation with a custom node class.',
+ ucfirst($this->getAttribute('type')),
+ $this->getAttribute('name')
+ ));
}
$this->compileArguments($compiler);
@@ -72,10 +75,8 @@ protected function compileArguments(Twig_Compiler $compiler)
}
if ($this->hasNode('arguments') && null !== $this->getNode('arguments')) {
- $callable = $this->hasAttribute('callable') ? $this->getAttribute('callable') : null;
-
+ $callable = $this->getAttribute('callable');
$arguments = $this->getArguments($callable, $this->getNode('arguments'));
-
foreach ($arguments as $node) {
if (!$first) {
$compiler->raw(', ');
@@ -88,7 +89,7 @@ protected function compileArguments(Twig_Compiler $compiler)
$compiler->raw(')');
}
- protected function getArguments($callable, $arguments)
+ protected function getArguments(callable $callable = null, $arguments)
{
$callType = $this->getAttribute('type');
$callName = $this->getAttribute('name');
@@ -122,53 +123,14 @@ protected function getArguments($callable, $arguments)
}
// manage named arguments
- if (is_array($callable)) {
- $r = new ReflectionMethod($callable[0], $callable[1]);
- } elseif (is_object($callable) && !$callable instanceof Closure) {
- $r = new ReflectionObject($callable);
- $r = $r->getMethod('__invoke');
- } elseif (is_string($callable) && false !== strpos($callable, '::')) {
- $r = new ReflectionMethod($callable);
- } else {
- $r = new ReflectionFunction($callable);
- }
-
- $definition = $r->getParameters();
- if ($this->hasNode('node')) {
- array_shift($definition);
- }
- if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) {
- array_shift($definition);
- }
- if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) {
- array_shift($definition);
- }
- if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) {
- foreach ($this->getAttribute('arguments') as $argument) {
- array_shift($definition);
- }
- }
- if ($isVariadic) {
- $argument = end($definition);
- if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && array() === $argument->getDefaultValue()) {
- array_pop($definition);
- } else {
- $callableName = $r->name;
- if ($r->getDeclaringClass()) {
- $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 = array()".', $callableName, $callType, $callName));
- }
- }
-
+ $callableParameters = $this->getCallableParameters($callable, $isVariadic);
$arguments = array();
$names = array();
$missingArguments = array();
$optionalArguments = array();
$pos = 0;
- foreach ($definition as $param) {
- $names[] = $name = $this->normalizeName($param->name);
+ foreach ($callableParameters as $callableParameter) {
+ $names[] = $name = $this->normalizeName($callableParameter->name);
if (array_key_exists($name, $parameters)) {
if (array_key_exists($pos, $parameters)) {
@@ -192,9 +154,9 @@ protected function getArguments($callable, $arguments)
unset($parameters[$pos]);
$optionalArguments = array();
++$pos;
- } elseif ($param->isDefaultValueAvailable()) {
- $optionalArguments[] = new Twig_Node_Expression_Constant($param->getDefaultValue(), -1);
- } elseif ($param->isOptional()) {
+ } elseif ($callableParameter->isDefaultValueAvailable()) {
+ $optionalArguments[] = new Twig_Node_Expression_Constant($callableParameter->getDefaultValue(), -1);
+ } elseif ($callableParameter->isOptional()) {
if (empty($parameters)) {
break;
} else {
@@ -244,4 +206,49 @@ protected function normalizeName($name)
{
return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), $name));
}
+
+ private function getCallableParameters($callable, $isVariadic)
+ {
+ if (is_array($callable)) {
+ $r = new ReflectionMethod($callable[0], $callable[1]);
+ } elseif (is_object($callable) && !$callable instanceof Closure) {
+ $r = new ReflectionObject($callable);
+ $r = $r->getMethod('__invoke');
+ } elseif (is_string($callable) && false !== strpos($callable, '::')) {
+ $r = new ReflectionMethod($callable);
+ } else {
+ $r = new ReflectionFunction($callable);
+ }
+
+ $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() && array() === $argument->getDefaultValue()) {
+ array_pop($parameters);
+ } else {
+ $callableName = $r->name;
+ if ($r->getDeclaringClass()) {
+ $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 = array()".', $callableName, $this->getAttribute('type'), $this->getAttribute('name')));
+ }
+ }
+
+ return $parameters;
+ }
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php b/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php
deleted file mode 100644
index 6140c57..0000000
--- a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- */
-class Twig_Node_Expression_ExtensionReference extends Twig_Node_Expression
-{
- public function __construct($name, $lineno, $tag = null)
- {
- parent::__construct(array(), array('name' => $name), $lineno, $tag);
- }
-
- public function compile(Twig_Compiler $compiler)
- {
- $compiler->raw(sprintf("\$this->env->getExtension('%s')", $this->getAttribute('name')));
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php b/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php
index a906232..b1008d8 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php
@@ -11,7 +11,7 @@
*/
class Twig_Node_Expression_Filter extends Twig_Node_Expression_Call
{
- public function __construct(Twig_NodeInterface $node, Twig_Node_Expression_Constant $filterName, Twig_NodeInterface $arguments, $lineno, $tag = null)
+ public function __construct(Twig_Node $node, Twig_Node_Expression_Constant $filterName, Twig_Node $arguments, $lineno, $tag = null)
{
parent::__construct(array('node' => $node, 'filter' => $filterName, 'arguments' => $arguments), array(), $lineno, $tag);
}
@@ -23,16 +23,11 @@ public function compile(Twig_Compiler $compiler)
$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 Twig_SimpleFilter) {
- $this->setAttribute('callable', $filter->getCallable());
- }
- if ($filter instanceof Twig_SimpleFilter) {
- $this->setAttribute('is_variadic', $filter->isVariadic());
- }
+ $this->setAttribute('callable', $filter->getCallable());
+ $this->setAttribute('is_variadic', $filter->isVariadic());
$this->compileCallable($compiler);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php b/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php
index 1827c88..dc2fdd8 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php
@@ -20,7 +20,7 @@
*/
class Twig_Node_Expression_Filter_Default extends Twig_Node_Expression_Filter
{
- public function __construct(Twig_NodeInterface $node, Twig_Node_Expression_Constant $filterName, Twig_NodeInterface $arguments, $lineno, $tag = null)
+ public function __construct(Twig_Node $node, Twig_Node_Expression_Constant $filterName, Twig_Node $arguments, $lineno, $tag = null)
{
$default = new Twig_Node_Expression_Filter($node, new Twig_Node_Expression_Constant('default', $node->getLine()), $arguments, $node->getLine());
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Function.php b/vendor/twig/twig/lib/Twig/Node/Expression/Function.php
index 7326ede..e19dc5f 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Function.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Function.php
@@ -10,7 +10,7 @@
*/
class Twig_Node_Expression_Function extends Twig_Node_Expression_Call
{
- public function __construct($name, Twig_NodeInterface $arguments, $lineno)
+ public function __construct($name, Twig_Node $arguments, $lineno)
{
parent::__construct(array('arguments' => $arguments), array('name' => $name), $lineno);
}
@@ -22,16 +22,11 @@ public function compile(Twig_Compiler $compiler)
$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 Twig_SimpleFunction) {
- $this->setAttribute('callable', $function->getCallable());
- }
- if ($function instanceof Twig_SimpleFunction) {
- $this->setAttribute('is_variadic', $function->isVariadic());
- }
+ $this->setAttribute('callable', $function->getCallable());
+ $this->setAttribute('is_variadic', $function->isVariadic());
$this->compileCallable($compiler);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php
index c062a21..89367b4 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php
@@ -11,8 +11,8 @@
*/
class Twig_Node_Expression_Name extends Twig_Node_Expression
{
- protected $specialVars = array(
- '_self' => '$this',
+ private $specialVars = array(
+ '_self' => '$this->getTemplateName()',
'_context' => '$context',
'_charset' => '$this->env->getCharset()',
);
@@ -30,19 +30,11 @@ public function compile(Twig_Compiler $compiler)
if ($this->getAttribute('is_defined_test')) {
if ($this->isSpecial()) {
- if ('_self' === $name) {
- @trigger_error(sprintf('Global variable "_self" is deprecated in %s at line %d', '?', $this->getLine()), E_USER_DEPRECATED);
- }
-
$compiler->repr(true);
} else {
$compiler->raw('array_key_exists(')->repr($name)->raw(', $context)');
}
} elseif ($this->isSpecial()) {
- if ('_self' === $name) {
- @trigger_error(sprintf('Global variable "_self" is deprecated in %s at line %d', '?', $this->getLine()), E_USER_DEPRECATED);
- }
-
$compiler->raw($this->specialVars[$name]);
} elseif ($this->getAttribute('always_defined')) {
$compiler
@@ -51,36 +43,30 @@ public function compile(Twig_Compiler $compiler)
->raw(']')
;
} else {
- // remove the non-PHP 5.4 version when PHP 5.3 support is dropped
- // as the non-optimized version is just a workaround for slow ternary operator
- // when the context has a lot of variables
- if (PHP_VERSION_ID >= 50400) {
- // PHP 5.4 ternary operator performance was optimized
+ if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) {
$compiler
->raw('(isset($context[')
->string($name)
->raw(']) ? $context[')
->string($name)
- ->raw('] : ')
+ ->raw('] : null)')
;
-
- if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) {
- $compiler->raw('null)');
- } else {
- $compiler->raw('$this->getContext($context, ')->string($name)->raw('))');
- }
} else {
+ // When Twig will require PHP 7.0, the Template::notFound() method
+ // will be removed and the code inlined like this:
+ // (function () { throw new Exception(...); })();
$compiler
- ->raw('$this->getContext($context, ')
+ ->raw('(isset($context[')
->string($name)
- ;
-
- if ($this->getAttribute('ignore_strict_check')) {
- $compiler->raw(', true');
- }
-
- $compiler
- ->raw(')')
+ ->raw(']) || array_key_exists(')
+ ->string($name)
+ ->raw(', $context) ? $context[')
+ ->string($name)
+ ->raw('] : $this->notFound(')
+ ->string($name)
+ ->raw(', ')
+ ->repr($this->lineno)
+ ->raw('))')
;
}
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php b/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php
new file mode 100644
index 0000000..d08c72a
--- /dev/null
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php
@@ -0,0 +1,23 @@
+getLine()),
+ new Twig_Node_Expression_Unary_Not(new Twig_Node_Expression_Test_Null($left, 'null', new Twig_Node(), $left->getLine()), $left->getLine()),
+ $left->getLine()
+ );
+
+ parent::__construct($test, $left, $right, $lineno);
+ }
+}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php
index c0358c8..80f4b69 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php
@@ -10,7 +10,7 @@
*/
class Twig_Node_Expression_Test extends Twig_Node_Expression_Call
{
- public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno)
+ public function __construct(Twig_Node $node, $name, Twig_Node $arguments = null, $lineno)
{
parent::__construct(array('node' => $node, 'arguments' => $arguments), array('name' => $name), $lineno);
}
@@ -22,13 +22,8 @@ public function compile(Twig_Compiler $compiler)
$this->setAttribute('name', $name);
$this->setAttribute('type', 'test');
- $this->setAttribute('thing', $test);
- if ($test instanceof Twig_TestCallableInterface || $test instanceof Twig_SimpleTest) {
- $this->setAttribute('callable', $test->getCallable());
- }
- if ($test instanceof Twig_SimpleTest) {
- $this->setAttribute('is_variadic', $test->isVariadic());
- }
+ $this->setAttribute('callable', $test->getCallable());
+ $this->setAttribute('is_variadic', $test->isVariadic());
$this->compileCallable($compiler);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php
index 4b4a48a..771065d 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php
@@ -23,22 +23,24 @@
*/
class Twig_Node_Expression_Test_Defined extends Twig_Node_Expression_Test
{
- public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno)
+ public function __construct(Twig_Node $node, $name, Twig_Node $arguments = null, $lineno)
{
- parent::__construct($node, $name, $arguments, $lineno);
-
if ($node instanceof Twig_Node_Expression_Name) {
$node->setAttribute('is_defined_test', true);
} elseif ($node instanceof Twig_Node_Expression_GetAttr) {
$node->setAttribute('is_defined_test', true);
$this->changeIgnoreStrictCheck($node);
+ } elseif ($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array) {
+ $node = new Twig_Node_Expression_Constant(true, $node->getLine());
} else {
throw new Twig_Error_Syntax('The "defined" test only works with simple variables.', $this->getLine());
}
+
+ parent::__construct($node, $name, $arguments, $lineno);
}
- protected function changeIgnoreStrictCheck(Twig_Node_Expression_GetAttr $node)
+ private function changeIgnoreStrictCheck(Twig_Node_Expression_GetAttr $node)
{
$node->setAttribute('ignore_strict_check', true);
diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php b/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php
index 1cf54c3..ee3af70 100644
--- a/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php
+++ b/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php
@@ -11,7 +11,7 @@
*/
abstract class Twig_Node_Expression_Unary extends Twig_Node_Expression
{
- public function __construct(Twig_NodeInterface $node, $lineno)
+ public function __construct(Twig_Node $node, $lineno)
{
parent::__construct(array('node' => $node), array(), $lineno);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/For.php b/vendor/twig/twig/lib/Twig/Node/For.php
index 2d45093..f62f5bb 100644
--- a/vendor/twig/twig/lib/Twig/Node/For.php
+++ b/vendor/twig/twig/lib/Twig/Node/For.php
@@ -17,9 +17,9 @@
*/
class Twig_Node_For extends Twig_Node
{
- protected $loop;
+ private $loop;
- public function __construct(Twig_Node_Expression_AssignName $keyTarget, Twig_Node_Expression_AssignName $valueTarget, Twig_Node_Expression $seq, Twig_Node_Expression $ifexpr = null, Twig_NodeInterface $body, Twig_NodeInterface $else = null, $lineno, $tag = null)
+ public function __construct(Twig_Node_Expression_AssignName $keyTarget, Twig_Node_Expression_AssignName $valueTarget, Twig_Node_Expression $seq, Twig_Node_Expression $ifexpr = null, Twig_Node $body, Twig_Node $else = null, $lineno, $tag = null)
{
$body = new Twig_Node(array($body, $this->loop = new Twig_Node_ForLoop($lineno, $tag)));
diff --git a/vendor/twig/twig/lib/Twig/Node/If.php b/vendor/twig/twig/lib/Twig/Node/If.php
index caff936..73020be 100644
--- a/vendor/twig/twig/lib/Twig/Node/If.php
+++ b/vendor/twig/twig/lib/Twig/Node/If.php
@@ -17,7 +17,7 @@
*/
class Twig_Node_If extends Twig_Node
{
- public function __construct(Twig_NodeInterface $tests, Twig_NodeInterface $else = null, $lineno, $tag = null)
+ public function __construct(Twig_Node $tests, Twig_Node $else = null, $lineno, $tag = null)
{
parent::__construct(array('tests' => $tests, 'else' => $else), array(), $lineno, $tag);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Macro.php b/vendor/twig/twig/lib/Twig/Node/Macro.php
index 932e795..719ac9f 100644
--- a/vendor/twig/twig/lib/Twig/Node/Macro.php
+++ b/vendor/twig/twig/lib/Twig/Node/Macro.php
@@ -18,7 +18,7 @@ class Twig_Node_Macro extends Twig_Node
{
const VARARGS_NAME = 'varargs';
- public function __construct($name, Twig_NodeInterface $body, Twig_NodeInterface $arguments, $lineno, $tag = null)
+ public function __construct($name, Twig_Node $body, Twig_Node $arguments, $lineno, $tag = null)
{
foreach ($arguments as $argumentName => $argument) {
if (self::VARARGS_NAME === $argumentName) {
@@ -33,7 +33,7 @@ public function compile(Twig_Compiler $compiler)
{
$compiler
->addDebugInfo($this)
- ->write(sprintf('public function get%s(', $this->getAttribute('name')))
+ ->write(sprintf('public function macro_%s(', $this->getAttribute('name')))
;
$count = count($this->getNode('arguments'));
@@ -103,14 +103,14 @@ public function compile(Twig_Compiler $compiler)
->write("try {\n")
->indent()
->subcompile($this->getNode('body'))
+ ->raw("\n")
+ ->write("return ('' === \$tmp = ob_get_contents()) ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset());\n")
->outdent()
- ->write("} catch (Exception \$e) {\n")
+ ->write("} finally {\n")
->indent()
- ->write("ob_end_clean();\n\n")
- ->write("throw \$e;\n")
+ ->write("ob_end_clean();\n")
->outdent()
- ->write("}\n\n")
- ->write("return ('' === \$tmp = ob_get_clean()) ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset());\n")
+ ->write("}\n")
->outdent()
->write("}\n\n")
;
diff --git a/vendor/twig/twig/lib/Twig/Node/Module.php b/vendor/twig/twig/lib/Twig/Node/Module.php
index 01161d3..b35923a 100644
--- a/vendor/twig/twig/lib/Twig/Node/Module.php
+++ b/vendor/twig/twig/lib/Twig/Node/Module.php
@@ -21,7 +21,7 @@
*/
class Twig_Node_Module extends Twig_Node
{
- public function __construct(Twig_NodeInterface $body, Twig_Node_Expression $parent = null, Twig_NodeInterface $blocks, Twig_NodeInterface $macros, Twig_NodeInterface $traits, $embeddedTemplates, $filename)
+ public function __construct(Twig_Node $body, Twig_Node_Expression $parent = null, Twig_Node $blocks, Twig_Node $macros, Twig_Node $traits, $embeddedTemplates, $filename)
{
// embedded templates are set as attributes so that they are only visited once by the visitors
parent::__construct(array(
@@ -168,7 +168,17 @@ protected function compileConstructor(Twig_Compiler $compiler)
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
+ ->write(sprintf('$_trait_%s = $this->loadTemplate(', $i))
+ ->subcompile($node)
+ ->raw(', ')
+ ->repr($compiler->getFilename())
+ ->raw(', ')
+ ->repr($node->getLine())
+ ->raw(");\n")
+ ;
$compiler
->addDebugInfo($trait->getNode('template'))
@@ -383,21 +393,4 @@ protected function compileDebugInfo(Twig_Compiler $compiler)
->write("}\n")
;
}
-
- protected function compileLoadTemplate(Twig_Compiler $compiler, $node, $var)
- {
- if ($node instanceof Twig_Node_Expression_Constant) {
- $compiler
- ->write(sprintf('%s = $this->loadTemplate(', $var))
- ->subcompile($node)
- ->raw(', ')
- ->repr($compiler->getFilename())
- ->raw(', ')
- ->repr($node->getLine())
- ->raw(");\n")
- ;
- } else {
- throw new LogicException('Trait templates can only be constant nodes');
- }
- }
}
diff --git a/vendor/twig/twig/lib/Twig/Node/Sandbox.php b/vendor/twig/twig/lib/Twig/Node/Sandbox.php
index cd705e2..66c0b3a 100644
--- a/vendor/twig/twig/lib/Twig/Node/Sandbox.php
+++ b/vendor/twig/twig/lib/Twig/Node/Sandbox.php
@@ -16,7 +16,7 @@
*/
class Twig_Node_Sandbox extends Twig_Node
{
- public function __construct(Twig_NodeInterface $body, $lineno, $tag = null)
+ public function __construct(Twig_Node $body, $lineno, $tag = null)
{
parent::__construct(array('body' => $body), array(), $lineno, $tag);
}
diff --git a/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php b/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php
index 148dd2b..07db2f2 100644
--- a/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php
+++ b/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php
@@ -40,7 +40,7 @@ public function compile(Twig_Compiler $compiler)
*
* @return Twig_Node
*/
- protected function removeNodeFilter($node)
+ private function removeNodeFilter($node)
{
if ($node instanceof Twig_Node_Expression_Filter) {
return $this->removeNodeFilter($node->getNode('node'));
diff --git a/vendor/twig/twig/lib/Twig/Node/Set.php b/vendor/twig/twig/lib/Twig/Node/Set.php
index e5a6603..5eea399 100644
--- a/vendor/twig/twig/lib/Twig/Node/Set.php
+++ b/vendor/twig/twig/lib/Twig/Node/Set.php
@@ -16,7 +16,7 @@
*/
class Twig_Node_Set extends Twig_Node
{
- public function __construct($capture, Twig_NodeInterface $names, Twig_NodeInterface $values, $lineno, $tag = null)
+ public function __construct($capture, Twig_Node $names, Twig_Node $values, $lineno, $tag = null)
{
parent::__construct(array('names' => $names, 'values' => $values), array('capture' => $capture, 'safe' => false), $lineno, $tag);
diff --git a/vendor/twig/twig/lib/Twig/Node/SetTemp.php b/vendor/twig/twig/lib/Twig/Node/SetTemp.php
deleted file mode 100644
index 3bdd1cb..0000000
--- a/vendor/twig/twig/lib/Twig/Node/SetTemp.php
+++ /dev/null
@@ -1,35 +0,0 @@
- $name), $lineno);
- }
-
- public function compile(Twig_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")
- ;
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Node/Spaceless.php b/vendor/twig/twig/lib/Twig/Node/Spaceless.php
index 486e461..52a0760 100644
--- a/vendor/twig/twig/lib/Twig/Node/Spaceless.php
+++ b/vendor/twig/twig/lib/Twig/Node/Spaceless.php
@@ -18,7 +18,7 @@
*/
class Twig_Node_Spaceless extends Twig_Node
{
- public function __construct(Twig_NodeInterface $body, $lineno, $tag = 'spaceless')
+ public function __construct(Twig_Node $body, $lineno, $tag = 'spaceless')
{
parent::__construct(array('body' => $body), array(), $lineno, $tag);
}
diff --git a/vendor/twig/twig/lib/Twig/NodeInterface.php b/vendor/twig/twig/lib/Twig/NodeInterface.php
deleted file mode 100644
index 8077349..0000000
--- a/vendor/twig/twig/lib/Twig/NodeInterface.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 3.0)
- */
-interface Twig_NodeInterface extends Countable, IteratorAggregate
-{
- /**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler $compiler A Twig_Compiler instance
- */
- public function compile(Twig_Compiler $compiler);
-
- public function getLine();
-
- public function getNodeTag();
-}
diff --git a/vendor/twig/twig/lib/Twig/NodeTraverser.php b/vendor/twig/twig/lib/Twig/NodeTraverser.php
index 00f7b54..f149265 100644
--- a/vendor/twig/twig/lib/Twig/NodeTraverser.php
+++ b/vendor/twig/twig/lib/Twig/NodeTraverser.php
@@ -18,8 +18,8 @@
*/
class Twig_NodeTraverser
{
- protected $env;
- protected $visitors = array();
+ private $env;
+ private $visitors = array();
/**
* Constructor.
@@ -52,11 +52,11 @@ public function addVisitor(Twig_NodeVisitorInterface $visitor)
/**
* Traverses a node and calls the registered visitors.
*
- * @param Twig_NodeInterface $node A Twig_NodeInterface instance
+ * @param Twig_Node $node A Twig_Node instance
*
- * @return Twig_NodeInterface
+ * @return Twig_Node
*/
- public function traverse(Twig_NodeInterface $node)
+ public function traverse(Twig_Node $node)
{
ksort($this->visitors);
foreach ($this->visitors as $visitors) {
@@ -68,7 +68,7 @@ public function traverse(Twig_NodeInterface $node)
return $node;
}
- protected function traverseForVisitor(Twig_NodeVisitorInterface $visitor, Twig_NodeInterface $node = null)
+ private function traverseForVisitor(Twig_NodeVisitorInterface $visitor, Twig_Node $node = null)
{
if (null === $node) {
return;
diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php
index 5c94977..9c38121 100644
--- a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php
+++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php
@@ -16,12 +16,12 @@
*/
class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor
{
- protected $statusStack = array();
- protected $blocks = array();
- protected $safeAnalysis;
- protected $traverser;
- protected $defaultStrategy = false;
- protected $safeVars = array();
+ private $statusStack = array();
+ private $blocks = array();
+ private $safeAnalysis;
+ private $traverser;
+ private $defaultStrategy = false;
+ private $safeVars = array();
public function __construct()
{
@@ -72,7 +72,7 @@ protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
return $node;
}
- protected function escapePrintNode(Twig_Node_Print $node, Twig_Environment $env, $type)
+ private function escapePrintNode(Twig_Node_Print $node, Twig_Environment $env, $type)
{
if (false === $type) {
return $node;
@@ -92,7 +92,7 @@ protected function escapePrintNode(Twig_Node_Print $node, Twig_Environment $env,
);
}
- protected function preEscapeFilterNode(Twig_Node_Expression_Filter $filter, Twig_Environment $env)
+ private function preEscapeFilterNode(Twig_Node_Expression_Filter $filter, Twig_Environment $env)
{
$name = $filter->getNode('filter')->getAttribute('value');
@@ -111,7 +111,7 @@ protected function preEscapeFilterNode(Twig_Node_Expression_Filter $filter, Twig
return $filter;
}
- protected function isSafeFor($type, Twig_NodeInterface $expression, $env)
+ private function isSafeFor($type, Twig_Node $expression, $env)
{
$safe = $this->safeAnalysis->getSafe($expression);
@@ -129,7 +129,7 @@ protected function isSafeFor($type, Twig_NodeInterface $expression, $env)
return in_array($type, $safe) || in_array('all', $safe);
}
- protected function needEscaping(Twig_Environment $env)
+ private function needEscaping(Twig_Environment $env)
{
if (count($this->statusStack)) {
return $this->statusStack[count($this->statusStack) - 1];
@@ -138,7 +138,7 @@ protected function needEscaping(Twig_Environment $env)
return $this->defaultStrategy ? $this->defaultStrategy : false;
}
- protected function getEscaperFilter($type, Twig_NodeInterface $node)
+ private function getEscaperFilter($type, Twig_Node $node)
{
$line = $node->getLine();
$name = new Twig_Node_Expression_Constant('escape', $line);
diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php
index 872b7fe..8a7cfa1 100644
--- a/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php
+++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php
@@ -25,13 +25,12 @@ class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor
const OPTIMIZE_NONE = 0;
const OPTIMIZE_FOR = 2;
const OPTIMIZE_RAW_FILTER = 4;
+ // obsolete, does not do anything
const OPTIMIZE_VAR_ACCESS = 8;
- protected $loops = array();
- protected $loopsTargets = array();
- protected $optimizers;
- protected $prependedNodes = array();
- protected $inABody = false;
+ private $loops = array();
+ private $loopsTargets = array();
+ private $optimizers;
/**
* Constructor.
@@ -56,20 +55,6 @@ protected function doEnterNode(Twig_Node $node, Twig_Environment $env)
$this->enterOptimizeFor($node, $env);
}
- if (PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('sandbox')) {
- if ($this->inABody) {
- if (!$node instanceof Twig_Node_Expression) {
- if (get_class($node) !== 'Twig_Node') {
- array_unshift($this->prependedNodes, array());
- }
- } else {
- $node = $this->optimizeVariables($node, $env);
- }
- } elseif ($node instanceof Twig_Node_Body) {
- $this->inABody = true;
- }
- }
-
return $node;
}
@@ -78,8 +63,6 @@ protected function doEnterNode(Twig_Node $node, Twig_Environment $env)
*/
protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
{
- $expression = $node instanceof Twig_Node_Expression;
-
if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) {
$this->leaveOptimizeFor($node, $env);
}
@@ -90,33 +73,6 @@ protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
$node = $this->optimizePrintNode($node, $env);
- if (self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('sandbox')) {
- if ($node instanceof Twig_Node_Body) {
- $this->inABody = false;
- } elseif ($this->inABody) {
- if (!$expression && get_class($node) !== 'Twig_Node' && $prependedNodes = array_shift($this->prependedNodes)) {
- $nodes = array();
- foreach (array_unique($prependedNodes) as $name) {
- $nodes[] = new Twig_Node_SetTemp($name, $node->getLine());
- }
-
- $nodes[] = $node;
- $node = new Twig_Node($nodes);
- }
- }
- }
-
- return $node;
- }
-
- protected function optimizeVariables(Twig_NodeInterface $node, Twig_Environment $env)
- {
- if ('Twig_Node_Expression_Name' === get_class($node) && $node->isSimple()) {
- $this->prependedNodes[0][] = $node->getAttribute('name');
-
- return new Twig_Node_Expression_TempName($node->getAttribute('name'), $node->getLine());
- }
-
return $node;
}
@@ -127,12 +83,12 @@ protected function optimizeVariables(Twig_NodeInterface $node, Twig_Environment
*
* * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()"
*
- * @param Twig_NodeInterface $node A Node
- * @param Twig_Environment $env The current Twig environment
+ * @param Twig_Node $node A Node
+ * @param Twig_Environment $env The current Twig environment
*
* @return Twig_NodeInterface
*/
- protected function optimizePrintNode(Twig_NodeInterface $node, Twig_Environment $env)
+ private function optimizePrintNode(Twig_Node $node, Twig_Environment $env)
{
if (!$node instanceof Twig_Node_Print) {
return $node;
@@ -153,12 +109,12 @@ protected function optimizePrintNode(Twig_NodeInterface $node, Twig_Environment
/**
* Removes "raw" filters.
*
- * @param Twig_NodeInterface $node A Node
- * @param Twig_Environment $env The current Twig environment
+ * @param Twig_Node $node A Node
+ * @param Twig_Environment $env The current Twig environment
*
- * @return Twig_NodeInterface
+ * @return Twig_Node
*/
- protected function optimizeRawFilter(Twig_NodeInterface $node, Twig_Environment $env)
+ private function optimizeRawFilter(Twig_Node $node, Twig_Environment $env)
{
if ($node instanceof Twig_Node_Expression_Filter && 'raw' == $node->getNode('filter')->getAttribute('value')) {
return $node->getNode('node');
@@ -170,10 +126,10 @@ protected function optimizeRawFilter(Twig_NodeInterface $node, Twig_Environment
/**
* Optimizes "for" tag by removing the "loop" variable creation whenever possible.
*
- * @param Twig_NodeInterface $node A Node
- * @param Twig_Environment $env The current Twig environment
+ * @param Twig_Node $node A Node
+ * @param Twig_Environment $env The current Twig environment
*/
- protected function enterOptimizeFor(Twig_NodeInterface $node, Twig_Environment $env)
+ private function enterOptimizeFor(Twig_Node $node, Twig_Environment $env)
{
if ($node instanceof Twig_Node_For) {
// disable the loop variable by default
@@ -237,10 +193,10 @@ protected function enterOptimizeFor(Twig_NodeInterface $node, Twig_Environment $
/**
* Optimizes "for" tag by removing the "loop" variable creation whenever possible.
*
- * @param Twig_NodeInterface $node A Node
- * @param Twig_Environment $env The current Twig environment
+ * @param Twig_Node $node A Node
+ * @param Twig_Environment $env The current Twig environment
*/
- protected function leaveOptimizeFor(Twig_NodeInterface $node, Twig_Environment $env)
+ private function leaveOptimizeFor(Twig_Node $node, Twig_Environment $env)
{
if ($node instanceof Twig_Node_For) {
array_shift($this->loops);
@@ -249,12 +205,12 @@ protected function leaveOptimizeFor(Twig_NodeInterface $node, Twig_Environment $
}
}
- protected function addLoopToCurrent()
+ private function addLoopToCurrent()
{
$this->loops[0]->setAttribute('with_loop', true);
}
- protected function addLoopToAll()
+ private function addLoopToAll()
{
foreach ($this->loops as $loop) {
$loop->setAttribute('with_loop', true);
diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php b/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php
index 439f5bf..ce04d9a 100644
--- a/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php
+++ b/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php
@@ -11,15 +11,15 @@
class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor
{
- protected $data = array();
- protected $safeVars = array();
+ private $data = array();
+ private $safeVars = array();
public function setSafeVars($safeVars)
{
$this->safeVars = $safeVars;
}
- public function getSafe(Twig_NodeInterface $node)
+ public function getSafe(Twig_Node $node)
{
$hash = spl_object_hash($node);
if (!isset($this->data[$hash])) {
@@ -39,7 +39,7 @@ public function getSafe(Twig_NodeInterface $node)
}
}
- protected function setSafe(Twig_NodeInterface $node, array $safe)
+ private function setSafe(Twig_Node $node, array $safe)
{
$hash = spl_object_hash($node);
if (isset($this->data[$hash])) {
@@ -114,8 +114,7 @@ protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
}
} elseif ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name) {
$name = $node->getNode('node')->getAttribute('name');
- // attributes on template instances are safe
- if ('_self' == $name || in_array($name, $this->safeVars)) {
+ if (in_array($name, $this->safeVars)) {
$this->setSafe($node, array('all'));
} else {
$this->setSafe($node, array());
@@ -127,7 +126,7 @@ protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
return $node;
}
- protected function intersectSafe(array $a = null, array $b = null)
+ private function intersectSafe(array $a = null, array $b = null)
{
if (null === $a || null === $b) {
return array();
diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
index 7f1b913..5e1e468 100644
--- a/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
+++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
@@ -16,10 +16,10 @@
*/
class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor
{
- protected $inAModule = false;
- protected $tags;
- protected $filters;
- protected $functions;
+ private $inAModule = false;
+ private $tags;
+ private $filters;
+ private $functions;
/**
* {@inheritdoc}
diff --git a/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php b/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
index f276163..6e11072 100644
--- a/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
+++ b/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
@@ -19,22 +19,22 @@
/**
* Called before child nodes are visited.
*
- * @param Twig_NodeInterface $node The node to visit
- * @param Twig_Environment $env The Twig environment instance
+ * @param Twig_Node $node The node to visit
+ * @param Twig_Environment $env The Twig environment instance
*
- * @return Twig_NodeInterface The modified node
+ * @return Twig_Node The modified node
*/
- public function enterNode(Twig_NodeInterface $node, Twig_Environment $env);
+ public function enterNode(Twig_Node $node, Twig_Environment $env);
/**
* Called after child nodes are visited.
*
- * @param Twig_NodeInterface $node The node to visit
- * @param Twig_Environment $env The Twig environment instance
+ * @param Twig_Node $node The node to visit
+ * @param Twig_Environment $env The Twig environment instance
*
- * @return Twig_NodeInterface|false The modified node or false if the node must be removed
+ * @return Twig_Node|false The modified node or false if the node must be removed
*/
- public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env);
+ public function leaveNode(Twig_Node $node, Twig_Environment $env);
/**
* Returns the priority for this visitor.
diff --git a/vendor/twig/twig/lib/Twig/Parser.php b/vendor/twig/twig/lib/Twig/Parser.php
index ed28a0e..9e54a7e 100644
--- a/vendor/twig/twig/lib/Twig/Parser.php
+++ b/vendor/twig/twig/lib/Twig/Parser.php
@@ -15,22 +15,21 @@
*
* @author Fabien Potencier
*/
-class Twig_Parser implements Twig_ParserInterface
+class Twig_Parser
{
- protected $stack = array();
- 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 = array();
+ private $stack = array();
+ private $stream;
+ private $parent;
+ private $handlers;
+ private $visitors;
+ private $expressionParser;
+ private $blocks;
+ private $blockStack;
+ private $macros;
+ private $env;
+ private $importedSymbols;
+ private $traits;
+ private $embeddedTemplates = array();
/**
* Constructor.
@@ -63,14 +62,23 @@ public function getFilename()
public function parse(Twig_TokenStream $stream, $test = null, $dropNeedle = false)
{
// push all variables into the stack to keep the current state of the parser
- $vars = get_object_vars($this);
+ // using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336
+ $vars = array();
+ 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);
+ $this->handlers = array();
+ foreach ($this->env->getTokenParsers() as $handler) {
+ $handler->setParser($this);
+
+ $this->handlers[$handler->getTag()] = $handler;
+ }
}
// node visitors
@@ -149,7 +157,7 @@ public function subparse($test, $dropNeedle = false)
throw new Twig_Error_Syntax('A block must start with a tag name.', $token->getLine(), $this->getFilename());
}
- if (null !== $test && call_user_func($test, $token)) {
+ if (null !== $test && $test($token)) {
if ($dropNeedle) {
$this->stream->next();
}
@@ -161,8 +169,7 @@ public function subparse($test, $dropNeedle = false)
return new Twig_Node($rv, array(), $lineno);
}
- $subparser = $this->handlers->getTokenParser($token->getValue());
- if (null === $subparser) {
+ if (!isset($this->handlers[$token->getValue()])) {
if (null !== $test) {
$e = new Twig_Error_Syntax(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->getFilename());
@@ -179,6 +186,7 @@ public function subparse($test, $dropNeedle = false)
$this->stream->next();
+ $subparser = $this->handlers[$token->getValue()];
$node = $subparser->parse($token);
if (null !== $node) {
$rv[] = $node;
@@ -249,28 +257,17 @@ public function hasMacro($name)
public function setMacro($name, Twig_Node_Macro $node)
{
- if ($this->isReservedMacroName($name)) {
- throw new Twig_Error_Syntax(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword.', $name), $node->getLine(), $this->getFilename());
- }
-
$this->macros[$name] = $node;
}
+ /**
+ * @deprecated since 2.0. Will be removed in 3.0. There is no reserved macro names anymore
+ */
public function isReservedMacroName($name)
{
- if (null === $this->reservedMacroNames) {
- $this->reservedMacroNames = array();
- $r = new ReflectionClass($this->env->getBaseTemplateClass());
- foreach ($r->getMethods() as $method) {
- $methodName = strtolower($method->getName());
-
- if ('get' === substr($methodName, 0, 3) && isset($methodName[3])) {
- $this->reservedMacroNames[] = substr($methodName, 3);
- }
- }
- }
+ @trigger_error('The '.__METHOD__.' method is deprecated since version 2.0 and will be removed in 3.0.', E_USER_DEPRECATED);
- return in_array(strtolower($name), $this->reservedMacroNames);
+ return false;
}
public function addTrait($trait)
@@ -359,7 +356,7 @@ public function getCurrentToken()
return $this->stream->getCurrent();
}
- protected function filterBodyNodes(Twig_NodeInterface $node)
+ private function filterBodyNodes(Twig_Node $node)
{
// check that the body does not contain non-empty output nodes
if (
diff --git a/vendor/twig/twig/lib/Twig/ParserInterface.php b/vendor/twig/twig/lib/Twig/ParserInterface.php
deleted file mode 100644
index 8e7cc0a..0000000
--- a/vendor/twig/twig/lib/Twig/ParserInterface.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 3.0)
- */
-interface Twig_ParserInterface
-{
- /**
- * Converts a token stream to a node tree.
- *
- * @param Twig_TokenStream $stream A token stream instance
- *
- * @return Twig_Node_Module A node tree
- *
- * @throws Twig_Error_Syntax When the token stream is syntactically or semantically wrong
- */
- public function parse(Twig_TokenStream $stream);
-}
diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php
index c4dd03d..bd04813 100644
--- a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php
+++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php
@@ -16,11 +16,11 @@
*/
class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyInterface
{
- protected $allowedTags;
- protected $allowedFilters;
- protected $allowedMethods;
- protected $allowedProperties;
- protected $allowedFunctions;
+ private $allowedTags;
+ private $allowedFilters;
+ private $allowedMethods;
+ private $allowedProperties;
+ private $allowedFunctions;
public function __construct(array $allowedTags = array(), array $allowedFilters = array(), array $allowedMethods = array(), array $allowedProperties = array(), array $allowedFunctions = array())
{
@@ -82,7 +82,7 @@ public function checkSecurity($tags, $filters, $functions)
public function checkMethodAllowed($obj, $method)
{
- if ($obj instanceof Twig_TemplateInterface || $obj instanceof Twig_Markup) {
+ if ($obj instanceof Twig_Template || $obj instanceof Twig_Markup) {
return true;
}
diff --git a/vendor/twig/twig/lib/Twig/SimpleFilter.php b/vendor/twig/twig/lib/Twig/SimpleFilter.php
index cefc4f5..b5aaa39 100644
--- a/vendor/twig/twig/lib/Twig/SimpleFilter.php
+++ b/vendor/twig/twig/lib/Twig/SimpleFilter.php
@@ -3,110 +3,17 @@
/*
* This file is part of Twig.
*
- * (c) 2009-2012 Fabien Potencier
+ * (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 filter.
+ * Empty class for Twig 1.x compatibility.
*
- * @author Fabien Potencier
+ * @deprecated to be removed in 3.0
*/
-class Twig_SimpleFilter
+class Twig_SimpleFilter extends Twig_Filter
{
- protected $name;
- protected $callable;
- protected $options;
- protected $arguments = array();
-
- public function __construct($name, $callable, array $options = array())
- {
- $this->name = $name;
- $this->callable = $callable;
- $this->options = array_merge(array(
- '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_Filter',
- '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(Twig_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 $this->options['deprecated'];
- }
-
- public function getAlternative()
- {
- return $this->options['alternative'];
- }
}
diff --git a/vendor/twig/twig/lib/Twig/SimpleFunction.php b/vendor/twig/twig/lib/Twig/SimpleFunction.php
index 7973540..4a716b6 100644
--- a/vendor/twig/twig/lib/Twig/SimpleFunction.php
+++ b/vendor/twig/twig/lib/Twig/SimpleFunction.php
@@ -3,100 +3,17 @@
/*
* This file is part of Twig.
*
- * (c) 2010-2012 Fabien Potencier
+ * (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 function.
+ * Empty class for Twig 1.x compatibility.
*
- * @author Fabien Potencier
+ * @deprecated to be removed in 3.0
*/
-class Twig_SimpleFunction
+class Twig_SimpleFunction extends Twig_Function
{
- protected $name;
- protected $callable;
- protected $options;
- protected $arguments = array();
-
- public function __construct($name, $callable, array $options = array())
- {
- $this->name = $name;
- $this->callable = $callable;
- $this->options = array_merge(array(
- 'needs_environment' => false,
- 'needs_context' => false,
- 'is_variadic' => false,
- 'is_safe' => null,
- 'is_safe_callback' => null,
- 'node_class' => 'Twig_Node_Expression_Function',
- '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(Twig_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 array();
- }
-
- public function isVariadic()
- {
- return $this->options['is_variadic'];
- }
-
- public function isDeprecated()
- {
- return $this->options['deprecated'];
- }
-
- public function getAlternative()
- {
- return $this->options['alternative'];
- }
}
diff --git a/vendor/twig/twig/lib/Twig/SimpleTest.php b/vendor/twig/twig/lib/Twig/SimpleTest.php
index 8ba2192..0f49d72 100644
--- a/vendor/twig/twig/lib/Twig/SimpleTest.php
+++ b/vendor/twig/twig/lib/Twig/SimpleTest.php
@@ -3,62 +3,17 @@
/*
* This file is part of Twig.
*
- * (c) 2010-2012 Fabien Potencier
+ * (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.
+ * Empty class for Twig 1.x compatibility.
*
- * @author Fabien Potencier
+ * @deprecated to be removed in 3.0
*/
-class Twig_SimpleTest
+class Twig_SimpleTest extends Twig_Test
{
- protected $name;
- protected $callable;
- protected $options;
-
- public function __construct($name, $callable, array $options = array())
- {
- $this->name = $name;
- $this->callable = $callable;
- $this->options = array_merge(array(
- 'is_variadic' => false,
- 'node_class' => 'Twig_Node_Expression_Test',
- '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 $this->options['deprecated'];
- }
-
- public function getAlternative()
- {
- return $this->options['alternative'];
- }
}
diff --git a/vendor/twig/twig/lib/Twig/Template.php b/vendor/twig/twig/lib/Twig/Template.php
index a816022..3b9032d 100644
--- a/vendor/twig/twig/lib/Twig/Template.php
+++ b/vendor/twig/twig/lib/Twig/Template.php
@@ -15,8 +15,12 @@
*
* @author Fabien Potencier
*/
-abstract class Twig_Template implements Twig_TemplateInterface
+abstract class Twig_Template
{
+ const ANY_CALL = 'any';
+ const ARRAY_CALL = 'array';
+ const METHOD_CALL = 'method';
+
protected static $cache = array();
protected $parent;
@@ -43,16 +47,6 @@ public function __construct(Twig_Environment $env)
abstract public function 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
@@ -60,7 +54,7 @@ public function getEnvironment()
*
* @param array $context
*
- * @return Twig_TemplateInterface|false The parent template or false if there is no parent
+ * @return Twig_Template|false The parent template or false if there is no parent
*
* @internal
*/
@@ -118,8 +112,6 @@ public function isTraitable()
*/
public function displayParentBlock($name, array $context, array $blocks = array())
{
- $name = (string) $name;
-
if (isset($this->traits[$name])) {
$this->traits[$name][0]->displayBlock($name, $context, $blocks, false);
} elseif (false !== $parent = $this->getParent($context)) {
@@ -144,8 +136,6 @@ public function displayParentBlock($name, array $context, array $blocks = array(
*/
public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true)
{
- $name = (string) $name;
-
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
@@ -252,7 +242,7 @@ public function renderBlock($name, array $context, array $blocks = array(), $use
*/
public function hasBlock($name)
{
- return isset($this->blocks[(string) $name]);
+ return isset($this->blocks[$name]);
}
/**
@@ -406,19 +396,12 @@ protected function displayWithErrorHandling(array $context, array $blocks = arra
abstract protected function doDisplay(array $context, array $blocks = array());
/**
- * Returns a variable from the context.
+ * Throws an exception for an unknown variable.
*
* 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
+ * This is an implementation detail due to a PHP limitation before version 7.0.
*
* @return mixed The content of the context variable
*
@@ -426,17 +409,9 @@ protected function displayWithErrorHandling(array $context, array $blocks = arra
*
* @internal
*/
- final protected function getContext($context, $item, $ignoreStrictCheck = false)
+ final protected function notFound($name, $line)
{
- if (!array_key_exists($item, $context)) {
- if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
- return;
- }
-
- throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $item), -1, $this->getTemplateName());
- }
-
- return $context[$item];
+ throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $name), $line, $this->getTemplateName());
}
/**
@@ -547,12 +522,7 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ
$methods = array();
foreach ($ref->getMethods(ReflectionMethod::IS_PUBLIC) as $refMethod) {
- $methodName = strtolower($refMethod->name);
-
- // Accessing the environment from templates is forbidden to prevent untrusted changes to the environment
- if ('getenvironment' !== $methodName) {
- $methods[$methodName] = true;
- }
+ $methods[strtolower($refMethod->name)] = true;
}
self::$cache[$class]['methods'] = $methods;
@@ -569,6 +539,8 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ
$method = 'get'.$item;
} elseif (isset(self::$cache[$class]['methods']['is'.$lcItem])) {
$method = 'is'.$item;
+ } elseif (isset(self::$cache[$class]['methods']['has'.$lcItem])) {
+ $method = 'has'.$item;
} elseif (isset(self::$cache[$class]['methods']['__call'])) {
$method = (string) $item;
$call = true;
@@ -605,7 +577,7 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ
// useful when calling a template method from a template
// this is not supported but unfortunately heavily used in the Symfony profiler
- if ($object instanceof Twig_TemplateInterface) {
+ if ($object instanceof self) {
return $ret === '' ? '' : new Twig_Markup($ret, $this->env->getCharset());
}
diff --git a/vendor/twig/twig/lib/Twig/TemplateInterface.php b/vendor/twig/twig/lib/Twig/TemplateInterface.php
deleted file mode 100644
index 3274640..0000000
--- a/vendor/twig/twig/lib/Twig/TemplateInterface.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- *
- * @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 = array());
-
- /**
- * Returns the bound environment for this template.
- *
- * @return Twig_Environment The current environment
- */
- public function getEnvironment();
-}
diff --git a/vendor/twig/twig/lib/Twig/TemplateIterator.php b/vendor/twig/twig/lib/Twig/TemplateIterator.php
new file mode 100644
index 0000000..5672963
--- /dev/null
+++ b/vendor/twig/twig/lib/Twig/TemplateIterator.php
@@ -0,0 +1,45 @@
+
+ */
+class Twig_TemplateIterator implements IteratorAggregate
+{
+ private $loader;
+
+ public function __construct(Twig_LoaderInterface $loader)
+ {
+ $this->loader = $loader;
+
+ $templates = array();
+ if ($loader instanceof Twig_Loader_Filesystem) {
+ foreach ($loader->getNamespaces() as $namespace) {
+ $paths = $loader->getPaths($namespace);
+ foreach ($paths as $path) {
+ foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(realpath($path)), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
+ if (Twig_Loader_Filesystem::MAIN_NAMESPACE === $namespace) {
+ $templates[] = substr($file->getPathname(), strlen($path) + 1);
+ } else {
+ $templates[] = '@'.$namespace.'/'.$file->getPathname();
+ }
+ }
+ }
+ }
+ }
+
+ print_r($templates);
+ }
+
+ public function getIterator()
+ {
+ }
+}
diff --git a/vendor/twig/twig/lib/Twig/Test.php b/vendor/twig/twig/lib/Twig/Test.php
index 3c2d859..9e237b2 100644
--- a/vendor/twig/twig/lib/Twig/Test.php
+++ b/vendor/twig/twig/lib/Twig/Test.php
@@ -3,35 +3,81 @@
/*
* This file is part of Twig.
*
- * (c) 2012 Fabien Potencier
+ * (c) 2010-2012 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_SimpleTest instead.', E_USER_DEPRECATED);
-
/**
* Represents a template test.
*
* @author Fabien Potencier
*
- * @deprecated since 1.12 (to be removed in 2.0)
+ * @see http://twig.sensiolabs.org/doc/templates.html#test-operator
*/
-abstract class Twig_Test implements Twig_TestInterface, Twig_TestCallableInterface
+class Twig_Test
{
- protected $options;
- protected $arguments = array();
+ private $name;
+ private $callable;
+ private $options;
- public function __construct(array $options = array())
+ /**
+ * Creates a template test.
+ *
+ * @param string $name Name of this test
+ * @param callable|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation.
+ * @param array $options Options array
+ */
+ public function __construct($name, callable $callable = null, array $options = array())
{
+ $this->name = $name;
+ $this->callable = $callable;
$this->options = array_merge(array(
- 'callable' => null,
+ 'is_variadic' => false,
+ 'node_class' => 'Twig_Node_Expression_Test',
+ 'deprecated' => false,
+ 'alternative' => null,
), $options);
}
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Returns the callable to execute for this test.
+ *
+ * @return callable|null
+ */
public function getCallable()
{
- return $this->options['callable'];
+ 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'];
}
}
diff --git a/vendor/twig/twig/lib/Twig/Test/Function.php b/vendor/twig/twig/lib/Twig/Test/Function.php
deleted file mode 100644
index 5e76c71..0000000
--- a/vendor/twig/twig/lib/Twig/Test/Function.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- *
- * @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 = array())
- {
- $options['callable'] = $function;
-
- parent::__construct($options);
-
- $this->function = $function;
- }
-
- public function compile()
- {
- return $this->function;
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php b/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
index 45ca7dc..46bd16b 100644
--- a/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
+++ b/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
@@ -154,12 +154,9 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e
}
// avoid using the same PHP class name for different cases
- // only for PHP 5.2+
- if (PHP_VERSION_ID >= 50300) {
- $p = new ReflectionProperty($twig, 'templateClassPrefix');
- $p->setAccessible(true);
- $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_');
- }
+ $p = new ReflectionProperty($twig, 'templateClassPrefix');
+ $p->setAccessible(true);
+ $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_');
try {
$template = $twig->loadTemplate('index.twig');
diff --git a/vendor/twig/twig/lib/Twig/Test/Method.php b/vendor/twig/twig/lib/Twig/Test/Method.php
deleted file mode 100644
index 2779986..0000000
--- a/vendor/twig/twig/lib/Twig/Test/Method.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 2.0)
- */
-class Twig_Test_Method extends Twig_Test
-{
- protected $extension;
- protected $method;
-
- public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array())
- {
- $options['callable'] = array($extension, $method);
-
- parent::__construct($options);
-
- $this->extension = $extension;
- $this->method = $method;
- }
-
- public function compile()
- {
- return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension->getName(), $this->method);
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Test/Node.php b/vendor/twig/twig/lib/Twig/Test/Node.php
deleted file mode 100644
index baef49c..0000000
--- a/vendor/twig/twig/lib/Twig/Test/Node.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- *
- * @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 = array())
- {
- parent::__construct($options);
-
- $this->class = $class;
- }
-
- public function getClass()
- {
- return $this->class;
- }
-
- public function compile()
- {
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php b/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php
index e591c1d..2a13754 100644
--- a/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php
+++ b/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php
@@ -46,11 +46,7 @@ protected function getVariableGetter($name, $line = false)
{
$line = $line > 0 ? "// line {$line}\n" : '';
- 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);
+ return sprintf('%s(isset($context["%s"]) ? $context["%s"] : null)', $line, $name, $name);
}
protected function getAttributeGetter()
diff --git a/vendor/twig/twig/lib/Twig/TestCallableInterface.php b/vendor/twig/twig/lib/Twig/TestCallableInterface.php
deleted file mode 100644
index 98d3457..0000000
--- a/vendor/twig/twig/lib/Twig/TestCallableInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 2.0)
- */
-interface Twig_TestCallableInterface
-{
- public function getCallable();
-}
diff --git a/vendor/twig/twig/lib/Twig/TestInterface.php b/vendor/twig/twig/lib/Twig/TestInterface.php
deleted file mode 100644
index 2fa821c..0000000
--- a/vendor/twig/twig/lib/Twig/TestInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * @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();
-}
diff --git a/vendor/twig/twig/lib/Twig/Token.php b/vendor/twig/twig/lib/Twig/Token.php
index a0a029b..2a2c2f3 100644
--- a/vendor/twig/twig/lib/Twig/Token.php
+++ b/vendor/twig/twig/lib/Twig/Token.php
@@ -17,9 +17,9 @@
*/
class Twig_Token
{
- protected $value;
- protected $type;
- protected $lineno;
+ private $value;
+ private $type;
+ private $lineno;
const EOF_TYPE = -1;
const TEXT_TYPE = 0;
diff --git a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php
index c753e62..db9c074 100644
--- a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php
+++ b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php
@@ -11,21 +11,6 @@
/**
* 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 %}
- *
*/
class Twig_TokenParser_AutoEscape extends Twig_TokenParser
{
@@ -39,25 +24,9 @@ public function parse(Twig_Token $token)
} else {
$expr = $this->parser->getExpressionParser()->parseExpression();
if (!$expr instanceof Twig_Node_Expression_Constant) {
- throw new Twig_Error_Syntax('An escaping strategy must be a string or a bool.', $stream->getCurrent()->getLine(), $stream->getFilename());
+ throw new Twig_Error_Syntax('An escaping strategy must be a string or false.', $stream->getCurrent()->getLine(), $stream->getFilename());
}
$value = $expr->getAttribute('value');
-
- $compat = true === $value || false === $value;
-
- if (true === $value) {
- $value = 'html';
- }
-
- if ($compat && $stream->test(Twig_Token::NAME_TYPE)) {
- @trigger_error('Using the autoescape tag with "true" or "false" before the strategy name is deprecated.', E_USER_DEPRECATED);
-
- if (false === $value) {
- throw new Twig_Error_Syntax('Unexpected escaping strategy as you set autoescaping to false.', $stream->getCurrent()->getLine(), $stream->getFilename());
- }
-
- $value = $stream->next()->getValue();
- }
}
$stream->expect(Twig_Token::BLOCK_END_TYPE);
diff --git a/vendor/twig/twig/lib/Twig/TokenParser/For.php b/vendor/twig/twig/lib/Twig/TokenParser/For.php
index 3fac511..b451ea1 100644
--- a/vendor/twig/twig/lib/Twig/TokenParser/For.php
+++ b/vendor/twig/twig/lib/Twig/TokenParser/For.php
@@ -76,7 +76,7 @@ public function decideForEnd(Twig_Token $token)
}
// the loop variable cannot be used in the condition
- protected function checkLoopUsageCondition(Twig_TokenStream $stream, Twig_NodeInterface $node)
+ private function checkLoopUsageCondition(Twig_TokenStream $stream, Twig_Node $node)
{
if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) {
throw new Twig_Error_Syntax('The "loop" variable cannot be used in a looping condition.', $node->getLine(), $stream->getFilename());
@@ -93,7 +93,7 @@ protected function checkLoopUsageCondition(Twig_TokenStream $stream, Twig_NodeIn
// 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(Twig_TokenStream $stream, Twig_NodeInterface $node)
+ private function checkLoopUsageBody(Twig_TokenStream $stream, Twig_Node $node)
{
if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) {
$attribute = $node->getNode('attribute');
diff --git a/vendor/twig/twig/lib/Twig/TokenParser/From.php b/vendor/twig/twig/lib/Twig/TokenParser/From.php
index f7547eb..7dfa5b2 100644
--- a/vendor/twig/twig/lib/Twig/TokenParser/From.php
+++ b/vendor/twig/twig/lib/Twig/TokenParser/From.php
@@ -45,11 +45,7 @@ public function parse(Twig_Token $token)
$node = new Twig_Node_Import($macro, new Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), $token->getLine(), $this->getTag());
foreach ($targets as $name => $alias) {
- if ($this->parser->isReservedMacroName($name)) {
- throw new Twig_Error_Syntax(sprintf('"%s" cannot be an imported macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getFilename());
- }
-
- $this->parser->addImportedSymbol('function', $alias, 'get'.$name, $node->getNode('var'));
+ $this->parser->addImportedSymbol('function', $alias, 'macro_'.$name, $node->getNode('var'));
}
return $node;
diff --git a/vendor/twig/twig/lib/Twig/TokenParserBroker.php b/vendor/twig/twig/lib/Twig/TokenParserBroker.php
deleted file mode 100644
index d88bb43..0000000
--- a/vendor/twig/twig/lib/Twig/TokenParserBroker.php
+++ /dev/null
@@ -1,142 +0,0 @@
-
- *
- * @deprecated since 1.12 (to be removed in 2.0)
- */
-class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface
-{
- protected $parser;
- protected $parsers = array();
- protected $brokers = array();
-
- /**
- * Constructor.
- *
- * @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 = array(), $brokers = array(), $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 Twig_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;
- }
- }
-
- /**
- * Adds a TokenParser.
- *
- * @param Twig_TokenParserInterface $parser A Twig_TokenParserInterface instance
- */
- public function addTokenParser(Twig_TokenParserInterface $parser)
- {
- $this->parsers[$parser->getTag()] = $parser;
- }
-
- /**
- * Removes a TokenParser.
- *
- * @param Twig_TokenParserInterface $parser A Twig_TokenParserInterface instance
- */
- public function removeTokenParser(Twig_TokenParserInterface $parser)
- {
- $name = $parser->getTag();
- if (isset($this->parsers[$name]) && $parser === $this->parsers[$name]) {
- unset($this->parsers[$name]);
- }
- }
-
- /**
- * Adds a TokenParserBroker.
- *
- * @param Twig_TokenParserBroker $broker A Twig_TokenParserBroker instance
- */
- public function addTokenParserBroker(Twig_TokenParserBroker $broker)
- {
- $this->brokers[] = $broker;
- }
-
- /**
- * Removes a TokenParserBroker.
- *
- * @param Twig_TokenParserBroker $broker A Twig_TokenParserBroker instance
- */
- public function removeTokenParserBroker(Twig_TokenParserBroker $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 null|Twig_TokenParserInterface 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);
- }
- }
-}
diff --git a/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php b/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php
deleted file mode 100644
index 3ec2a88..0000000
--- a/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- *
- * @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 null|Twig_TokenParserInterface A Twig_TokenParserInterface or null if no suitable TokenParser was found
- */
- public function getTokenParser($tag);
-
- /**
- * Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of.
- *
- * @param Twig_ParserInterface $parser A Twig_ParserInterface interface
- */
- public function setParser(Twig_ParserInterface $parser);
-
- /**
- * Gets the Twig_ParserInterface.
- *
- * @return null|Twig_ParserInterface A Twig_ParserInterface instance or null
- */
- public function getParser();
-}
diff --git a/vendor/twig/twig/lib/Twig/TokenParserInterface.php b/vendor/twig/twig/lib/Twig/TokenParserInterface.php
index 12ec396..2a47e4a 100644
--- a/vendor/twig/twig/lib/Twig/TokenParserInterface.php
+++ b/vendor/twig/twig/lib/Twig/TokenParserInterface.php
@@ -28,7 +28,7 @@ public function setParser(Twig_Parser $parser);
*
* @param Twig_Token $token A Twig_Token instance
*
- * @return Twig_NodeInterface A Twig_NodeInterface instance
+ * @return Twig_Node A Twig_Node instance
*
* @throws Twig_Error_Syntax
*/
diff --git a/vendor/twig/twig/lib/Twig/TokenStream.php b/vendor/twig/twig/lib/Twig/TokenStream.php
index 016f812..9e14522 100644
--- a/vendor/twig/twig/lib/Twig/TokenStream.php
+++ b/vendor/twig/twig/lib/Twig/TokenStream.php
@@ -17,9 +17,9 @@
*/
class Twig_TokenStream
{
- protected $tokens;
- protected $current = 0;
- protected $filename;
+ private $tokens;
+ private $current = 0;
+ private $filename;
/**
* Constructor.
diff --git a/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php b/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php
index e406f0a..d21c2d2 100644
--- a/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php
+++ b/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php
@@ -15,7 +15,6 @@
class Twig_Util_DeprecationCollector
{
private $twig;
- private $deprecations;
public function __construct(Twig_Environment $twig)
{
@@ -50,9 +49,12 @@ public function collectDir($dir, $ext = '.twig')
*/
public function collect(Iterator $iterator)
{
- $this->deprecations = array();
-
- set_error_handler(array($this, 'errorHandler'));
+ $deprecations = array();
+ set_error_handler(function($type, $msg) use (&$deprecations) {
+ if (E_USER_DEPRECATED === $type) {
+ $deprecations[] = $msg;
+ }
+ });
foreach ($iterator as $name => $contents) {
try {
@@ -64,19 +66,6 @@ public function collect(Iterator $iterator)
restore_error_handler();
- $deprecations = $this->deprecations;
- $this->deprecations = array();
-
return $deprecations;
}
-
- /**
- * @internal
- */
- public function errorHandler($type, $msg)
- {
- if (E_USER_DEPRECATED === $type) {
- $this->deprecations[] = $msg;
- }
- }
}