'badVerb', self::BADARGUMENT => 'badArgument', self::NORECORDSMATCH => 'noRecordsMatch', self::CANNOTDISSEMINATEFORMAT => 'cannotDisseminateFormat', self::BADRESUMPTIONTOKEN => 'badResumptionToken', self::IDDOESNOTEXIST => 'idDoesNotExist', ); /** * Map internal error codes to OAI error codes. * * @param int $code Internal error code. * @return string OAI error code. */ public static function mapCode($code) { if (false === array_key_exists($code, self::$oaiErrorCodes)) { throw new OaiModelException("Unknown oai error code $code"); } return self::$oaiErrorCodes[$code]; } }