### Methods

## __construct()

    __construct(object | array $resource, mixed $id)

### Parameters

#### $resource

`object` `array`

#### $id

`mixed`

### Exceptions

`\PhlyRestfully\Exception\InvalidResourceException` | if resource is not an object or array

## Retrieve properties

    __get(string $name) : mixed

### Parameters

#### $name

`string`

### Returns

`mixed`

## Get link collection

    getLinks() : \PhlyRestfully\LinkCollection

### Returns

`\PhlyRestfully\LinkCollection`

## Set link collection

    setLinks(\PhlyRestfully\LinkCollection $links) : \PhlyRestfully\HalResource

fluent | This method is part of a fluent interface and will return the same instance

### Parameters

#### $links

`\PhlyRestfully\LinkCollection`

### Returns

`\PhlyRestfully\HalResource`