1 | <?php |
||
27 | class ServerFactory |
||
28 | { |
||
29 | /** |
||
30 | * Configuration parameters. |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $config; |
||
34 | |||
35 | /** |
||
36 | * Create ServerFactory instance. |
||
37 | * @param array $config Configuration parameters. |
||
38 | */ |
||
39 | 66 | public function __construct(array $config = []) |
|
43 | |||
44 | /** |
||
45 | * Get configured server. |
||
46 | * @return Server Configured Glide server. |
||
47 | */ |
||
48 | 6 | public function getServer() |
|
66 | |||
67 | /** |
||
68 | * Get source file system. |
||
69 | * @return FilesystemInterface Source file system. |
||
70 | */ |
||
71 | 12 | public function getSource() |
|
85 | |||
86 | /** |
||
87 | * Get source path prefix. |
||
88 | * @return string|null Source path prefix. |
||
89 | */ |
||
90 | 9 | public function getSourcePathPrefix() |
|
96 | |||
97 | /** |
||
98 | * Get cache file system. |
||
99 | * @return FilesystemInterface Cache file system. |
||
100 | */ |
||
101 | 12 | public function getCache() |
|
115 | |||
116 | /** |
||
117 | * Get cache path prefix. |
||
118 | * @return string|null Cache path prefix. |
||
119 | */ |
||
120 | 9 | public function getCachePathPrefix() |
|
126 | |||
127 | /** |
||
128 | * Get the group cache in folders setting. |
||
129 | * @return bool Whether to group cache in folders. |
||
130 | */ |
||
131 | 9 | public function getGroupCacheInFolders() |
|
139 | |||
140 | /** |
||
141 | * Get watermarks file system. |
||
142 | * @return FilesystemInterface|null Watermarks file system. |
||
143 | */ |
||
144 | 15 | public function getWatermarks() |
|
158 | |||
159 | /** |
||
160 | * Get watermarks path prefix. |
||
161 | * @return string|null Watermarks path prefix. |
||
162 | */ |
||
163 | 15 | public function getWatermarksPathPrefix() |
|
169 | |||
170 | /** |
||
171 | * Get image manipulation API. |
||
172 | * @return Api Image manipulation API. |
||
173 | */ |
||
174 | 9 | public function getApi() |
|
181 | |||
182 | /** |
||
183 | * Get Intervention image manager. |
||
184 | * @return ImageManager Intervention image manager. |
||
185 | */ |
||
186 | 15 | public function getImageManager() |
|
198 | |||
199 | /** |
||
200 | * Get image manipulators. |
||
201 | * @return array Image manipulators. |
||
202 | */ |
||
203 | 12 | public function getManipulators() |
|
222 | |||
223 | /** |
||
224 | * Get maximum image size. |
||
225 | * @return int|null Maximum image size. |
||
226 | */ |
||
227 | 15 | public function getMaxImageSize() |
|
233 | |||
234 | /** |
||
235 | * Get default image manipulations. |
||
236 | * @return array Default image manipulations. |
||
237 | */ |
||
238 | 9 | public function getDefaults() |
|
246 | |||
247 | /** |
||
248 | * Get preset image manipulations. |
||
249 | * @return array Preset image manipulations. |
||
250 | */ |
||
251 | 9 | public function getPresets() |
|
259 | |||
260 | /** |
||
261 | * Get base URL. |
||
262 | * @return string|null Base URL. |
||
263 | */ |
||
264 | 9 | public function getBaseUrl() |
|
270 | |||
271 | /** |
||
272 | * Get response factory. |
||
273 | * @return ResponseFactoryInterface|null Response factory. |
||
274 | */ |
||
275 | 12 | public function getResponseFactory() |
|
281 | |||
282 | /** |
||
283 | * Create configured server. |
||
284 | * @param array $config Configuration parameters. |
||
285 | * @return Server Configured server. |
||
286 | */ |
||
287 | 3 | public static function create(array $config = []) |
|
291 | } |
||
292 |