PHP Class MedraWebservice, ojs

Show file Open project: pkp/ojs Class Usage Examples

Public Properties

Property Type Description
$_auth HTTP authentication credentials.
$_endpoint The mEDRA web service endpoint.

Public Methods

Method Description
__construct ( $endpoint, $login, $password ) Constructor
_doRequest ( $action, $arg, $attachment = null ) : boolean | string Do the actual web service request.
_escapeXmlEntities ( $string ) Escape XML entities.
_getContentId ( $prefix ) : string Create a globally unique MIME content ID.
_getMimePart ( $contentId, $content ) : string Create a mime part with the given content.
upload ( $xml ) mEDRA upload operation.
viewMetadata ( $doi ) mEDRA viewMetadata operation

Method Details

__construct() public method

Constructor
public __construct ( $endpoint, $login, $password )
$endpoint string The mEDRA web service endpoint.
$login string
$password string

_doRequest() public method

Do the actual web service request.
public _doRequest ( $action, $arg, $attachment = null ) : boolean | string
$action string
$arg string
$attachment array
return boolean | string True for success, an error message otherwise.

_escapeXmlEntities() public method

Escape XML entities.
public _escapeXmlEntities ( $string )
$string string

_getContentId() public method

Create a globally unique MIME content ID.
public _getContentId ( $prefix ) : string
$prefix string
return string

_getMimePart() public method

Create a mime part with the given content.
public _getMimePart ( $contentId, $content ) : string
$contentId string
$content string
return string

upload() public method

mEDRA upload operation.
public upload ( $xml )
$xml

viewMetadata() public method

mEDRA viewMetadata operation
public viewMetadata ( $doi )

Property Details

$_auth public property

HTTP authentication credentials.
public $_auth

$_endpoint public property

The mEDRA web service endpoint.
public $_endpoint