| 1 | <?php |
||
| 12 | class ConvertProcessor extends AbstractProcessor |
||
| 13 | { |
||
| 14 | public const DEFAULT_TARGET_FIELD_VALUE = 'field'; |
||
| 15 | public const DEFAULT_IGNORE_MISSING_VALUE = false; |
||
| 16 | |||
| 17 | public function __construct(string $field, string $type) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Set field. |
||
| 25 | * |
||
| 26 | * @return $this |
||
| 27 | */ |
||
| 28 | public function setField(string $field): self |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Set field value. |
||
| 35 | * |
||
| 36 | * @return $this |
||
| 37 | */ |
||
| 38 | public function setType(string $type): self |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Set target_field. Default value field. |
||
| 45 | * |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | public function setTargetField(string $targetField): self |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Set ignore_missing. Default value false. |
||
| 55 | * |
||
| 56 | * @param bool $ignoreMissing only these values are allowed (integer|float|string|boolean|auto) |
||
| 57 | * |
||
| 58 | * @return $this |
||
| 59 | */ |
||
| 60 | public function setIgnoreMissing(bool $ignoreMissing): self |
||
| 64 | } |
||
| 65 |