private static function extractOutputContentType($uri) { if (preg_match('@\\.([a-z0-9]+)$@i', $uri, $regs)) { try { return ContentType::byExtention($regs[1]); } catch (ContentType\Exception $e) { } } return null; }
private static function factory($ext = 'jpg') { return new Factory(file_get_contents(__FILE__), ContentType::byExtention($ext)); }