WhichBrowser\Model\Device::getModel PHP Method

getModel() public method

Get the name of the model in a human readable format
public getModel ( ) : string
return string
    public function getModel()
    {
        if ($this->identified) {
            return trim((!empty($this->model) ? $this->model . ' ' : '') . (!empty($this->series) ? $this->series : ''));
        }
        return !empty($this->model) ? $this->model : '';
    }

Usage Example

Example #1
0
 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);
 }
All Usage Examples Of WhichBrowser\Model\Device::getModel