1 | <?php namespace Propaganistas\LaravelPhone\Traits; |
||
8 | trait ParsesTypes |
||
9 | { |
||
10 | /** |
||
11 | * Array of available phone types. |
||
12 | * |
||
13 | * @var array |
||
14 | */ |
||
15 | protected static $types; |
||
16 | |||
17 | /** |
||
18 | * Determine whether the given type is valid. |
||
19 | * |
||
20 | * @param string $type |
||
21 | * @return bool |
||
22 | */ |
||
23 | 3 | public static function isValidType($type) |
|
27 | |||
28 | /** |
||
29 | * Parse a phone type into constant's value. |
||
30 | * |
||
31 | * @param string|array $types |
||
32 | * @return array |
||
33 | */ |
||
34 | 36 | protected static function parseTypes($types) |
|
52 | |||
53 | /** |
||
54 | * Parse a phone type into its string representation. |
||
55 | * |
||
56 | * @param string|array $types |
||
57 | * @return array |
||
58 | */ |
||
59 | 3 | protected static function parseTypesAsStrings($types) |
|
70 | |||
71 | /** |
||
72 | * Load all available formats once. |
||
73 | */ |
||
74 | 36 | private static function loadTypes() |
|
80 | } |