mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-10 09:26:29 +00:00
fixed some class names
This commit is contained in:
+2
-2
@@ -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
@@ -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
@@ -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
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user