1 | <?php |
||
28 | class ServerFactory |
||
29 | { |
||
30 | /** |
||
31 | * Configuration parameters. |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $config; |
||
35 | |||
36 | /** |
||
37 | * Create ServerFactory instance. |
||
38 | * @param array $config Configuration parameters. |
||
39 | */ |
||
40 | public function __construct(array $config = []) |
||
44 | |||
45 | /** |
||
46 | * Get configured server. |
||
47 | * @return Server Configured Glide server. |
||
48 | */ |
||
49 | public function getServer() |
||
69 | |||
70 | /** |
||
71 | * Get source file system. |
||
72 | * @return FilesystemInterface Source file system. |
||
73 | */ |
||
74 | public function getSource() |
||
88 | |||
89 | /** |
||
90 | * Get source path prefix. |
||
91 | * @return string|null Source path prefix. |
||
92 | */ |
||
93 | public function getSourcePathPrefix() |
||
99 | |||
100 | /** |
||
101 | * Get cache file system. |
||
102 | * @return FilesystemInterface Cache file system. |
||
103 | */ |
||
104 | public function getCache() |
||
118 | |||
119 | /** |
||
120 | * Get cache path prefix. |
||
121 | * @return string|null Cache path prefix. |
||
122 | */ |
||
123 | public function getCachePathPrefix() |
||
129 | |||
130 | /** |
||
131 | * Get cache path callable. |
||
132 | * @return callable|null Cache path callable. |
||
133 | */ |
||
134 | public function getCachePathCallable() |
||
140 | |||
141 | /** |
||
142 | * Get the group cache in folders setting. |
||
143 | * @return bool Whether to group cache in folders. |
||
144 | */ |
||
145 | public function getGroupCacheInFolders() |
||
153 | |||
154 | /** |
||
155 | * Get the cache with file extensions setting. |
||
156 | * @return bool Whether to cache with file extensions. |
||
157 | */ |
||
158 | public function getCacheWithFileExtensions() |
||
166 | |||
167 | /** |
||
168 | * Get watermarks file system. |
||
169 | * @return FilesystemInterface|null Watermarks file system. |
||
170 | */ |
||
171 | public function getWatermarks() |
||
185 | |||
186 | /** |
||
187 | * Get watermarks path prefix. |
||
188 | * @return string|null Watermarks path prefix. |
||
189 | */ |
||
190 | public function getWatermarksPathPrefix() |
||
196 | |||
197 | /** |
||
198 | * Get image manipulation API. |
||
199 | * @return Api Image manipulation API. |
||
200 | */ |
||
201 | public function getApi() |
||
208 | |||
209 | /** |
||
210 | * Get Intervention image manager. |
||
211 | * @return ImageManager Intervention image manager. |
||
212 | */ |
||
213 | public function getImageManager() |
||
225 | |||
226 | /** |
||
227 | * Get image manipulators. |
||
228 | * @return array Image manipulators. |
||
229 | */ |
||
230 | public function getManipulators() |
||
250 | |||
251 | /** |
||
252 | * Get maximum image size. |
||
253 | * @return int|null Maximum image size. |
||
254 | */ |
||
255 | public function getMaxImageSize() |
||
261 | |||
262 | /** |
||
263 | * Get default image manipulations. |
||
264 | * @return array Default image manipulations. |
||
265 | */ |
||
266 | public function getDefaults() |
||
274 | |||
275 | /** |
||
276 | * Get preset image manipulations. |
||
277 | * @return array Preset image manipulations. |
||
278 | */ |
||
279 | public function getPresets() |
||
287 | |||
288 | /** |
||
289 | * Get base URL. |
||
290 | * @return string|null Base URL. |
||
291 | */ |
||
292 | public function getBaseUrl() |
||
298 | |||
299 | /** |
||
300 | * Get response factory. |
||
301 | * @return ResponseFactoryInterface|null Response factory. |
||
302 | */ |
||
303 | public function getResponseFactory() |
||
309 | |||
310 | /** |
||
311 | * Create configured server. |
||
312 | * @param array $config Configuration parameters. |
||
313 | * @return Server Configured server. |
||
314 | */ |
||
315 | public static function create(array $config = []) |
||
319 | } |
||
320 |