Browscap\Data\DataCollection::getPlatforms PHP Метод

getPlatforms() публичный Метод

Get the array of platform data
public getPlatforms ( ) : Platform[]
Результат Platform[]
    public function getPlatforms()
    {
        return $this->platforms;
    }

Usage Example

Пример #1
0
 /**
  * tests getting an exiting platform
  *
  * @group data
  * @group sourcetest
  */
 public function testGetPlatform()
 {
     $this->object->addPlatformsFile($this->getPlatformsJsonFixture());
     self::assertInternalType('array', $this->object->getPlatforms());
     $platform = $this->object->getPlatform('Platform1');
     self::assertInstanceOf('\\Browscap\\Data\\Platform', $platform);
     $properties = $platform->getProperties();
     self::assertInternalType('array', $properties);
     self::assertArrayHasKey('Platform', $properties);
     self::assertSame('Platform1', $properties['Platform']);
 }