Skip to content

Commit

Permalink
Merge pull request #12 from KunX/LQLandOperator
Browse files Browse the repository at this point in the history
Creating function for using And on LQL
  • Loading branch information
aashley committed Mar 28, 2016
2 parents 4ee1281 + c11b664 commit 85f7963
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Nagios/Livestatus/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ public function lor($or)
$this->query .= "Or: " . $or. "\n";
return $this;
}

public function and($and)
{
if (!is_int($and)) {
throw new InvalidArgumentException("An integer must be supplied.");
}

$this->query .= "And: " . $and. "\n";
return $this;
}

public function negate()
{
Expand Down

0 comments on commit 85f7963

Please sign in to comment.