COAR Notify
 
Loading...
Searching...
No Matches
coarnotify\server\COARNotifyReceipt Class Reference

Public Member Functions

 __construct (int $status, ?string $location=null)
 
 getStatus ()
 
 getLocation ()
 

Public Attributes

const CREATED = 201
 
const ACCEPTED = 202
 

Detailed Description

An object representing the response from a COAR Notify server.

Server implementations should construct and return this object with the appropriate properties when implementing the :py:meth:COARNotifyServiceBinding.notification_received binding

Constructor & Destructor Documentation

◆ __construct()

coarnotify\server\COARNotifyReceipt::__construct ( int $status,
?string $location = null )

Construct a new COARNotifyReceipt object with the status code and location URL (optional)

Parameters
int$statusThe HTTP status code, should be one of the constants CREATED (201) or ACCEPTED (202)
string | null$locationThe HTTP URI for the resource that was created (if present)

Member Function Documentation

◆ getLocation()

coarnotify\server\COARNotifyReceipt::getLocation ( )

Get the HTTP URI of the created resource, if present

Returns
string|null

◆ getStatus()

coarnotify\server\COARNotifyReceipt::getStatus ( )

Get the status code of the response. Should be one of the constants CREATED (201) or ACCEPTED (202)

Returns
int

Member Data Documentation

◆ ACCEPTED

const coarnotify\server\COARNotifyReceipt::ACCEPTED = 202

The status code for an accepted request

◆ CREATED

const coarnotify\server\COARNotifyReceipt::CREATED = 201

The status code for a created resource


The documentation for this class was generated from the following file: