-
Notifications
You must be signed in to change notification settings - Fork 166
/
imagine.xml
146 lines (100 loc) · 6.46 KB
/
imagine.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="utf-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<!-- Configuration defaults -->
<parameter key="imagine.web_root">%kernel.root_dir%/../web</parameter>
<parameter key="imagine.source_root">%kernel.root_dir%/../web</parameter>
<parameter key="imagine.cache_prefix">media/cache</parameter>
<parameter key="imagine.filters" type="collection" />
<!-- Utility classes -->
<parameter key="imagine.filter.manager.class">Avalanche\Bundle\ImagineBundle\Imagine\Filter\FilterManager</parameter>
<parameter key="imagine.cache.path.resolver.class">Avalanche\Bundle\ImagineBundle\Imagine\CachePathResolver</parameter>
<parameter key="imagine.cache.manager.class">Avalanche\Bundle\ImagineBundle\Imagine\CacheManager</parameter>
<!-- Controller class -->
<parameter key="imagine.controller.class">Avalanche\Bundle\ImagineBundle\Controller\ImagineController</parameter>
<!-- Route loader class -->
<parameter key="imagine.routing.loader.class">Avalanche\Bundle\ImagineBundle\Routing\ImagineLoader</parameter>
<!-- Templating classes -->
<parameter key="imagine.twig.extension.class">Avalanche\Bundle\ImagineBundle\Templating\ImagineExtension</parameter>
<parameter key="imagine.templating.helper.class">Avalanche\Bundle\ImagineBundle\Templating\Helper\ImagineHelper</parameter>
<!-- ImagineInterface implementations -->
<parameter key="imagine.gd.class">Imagine\Gd\Imagine</parameter>
<parameter key="imagine.imagick.class">Imagine\Imagick\Imagine</parameter>
<parameter key="imagine.gmagick.class">Imagine\Gmagick\Imagine</parameter>
<!-- Filter loaders' classes -->
<parameter key="imagine.filter.loader.thumbnail.class">Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\ThumbnailFilterLoader</parameter>
<parameter key="imagine.filter.loader.relative_resize.class">Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\RelativeResizeFilterLoader</parameter>
<parameter key="imagine.filter.loader.resize.class">Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\ResizeFilterLoader</parameter>
<parameter key="imagine.filter.loader.paste.class">Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\PasteFilterLoader</parameter>
<parameter key="imagine.filter.loader.chain.class">Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\ChainFilterLoader</parameter>
<parameter key="imagine.filter.loader.crop.class">Avalanche\Bundle\ImagineBundle\Imagine\Filter\Loader\CropFilterLoader</parameter>
</parameters>
<services>
<!-- Utility services -->
<service id="imagine.cache.path.resolver" class="%imagine.cache.path.resolver.class%">
<argument>%imagine.web_root%</argument>
<argument type="service" id="router" />
</service>
<service id="imagine.cache.manager" class="%imagine.cache.manager.class%">
<argument type="service" id="imagine.cache.path.resolver" />
<argument type="service" id="imagine" />
<argument type="service" id="imagine.filter.manager" />
<argument type="service" id="filesystem" />
<argument>%imagine.web_root%</argument>
<argument>%imagine.source_root%</argument>
</service>
<service id="imagine.filter.manager" class="%imagine.filter.manager.class%">
<argument>%imagine.filters%</argument>
</service>
<!-- Controller -->
<service id="imagine.controller" class="%imagine.controller.class%" scope="request">
<argument type="service" id="request" />
<argument type="service" id="imagine" />
<argument type="service" id="imagine.cache.manager" />
<argument type="service" id="imagine.filter.manager" />
</service>
<!-- Route Loader -->
<service id="imagine.routing.loader" class="%imagine.routing.loader.class%">
<tag name="routing.loader" />
<argument>%imagine.cache_prefix%</argument>
<argument>%imagine.filters%</argument>
</service>
<!-- ImagineInterface instances -->
<service id="imagine" alias="imagine.gd" />
<service id="imagine.gd" class="%imagine.gd.class%" />
<service id="imagine.imagick" class="%imagine.imagick.class%" />
<service id="imagine.gmagick" class="%imagine.gmagick.class%" />
<!-- Templating helpers and extensions -->
<service id="imagine.twig.extension" class="%imagine.twig.extension.class%" public="false">
<tag name="twig.extension" />
<argument type="service" id="imagine.cache.path.resolver" />
</service>
<service id="imagine.templating.helper" class="%imagine.templating.helper.class%">
<tag name="templating.helper" alias="imagine" />
<argument type="service" id="imagine.cache.path.resolver" />
</service>
<!-- Filter loaders -->
<service id="imagine.filter.loader.thumbnail" class="%imagine.filter.loader.thumbnail.class%">
<tag name="imagine.filter.loader" filter="thumbnail" />
</service>
<service id="imagine.filter.loader.relative_resize" class="%imagine.filter.loader.relative_resize.class%">
<tag name="imagine.filter.loader" filter="relative_resize" />
</service>
<service id="imagine.filter.loader.resize" class="%imagine.filter.loader.resize.class%">
<tag name="imagine.filter.loader" filter="resize" />
</service>
<service id="imagine.filter.loader.paste" class="%imagine.filter.loader.paste.class%">
<argument type="service" id="imagine" />
<tag name="imagine.filter.loader" filter="paste" />
</service>
<service id="imagine.filter.loader.chain" class="%imagine.filter.loader.chain.class%">
<argument type="service" id="imagine.filter.manager" />
<tag name="imagine.filter.loader" filter="chain" />
</service>
<service id="imagine.filter.loader.crop" class="%imagine.filter.loader.crop.class%">
<tag name="imagine.filter.loader" filter="crop" />
</service>
</services>
</container>