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

Public Member Functions

 __construct (?string $inboxUrl=null, ?HttpLayer $httpLayer=null)
 
 getInboxUrl ()
 
 setInboxUrl (string $value)
 
 send (NotifyPattern $notification, ?string $inboxUrl=null, bool $validate=true)
 

Member Function Documentation

◆ getInboxUrl()

coarnotify\client\COARNotifyClient::getInboxUrl ( )

Get the HTTP URI of the inbox to communicate with by default.

Returns
string|null

◆ send()

coarnotify\client\COARNotifyClient::send ( NotifyPattern $notification,
?string $inboxUrl = null,
bool $validate = true )

Send the given notification to the inbox. If no inbox URL is provided, the default inbox URL will be used.

Parameters
NotifyPattern$notificationThe notification object (from the models provided, or a subclass you have made of the NotifyPattern class)
string | null$inboxUrlThe HTTP URI to send the notification to. Omit if using the default inbox_url supplied in the constructor. If it is omitted, and no value is passed here then we will also look in the target.inbox property of the notification.
bool$validateWhether to validate the notification before sending. If you are sure the notification is valid, you can set this to false.
Returns
NotifyResponse A NotifyResponse object representing the response from the server.
Exceptions
NotifyException

◆ setInboxUrl()

coarnotify\client\COARNotifyClient::setInboxUrl ( string $value)

Set the HTTP URI of the inbox to communicate with by default.

Parameters
string$value

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