$values
$values :
Provides helpful functionality for link headers
parseParams() : array
Parse a header containing ";" separated data into an array of associative arrays representing the header key value pair data of the header. When a parameter does not contain a value, but just contains a key, this function will inject a key with a '' string value.
codeCoverageIgnore |
---|
addLink(string $url, string $rel, array $params = array()) : self
Add a link to the header
string | $url | Link URL |
string | $rel | Link rel |
array | $params | Other link parameters |
None found |
hasLink(string $rel) : boolean
Check if a specific link exists for a given rel attribute
string | $rel | rel value |
None found |
getLink(string $rel) : array|null
Get a specific link for a given rel attribute
string | $rel | Rel value |
None found |
getLinks() : array
Get an associative array of links
For example: Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg", http://.../back.jpeg; rel=back; type="image/jpeg"
var_export($response->getLinks());
array(
array(
'url' => 'http:/.../front.jpeg',
'rel' => 'back',
'type' => 'image/jpeg',
)
)
None found |
trimHeader( $str) : string
Trim a header by removing excess spaces and wrapping quotes
$str |
None found |