getManufacturer() public method

Get the name of the manufacturer in a human readable format
public getManufacturer ( ) : string
return string
コード例 #1
0
ファイル: DeviceTest.php プロジェクト: whichbrowser/parser
 public function testSetWithoutIdentified()
 {
     $device = new Device();
     $device->set(['manufacturer' => 'Microsoft', 'model' => 'Xbox One']);
     $this->assertEquals('', $device->getManufacturer());
     $this->assertEquals('Xbox One', $device->getModel());
     $this->assertEquals(true, $device->generic);
 }
コード例 #2
0
 /**
  *
  * @param Model\Device               $device
  * @param \WhichBrowser\Model\Device $deviceRaw
  * @param WhichBrowserParser         $parser
  */
 private function hydrateDevice(Model\Device $device, \WhichBrowser\Model\Device $deviceRaw, WhichBrowserParser $parser)
 {
     $device->setModel($this->getRealResult($deviceRaw->getModel()));
     $device->setBrand($this->getRealResult($deviceRaw->getManufacturer()));
     $device->setType($this->getRealResult($parser->getType()));
     if ($parser->isMobile() === true) {
         $device->setIsMobile(true);
     }
 }