1 | <?php |
||
17 | trait BasicIdTrait |
||
18 | { |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $serialPre = '000000'; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $serialPost = '000'; |
||
28 | |||
29 | /** |
||
30 | * @var string Date and control string delimiter (- or +) |
||
31 | */ |
||
32 | protected $delimiter = '-'; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $checkDigit = '0'; |
||
38 | |||
39 | public function getId(): string |
||
43 | |||
44 | public function __tostring(): string |
||
48 | |||
49 | public function format(string $format): string |
||
53 | |||
54 | public function getSerialPreDelimiter(): string |
||
58 | |||
59 | public function getSerialPostDelimiter(): string |
||
63 | |||
64 | public function getDelimiter(): string |
||
68 | |||
69 | public function getCheckDigit(): string |
||
73 | |||
74 | public function getBirthDate(): \DateTimeImmutable |
||
78 | |||
79 | public function getAge(\DateTimeInterface $atDate = null): int |
||
89 | |||
90 | public function getCentury(): string |
||
94 | |||
95 | public function getSex(): string |
||
99 | |||
100 | public function isMale(): bool |
||
104 | |||
105 | public function isFemale(): bool |
||
109 | |||
110 | public function isSexOther(): bool |
||
114 | |||
115 | public function isSexUndefined(): bool |
||
119 | |||
120 | public function getBirthCounty(): string |
||
124 | |||
125 | public function getLegalForm(): string |
||
129 | |||
130 | public function isLegalFormUndefined(): bool |
||
134 | |||
135 | public function isStateOrParish(): bool |
||
139 | |||
140 | public function isIncorporated(): bool |
||
144 | |||
145 | public function isPartnership(): bool |
||
149 | |||
150 | public function isAssociation(): bool |
||
154 | |||
155 | public function isNonProfit(): bool |
||
159 | |||
160 | public function isTradingCompany(): bool |
||
164 | } |
||
165 |