WhichBrowser\Model\Device::getCarrier PHP Method

getCarrier() public method

Get the name of the carrier in a human readable format
public getCarrier ( ) : string
return string
    public function getCarrier()
    {
        return $this->identified && !empty($this->carrier) ? $this->carrier : '';
    }

Usage Example

Example #1
0
 public function testCarrier()
 {
     $device = new Device();
     $device->setIdentification(['manufacturer' => 'NEC', 'model' => 'N2002', 'carrier' => 'DoCoMo']);
     $this->assertEquals('DoCoMo', $device->getCarrier());
     $this->assertEquals('DoCoMo', $device->carrier);
     $this->assertEquals(false, $device->generic);
 }