| @@ 11-34 (lines=24) @@ | ||
| 8 | * Class AddStaffRequestDataTransformer |
|
| 9 | * @package OmnideskBundle\DataTransformer\Request |
|
| 10 | */ |
|
| 11 | class AddStaffRequestDataTransformer implements DataTransformerInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param AddStaffRequest $value |
|
| 15 | * @return array |
|
| 16 | */ |
|
| 17 | public function transform($value) |
|
| 18 | { |
|
| 19 | return [ |
|
| 20 | 'staff_email' => $value->getEmail(), |
|
| 21 | 'staff_full_name' => $value->getFullName(), |
|
| 22 | 'staff_signature' => $value->getSignature(), |
|
| 23 | ]; |
|
| 24 | } |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @param array $value |
|
| 28 | * @return AddStaffRequest |
|
| 29 | */ |
|
| 30 | public function reverseTransform($value) |
|
| 31 | { |
|
| 32 | throw new \LogicException('Method not implemented.'); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 11-35 (lines=25) @@ | ||
| 8 | * Class EditStaffRequestDataTransformer |
|
| 9 | * @package OmnideskBundle\DataTransformer\Request |
|
| 10 | */ |
|
| 11 | class EditStaffRequestDataTransformer implements DataTransformerInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param EditStaffRequest $value |
|
| 15 | * @return array |
|
| 16 | */ |
|
| 17 | public function transform($value) |
|
| 18 | { |
|
| 19 | return [ |
|
| 20 | 'staff_id' => $value->getStaffId(), |
|
| 21 | 'staff_email' => $value->getEmail(), |
|
| 22 | 'staff_full_name' => $value->getFullName(), |
|
| 23 | 'staff_signature' => $value->getSignature(), |
|
| 24 | ]; |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @param array $value |
|
| 29 | * @return EditStaffRequest |
|
| 30 | */ |
|
| 31 | public function reverseTransform($value) |
|
| 32 | { |
|
| 33 | throw new \LogicException('Method not implemented.'); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||