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 | 69 | public function __construct(array $config = []) |
|
43 | |||
44 | /** |
||
45 | * Get configured server. |
||
46 | * @return Server Configured Glide server. |
||
47 | */ |
||
48 | 6 | public function getServer() |
|
67 | |||
68 | /** |
||
69 | * Get source file system. |
||
70 | * @return FilesystemInterface Source file system. |
||
71 | */ |
||
72 | 12 | public function getSource() |
|
86 | |||
87 | /** |
||
88 | * Get source path prefix. |
||
89 | * @return string|null Source path prefix. |
||
90 | */ |
||
91 | 9 | public function getSourcePathPrefix() |
|
97 | |||
98 | /** |
||
99 | * Get cache file system. |
||
100 | * @return FilesystemInterface Cache file system. |
||
101 | */ |
||
102 | 12 | public function getCache() |
|
116 | |||
117 | /** |
||
118 | * Get cache path prefix. |
||
119 | * @return string|null Cache path prefix. |
||
120 | */ |
||
121 | 9 | public function getCachePathPrefix() |
|
127 | |||
128 | /** |
||
129 | * Get the group cache in folders setting. |
||
130 | * @return bool Whether to group cache in folders. |
||
131 | */ |
||
132 | 9 | public function getGroupCacheInFolders() |
|
140 | |||
141 | /** |
||
142 | * Get the cache with file extensions setting. |
||
143 | * @return bool Whether to cache with file extensions. |
||
144 | */ |
||
145 | 9 | public function getCacheWithFileExtensions() |
|
153 | |||
154 | /** |
||
155 | * Get watermarks file system. |
||
156 | * @return FilesystemInterface|null Watermarks file system. |
||
157 | */ |
||
158 | 15 | public function getWatermarks() |
|
172 | |||
173 | /** |
||
174 | * Get watermarks path prefix. |
||
175 | * @return string|null Watermarks path prefix. |
||
176 | */ |
||
177 | 15 | public function getWatermarksPathPrefix() |
|
183 | |||
184 | /** |
||
185 | * Get image manipulation API. |
||
186 | * @return Api Image manipulation API. |
||
187 | */ |
||
188 | 9 | public function getApi() |
|
195 | |||
196 | /** |
||
197 | * Get Intervention image manager. |
||
198 | * @return ImageManager Intervention image manager. |
||
199 | */ |
||
200 | 15 | public function getImageManager() |
|
212 | |||
213 | /** |
||
214 | * Get image manipulators. |
||
215 | * @return array Image manipulators. |
||
216 | */ |
||
217 | 12 | public function getManipulators() |
|
236 | |||
237 | /** |
||
238 | * Get maximum image size. |
||
239 | * @return int|null Maximum image size. |
||
240 | */ |
||
241 | 15 | public function getMaxImageSize() |
|
247 | |||
248 | /** |
||
249 | * Get default image manipulations. |
||
250 | * @return array Default image manipulations. |
||
251 | */ |
||
252 | 9 | public function getDefaults() |
|
260 | |||
261 | /** |
||
262 | * Get preset image manipulations. |
||
263 | * @return array Preset image manipulations. |
||
264 | */ |
||
265 | 9 | public function getPresets() |
|
273 | |||
274 | /** |
||
275 | * Get base URL. |
||
276 | * @return string|null Base URL. |
||
277 | */ |
||
278 | 9 | public function getBaseUrl() |
|
284 | |||
285 | /** |
||
286 | * Get response factory. |
||
287 | * @return ResponseFactoryInterface|null Response factory. |
||
288 | */ |
||
289 | 12 | public function getResponseFactory() |
|
295 | |||
296 | /** |
||
297 | * Create configured server. |
||
298 | * @param array $config Configuration parameters. |
||
299 | * @return Server Configured server. |
||
300 | */ |
||
301 | 3 | public static function create(array $config = []) |
|
305 | } |
||
306 |