Tsugi

LinkHeader
in package

Tags
author

List of contributors https://github.com/libgraviton/link-header-rel-parser/graphs/contributors

license

https://opensource.org/licenses/MIT MIT License

Table of Contents

Constants

PATTERN  : mixed = '/\<(?<uri>.*)\>;(\s?)rel=\"(?<rel>.*)\"/U'

Properties

$items  : array<string|int, LinkHeaderItem>

Methods

__construct()  : mixed
Constructor
__toString()  : string
Cast contents to string.
add()  : LinkHeader
add a LinkHeaderItem.
all()  : array<string|int, LinkHeaderItem>
get all items
fromString()  : LinkHeader
Builds a LinkHeader instance from a string.
getRel()  : LinkHeaderItem|null
gets an item for a certain rel
removeRel()  : void
removes a certain relation

Constants

PATTERN

public mixed PATTERN = '/\<(?<uri>.*)\>;(\s?)rel=\"(?<rel>.*)\"/U'

Properties

Methods

__toString()

Cast contents to string.

public __toString() : string
Return values
string

fromString()

Builds a LinkHeader instance from a string.

public static fromString(string $headerValue) : LinkHeader
Parameters
$headerValue : string

value of complete header

Return values
LinkHeader

removeRel()

removes a certain relation

public removeRel(string $rel) : void
Parameters
$rel : string

rel name


        
On this page

Search results