analyse($headers, $options); } } /** * Analyse the provided headers or User-Agent string * * @param array|string $headers An array with all of the headers or a string with just the User-Agent header */ public function analyse($headers, $options = []) { $o = $options; if (is_string($headers)) { $h = [ 'User-Agent' => $headers ]; } else { if (isset($headers['headers'])) { $h = $headers['headers']; unset($headers['headers']); $o = array_merge($headers, $options); } else { $h = $headers; } } if ($this->analyseWithCache($h, $o)) { return; } $analyser = new Analyser($h, $o); $analyser->setdata($this); $analyser->analyse(); } }