1 | <?php |
||
7 | trait TypeTraits |
||
8 | { |
||
9 | // Supported Types |
||
10 | private $_types = [ |
||
11 | 'cbn', 'bdc', 'bank', 'moneygram', 'westernunion', |
||
12 | ]; |
||
13 | |||
14 | // The type (default is cbn): |
||
15 | private $type; |
||
16 | |||
17 | // Set the base type: |
||
18 | public function setType(string $type) |
||
30 | |||
31 | // Get the specified type: |
||
32 | public function getBaseType() |
||
36 | |||
37 | // Sanitize types: |
||
38 | private function sanitizeTypes(string $code) |
||
44 | |||
45 | /** |
||
46 | * Verify Types. |
||
47 | * @param \Infinitypaul\NairaExchangeRates\Traits\string $code |
||
48 | * |
||
49 | * @throws \Infinitypaul\NairaExchangeRates\Exceptions\Exceptions |
||
50 | */ |
||
51 | private function verifyType(string $code) |
||
60 | |||
61 | // Check if a type is in the supported range: |
||
62 | private function typeIsSupported(string $code) |
||
68 | } |
||
69 |