public function setSessionClosedReason($reason) { if (!is_numeric($reason)) { throw new InvalidIntegerArgumentException("\$status have to be non zero integer"); } if (!in_array($reason, ChatSessionManager::getConstsArray("CLOSED_REASON"))) { throw new InvalidIntegerArgumentException("Invalid \$status specified"); } $this->qb->andWhere($this->qb->expr()->equal(new Field("closed_reason", "chat_sess"), $reason)); return $this; }