UserAgentParser\Model\UserAgent::isBot PHP Method

isBot() public method

public isBot ( ) : boolean
return boolean
    public function isBot()
    {
        if ($this->getBot()->getIsBot() === true) {
            return true;
        }
        return false;
    }

Usage Example

Exemplo n.º 1
0
 public function testIsBot()
 {
     $ua = new UserAgent();
     $this->assertFalse($ua->isBot());
     $ua->getBot()->setIsBot(false);
     $this->assertFalse($ua->isBot());
     $ua->getBot()->setIsBot(true);
     $this->assertTrue($ua->isBot());
 }