/** * Retrieves the supported MIME types from Thumber. * @return array The supported MIME types reported by the Thumber server. */ public function getMimeTypes() { if (!isset(self::$mime_types)) { $headers = array('Content-Type: application/json', 'Content-Length: 0'); $result = $this->sendToThumber('GET', self::getThumberUrl(self::ThumberServerMimeTypesPath), $headers); self::$mime_types = !array_key_exists('error', $result) ? json_decode($result['body'], true) : array(); } return self::$mime_types; }