mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
* updated Twig to the latest version in 1.x series (v1.35.0)
This commit is contained in:
@@ -3,16 +3,17 @@
|
||||
/*
|
||||
* This file is part of Twig.
|
||||
*
|
||||
* (c) 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @final
|
||||
*/
|
||||
class Twig_Extension_StringLoader extends Twig_Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return array(
|
||||
@@ -20,9 +21,6 @@ class Twig_Extension_StringLoader extends Twig_Extension
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'string_loader';
|
||||
@@ -37,11 +35,13 @@ class Twig_Extension_StringLoader extends Twig_Extension
|
||||
* </pre>
|
||||
*
|
||||
* @param Twig_Environment $env A Twig_Environment instance
|
||||
* @param string $template A template as a string
|
||||
* @param string $template A template as a string or object implementing __toString()
|
||||
*
|
||||
* @return Twig_Template A Twig_Template instance
|
||||
* @return Twig_Template
|
||||
*/
|
||||
function twig_template_from_string(Twig_Environment $env, $template)
|
||||
{
|
||||
return $env->createTemplate($template);
|
||||
return $env->createTemplate((string) $template);
|
||||
}
|
||||
|
||||
class_alias('Twig_Extension_StringLoader', 'Twig\Extension\StringLoaderExtension', false);
|
||||
|
Reference in New Issue
Block a user