public function add($message, $target) { if ($this->seqId >= 5000) { throw new Exception("Can not add over 5000 message once! Please call submit() first."); } else { $this->seqId += 1; $innerMsg = new SingleBatchItem(); $innerMsg->set_seqId($this->seqId); $innerMsg->set_data($this->createSingleJson($message, $target)); array_push($this->innerMsgList, $innerMsg); } return $this->seqId . ""; }