Download the PHP package dagstuhl/datacite without Composer
On this page you can find all versions of the php package dagstuhl/datacite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dagstuhl/datacite
More information about dagstuhl/datacite
Files in dagstuhl/datacite
Package datacite
Short Description A DataCite API client for creating/updating DOI metadata (Schema 4.4), developed and used by Dagstuhl Publishing.
License MIT license
Informations about the package datacite
The Dagstuhl DataCite API client
The aim of this project is to provide an easy-to-use php interface for
- providing schema-compliant DataCite metadata (Schema 4.4)
- registering/updating the doi metadata via the DataCite API.
Note:
- This is not a full API implementation; it only covers the use cases required by Dagstuhl Publishing.
- This is a mirror of the master branch of our internal git.
Installation: composer require dagstuhl/datacite
Code Examples:
1) Creation of a metadata record
-
General Information:
-
Adding an author with affiliation:
-
Adding an editor with affiliation based on ror Identifier:
-
Adding relationships to other resources / alternative identifiers:
-
Classifying the type of the Document
-
Add date-fields:
- View the generated JSON:
2) Registering/Updating DOI Metadata
-
Updating an existing record:
-
The same lines of code produce a draft record, if the DOI was not registered before. To make this draft data publicly available and finally register the doi, simply call
- For error handling/debugging, use the following methods showing details on the status of the last HTTP-request:
3) Connect to your own models by implementing a DataCiteDataProvider
- the
DataCiteDataProvider
interface provides a clean interface to your custom models - just implement this interface on your models and obtain a DataCiteRecord by