1 | <?php namespace Arcanedev\Hasher\Drivers; |
||
13 | class HashidsDriver implements HashDriver |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Properties |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** @var \Hashids\Hashids */ |
||
20 | private $hasher; |
||
21 | |||
22 | /* ------------------------------------------------------------------------------------------------ |
||
23 | | Constructor |
||
24 | | ------------------------------------------------------------------------------------------------ |
||
25 | */ |
||
26 | /** |
||
27 | * HashidsDriver constructor. |
||
28 | * |
||
29 | * @param array $options |
||
30 | */ |
||
31 | public function __construct(array $options) |
||
39 | |||
40 | /* ------------------------------------------------------------------------------------------------ |
||
41 | | Main Functions |
||
42 | | ------------------------------------------------------------------------------------------------ |
||
43 | */ |
||
44 | /** |
||
45 | * Encode the value. |
||
46 | * |
||
47 | * @param mixed $value |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public function encode($value) |
||
55 | |||
56 | /** |
||
57 | * Decode the hashed value. |
||
58 | * |
||
59 | * @param string $hashed |
||
60 | * |
||
61 | * @return mixed |
||
62 | */ |
||
63 | public function decode($hashed) |
||
69 | } |
||
70 |