1 | <?php |
||
5 | class CsrfParser |
||
6 | { |
||
7 | const TOKEN_NAME = 'csrftoken'; |
||
8 | const DEFAULT_TOKEN = '1234'; |
||
9 | |||
10 | /** |
||
11 | * Get a CSRF token from the given cookie file. |
||
12 | * |
||
13 | * @param string $file |
||
14 | * |
||
15 | * @return string|null |
||
16 | */ |
||
17 | public static function getTokenFromFile($file) |
||
31 | |||
32 | /** |
||
33 | * @param string $line |
||
34 | * |
||
35 | * @return false|string |
||
36 | */ |
||
37 | protected static function parseLineForToken($line) |
||
50 | } |
||
51 |