Merge pull request #6469 from dhensby/pulls/4/image-backend-interface

FIX Make sure image backends implement method getImageResource
This commit is contained in:
Loz Calver 2017-01-27 16:59:46 +00:00 committed by GitHub
commit d3c24769ac
2 changed files with 16 additions and 0 deletions

View File

@ -49,6 +49,13 @@ interface Image_Backend
*/
public function loadFrom($path);
/**
* Get the currently assigned image resource
*
* @return mixed
*/
public function getImageResource();
/**
* Write to the given asset store
*

View File

@ -22,6 +22,15 @@ class ImagickBackend extends Imagick implements Image_Backend
*/
private static $default_quality = 75;
/**
* @return $this
*/
public function getImageResource()
{
// the object represents the resource
return $this;
}
/**
* Create a new backend with the given object
*