Browscap\Data\DataCollection::getDivisions PHP Method

getDivisions() public method

Get the divisions array containing UA data
public getDivisions ( ) : Division[]
return Division[]
    public function getDivisions()
    {
        $this->sortDivisions();
        return $this->divisions;
    }

Usage Example

 /**
  * checks if a source file is added successful
  *
  * @group data
  * @group sourcetest
  */
 public function testAddSourceFileOkWithLiteAndVersions()
 {
     $this->object->addSourceFile(__DIR__ . '/../../fixtures/ua/test2.json');
     $divisions = $this->object->getDivisions();
     self::assertInternalType('array', $divisions);
     self::assertArrayHasKey(0, $divisions);
     self::assertInstanceOf('\\Browscap\\Data\\Division', $divisions[0]);
 }