summaryrefslogtreecommitdiff
path: root/src/RequestMessage.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/RequestMessage.php')
-rw-r--r--src/RequestMessage.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/RequestMessage.php b/src/RequestMessage.php
index 85b9786..dc28e4d 100644
--- a/src/RequestMessage.php
+++ b/src/RequestMessage.php
@@ -4,6 +4,7 @@ namespace jobd;
class RequestMessage extends Message {
+ protected $requestNo;
protected $requestType;
protected $requestData;
protected $password;
@@ -28,12 +29,27 @@ class RequestMessage extends Message {
}
/**
+ * @param int $no
+ */
+ public function setRequestNo(int $no) {
+ $this->requestNo = $no;
+ }
+
+ /**
* @return string[]
*/
protected function getContent(): array {
- $request = ['type' => $this->requestType];
+ $request = [
+ 'type' => $this->requestType,
+ 'no' => $this->requestNo,
+ ];
+
if (!is_null($this->requestData))
$request['data'] = $this->requestData;
+
+ if (!is_null($this->password))
+ $request['password'] = $this->password;
+
return $request;
}