diff --git a/oai2exception.php b/oai2exception.php index f2d6635..84a095c 100644 --- a/oai2exception.php +++ b/oai2exception.php @@ -1,24 +1,42 @@ + * Copyright (C) 2017 Sebastian Meyer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ class OAI2Exception extends Exception { - function __construct($code) { - + public function __construct($code) { $this->errorTable = array( 'badArgument' => array( - 'text' => "The request includes illegal arguments, is missing required arguments, includes a repeated argument, or values for arguments have an illegal syntax.", + 'text' => 'The request includes illegal arguments, is missing required arguments, includes a repeated argument, or values for arguments have an illegal syntax.', ), 'badResumptionToken' => array( - 'text' => "The value of the resumptionToken argument is invalid or expired", + 'text' => 'The value of the resumptionToken argument is invalid or expired.', ), 'badVerb' => array( - 'text' => "Value of the verb argument is not a legal OAI-PMH verb, the verb argument is missing, or the verb argument is repeated.", + 'text' => 'Value of the verb argument is not a legal OAI-PMH verb, the verb argument is missing, or the verb argument is repeated.', ), 'cannotDisseminateFormat' => array( - 'text' => "The metadata format identified by the value given for the metadataPrefix argument is not supported by the item or by the repository.", + 'text' => 'The metadata format identified by the value given for the metadataPrefix argument is not supported by the item or by the repository.', ), 'idDoesNotExist' => array( - 'text' => "The value of the identifier argument is unknown or illegal in this repository.", + 'text' => 'The value of the identifier argument is unknown or illegal in this repository.', ), 'noRecordsMatch' => array( 'text' => 'The combination of the values of the from, until, set and metadataPrefix arguments results in an empty list.', @@ -37,4 +55,5 @@ class OAI2Exception extends Exception { public function getOAI2Code() { return $this->code; } + }