getUserAgents() public method

public getUserAgents ( ) : array
return array
Esempio n. 1
0
 /**
  * tests setter and getter
  *
  * @group data
  * @group sourcetest
  */
 public function testGetter()
 {
     $name = 'TestName';
     $sortIndex = 42;
     $userAgents = ['abc' => 'def'];
     $versions = [1, 2, 3];
     $object = new Division($name, $sortIndex, $userAgents, true, false, $versions);
     self::assertSame($name, $object->getName());
     self::assertSame($sortIndex, $object->getSortIndex());
     self::assertSame($userAgents, $object->getUserAgents());
     self::assertTrue($object->isLite());
     self::assertFalse($object->isStandard());
     self::assertSame($versions, $object->getVersions());
 }
Esempio n. 2
0
 /**
  * Render a single division
  *
  * @param \Browscap\Data\Division $division
  * @param string                  $divisionName
  *
  * @return array
  */
 private function parseDivision(Division $division, $divisionName)
 {
     $output = array();
     foreach ($division->getUserAgents() as $uaData) {
         $output = array_merge($output, $this->parseUserAgent($uaData, $division->isLite(), $division->isStandard(), $division->getSortIndex(), $divisionName));
     }
     return $output;
 }
Esempio n. 3
0
 /**
  * tests setter and getter for useragents
  *
  * @group data
  * @group sourcetest
  */
 public function testSetGetUserAgents()
 {
     $userAgents = array('abc' => 'def');
     self::assertSame($this->object, $this->object->setUserAgents($userAgents));
     self::assertSame($userAgents, $this->object->getUserAgents());
 }