for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Graze\CiffRenderer\GraphicResolver;
use Graze\CiffRenderer\GraphicResolver\GraphicResolverInterface;
use Graze\CiffRenderer\Exception\RuntimeException;
use Urbanplum\PhpBmp\PhpBmp;
/**
* Resolves an image resource from it's file path
*/
class FilepathGraphicResolver implements GraphicResolverInterface
{
* @param string $filePath
*
* @return Resource
public function __invoke($filePath)
try {
$phpBmp = new PhpBmp();
return $phpBmp->create($filePath);
} catch (\Exception $e) {
throw new RuntimeException($e);
}