mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 04:08:14 +01:00
Rename ImageManager::make to ImageManager::read
This commit is contained in:
parent
635567e9c2
commit
764c6f3843
@ -20,7 +20,7 @@ Intervention Image is a **image handling and manipulation library written in PHP
|
||||
$manager = new ImageManager('gd')
|
||||
|
||||
// open an image file
|
||||
$image = $manager->make('images/example.gif');
|
||||
$image = $manager->read('images/example.gif');
|
||||
|
||||
// resize image instance
|
||||
$image->resize(height: 300);
|
||||
|
@ -32,7 +32,7 @@ class ImageManager
|
||||
* @param mixed $source
|
||||
* @return ImageInterface
|
||||
*/
|
||||
public function make($source): ImageInterface
|
||||
public function read($source): ImageInterface
|
||||
{
|
||||
return $this->resolveDriverClass('InputHandler')->handle($source);
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ class ImageManagerTest extends TestCase
|
||||
}
|
||||
|
||||
/** @requires extension gd */
|
||||
public function testMakeGd()
|
||||
public function testReadGd()
|
||||
{
|
||||
$manager = new ImageManager('gd');
|
||||
$image = $manager->make(__DIR__ . '/images/red.gif');
|
||||
$image = $manager->read(__DIR__ . '/images/red.gif');
|
||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
||||
}
|
||||
|
||||
@ -41,10 +41,10 @@ class ImageManagerTest extends TestCase
|
||||
}
|
||||
|
||||
/** @requires extension imagick */
|
||||
public function testMakeImagick()
|
||||
public function testReadImagick()
|
||||
{
|
||||
$manager = new ImageManager('imagick');
|
||||
$image = $manager->make(__DIR__ . '/images/red.gif');
|
||||
$image = $manager->read(__DIR__ . '/images/red.gif');
|
||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user