JrdResponse
in package
implements
IResponse
FinalYes
A JSON Document Format (JDF) response to a well-known request
Tags
Table of Contents
Interfaces
Properties
- $aliases : array<string|int, string>
- $expires : string|null
- $links : array<string|int, mixed>
- $properties : array<string|int, string|null>
- $subject : string
Methods
- __construct() : mixed
- addAlias() : $this
- Add an alias
- addLink() : JrdResponse
- Add a link
- addProperty() : $this
- Add a property
- isEmpty() : bool
- Does this response have any data attached to it?
- setExpires() : $this
- toHttpResponse() : Response
Properties
$aliases
private
array<string|int, string>
$aliases
= []
$expires
private
string|null
$expires
$links
private
array<string|int, mixed>
$links
$properties
private
array<string|int, string|null>
$properties
= []
$subject
private
string
$subject
Methods
__construct()
public
__construct(string $subject) : mixed
Parameters
- $subject : string
-
https://tools.ietf.org/html/rfc7033#section-4.4.1
Tags
addAlias()
Add an alias
public
addAlias(string $alias) : $this
Parameters
- $alias : string
Tags
Return values
$thisaddLink()
Add a link
public
addLink(string $rel, string|null $type, string|null $href[, array<string|int, string>|null $titles = [] ][, string|null $properties = [] ]) : JrdResponse
Parameters
- $rel : string
-
https://tools.ietf.org/html/rfc7033#section-4.4.4.1
- $type : string|null
-
https://tools.ietf.org/html/rfc7033#section-4.4.4.2
- $href : string|null
-
https://tools.ietf.org/html/rfc7033#section-4.4.4.3
- $titles : array<string|int, string>|null = []
-
https://tools.ietf.org/html/rfc7033#section-4.4.4.4
- $properties : string|null = []
-
https://tools.ietf.org/html/rfc7033#section-4.4.4.5
Tags
Return values
JrdResponseaddProperty()
Add a property
public
addProperty(string $property, string|null $value) : $this
Parameters
- $property : string
- $value : string|null
Tags
Return values
$thisisEmpty()
Does this response have any data attached to it?
public
isEmpty() : bool
Tags
Return values
boolsetExpires()
public
setExpires(string $expires) : $this
Parameters
- $expires : string
Tags
Return values
$thistoHttpResponse()
public
toHttpResponse() : Response