@@ -94,10 +94,10 @@ implementation. Following the same example as before, the first change would be
94
94
to remove the ``priceFilter() `` method from the extension and update the PHP
95
95
callable defined in ``getFilters() ``::
96
96
97
- // src/AppBundle/ Twig/AppExtension.php
98
- namespace AppBundle \Twig;
97
+ // src/Twig/AppExtension.php
98
+ namespace App \Twig;
99
99
100
- use AppBundle \Twig\AppRuntime;
100
+ use App \Twig\AppRuntime;
101
101
102
102
class AppExtension extends \Twig_Extension
103
103
{
@@ -114,8 +114,8 @@ Then, create the new ``AppRuntime`` class (it's not required but these classes
114
114
are suffixed with ``Runtime `` by convention) and include the logic of the
115
115
previous ``priceFilter() `` method::
116
116
117
- // src/AppBundle/ Twig/AppRuntime.php
118
- namespace AppBundle \Twig;
117
+ // src/Twig/AppRuntime.php
118
+ namespace App \Twig;
119
119
120
120
class AppRuntime
121
121
{
@@ -147,7 +147,7 @@ Finally, register your new class as a service and tag it with ``twig.runtime``
147
147
# app/config/services.yml
148
148
services :
149
149
app.twig_runtime :
150
- class : AppBundle \Twig\AppRuntime
150
+ class : App \Twig\AppRuntime
151
151
public : false
152
152
tags :
153
153
- { name: twig.runtime }
@@ -163,7 +163,7 @@ Finally, register your new class as a service and tag it with ``twig.runtime``
163
163
164
164
<services >
165
165
<service id =" app.twig_runtime"
166
- class =" AppBundle \Twig\AppRuntime"
166
+ class =" App \Twig\AppRuntime"
167
167
public =" false" >
168
168
<tag name =" twig.runtime" />
169
169
</service >
@@ -173,7 +173,7 @@ Finally, register your new class as a service and tag it with ``twig.runtime``
173
173
.. code-block :: php
174
174
175
175
// app/config/services.php
176
- use AppBundle \Twig\AppExtension;
176
+ use App \Twig\AppExtension;
177
177
178
178
$container
179
179
->register('app.twig_runtime', AppRuntime::class)
0 commit comments