-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAdvancedCustomerTransfer.php
More file actions
62 lines (51 loc) · 2.17 KB
/
AdvancedCustomerTransfer.php
File metadata and controls
62 lines (51 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
declare(strict_types=1);
namespace Picamator\Examples\TransferObject\Generated\AdvancedTransferGenerator;
use Picamator\Examples\TransferObject\Advanced\AddressData;
use Picamator\Examples\TransferObject\Advanced\CredentialsData;
use Picamator\Examples\TransferObject\Generated\TransferGenerator\CustomerTransfer;
use Picamator\TransferObject\Transfer\AbstractTransfer;
use Picamator\TransferObject\Transfer\Attribute\PropertyTypeAttribute;
use Picamator\TransferObject\Transfer\TransferInterface;
/**
* Specification:
* - Class is automatically generated based on a definition file.
* - To modify it, please update the corresponding definition file and run the generator again.
*
* Note: Do not manually edit this file, as changes will be overwritten.
*
* @see /examples/config/advanced-transfer-generator/definition/advanced-customer.transfer.yml Definition file path.
*/
final class AdvancedCustomerTransfer extends AbstractTransfer
{
protected const int META_DATA_SIZE = 3;
protected const array META_DATA = [
self::ADDRESS_INDEX => self::ADDRESS,
self::CREDENTIALS_INDEX => self::CREDENTIALS,
self::CUSTOMER_INDEX => self::CUSTOMER,
];
// address
#[PropertyTypeAttribute(AddressData::class)]
public const string ADDRESS = 'address';
protected const int ADDRESS_INDEX = 0;
public TransferInterface&AddressData $address {
get => $this->getData(self::ADDRESS_INDEX);
set => $this->setData(self::ADDRESS_INDEX, $value);
}
// credentials
#[PropertyTypeAttribute(CredentialsData::class)]
public const string CREDENTIALS = 'credentials';
protected const int CREDENTIALS_INDEX = 1;
public TransferInterface&CredentialsData $credentials {
get => $this->getData(self::CREDENTIALS_INDEX);
set => $this->setData(self::CREDENTIALS_INDEX, $value);
}
// customer
#[PropertyTypeAttribute(CustomerTransfer::class)]
public const string CUSTOMER = 'customer';
protected const int CUSTOMER_INDEX = 2;
public TransferInterface&CustomerTransfer $customer {
get => $this->getData(self::CUSTOMER_INDEX);
set => $this->setData(self::CUSTOMER_INDEX, $value);
}
}