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() |
||
68 | |||
69 | /** |
||
70 | * Get source file system. |
||
71 | * @return FilesystemInterface Source file system. |
||
72 | */ |
||
73 | public function getSource() |
||
87 | |||
88 | /** |
||
89 | * Get source path prefix. |
||
90 | * @return string|null Source path prefix. |
||
91 | */ |
||
92 | public function getSourcePathPrefix() |
||
98 | |||
99 | /** |
||
100 | * Get cache file system. |
||
101 | * @return FilesystemInterface Cache file system. |
||
102 | */ |
||
103 | public function getCache() |
||
117 | |||
118 | /** |
||
119 | * Get cache path prefix. |
||
120 | * @return string|null Cache path prefix. |
||
121 | */ |
||
122 | public function getCachePathPrefix() |
||
128 | |||
129 | /** |
||
130 | * Get the group cache in folders setting. |
||
131 | * @return bool Whether to group cache in folders. |
||
132 | */ |
||
133 | public function getGroupCacheInFolders() |
||
141 | |||
142 | /** |
||
143 | * Get the cache with file extensions setting. |
||
144 | * @return bool Whether to cache with file extensions. |
||
145 | */ |
||
146 | public function getCacheWithFileExtensions() |
||
154 | |||
155 | /** |
||
156 | * Get watermarks file system. |
||
157 | * @return FilesystemInterface|null Watermarks file system. |
||
158 | */ |
||
159 | public function getWatermarks() |
||
173 | |||
174 | /** |
||
175 | * Get watermarks path prefix. |
||
176 | * @return string|null Watermarks path prefix. |
||
177 | */ |
||
178 | public function getWatermarksPathPrefix() |
||
184 | |||
185 | /** |
||
186 | * Get image manipulation API. |
||
187 | * @return Api Image manipulation API. |
||
188 | */ |
||
189 | public function getApi() |
||
196 | |||
197 | /** |
||
198 | * Get Intervention image manager. |
||
199 | * @return ImageManager Intervention image manager. |
||
200 | */ |
||
201 | public function getImageManager() |
||
213 | |||
214 | /** |
||
215 | * Get image manipulators. |
||
216 | * @return array Image manipulators. |
||
217 | */ |
||
218 | public function getManipulators() |
||
238 | |||
239 | /** |
||
240 | * Get maximum image size. |
||
241 | * @return int|null Maximum image size. |
||
242 | */ |
||
243 | public function getMaxImageSize() |
||
249 | |||
250 | /** |
||
251 | * Get default image manipulations. |
||
252 | * @return array Default image manipulations. |
||
253 | */ |
||
254 | public function getDefaults() |
||
262 | |||
263 | /** |
||
264 | * Get preset image manipulations. |
||
265 | * @return array Preset image manipulations. |
||
266 | */ |
||
267 | public function getPresets() |
||
275 | |||
276 | /** |
||
277 | * Get base URL. |
||
278 | * @return string|null Base URL. |
||
279 | */ |
||
280 | public function getBaseUrl() |
||
286 | |||
287 | /** |
||
288 | * Get response factory. |
||
289 | * @return ResponseFactoryInterface|null Response factory. |
||
290 | */ |
||
291 | public function getResponseFactory() |
||
297 | |||
298 | /** |
||
299 | * Create configured server. |
||
300 | * @param array $config Configuration parameters. |
||
301 | * @return Server Configured server. |
||
302 | */ |
||
303 | public static function create(array $config = []) |
||
307 | } |
||
308 |