1 | <?php |
||
15 | class Transformer implements TransformerContract |
||
16 | { |
||
17 | /** |
||
18 | * A builder used to build transformed arrays. |
||
19 | * |
||
20 | * @var \Flugg\Responder\TransformBuilder |
||
21 | */ |
||
22 | protected $transformBuilder; |
||
23 | |||
24 | /** |
||
25 | * Construct the service class. |
||
26 | * |
||
27 | * @param \Flugg\Responder\TransformBuilder $transformBuilder |
||
28 | */ |
||
29 | 1 | public function __construct(TransformBuilder $transformBuilder) |
|
33 | |||
34 | /** |
||
35 | * Transform the data without serializing with the given transformer and relations. |
||
36 | * |
||
37 | * @param mixed $data |
||
38 | * @param \Flugg\Responder\Transformers\Transformer|callable|string|null $transformer |
||
39 | * @param string[] $with |
||
40 | * @param string[] $without |
||
41 | * @return array |
||
42 | */ |
||
43 | 1 | public function transform($data = null, $transformer = null, array $with = [], array $without = []): array |
|
51 | } |