]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Api/Mastodon/Card.php
Correct format/style errors
[friendica.git] / src / Object / Api / Mastodon / Card.php
index 4bd6c6e7697d152b35062124c667260a083f7c83..c4d21f66a32174afb708639fbb28c0f1bc80e497 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -52,6 +52,10 @@ class Card extends BaseDataTransferObject
        protected $height;
        /** @var string */
        protected $image;
+       /** @var string */
+       protected $blurhash;
+       /** @var array */
+       protected $history;
 
        /**
         * Creates a card record from an attachment array.
@@ -59,7 +63,7 @@ class Card extends BaseDataTransferObject
         * @param array   $attachment Attachment record
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public function __construct(array $attachment)
+       public function __construct(array $attachment, array $history = [])
        {
                $this->url           = $attachment['url'] ?? '';
                $this->title         = $attachment['title'] ?? '';
@@ -72,6 +76,8 @@ class Card extends BaseDataTransferObject
                $this->width         = $attachment['width'] ?? 0;
                $this->height        = $attachment['height'] ?? 0;
                $this->image         = $attachment['image'] ?? '';
+               $this->blurhash      = $attachment['blurhash'] ?? '';
+               $this->history       = $history;
        }
 
        /**