| 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 | /** |
||
| 18 | * Convert constructor. |
||
| 19 | */ |
||
| 20 | public function __construct(string $field, string $type) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Set field. |
||
| 28 | * |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | public function setField(string $field): self |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Set field value. |
||
| 38 | * |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | public function setType(string $type): self |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Set target_field. Default value field. |
||
| 48 | * |
||
| 49 | * @return $this |
||
| 50 | */ |
||
| 51 | public function setTargetField(string $targetField): self |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Set ignore_missing. Default value false. |
||
| 58 | * |
||
| 59 | * @param bool $ignoreMissing only these values are allowed (integer|float|string|boolean|auto) |
||
| 60 | * |
||
| 61 | * @return $this |
||
| 62 | */ |
||
| 63 | public function setIgnoreMissing(bool $ignoreMissing): self |
||
| 67 | } |
||
| 68 |