/** * Create a new object that contains all the detected information * * @param array|string $headers An array with all of the headers or a string with just the User-Agent header */ public function __construct($headers) { parent::__construct(); $analyser = new Analyser($headers); $analyser->setdata($this); $analyser->analyse(); }
/** * Create a new object that contains all the detected information * * @param array|string $headers Optional, an array with all of the headers or a string with just the User-Agent header * @param array $options Optional, an array with configuration options */ public function __construct($headers = null, $options = []) { parent::__construct(); if (!is_null($headers)) { $this->analyse($headers, $options); } }