COAR Notify
 
Loading...
Searching...
No Matches
coarnotify\client\NotifyResponse Class Reference

Public Member Functions

 __construct (string $action, ?string $location=null)
 
 getAction ()
 
 getLocation ()
 

Public Attributes

const CREATED = "created"
 
const ACCEPTED = "accepted"
 

Constructor & Destructor Documentation

◆ __construct()

coarnotify\client\NotifyResponse::__construct ( string $action,
?string $location = null )

Construct a new NotifyResponse object with the action (created or accepted) and the location URL (optional).

Parameters
string$actionThe action which the server said it took
string | null$locationThe HTTP URI for the resource that was created (if present)

Member Function Documentation

◆ getAction()

coarnotify\client\NotifyResponse::getAction ( )

Get the action that was taken, will be one of the constants CREATED or ACCEPTED.

Returns
string

◆ getLocation()

coarnotify\client\NotifyResponse::getLocation ( )

Get the HTTP URI of the created resource, if present.

Returns
string|null

Member Data Documentation

◆ CREATED

const coarnotify\client\NotifyResponse::CREATED = "created"

An object representing the response from a COAR Notify inbox.

This contains the action that was carried out on the server:

  • CREATED: a new resource was created
  • ACCEPTED: the request was accepted, but the resource was not yet created

In the event that the resource is created, then there will also be a location URL which will give you access to the resource.


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