1 | <?php |
||
7 | class Generator |
||
8 | { |
||
9 | /** |
||
10 | * The token generator function. |
||
11 | * |
||
12 | * @var callable |
||
13 | */ |
||
14 | protected static $handler; |
||
15 | |||
16 | /** |
||
17 | * Get the callback function. |
||
18 | * |
||
19 | * @return callable |
||
20 | */ |
||
21 | public static function handler() |
||
31 | |||
32 | /** |
||
33 | * Register a custom generator handler. |
||
34 | * |
||
35 | * @param callable $handler |
||
36 | * @return void |
||
37 | */ |
||
38 | public static function extend(callable $handler) |
||
42 | |||
43 | /** |
||
44 | * Generate a new token value. |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | public static function generate() |
||
52 | } |
||
53 |