| 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 = []) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Encode the data. |
||
| 44 | * |
||
| 45 | * @param mixed $data |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | 2 | public function encode($data) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Decode the data. |
||
| 55 | * |
||
| 56 | * @param string $data |
||
| 57 | * @return mixed |
||
| 58 | */ |
||
| 59 | 2 | public function decode($data) |
|
| 63 | } |
||
| 64 |