1 | <?php |
||
7 | final class DataWrapper |
||
8 | { |
||
9 | /** |
||
10 | * One of the eZ Publish structs, like ContentCreateStruct, UserUpdateStruct and so on. |
||
11 | * |
||
12 | * @var mixed |
||
13 | */ |
||
14 | public $payload; |
||
15 | |||
16 | /** |
||
17 | * Definition of the target. |
||
18 | * |
||
19 | * In case of Content or User target, this must be the corresponding ContentType. |
||
20 | * |
||
21 | * @var mixed|null |
||
22 | */ |
||
23 | public $definition; |
||
24 | |||
25 | /** |
||
26 | * The target struct that applies to. E.g. Content, User, Section object and so on. |
||
27 | * |
||
28 | * This target makes sense only in update context, when creating target does not |
||
29 | * exist (yet to be created). |
||
30 | * |
||
31 | * @var mixed|null |
||
32 | */ |
||
33 | public $target; |
||
34 | |||
35 | /** |
||
36 | * Construct from payload, target and definition. |
||
37 | * |
||
38 | * @param mixed $payload |
||
39 | * @param mixed|null $target |
||
40 | * @param mixed|null $definition |
||
41 | */ |
||
42 | public function __construct($payload, $definition = null, $target = null) |
||
48 | } |
||
49 |