Browse Source

Merge branch 'master' of github.com:yiisoft/yii2

tags/2.0.0-beta
Klimov Paul 11 years ago
parent
commit
00b403fcc2
  1. 12
      extensions/yii/imagine/BaseImage.php

12
extensions/yii/imagine/BaseImage.php

@ -59,10 +59,10 @@ class BaseImage
*/ */
public static function getImagine() public static function getImagine()
{ {
if (static::$_imagine === null) { if (self::$_imagine === null) {
static::$_imagine = static::createImagine(); self::$_imagine = static::createImagine();
} }
return static::$_imagine; return self::$_imagine;
} }
/** /**
@ -70,7 +70,7 @@ class BaseImage
*/ */
public static function setImagine($imagine) public static function setImagine($imagine)
{ {
static::$_imagine = $imagine; self::$_imagine = $imagine;
} }
/** /**
@ -88,12 +88,12 @@ class BaseImage
} }
break; break;
case self::DRIVER_IMAGICK: case self::DRIVER_IMAGICK:
if (!class_exists('Imagick', false)) { if (class_exists('Imagick', false)) {
return new \Imagine\Imagick\Imagine(); return new \Imagine\Imagick\Imagine();
} }
break; break;
case self::DRIVER_GD2: case self::DRIVER_GD2:
if (!function_exists('gd_info')) { if (function_exists('gd_info')) {
return new \Imagine\Gd\Imagine(); return new \Imagine\Gd\Imagine();
} }
break; break;

Loading…
Cancel
Save