Skip to content

Commit

Permalink
playing with formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Aug 18, 2023
1 parent 96047ae commit 5213e55
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ When the max depth is hit, the `load()` method will be called on the mapper
for that level but `populate()` will *not* be called. This results in a
"shallow" mapping of the final level object.

Let's look at a few depth examples using using this code:
Let's look at a few depth examples using this code:

```php
$dto->dragon = $this->microMapper->map($dragonEntity, DragonApi::class, [
Expand All @@ -332,8 +332,8 @@ $dto->dragon = $this->microMapper->map($dragonEntity, DragonApi::class, [

Result:

```
DragonApi
```yaml
DragonApi:
id: 1
name: null
firePower: null
Expand All @@ -350,23 +350,22 @@ DragonApi

Result:

```
DragonApi
```yaml
DragonApi:
id: 1
name: 'Sizzley Pete'
firePower: 100
treasures: [
TreasureApi
treasures:
TreasureApi:
id: 1
name: null
value: null
dragon: null
TreasureApi
TreasureApi:
id: 2
name: null
value: null
dragon: null
]
```

In something like API Platform, you can also use `MAX_DEPTH` to limit the
Expand Down

0 comments on commit 5213e55

Please sign in to comment.