---
title: Decorator
---

# Decorator

<div class="documentation__toc"></div>

## Introduction

The `\Anomaly\Streams\Platform\Support\Decorator` class let's you `decorate` objects as `presenters`. The same class will also let you undecorate presenters to their object.

## Basic Usage

### decorate

The `decorate` method let's you decorate a `value` as presenters. If an array or collection is passed then all items will be decorated recursively.

```php
use Anomaly\Streams\Platform\Support\Decorator;

$presenter = (new Decorator())->decorate($entry);
```

### undecorate

The `undecorate` method let's you undecorate a `value` from presenters. If an array or collection is passed then all items will be undecorated recursively.

```php
use Anomaly\Streams\Platform\Support\Decorator;

$presenter = (new Decorator())->undecorate($entry);
```
