19 lines
		
	
	
		
			449 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			449 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php declare(strict_types=1);
 | 
						|
 | 
						|
namespace App\Captcha\Images;
 | 
						|
 | 
						|
use App\Captcha\Contracts\Image;
 | 
						|
use App\Captcha\Contracts\ImageManager as ImageManagerContract;
 | 
						|
 | 
						|
final class ImageManager implements ImageManagerContract
 | 
						|
{
 | 
						|
    public function __construct(
 | 
						|
        private readonly string $imageClassName
 | 
						|
    ) { }
 | 
						|
    public function createImage(int $width, int $height): Image
 | 
						|
    {
 | 
						|
        return new $this->imageClassName($width, $height);
 | 
						|
    }
 | 
						|
 | 
						|
}
 |