diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/config/services.yml')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/config/services.yml | 71 |
1 files changed, 68 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index ed66d2be..51d6ab47 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -30,7 +30,7 @@ services: | |||
30 | - "@doctrine" | 30 | - "@doctrine" |
31 | 31 | ||
32 | wallabag_core.subscriber.table_prefix: | 32 | wallabag_core.subscriber.table_prefix: |
33 | class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber | 33 | class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber |
34 | arguments: | 34 | arguments: |
35 | - "%database_table_prefix%" | 35 | - "%database_table_prefix%" |
36 | tags: | 36 | tags: |
@@ -41,11 +41,45 @@ services: | |||
41 | arguments: | 41 | arguments: |
42 | - | 42 | - |
43 | error_message: '%wallabag_core.fetching_error_message%' | 43 | error_message: '%wallabag_core.fetching_error_message%' |
44 | - "@wallabag_core.guzzle.http_client" | ||
45 | - "@wallabag_core.graby.config_builder" | ||
44 | calls: | 46 | calls: |
45 | - [ setLogger, [ "@logger" ] ] | 47 | - [ setLogger, [ "@logger" ] ] |
46 | tags: | 48 | tags: |
47 | - { name: monolog.logger, channel: graby } | 49 | - { name: monolog.logger, channel: graby } |
48 | 50 | ||
51 | wallabag_core.graby.config_builder: | ||
52 | class: Graby\SiteConfig\ConfigBuilder | ||
53 | arguments: | ||
54 | - {} | ||
55 | - "@logger" | ||
56 | |||
57 | wallabag_core.guzzle.http_client: | ||
58 | class: GuzzleHttp\ClientInterface | ||
59 | factory: ["@wallabag_core.guzzle.http_client_factory", buildHttpClient] | ||
60 | |||
61 | wallabag_core.guzzle_authenticator.config_builder: | ||
62 | class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder | ||
63 | arguments: | ||
64 | - "@wallabag_core.graby.config_builder" | ||
65 | - "%sites_credentials%" | ||
66 | |||
67 | # service alias override | ||
68 | bd_guzzle_site_authenticator.site_config_builder: | ||
69 | alias: wallabag_core.guzzle_authenticator.config_builder | ||
70 | |||
71 | wallabag_core.guzzle.http_client_factory: | ||
72 | class: Wallabag\CoreBundle\Helper\HttpClientFactory | ||
73 | arguments: | ||
74 | - "@bd_guzzle_site_authenticator.authenticator_subscriber" | ||
75 | - "@wallabag_core.guzzle.cookie_jar" | ||
76 | - '@=service(''craue_config'').get(''restricted_access'')' | ||
77 | - '@logger' | ||
78 | |||
79 | wallabag_core.guzzle.cookie_jar: | ||
80 | class: GuzzleHttp\Cookie\FileCookieJar | ||
81 | arguments: ["%kernel.cache_dir%/cookiejar.json"] | ||
82 | |||
49 | wallabag_core.content_proxy: | 83 | wallabag_core.content_proxy: |
50 | class: Wallabag\CoreBundle\Helper\ContentProxy | 84 | class: Wallabag\CoreBundle\Helper\ContentProxy |
51 | arguments: | 85 | arguments: |
@@ -53,6 +87,7 @@ services: | |||
53 | - "@wallabag_core.rule_based_tagger" | 87 | - "@wallabag_core.rule_based_tagger" |
54 | - "@wallabag_core.tag_repository" | 88 | - "@wallabag_core.tag_repository" |
55 | - "@logger" | 89 | - "@logger" |
90 | - '%wallabag_core.fetching_error_message%' | ||
56 | 91 | ||
57 | wallabag_core.rule_based_tagger: | 92 | wallabag_core.rule_based_tagger: |
58 | class: Wallabag\CoreBundle\Helper\RuleBasedTagger | 93 | class: Wallabag\CoreBundle\Helper\RuleBasedTagger |
@@ -83,17 +118,18 @@ services: | |||
83 | wallabag.operator.array.matches: | 118 | wallabag.operator.array.matches: |
84 | class: Wallabag\CoreBundle\Operator\PHP\Matches | 119 | class: Wallabag\CoreBundle\Operator\PHP\Matches |
85 | tags: | 120 | tags: |
86 | - { name: rulerz.operator, executor: rulerz.executor.array, operator: matches } | 121 | - { name: rulerz.operator, target: native, operator: matches } |
87 | 122 | ||
88 | wallabag.operator.doctrine.matches: | 123 | wallabag.operator.doctrine.matches: |
89 | class: Wallabag\CoreBundle\Operator\Doctrine\Matches | 124 | class: Wallabag\CoreBundle\Operator\Doctrine\Matches |
90 | tags: | 125 | tags: |
91 | - { name: rulerz.operator, executor: rulerz.executor.doctrine, operator: matches, inline: true } | 126 | - { name: rulerz.operator, target: doctrine, operator: matches, inline: true } |
92 | 127 | ||
93 | wallabag_core.helper.redirect: | 128 | wallabag_core.helper.redirect: |
94 | class: Wallabag\CoreBundle\Helper\Redirect | 129 | class: Wallabag\CoreBundle\Helper\Redirect |
95 | arguments: | 130 | arguments: |
96 | - "@router" | 131 | - "@router" |
132 | - "@security.token_storage" | ||
97 | 133 | ||
98 | wallabag_core.helper.prepare_pager_for_entries: | 134 | wallabag_core.helper.prepare_pager_for_entries: |
99 | class: Wallabag\CoreBundle\Helper\PreparePagerForEntries | 135 | class: Wallabag\CoreBundle\Helper\PreparePagerForEntries |
@@ -109,9 +145,38 @@ services: | |||
109 | host: '%redis_host%' | 145 | host: '%redis_host%' |
110 | port: '%redis_port%' | 146 | port: '%redis_port%' |
111 | path: '%redis_path%' | 147 | path: '%redis_path%' |
148 | password: '%redis_password%' | ||
112 | 149 | ||
113 | wallabag_core.exception_controller: | 150 | wallabag_core.exception_controller: |
114 | class: Wallabag\CoreBundle\Controller\ExceptionController | 151 | class: Wallabag\CoreBundle\Controller\ExceptionController |
115 | arguments: | 152 | arguments: |
116 | - '@twig' | 153 | - '@twig' |
117 | - '%kernel.debug%' | 154 | - '%kernel.debug%' |
155 | |||
156 | wallabag_core.subscriber.sqlite_cascade_delete: | ||
157 | class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber | ||
158 | arguments: | ||
159 | - "@doctrine" | ||
160 | tags: | ||
161 | - { name: doctrine.event_subscriber } | ||
162 | |||
163 | wallabag_core.subscriber.download_images: | ||
164 | class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber | ||
165 | arguments: | ||
166 | - "@doctrine.orm.default_entity_manager" | ||
167 | - "@wallabag_core.entry.download_images" | ||
168 | - '@=service(''craue_config'').get(''download_images_enabled'')' | ||
169 | - "@logger" | ||
170 | tags: | ||
171 | - { name: kernel.event_subscriber } | ||
172 | |||
173 | wallabag_core.entry.download_images: | ||
174 | class: Wallabag\CoreBundle\Helper\DownloadImages | ||
175 | arguments: | ||
176 | - "@wallabag_core.entry.download_images.client" | ||
177 | - "%kernel.root_dir%/../web/assets/images" | ||
178 | - '@=service(''craue_config'').get(''wallabag_url'')' | ||
179 | - "@logger" | ||
180 | |||
181 | wallabag_core.entry.download_images.client: | ||
182 | class: GuzzleHttp\Client | ||