| @@ 28-37 (lines=10) @@ | ||
| 25 | * | |
| 26 | * @throws \Sinergi\BrowserDetector\InvalidArgumentException | |
| 27 | */ | |
| 28 | public function __construct($userAgent = null) | |
| 29 |     { | |
| 30 |         if ($userAgent instanceof UserAgent) { | |
| 31 | $this->setUserAgent($userAgent); | |
| 32 |         } elseif (null === $userAgent || is_string($userAgent)) { | |
| 33 | $this->setUserAgent(new UserAgent($userAgent)); | |
| 34 |         } else { | |
| 35 | throw new InvalidArgumentException(); | |
| 36 | } | |
| 37 | } | |
| 38 | ||
| 39 | /** | |
| 40 | * @param UserAgent $userAgent | |
| @@ 56-65 (lines=10) @@ | ||
| 53 | * | |
| 54 | * @throws \Sinergi\BrowserDetector\InvalidArgumentException | |
| 55 | */ | |
| 56 | public function __construct($userAgent = null) | |
| 57 |     { | |
| 58 |         if ($userAgent instanceof UserAgent) { | |
| 59 | $this->setUserAgent($userAgent); | |
| 60 |         } elseif (null === $userAgent || is_string($userAgent)) { | |
| 61 | $this->setUserAgent(new UserAgent($userAgent)); | |
| 62 |         } else { | |
| 63 | throw new InvalidArgumentException(); | |
| 64 | } | |
| 65 | } | |
| 66 | ||
| 67 | /** | |
| 68 | * Return the name of the OS. | |
| @@ 94-103 (lines=10) @@ | ||
| 91 | * | |
| 92 | * @throws \Sinergi\BrowserDetector\InvalidArgumentException | |
| 93 | */ | |
| 94 | public function __construct($userAgent = null) | |
| 95 |     { | |
| 96 |         if ($userAgent instanceof UserAgent) { | |
| 97 | $this->setUserAgent($userAgent); | |
| 98 |         } elseif (null === $userAgent || is_string($userAgent)) { | |
| 99 | $this->setUserAgent(new UserAgent($userAgent)); | |
| 100 |         } else { | |
| 101 | throw new InvalidArgumentException(); | |
| 102 | } | |
| 103 | } | |
| 104 | ||
| 105 | /** | |
| 106 | * Set the name of the Browser. | |
| @@ 80-89 (lines=10) @@ | ||
| 77 | */ | |
| 78 | private $url; | |
| 79 | ||
| 80 | public function __construct($userAgent = null) | |
| 81 |     { | |
| 82 |         if ($userAgent instanceof UserAgent) { | |
| 83 | $this->setUserAgent($userAgent); | |
| 84 |         } elseif (null === $userAgent || is_string($userAgent)) { | |
| 85 | $this->setUserAgent(new UserAgent($userAgent)); | |
| 86 |         } else { | |
| 87 | throw new InvalidArgumentException(); | |
| 88 | } | |
| 89 | } | |
| 90 | ||
| 91 | /** | |
| 92 | * Set the name of the ScriptedAgent. | |