1 | <?php |
||
8 | class PrerenderIoClient extends PrerenderClient |
||
9 | { |
||
10 | const URL = 'https://service.prerender.io/'; |
||
11 | |||
12 | const HEADER_TOKEN = 'HTTP_X-Prerender-Token'; |
||
13 | const HEADER_USER_AGENT = 'HTTP_USER_AGENT'; |
||
14 | |||
15 | const USER_AGENT = 'MediaMonks Crawler'; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $token; |
||
21 | |||
22 | /** |
||
23 | * @param string $token Token from the prerender.io service |
||
24 | * @param array $server The server parameters (equivalent of $_SERVER) |
||
25 | * @param History $history A History instance to store the browser history |
||
26 | * @param CookieJar $cookieJar A CookieJar instance to store the cookies |
||
27 | */ |
||
28 | 2 | public function __construct($token, array $server = [], History $history = null, CookieJar $cookieJar = null) |
|
37 | |||
38 | } |
||
39 |