LinkHeaderItem
in package
Tags
Table of Contents
Properties
- $attributes : array<string|int, mixed>
- $uri : string
Methods
- __construct() : mixed
- Constructor.
- __toString() : string
- cast item to string
- getAttribute() : string
- Get an attribute.
- getRel() : string
- Get rel attribute
- getUri() : string
- Get URI.
- setAttribute() : LinkHeaderItem
- Set attribute
- setUri() : LinkHeaderItem
- Set a new URI.
Properties
$attributes
private
array<string|int, mixed>
$attributes
= []
$uri
private
string
$uri
Methods
__construct()
Constructor.
public
__construct(string $uri, string|array<string|int, mixed> $attributes) : mixed
Parameters
- $uri : string
-
uri value of item
- $attributes : string|array<string|int, mixed>
-
array of attributes or rel attribute
__toString()
cast item to string
public
__toString() : string
Return values
stringgetAttribute()
Get an attribute.
public
getAttribute(string $name) : string
Parameters
- $name : string
-
attribute name
Return values
stringgetRel()
Get rel attribute
public
getRel() : string
Return values
stringgetUri()
Get URI.
public
getUri() : string
Return values
stringsetAttribute()
Set attribute
public
setAttribute(string $name, string $value) : LinkHeaderItem
Parameters
- $name : string
-
attribute name
- $value : string
-
attribute value
Return values
LinkHeaderItemsetUri()
Set a new URI.
public
setUri(string $uri) : LinkHeaderItem
Parameters
- $uri : string
-
new URI value