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