toArray() public method

public toArray ( $includeResultRaw = false ) : array
return array
 protected function assertProviderResult($result, array $expectedResult)
 {
     $this->assertInstanceOf('UserAgentParser\\Model\\UserAgent', $result);
     $model = new UserAgent();
     $expectedResult = array_merge($model->toArray(), $expectedResult);
     $this->assertEquals($result->toArray(), $expectedResult);
 }
 public function testToArray()
 {
     $ua = new UserAgent();
     $this->assertEquals(['browser' => $ua->getBrowser()->toArray(), 'renderingEngine' => $ua->getRenderingEngine()->toArray(), 'operatingSystem' => $ua->getOperatingSystem()->toArray(), 'device' => $ua->getDevice()->toArray(), 'bot' => $ua->getBot()->toArray()], $ua->toArray());
     $this->assertEquals(['browser' => $ua->getBrowser()->toArray(), 'renderingEngine' => $ua->getRenderingEngine()->toArray(), 'operatingSystem' => $ua->getOperatingSystem()->toArray(), 'device' => $ua->getDevice()->toArray(), 'bot' => $ua->getBot()->toArray(), 'providerResultRaw' => null], $ua->toArray(true));
 }
function hydrateResult(array $row2, \UserAgentParser\Model\UserAgent $result)
{
    $toHydrate = ['resBrowserName' => $result->getBrowser()->getName(), 'resBrowserVersion' => $result->getBrowser()->getVersion()->getComplete(), 'resEngineName' => $result->getRenderingEngine()->getName(), 'resEngineVersion' => $result->getRenderingEngine()->getVersion()->getComplete(), 'resOsName' => $result->getOperatingSystem()->getName(), 'resOsVersion' => $result->getOperatingSystem()->getVersion()->getComplete(), 'resDeviceModel' => $result->getDevice()->getModel(), 'resDeviceBrand' => $result->getDevice()->getBrand(), 'resDeviceType' => $result->getDevice()->getType(), 'resDeviceIsMobile' => $result->getDevice()->getIsMobile(), 'resDeviceIsTouch' => $result->getDevice()->getIsTouch(), 'resBotIsBot' => $result->getBot()->getIsBot(), 'resBotName' => $result->getBot()->getName(), 'resBotType' => $result->getBot()->getType(), 'resRawResult' => serialize($result->toArray(true)['providerResultRaw'])];
    return array_merge($row2, $toHydrate);
}