UserAgentParser\Model\UserAgent::isMobile PHP Method

isMobile() public method

public isMobile ( ) : boolean
return boolean
    public function isMobile()
    {
        if ($this->getDevice()->getIsMobile() === true) {
            return true;
        }
        return false;
    }

Usage Example

 public function testIsMobile()
 {
     $ua = new UserAgent();
     $this->assertFalse($ua->isMobile());
     $ua->getDevice()->setIsMobile(false);
     $this->assertFalse($ua->isMobile());
     $ua->getDevice()->setIsMobile(true);
     $this->assertTrue($ua->isMobile());
 }