Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Model/Tick.php')
-rw-r--r--lib/Model/Tick.php33
1 files changed, 32 insertions, 1 deletions
diff --git a/lib/Model/Tick.php b/lib/Model/Tick.php
index 865bb86..bd7649d 100644
--- a/lib/Model/Tick.php
+++ b/lib/Model/Tick.php
@@ -187,4 +187,35 @@ class Tick {
return $this;
}
-} \ No newline at end of file
+
+ /**
+ * @param string $key
+ * @param string|int $value
+ *
+ * @return $this
+ */
+ public function setInfo($key, $value) {
+ $this->data[$key] = $value;
+
+ return $this;
+ }
+
+ public function unsetInfo($key) {
+ unset($this->data[$key]);
+ }
+
+ /**
+ * @param $key
+ * @param int|string $default
+ *
+ * @return int|string
+ */
+ public function getInfo($key, $default = '') {
+ if (!array_key_exists($key, $this->data)) {
+ return $default;
+ }
+
+ return $this->data[$key];
+
+ }
+}