diff options
Diffstat (limited to 'lib/Db/Item.php')
-rw-r--r-- | lib/Db/Item.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php index abfcf6506..6ae0d7975 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -63,6 +63,8 @@ class Item extends Entity implements IAPI, \JsonSerializable protected $unread = false; /** @var bool */ protected $starred = false; + /** @var string|null */ + protected $tags; public function __construct() { @@ -85,6 +87,7 @@ class Item extends Entity implements IAPI, \JsonSerializable $this->addType('fingerprint', 'string'); $this->addType('unread', 'boolean'); $this->addType('starred', 'boolean'); + $this->addType('tags', 'string'); } /** @@ -276,6 +279,14 @@ class Item extends Entity implements IAPI, \JsonSerializable } /** + * @return null|string + */ + public function getTags(): ?string + { + return $this->tags; + } + + /** * Turns entity attributes into an array */ public function jsonSerialize(): array @@ -505,6 +516,16 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this; } + public function setTags(string $tags): self + { + if ($this->tags !== $tags) { + $this->tags = $tags; + $this->markFieldUpdated('tags'); + } + + return $this; + } + public function toAPI(): array { return [ |