PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.1
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.1
3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 2.8.17 2.8.18 All 259 releases
wpfunnels / vendor / intervention / image / src / Intervention / Image / ImageManagerStatic.php

ImageManagerStatic.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.1, at vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php

89 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Intervention\Image;
4
5 use Closure;
6
7 class ImageManagerStatic
8 {
9 /**
10 * Instance of Intervention\Image\ImageManager
11 *
12 * @var ImageManager
13 */
14 public static $manager;
15
16 /**
17 * Creates a new instance
18 *
19 * @param ImageManager $manager
20 */
21 public function __construct(ImageManager $manager = null)
22 {
23 self::$manager = $manager ? $manager : new ImageManager;
24 }
25
26 /**
27 * Get or create new ImageManager instance
28 *
29 * @return ImageManager
30 */
31 public static function getManager()
32 {
33 return self::$manager ? self::$manager : new ImageManager;
34 }
35
36 /**
37 * Statically create new custom configured image manager
38 *
39 * @param array $config
40 *
41 * @return ImageManager
42 */
43 public static function configure(array $config = [])
44 {
45 return self::$manager = self::getManager()->configure($config);
46 }
47
48 /**
49 * Statically initiates an Image instance from different input types
50 *
51 * @param mixed $data
52 *
53 * @return \Intervention\Image\Image
54 * @throws \Intervention\Image\Exception\NotReadableException
55 */
56 public static function make($data)
57 {
58 return self::getManager()->make($data);
59 }
60
61 /**
62 * Statically creates an empty image canvas
63 *
64 * @param int $width
65 * @param int $height
66 * @param mixed $background
67 *
68 * @return \Intervention\Image\Image
69 */
70 public static function canvas($width, $height, $background = null)
71 {
72 return self::getManager()->canvas($width, $height, $background);
73 }
74
75 /**
76 * Create new cached image and run callback statically
77 *
78 * @param Closure $callback
79 * @param int $lifetime
80 * @param boolean $returnObj
81 *
82 * @return mixed
83 */
84 public static function cache(Closure $callback, $lifetime = null, $returnObj = false)
85 {
86 return self::getManager()->cache($callback, $lifetime, $returnObj);
87 }
88 }
89