コード例 #1
0
ファイル: Parser.php プロジェクト: zunygun/Legacy
 /**
  * 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();
 }
コード例 #2
0
ファイル: Parser.php プロジェクト: intelogie/parser
 /**
  * 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);
     }
 }