]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Resources/config/services.yml
Jump to Symfony 3.4
[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_rsstoken_converter:
26 class: Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter
27 tags:
28 - { name: request.param_converter, converter: username_rsstoken_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.guzzle.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.guzzle.http_client:
59 class: GuzzleHttp\ClientInterface
60 factory: ["@wallabag_core.guzzle.http_client_factory", buildHttpClient]
61
62 wallabag_core.guzzle_authenticator.config_builder:
63 class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
64 arguments:
65 - "@wallabag_core.graby.config_builder"
66 - "@security.token_storage"
67 - "@wallabag_core.site_credential_repository"
68 - '@logger'
69 tags:
70 - { name: monolog.logger, channel: graby }
71
72 # service alias override
73 bd_guzzle_site_authenticator.site_config_builder:
74 alias: wallabag_core.guzzle_authenticator.config_builder
75
76 wallabag_core.guzzle.http_client_factory:
77 class: Wallabag\CoreBundle\Helper\HttpClientFactory
78 arguments:
79 - "@wallabag_core.guzzle.cookie_jar"
80 - '@=service(''craue_config'').get(''restricted_access'')'
81 - '@logger'
82 calls:
83 - ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]]
84
85 wallabag_core.guzzle.cookie_jar:
86 class: GuzzleHttp\Cookie\FileCookieJar
87 arguments: ["%kernel.cache_dir%/cookiejar.json"]
88
89 wallabag_core.content_proxy:
90 class: Wallabag\CoreBundle\Helper\ContentProxy
91 arguments:
92 - "@wallabag_core.graby"
93 - "@wallabag_core.rule_based_tagger"
94 - "@validator"
95 - "@logger"
96 - '%wallabag_core.fetching_error_message%'
97 - '@=service(''craue_config'').get(''store_article_headers'')'
98
99 wallabag_core.tags_assigner:
100 class: Wallabag\CoreBundle\Helper\TagsAssigner
101 arguments:
102 - "@wallabag_core.tag_repository"
103
104 wallabag_core.rule_based_tagger:
105 class: Wallabag\CoreBundle\Helper\RuleBasedTagger
106 arguments:
107 - "@rulerz"
108 - "@wallabag_core.tag_repository"
109 - "@wallabag_core.entry_repository"
110 - "@logger"
111
112 # repository as a service
113 wallabag_core.entry_repository:
114 class: Wallabag\CoreBundle\Repository\EntryRepository
115 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
116 arguments:
117 - WallabagCoreBundle:Entry
118
119 wallabag_core.tag_repository:
120 class: Wallabag\CoreBundle\Repository\TagRepository
121 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
122 arguments:
123 - WallabagCoreBundle:Tag
124
125 wallabag_core.site_credential_repository:
126 class: Wallabag\CoreBundle\Repository\SiteCredentialRepository
127 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
128 arguments:
129 - WallabagCoreBundle:SiteCredential
130 calls:
131 - [ setCrypto, [ "@wallabag_core.helper.crypto_proxy" ] ]
132
133 wallabag_core.helper.entries_export:
134 class: Wallabag\CoreBundle\Helper\EntriesExport
135 arguments:
136 - "@translator"
137 - '%domain_name%'
138 - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png
139
140 wallabag.operator.array.matches:
141 class: Wallabag\CoreBundle\Operator\PHP\Matches
142 tags:
143 - { name: rulerz.operator, target: native, operator: matches }
144
145 wallabag.operator.doctrine.matches:
146 class: Wallabag\CoreBundle\Operator\Doctrine\Matches
147 tags:
148 - { name: rulerz.operator, target: doctrine, operator: matches, inline: true }
149
150 wallabag.operator.array.notmatches:
151 class: Wallabag\CoreBundle\Operator\PHP\NotMatches
152 tags:
153 - { name: rulerz.operator, target: native, operator: notmatches }
154
155 wallabag.operator.doctrine.notmatches:
156 class: Wallabag\CoreBundle\Operator\Doctrine\NotMatches
157 tags:
158 - { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
159
160 wallabag_core.helper.redirect:
161 class: Wallabag\CoreBundle\Helper\Redirect
162 arguments:
163 - "@router"
164 - "@security.token_storage"
165
166 wallabag_core.helper.prepare_pager_for_entries:
167 class: Wallabag\CoreBundle\Helper\PreparePagerForEntries
168 arguments:
169 - "@security.token_storage"
170 - "@router"
171
172 wallabag_core.redis.client:
173 class: Predis\Client
174 arguments:
175 -
176 scheme: '%redis_scheme%'
177 host: '%redis_host%'
178 port: '%redis_port%'
179 path: '%redis_path%'
180 password: '%redis_password%'
181
182 wallabag_core.exception_controller:
183 class: Wallabag\CoreBundle\Controller\ExceptionController
184 public: true
185 arguments:
186 - '@twig'
187 - '%kernel.debug%'
188
189 wallabag_core.subscriber.sqlite_cascade_delete:
190 class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber
191 arguments:
192 - "@doctrine"
193 tags:
194 - { name: doctrine.event_subscriber }
195
196 wallabag_core.subscriber.download_images:
197 class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber
198 arguments:
199 - "@doctrine.orm.default_entity_manager"
200 - "@wallabag_core.entry.download_images"
201 - '@=service(''craue_config'').get(''download_images_enabled'')'
202 - "@logger"
203 tags:
204 - { name: kernel.event_subscriber }
205
206 wallabag_core.entry.download_images:
207 class: Wallabag\CoreBundle\Helper\DownloadImages
208 arguments:
209 - "@wallabag_core.entry.download_images.client"
210 - "%kernel.project_dir%/web/assets/images"
211 - '%domain_name%'
212 - "@logger"
213
214 wallabag_core.entry.download_images.client:
215 class: GuzzleHttp\Client
216
217 wallabag_core.helper.crypto_proxy:
218 class: Wallabag\CoreBundle\Helper\CryptoProxy
219 arguments:
220 - "%wallabag_core.site_credentials.encryption_key_path%"
221 - "@logger"
222
223 wallabag_core.command.clean_duplicates:
224 class: Wallabag\CoreBundle\Command\CleanDuplicatesCommand
225 tags: ['console.command']
226
227 wallabag_core.command.export:
228 class: Wallabag\CoreBundle\Command\ExportCommand
229 tags: ['console.command']
230
231 wallabag_core.command.install:
232 class: Wallabag\CoreBundle\Command\InstallCommand
233 tags: ['console.command']
234
235 wallabag_core.command.list_user:
236 class: Wallabag\CoreBundle\Command\ListUserCommand
237 tags: ['console.command']
238
239 wallabag_core.command.reload_entry:
240 class: Wallabag\CoreBundle\Command\ReloadEntryCommand
241 tags: ['console.command']
242
243 wallabag_core.command.show_user:
244 class: Wallabag\CoreBundle\Command\ShowUserCommand
245 tags: ['console.command']
246
247 wallabag_core.command.tag_all:
248 class: Wallabag\CoreBundle\Command\TagAllCommand
249 tags: ['console.command']