fixed some class names

This commit is contained in:
Fabien Potencier
2019-02-15 07:54:58 +01:00
parent 66b708bde8
commit db751d62d3
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -558,7 +558,7 @@ An extension is a class that implements the following interface::
*
* This is where you can load some file that contains filter functions for instance.
*
* @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterface instead
* @deprecated since 1.23 (to be removed in 2.0), implement \Twig\Extension\InitRuntimeInterface instead
*/
function initRuntime(Twig_Environment $environment);
@@ -609,7 +609,7 @@ An extension is a class that implements the following interface::
*
* @return array An array of global variables
*
* @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_GlobalsInterface instead
* @deprecated since 1.23 (to be removed in 2.0), implement \Twig\Extension\GlobalsInterface instead
*/
function getGlobals();
+1 -1
View File
@@ -288,7 +288,7 @@ All loaders implement the ``Twig_LoaderInterface``::
*
* @return string The template source code
*
* @deprecated since 1.27 (to be removed in 2.0), implement Twig_SourceContextLoaderInterface
* @deprecated since 1.27 (to be removed in 2.0), implement \Twig\Loader\SourceContextLoaderInterface
*/
function getSource($name);
+4 -4
View File
@@ -92,10 +92,10 @@ Here is the output for the ``Hello {{ name }}`` template:
.. code-block:: text
Twig_Node_Module(
Twig_Node_Text(Hello )
Twig_Node_Print(
Twig_Node_Expression_Name(name)
\Twig\Node\ModuleNode(
\Twig\Node\TextNode(Hello )
\Twig\Node\PrintNode(
\Twig\Node\Expression\NameExpression(name)
)
)
+3 -3
View File
@@ -417,7 +417,7 @@ We have created a simple ``templates`` table that hosts two templates:
Now, let's define a loader able to use this database::
class DatabaseTwigLoader implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface
class DatabaseTwigLoader implements \Twig\Loader\LoaderInterface, \Twig\Loader\ExistsLoaderInterface, \Twig\Loader\SourceContextLoaderInterface
{
protected $dbh;
@@ -435,7 +435,7 @@ Now, let's define a loader able to use this database::
return $source;
}
// Twig_SourceContextLoaderInterface as of Twig 1.27
// \Twig\Loader\SourceContextLoaderInterface as of Twig 1.27
public function getSourceContext($name)
{
if (false === $source = $this->getValue('source', $name)) {
@@ -445,7 +445,7 @@ Now, let's define a loader able to use this database::
return new Twig_Source($source, $name);
}
// Twig_ExistsLoaderInterface as of Twig 1.11
// \Twig\Loader\ExistsLoaderInterface as of Twig 1.11
public function exists($name)
{
return $name === $this->getValue('name', $name);
+1 -1
View File
@@ -67,7 +67,7 @@ class Twig_Extension_Escaper extends Twig_Extension
}
if ('name' === $defaultStrategy) {
$defaultStrategy = ['Twig_FileExtensionEscapingStrategy', 'guess'];
$defaultStrategy = ['\Twig\FileExtensionEscapingStrategy', 'guess'];
}
$this->defaultStrategy = $defaultStrategy;