NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class Link

Provides helpful functionality for link headers

  Guzzle\Http\Message\Header implements Guzzle\Http\Message\Header\HeaderInterface
  Guzzle\Http\Message\Header\Link

Namespace: Guzzle\Http\Message\Header
Located at Guzzle/Http/Message/Header/Link.php

## Methods summary

- `public` `addLink ( string $url, string $rel, array $params = array() )`

  Add a link to the header

- `public` `hasLink ( string $rel )`

  Check if a specific link exists for a given rel attribute

- `public` `getLink ( string $rel )`

  Get a specific link for a given rel attribute

- `public` `getLinks ( )`

  Get an associative array of links

## Methods detail

# `public `Guzzle\Http\Message\Header\Link``
`addLink( string $url, string $rel, array $params = array() )`

Add a link to the header

#### Parameters

$url
  `string`
  $url Link URL
$rel
  `string`
  $rel Link rel
$params
  `array`
  $params Other link parameters

#### Returns

``Guzzle\Http\Message\Header\Link``
# `public boolean`
`hasLink( string $rel )`

Check if a specific link exists for a given rel attribute

#### Parameters

$rel
  `string`
  $rel rel value

#### Returns

`boolean`
# `public array|null`
`getLink( string $rel )`

Get a specific link for a given rel attribute

#### Parameters

$rel
  `string`
  $rel Rel value

#### Returns

`array|null`
# `public array`
`getLinks( )`

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',
        )
    )

#### Returns

`array`

### Methods inherited from Guzzle\Http\Message\Header

`__construct()`, `__toString()`, `add()`, `count()`, `getGlue()`, `getIterator()`, `getName()`, `hasValue()`, `normalize()`, `parseParams()`, `removeValue()`, `setGlue()`, `setName()`, `toArray()`, `trimHeader()`

### Magic methods summary

## Properties summary

### Properties inherited from Guzzle\Http\Message\Header

`$glue`, `$header`, `$values`