ManaPHP\Image::__construct PHP Метод

__construct() публичный Метод

ImageInterface constructor.
public __construct ( string $file )
$file string
    public function __construct($file)
    {
        if (extension_loaded('imagick')) {
            $this->adapter = new Imagick($file);
        } elseif (extension_loaded('gd')) {
            $this->adapter = new Gd($file);
        } else {
            throw new ImageException('No valid Image Adapter exists.');
        }
    }