Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($endpoint, $login, $password) | |
_doRequest ($action, $arg, $attachment=null) | |
_escapeXmlEntities ($string) | |
_getContentId ($prefix) | |
_getMimePart ($contentId, $content) | |
upload ($xml) | |
viewMetadata ($doi) | |
Data Fields | |
$_auth | |
$_endpoint | |
A wrapper for the mEDRA web service 2.0.
NB: We do not use PHP's SoapClient because it is not PHP4 compatible and it doesn't support multipart SOAP messages.
Definition at line 26 of file MedraWebservice.inc.php.
MedraWebservice::__construct | ( | $endpoint, | |
$login, | |||
$password | |||
) |
Constructor
$endpoint | string The mEDRA web service endpoint. |
$login | string |
$password | string |
Definition at line 47 of file MedraWebservice.inc.php.
MedraWebservice::_doRequest | ( | $action, | |
$arg, | |||
$attachment = null |
|||
) |
Do the actual web service request.
$action | string |
$arg | string |
$attachment | array |
Definition at line 87 of file MedraWebservice.inc.php.
References _getContentId(), _getMimePart(), PKPCurlHelper\getCurlObject(), PKPString\regexp_match(), PKPString\regexp_match_get(), and PKPString\regexp_replace().
Referenced by upload(), and viewMetadata().
MedraWebservice::_escapeXmlEntities | ( | $string | ) |
Escape XML entities.
$string | string |
Definition at line 199 of file MedraWebservice.inc.php.
References XMLNode\xmlentities().
Referenced by viewMetadata().
MedraWebservice::_getContentId | ( | $prefix | ) |
Create a globally unique MIME content ID.
$prefix | string |
Definition at line 191 of file MedraWebservice.inc.php.
Referenced by _doRequest(), and upload().
MedraWebservice::_getMimePart | ( | $contentId, | |
$content | |||
) |
Create a mime part with the given content.
$contentId | string |
$content | string |
Definition at line 178 of file MedraWebservice.inc.php.
Referenced by _doRequest().
MedraWebservice::upload | ( | $xml | ) |
mEDRA upload operation.
$xml |
Definition at line 60 of file MedraWebservice.inc.php.
References _doRequest(), and _getContentId().
MedraWebservice::viewMetadata | ( | $doi | ) |
mEDRA viewMetadata operation
Definition at line 70 of file MedraWebservice.inc.php.
References _doRequest(), and _escapeXmlEntities().
string MedraWebservice::$_auth |
HTTP authentication credentials.
Definition at line 32 of file MedraWebservice.inc.php.
string MedraWebservice::$_endpoint |
The mEDRA web service endpoint.
Definition at line 38 of file MedraWebservice.inc.php.