| 1 | <?php |
||
| 12 | class JsonProcessor extends AbstractProcessor |
||
| 13 | { |
||
| 14 | public const DEFAULT_TARGET_FIELD_VALUE = 'field'; |
||
| 15 | public const DEFAULT_ADD_TO_ROOT_VALUE = false; |
||
| 16 | |||
| 17 | public function __construct(string $field) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Set the field. |
||
| 24 | * |
||
| 25 | * @return $this |
||
| 26 | */ |
||
| 27 | public function setField(string $field): self |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Set target_field. Default field. |
||
| 34 | * |
||
| 35 | * @return $this |
||
| 36 | */ |
||
| 37 | public function setTargetField(string $targetField): self |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Set add_to_root. Default value false. |
||
| 44 | * |
||
| 45 | * @return $this |
||
| 46 | */ |
||
| 47 | public function setAddToRoot(bool $addToRoot): self |
||
| 51 | } |
||
| 52 |