|
5 | 5 | xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> |
6 | 6 | <services> |
7 | 7 |
|
8 | | - <!-- Definition of a ShortcodeFacade instance. --> |
9 | | - <service id="webfactory.shortcode.facade" class="Thunder\Shortcode\ShortcodeFacade"> |
| 8 | + <!-- Definition of a Shortcode HandlerContainer instance. --> |
| 9 | + <service id="webfactory.shortcode.handler_container" class="Thunder\Shortcode\HandlerContainer\HandlerContainer"> |
10 | 10 | <!-- Event handler that removes <p>...</p> tag that directly wrap shortcodes. --> |
11 | | - <call method="addEventHandler"> |
| 11 | + <call method="add"> |
12 | 12 | <argument type="constant">\Thunder\Shortcode\Events::REPLACE_SHORTCODES</argument> |
13 | 13 | <argument type="service"> |
14 | 14 | <service class="Webfactory\ShortcodeBundle\Handler\RemoveWrappingParagraphElementsEventHandler"/> |
15 | 15 | </argument> |
16 | 16 | </call> |
17 | 17 | </service> |
18 | 18 |
|
| 19 | + <!-- Definition of a Shortcode RegularParser instance. --> |
| 20 | + <service id="webfactory.shortcode.regular_parser" class="Thunder\Shortcode\Parser\RegularParser"> |
| 21 | + </service> |
| 22 | + |
| 23 | + <!-- Definition of a Shortcode Processor instance. --> |
| 24 | + <service id="webfactory.shortcode.processor" class="Thunder\Shortcode\Processor\Processor"> |
| 25 | + <argument type="service" id="webfactory.shortcode.regular_parser" /> |
| 26 | + <argument type="service" id="webfactory.shortcode.handler_container" /> |
| 27 | + </service> |
| 28 | + |
19 | 29 | <!-- Base definition for the EmbedForShortcodeHandler with esi renderer. --> |
20 | 30 | <service abstract="true" id="webfactory.shortcode.embed_esi_for_shortcode_handler" class="Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler" lazy="true"> |
21 | 31 | <argument type="service" id="fragment.handler"/> |
|
34 | 44 | <argument type="service" id="logger" on-invalid="null" /> |
35 | 45 | </service> |
36 | 46 |
|
37 | | - <!-- Twig extension providing the |shortcodes filter. The content will be passed to the ShortcodeFacade. --> |
| 47 | + <!-- Twig extension providing the |shortcodes filter. The content will be passed to the Shortcode Processor. --> |
38 | 48 | <service id="Webfactory\ShortcodeBundle\Twig\ShortcodeExtension" class="Webfactory\ShortcodeBundle\Twig\ShortcodeExtension"> |
39 | | - <argument type="service" id="webfactory.shortcode.facade"/> |
| 49 | + <argument type="service" id="webfactory.shortcode.processor"/> |
40 | 50 | <tag name="twig.extension"/> |
41 | 51 | </service> |
42 | 52 |
|
|
0 commit comments