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