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 = []) |
|
36 | |||
37 | /** |
||
38 | * Encode the data. |
||
39 | * |
||
40 | * @param mixed $data |
||
41 | * @return string |
||
42 | */ |
||
43 | 2 | public function encode($data) |
|
47 | |||
48 | /** |
||
49 | * Decode the data. |
||
50 | * |
||
51 | * @param mixed $data |
||
52 | * @return mixed |
||
53 | */ |
||
54 | 2 | public function decode($data) |
|
58 | } |
||
59 |