$this->emojis = [];
$this->card = $card->toArray() ?: null;
$this->poll = $poll;
- $this->friendica = new FriendicaExtension($item['title'], $counts->dislikes);
+ $this->friendica = $friendica;
}
+ /**
+ * Returns the current created_at DateTime as an integer timestamp
+ * @return int
+ * @throws \Exception
+ */
+ public function createdAtTimestamp(): int
+ {
+ $result = strtotime($this->created_at);
+ if (!$result) {
+ throw new \Exception('Unknown date-time format');
+ }
+
+ return $result;
+ }
+
/**
* Returns the current entity as an array
*