1 | <?php |
||
9 | class Base62Driver implements DriverInterface |
||
10 | { |
||
11 | /** |
||
12 | * The Base62 instance. |
||
13 | * |
||
14 | * @var \Tuupola\Base62\GmpEncoder|\Tuupola\Base62\PhpEncoder |
||
15 | */ |
||
16 | protected $base62; |
||
17 | |||
18 | /** |
||
19 | * Indicates integer encoding. |
||
20 | * |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $integer = false; |
||
24 | |||
25 | /** |
||
26 | * Create a new hashid driver instance. |
||
27 | * |
||
28 | * @param array $config |
||
29 | */ |
||
30 | 3 | public function __construct(array $config = []) |
|
37 | |||
38 | /** |
||
39 | * Encode the data. |
||
40 | * |
||
41 | * @param mixed $data |
||
42 | * @return string |
||
43 | */ |
||
44 | 2 | public function encode($data) |
|
48 | |||
49 | /** |
||
50 | * Decode the data. |
||
51 | * |
||
52 | * @param mixed $data |
||
53 | * @return mixed |
||
54 | */ |
||
55 | 2 | public function decode($data) |
|
59 | } |
||
60 |