These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the FOSHttpCacheBundle package. |
||
5 | * |
||
6 | * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace FOS\HttpCacheBundle\UserContext; |
||
13 | |||
14 | use FOS\HttpCache\UserContext\AnonymousRequestMatcher as BaseAnonymousRequestMatcher; |
||
15 | |||
16 | /** |
||
17 | * Matches anonymous requests using a list of identification headers. |
||
18 | * |
||
19 | * @deprecated Use AnonymousRequestMatcher of HttpCache library |
||
20 | */ |
||
21 | class AnonymousRequestMatcher extends BaseAnonymousRequestMatcher |
||
22 | { |
||
23 | public function __construct(array $options = []) |
||
24 | { |
||
25 | @trigger_error( |
||
0 ignored issues
–
show
|
|||
26 | 'AnonymousRequestMatcher of HttpCacheBundle is deprecated. '. |
||
27 | 'Use AnonymousRequestMatcher of HttpCache library.', |
||
28 | E_USER_DEPRECATED |
||
29 | ); |
||
30 | |||
31 | if (isset($options['user_identifier_headers'], $options['session_name_prefix'])) { |
||
32 | parent::__construct($options); |
||
33 | } else { |
||
34 | parent::__construct([ |
||
35 | 'user_identifier_headers' => $options, |
||
36 | 'session_name_prefix' => 'PHPSESSID', |
||
37 | ]); |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 |
If you suppress an error, we recommend checking for the error condition explicitly: