- interface_exists: documentation ( source)
- sprintf: documentation ( source)
- file_exists: documentation ( source)
<?php
if (!interface_exists('Imagine\Image\ImageInterface')) {
if (file_exists(VENDORS . 'imagine.phar')) {
include_once 'phar://' . VENDORS . 'imagine.phar';
} else {
throw new CakeException(
sprintf(
'Download imagine.phar: %s, and extract into vendor: %s',
self::IMAGINE_URL,
VENDORS
)
);
}
}
return new \Imagine\Gd\Imagine();