summaryrefslogtreecommitdiffstats
path: root/lib/Model
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-04-08 20:36:40 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-05-03 16:31:15 -0100
commit0f714cfda1fae9c8c1d9703fd7cc1a1070b5b1b2 (patch)
treeddf0d11d97439506c6c5a2ff6c38a2a2522508e4 /lib/Model
parenta39d22353532703403ae2c15012c8bac68e939ca (diff)
cleaning Actions
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/StreamAction.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/Model/StreamAction.php b/lib/Model/StreamAction.php
index af34db46..eb6c3098 100644
--- a/lib/Model/StreamAction.php
+++ b/lib/Model/StreamAction.php
@@ -63,8 +63,13 @@ class StreamAction implements JsonSerializable {
/**
* StreamAction constructor.
+ *
+ * @param string $actorId
+ * @param string $streamId
*/
- public function __construct() {
+ public function __construct(string $actorId = '', string $streamId = '') {
+ $this->actorId = $actorId;
+ $this->streamId = $streamId;
}
@@ -143,6 +148,14 @@ class StreamAction implements JsonSerializable {
/**
* @param string $key
+ * @param bool $value
+ */
+ public function updateValueBool(string $key, bool $value) {
+ $this->values[$key] = $value;
+ }
+
+ /**
+ * @param string $key
*
* @return bool
*/
@@ -169,6 +182,15 @@ class StreamAction implements JsonSerializable {
}
/**
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function getValueBool(string $key): bool {
+ return $this->values[$key];
+ }
+
+ /**
* @return array
*/
public function getValues(): array {