PHP Класс MedraWebservice, ojs

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_auth HTTP authentication credentials.
$_endpoint The mEDRA web service endpoint.

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

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

_doRequest() публичный Метод

Do the actual web service request.
public _doRequest ( $action, $arg, $attachment = null ) : boolean | string
$action string
$arg string
$attachment array
Результат boolean | string True for success, an error message otherwise.

_escapeXmlEntities() публичный Метод

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

_getContentId() публичный Метод

Create a globally unique MIME content ID.
public _getContentId ( $prefix ) : string
$prefix string
Результат string

_getMimePart() публичный Метод

Create a mime part with the given content.
public _getMimePart ( $contentId, $content ) : string
$contentId string
$content string
Результат string

upload() публичный Метод

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

viewMetadata() публичный Метод

mEDRA viewMetadata operation
public viewMetadata ( $doi )

Описание свойств

$_auth публичное свойство

HTTP authentication credentials.
public $_auth

$_endpoint публичное свойство

The mEDRA web service endpoint.
public $_endpoint