Cheetah
ImageManagerStatic.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Intervention\Image;
4 
5 use Closure;
6 
8 {
14  public static $manager;
15 
21  public function __construct(ImageManager $manager = null)
22  {
23  self::$manager = $manager ? $manager : new ImageManager;
24  }
25 
31  public static function getManager()
32  {
33  return self::$manager ? self::$manager : new ImageManager;
34  }
35 
43  public static function configure(array $config = array())
44  {
45  return self::$manager = self::getManager()->configure($config);
46  }
47 
55  public static function make($data)
56  {
57  return self::getManager()->make($data);
58  }
59 
69  public static function canvas($width, $height, $background = null)
70  {
71  return self::getManager()->canvas($width, $height, $background);
72  }
73 
83  public static function cache(Closure $callback, $lifetime = null, $returnObj = false)
84  {
85  return self::getManager()->cache($callback, $lifetime, $returnObj);
86  }
87 }
$config
$config
Definition: Filter.ExtractStyleBlocks.txt:33
Intervention\Image\ImageManagerStatic\__construct
__construct(ImageManager $manager=null)
Definition: ImageManagerStatic.php:21
Intervention\Image\ImageManagerStatic\configure
static configure(array $config=array())
Definition: ImageManagerStatic.php:43
Intervention\Image\ImageManagerStatic\cache
static cache(Closure $callback, $lifetime=null, $returnObj=false)
Definition: ImageManagerStatic.php:83
Intervention\Image\ImageManagerStatic
Definition: ImageManagerStatic.php:8
use
GNU LESSER GENERAL PUBLIC LICENSE February Free Software Inc Franklin Fifth MA USA Everyone is permitted to copy and distribute verbatim copies of this license but changing it is not allowed[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it By the GNU General Public Licenses are intended to guarantee your freedom to share and change free software to make sure the software is free for all its users This the Lesser General Public applies to some specially designated software packages typically libraries of the Free Software Foundation and other authors who decide to use it You can use it but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular based on the explanations below When we speak of free we are referring to freedom of use
Definition: license.txt:27
php
Intervention\Image\ImageManagerStatic\$manager
static $manager
Definition: ImageManagerStatic.php:14
Intervention\Image\ImageManager
Definition: ImageManager.php:8
Intervention\Image\ImageManagerStatic\getManager
static getManager()
Definition: ImageManagerStatic.php:31
Intervention\Image\ImageManagerStatic\canvas
static canvas($width, $height, $background=null)
Definition: ImageManagerStatic.php:69
Intervention\Image\ImageManagerStatic\make
static make($data)
Definition: ImageManagerStatic.php:55
Intervention\Image
Definition: AbstractColor.php:3