]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Resources/config/services.yml
Add new Helper to process Ignore Origin rules and RulerZ operator
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / config / services.yml
CommitLineData
7ffb1e80 1services:
32da2a70
J
2 wallabag_core.helper.detect_active_theme:
3 class: Wallabag\CoreBundle\Helper\DetectActiveTheme
4 arguments:
619cc453 5 - "@security.token_storage"
624a7c6d 6 - "%wallabag_core.theme%"
32da2a70 7
6894d48e 8 # custom form type
32da2a70
J
9 wallabag_core.form.type.config:
10 class: Wallabag\CoreBundle\Form\Type\ConfigType
11 arguments:
624a7c6d
NL
12 - "%liip_theme.themes%"
13 - "%wallabag_core.languages%"
32da2a70 14 tags:
5c895a7f 15 - { name: form.type }
0c83fd59 16
1d76102a 17 wallabag_core.filter.type.entry:
b0b893ea 18 class: Wallabag\CoreBundle\Form\Type\EntryFilterType
1d76102a
JB
19 arguments:
20 - "@wallabag_core.entry_repository"
21 - "@security.token_storage"
22 tags:
23 - { name: form.type }
24
531c8d0a
TC
25 wallabag_core.param_converter.username_feed_token_converter:
26 class: Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter
0c83fd59 27 tags:
531c8d0a 28 - { name: request.param_converter, converter: username_feed_token_converter }
0c83fd59 29 arguments:
619cc453 30 - "@doctrine"
164bd801 31
ac8cf632 32 wallabag_core.subscriber.table_prefix:
535bfcbe 33 class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber
772d8c4b 34 arguments:
624a7c6d 35 - "%database_table_prefix%"
bd0f3d32
JB
36 tags:
37 - { name: doctrine.event_subscriber }
fad31615
JB
38
39 wallabag_core.graby:
40 class: Graby\Graby
558d9aab 41 arguments:
e71c376d 42 -
2297d60f 43 error_message: '%wallabag_core.fetching_error_message%'
1c5da417 44 error_message_title: '%wallabag_core.fetching_error_message_title%'
bf9ace06 45 - "@wallabag_core.http_client"
7aab0ecf 46 - "@wallabag_core.graby.config_builder"
c929c88f 47 calls:
619cc453 48 - [ setLogger, [ "@logger" ] ]
c929c88f
JB
49 tags:
50 - { name: monolog.logger, channel: graby }
558d9aab 51
7aab0ecf
BD
52 wallabag_core.graby.config_builder:
53 class: Graby\SiteConfig\ConfigBuilder
54 arguments:
55 - {}
56 - "@logger"
57
bf9ace06 58 wallabag_core.http_client:
59 alias: 'httplug.client.wallabag_core'
7aab0ecf
BD
60
61 wallabag_core.guzzle_authenticator.config_builder:
62 class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
63 arguments:
64 - "@wallabag_core.graby.config_builder"
b8427f22 65 - "@security.token_storage"
5a9bc007 66 - "@wallabag_core.site_credential_repository"
94b232bb
JB
67 - '@logger'
68 tags:
69 - { name: monolog.logger, channel: graby }
7aab0ecf
BD
70
71 # service alias override
72 bd_guzzle_site_authenticator.site_config_builder:
73 alias: wallabag_core.guzzle_authenticator.config_builder
74
bf9ace06 75 wallabag_core.http_client_factory:
7aab0ecf
BD
76 class: Wallabag\CoreBundle\Helper\HttpClientFactory
77 arguments:
7aab0ecf 78 - "@wallabag_core.guzzle.cookie_jar"
d64bf795 79 - '@=service(''craue_config'').get(''restricted_access'')'
7bf6b555 80 - '@logger'
5b914b04
BD
81 calls:
82 - ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]]
7aab0ecf
BD
83
84 wallabag_core.guzzle.cookie_jar:
9a80dcf1 85 class: Wallabag\CoreBundle\Helper\FileCookieJar
51d7f62b
JB
86 arguments:
87 - "@logger"
88 - "%kernel.cache_dir%/cookiejar.json"
7aab0ecf 89
558d9aab
JB
90 wallabag_core.content_proxy:
91 class: Wallabag\CoreBundle\Helper\ContentProxy
92 arguments:
619cc453
JB
93 - "@wallabag_core.graby"
94 - "@wallabag_core.rule_based_tagger"
f39c5a2a 95 - "@wallabag_core.rule_based_ignore_origin_processor"
0d349ea6 96 - "@validator"
619cc453 97 - "@logger"
29dca432 98 - '%wallabag_core.fetching_error_message%'
8a219854 99 - '@=service(''craue_config'').get(''store_article_headers'')'
c3510620 100
6bc6fb1f
TC
101 wallabag_core.tags_assigner:
102 class: Wallabag\CoreBundle\Helper\TagsAssigner
103 arguments:
104 - "@wallabag_core.tag_repository"
105
c3510620
KG
106 wallabag_core.rule_based_tagger:
107 class: Wallabag\CoreBundle\Helper\RuleBasedTagger
108 arguments:
619cc453
JB
109 - "@rulerz"
110 - "@wallabag_core.tag_repository"
111 - "@wallabag_core.entry_repository"
0a033767 112 - "@logger"
625acf33 113
f39c5a2a
KD
114 wallabag_core.rule_based_ignore_origin_processor:
115 class: Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor
116 arguments:
117 - "@rulerz"
118 - "@logger"
119 - "@wallabag_core.ignore_origin_instance_rule_repository"
120
5a4bbcc9 121 # repository as a service
625acf33
KG
122 wallabag_core.entry_repository:
123 class: Wallabag\CoreBundle\Repository\EntryRepository
5c895a7f 124 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
625acf33
KG
125 arguments:
126 - WallabagCoreBundle:Entry
c3510620
KG
127
128 wallabag_core.tag_repository:
129 class: Wallabag\CoreBundle\Repository\TagRepository
5c895a7f 130 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
c3510620
KG
131 arguments:
132 - WallabagCoreBundle:Tag
fcb1fba5 133
5a9bc007
JB
134 wallabag_core.site_credential_repository:
135 class: Wallabag\CoreBundle\Repository\SiteCredentialRepository
136 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
137 arguments:
138 - WallabagCoreBundle:SiteCredential
906424c1
JB
139 calls:
140 - [ setCrypto, [ "@wallabag_core.helper.crypto_proxy" ] ]
5a9bc007 141
c675bd11
KD
142 wallabag_core.ignore_origin_instance_rule_repository:
143 class: Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository
144 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
145 arguments:
146 - WallabagCoreBundle:IgnoreOriginInstanceRule
147
add597ba
JB
148 wallabag_core.helper.entries_export:
149 class: Wallabag\CoreBundle\Helper\EntriesExport
150 arguments:
dc7fa8df 151 - "@translator"
be9d693e 152 - '%domain_name%'
30d81a47 153 - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png
a6e27f74
KG
154
155 wallabag.operator.array.matches:
156 class: Wallabag\CoreBundle\Operator\PHP\Matches
157 tags:
177c5510 158 - { name: rulerz.operator, target: native, operator: matches }
a6e27f74
KG
159
160 wallabag.operator.doctrine.matches:
161 class: Wallabag\CoreBundle\Operator\Doctrine\Matches
162 tags:
177c5510 163 - { name: rulerz.operator, target: doctrine, operator: matches, inline: true }
af497a64 164
fdd725f5
NL
165 wallabag.operator.array.notmatches:
166 class: Wallabag\CoreBundle\Operator\PHP\NotMatches
167 tags:
168 - { name: rulerz.operator, target: native, operator: notmatches }
169
170 wallabag.operator.doctrine.notmatches:
171 class: Wallabag\CoreBundle\Operator\Doctrine\NotMatches
172 tags:
173 - { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
174
f39c5a2a
KD
175 wallabag.operator.array.pattern_matches:
176 class: Wallabag\CoreBundle\Operator\PHP\PatternMatches
177 tags:
178 - { name: rulerz.operator, target: native, operator: "~" }
179
af497a64
NL
180 wallabag_core.helper.redirect:
181 class: Wallabag\CoreBundle\Helper\Redirect
182 arguments:
183 - "@router"
a42f38d9 184 - "@security.token_storage"
891456ba
NL
185
186 wallabag_core.helper.prepare_pager_for_entries:
187 class: Wallabag\CoreBundle\Helper\PreparePagerForEntries
188 arguments:
189 - "@security.token_storage"
190 - "@router"
b3437d58
JB
191
192 wallabag_core.redis.client:
193 class: Predis\Client
194 arguments:
195 -
6d204f53 196 scheme: '%redis_scheme%'
b3437d58
JB
197 host: '%redis_host%'
198 port: '%redis_port%'
6d204f53 199 path: '%redis_path%'
c1683778 200 password: '%redis_password%'
40e21962
JB
201
202 wallabag_core.exception_controller:
203 class: Wallabag\CoreBundle\Controller\ExceptionController
115de64e 204 public: true
40e21962
JB
205 arguments:
206 - '@twig'
207 - '%kernel.debug%'
191564b7
JB
208
209 wallabag_core.subscriber.sqlite_cascade_delete:
535bfcbe 210 class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber
191564b7
JB
211 arguments:
212 - "@doctrine"
213 tags:
214 - { name: doctrine.event_subscriber }
7f559418
JB
215
216 wallabag_core.subscriber.download_images:
217 class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber
218 arguments:
e0597476 219 - "@doctrine.orm.default_entity_manager"
7f559418 220 - "@wallabag_core.entry.download_images"
e0597476 221 - '@=service(''craue_config'').get(''download_images_enabled'')'
7f559418
JB
222 - "@logger"
223 tags:
e0597476 224 - { name: kernel.event_subscriber }
7f559418
JB
225
226 wallabag_core.entry.download_images:
227 class: Wallabag\CoreBundle\Helper\DownloadImages
228 arguments:
229 - "@wallabag_core.entry.download_images.client"
9ca069a6 230 - "%kernel.project_dir%/web/assets/images"
80f4d85a 231 - '%domain_name%'
7f559418
JB
232 - "@logger"
233
234 wallabag_core.entry.download_images.client:
bf9ace06 235 alias: 'httplug.client.wallabag_core.entry.download_images'
906424c1
JB
236
237 wallabag_core.helper.crypto_proxy:
238 class: Wallabag\CoreBundle\Helper\CryptoProxy
239 arguments:
240 - "%wallabag_core.site_credentials.encryption_key_path%"
241 - "@logger"
115de64e
JB
242
243 wallabag_core.command.clean_duplicates:
244 class: Wallabag\CoreBundle\Command\CleanDuplicatesCommand
245 tags: ['console.command']
246
247 wallabag_core.command.export:
248 class: Wallabag\CoreBundle\Command\ExportCommand
249 tags: ['console.command']
250
251 wallabag_core.command.install:
252 class: Wallabag\CoreBundle\Command\InstallCommand
253 tags: ['console.command']
254
255 wallabag_core.command.list_user:
256 class: Wallabag\CoreBundle\Command\ListUserCommand
257 tags: ['console.command']
258
259 wallabag_core.command.reload_entry:
260 class: Wallabag\CoreBundle\Command\ReloadEntryCommand
261 tags: ['console.command']
262
263 wallabag_core.command.show_user:
264 class: Wallabag\CoreBundle\Command\ShowUserCommand
265 tags: ['console.command']
266
267 wallabag_core.command.tag_all:
268 class: Wallabag\CoreBundle\Command\TagAllCommand
269 tags: ['console.command']