|
8 | 8 |
|
9 | 9 | ## Attributes
|
10 | 10 |
|
| 11 | +### Groups & Ignore<hr> |
| 12 | + |
| 13 | +`#[Ignore()]` is like `#[Groups()]` with empty array of groups. If You do not define the groups for property, then `Default` will be assignment as a property group. Only `Origin` can decide about group assignment in the process. |
| 14 | + |
| 15 | +| Declaration place | Normalization | Denormalization | Transformation | |
| 16 | +|:-:|:-:|:-:|:-:| |
| 17 | +| **Origin** | Source: ✔️<br>Target: ✔️ | Source: ✔️<br>Target: ✔️ | Source: ✔️<br>Target: ✔️ | |
| 18 | +| **Source** | Source: ✖️<br>Target: ✖️ | Source: ✖️<br>Target: ✖️ | Source: ✖️<br>Target: ✖️ | |
| 19 | +| **Target** | Source: ✖️<br>Target: ✖️ | Source: ✖️<br>Target: ✖️ | Source: ✖️<br>Target: ✖️ | |
| 20 | + |
| 21 | +| Declaration place | Mapping | |
| 22 | +|:-:|:-:| |
| 23 | +| **Origin** | Source: ✔️<br>Target: ✔️ | |
| 24 | +| **Source** | Source: ✖️<br>Target: ✖️ | |
| 25 | +| **Target** | Source: ✖️<br>Target: ✖️ | |
| 26 | + |
| 27 | +###### legend: ✖️ - *has no effect*, ✔️ - *affects*, ➖ - *not implemented* |
| 28 | + |
| 29 | +> **INFO**<br> |
| 30 | +> The table is implemented by `PBaszak\UltraMapper\Mapper\Domain\Matcher\Matcher::matchClassBlueprints()`. |
| 31 | +
|
11 | 32 | ### TargetProperty<hr>
|
12 | 33 |
|
13 | 34 | The behavior of the `#[TargetProperty()]` attribute depends on the class in which you declare it (*origin*, *source*, *target*). The table below presents the relationship between the declaration place and the active process, and how the attribute changes the name (or path) of the property. Placing an attribute in an origin class has no effect on any process unless the origin class is also a source class, a target class, or both.
|
14 | 35 |
|
15 |
| -##### NAME |
16 |
| - |
17 | 36 | Target Property attribute works like `Symfony\SerializedName` for Normalization, Denormalization and Transformation. It changes property name when data are normalized.
|
18 | 37 |
|
19 | 38 | | Declaration place | Normalization | Denormalization | Transformation |
|
20 | 39 | |:-:|:-:|:-:|:-:|
|
| 40 | +| **Origin** | Source: ✖️<br>Target: ✖️ | Source: ✖️<br>Target: ✖️ | Source: ✖️<br>Target: ✖️ | |
21 | 41 | | **Source** | Source: ✖️<br>Target: ✖️ | Source: ✔️<br>Target: ✖️ | Source: ✔️<br>Target: ✖️ |
|
22 | 42 | | **Target** | Source: ✖️<br>Target: ✔️ | Source: ✖️<br>Target: ✖️ | Source: ✖️<br>Target: ✔️ |
|
23 | 43 |
|
24 | 44 | Target Property attribute links properties from different blueprints for Mapping. It works with other processes or alone.
|
25 | 45 |
|
26 | 46 | | Declaration place | Mapping |
|
27 | 47 | |:-:|:-:|
|
| 48 | +| **Origin** | Source: ✖️<br>Target: ✖️ | |
28 | 49 | | **Source** | Source: ✖️<br>Target: ✔️ |
|
29 | 50 | | **Target** | Source: ✔️<br>Target: ✖️ |
|
30 | 51 |
|
|
0 commit comments