summaryrefslogtreecommitdiff
path: root/src/RequestMessage.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-04-13 02:14:53 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-04-13 02:14:53 +0300
commitd0fa8d6f63003a6cb2f1897158bc587ab2344ea3 (patch)
tree5a6c165e928354a59eea48030c5de51067d381e4 /src/RequestMessage.php
parent5272c5f541a75b2a7824df4264ad7e69c6e346fa (diff)
1.6.0: support signals
Diffstat (limited to 'src/RequestMessage.php')
-rw-r--r--src/RequestMessage.php60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/RequestMessage.php b/src/RequestMessage.php
deleted file mode 100644
index a2e196d..0000000
--- a/src/RequestMessage.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-namespace jobd;
-
-class RequestMessage extends Message {
-
- protected $requestNo;
- protected $requestType;
- protected $requestData;
- protected $password;
-
- /**
- * Request constructor.
- * @param string $request_type
- * @param null|array $request_data
- */
- public function __construct(string $request_type, $request_data = null)
- {
- parent::__construct(Message::REQUEST);
-
- $this->requestData = $request_data;
- $this->requestType = $request_type;
- }
-
- /**
- * @param string $password
- */
- public function setPassword(string $password)
- {
- $this->password = $password;
- }
-
- /**
- * @param int $no
- */
- public function setRequestNo(int $no)
- {
- $this->requestNo = $no;
- }
-
- /**
- * @return string[]
- */
- protected function getContent(): array
- {
- $request = [
- 'type' => $this->requestType,
- 'no' => $this->requestNo,
- ];
-
- if (!is_null($this->requestData))
- $request['data'] = (object)$this->requestData;
-
- if (!is_null($this->password))
- $request['password'] = $this->password;
-
- return $request;
- }
-
-} \ No newline at end of file