Total Complexity | 6 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
18 | class CustomerForArrayable extends MagicActiveRecord |
||
19 | { |
||
20 | public array $items = []; |
||
21 | |||
22 | public ?CustomerForArrayable $item = null; |
||
23 | |||
24 | public function getTableName(): string |
||
25 | { |
||
26 | return 'customer'; |
||
27 | } |
||
28 | |||
29 | public function fields(): array |
||
30 | { |
||
31 | $fields = parent::fields(); |
||
32 | |||
33 | $fields['item'] = 'item'; |
||
34 | $fields['items'] = 'items'; |
||
35 | |||
36 | return $fields; |
||
37 | } |
||
38 | |||
39 | public function setItem(self $item) |
||
42 | } |
||
43 | |||
44 | public function setItems(self ...$items) |
||
47 | } |
||
48 | |||
49 | public function toArray(array $fields = [], array $expand = [], bool $recursive = true): array |
||
58 |