From dda6a6addc0fd54031514e81d2b55d5066b7157c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 11 May 2017 14:18:21 +0200 Subject: Added headers field in Entry --- src/Wallabag/CoreBundle/Entity/Entry.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index b71c467c..f0983b1c 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -201,6 +201,15 @@ class Entry */ private $httpStatus; + /** + * @var array + * + * @ORM\Column(name="headers", type="json_array", nullable=true) + * + * @Groups({"entries_for_user", "export_all"}) + */ + private $headers; + /** * @Exclude * @@ -716,7 +725,7 @@ class Entry } /** - * @return string + * @return array */ public function getPublishedBy() { @@ -734,4 +743,24 @@ class Entry return $this; } + + /** + * @return array + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * @param string $headers + * + * @return Entry + */ + public function setHeaders($headers) + { + $this->headers = $headers; + + return $this; + } } -- cgit v1.2.3 From 1517d5772db05ce86b9958dc6545471d8702bf60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 11 May 2017 14:53:56 +0200 Subject: Replaced json_array with array And fixed failing test due to @j0k3r :trollface: --- src/Wallabag/CoreBundle/Entity/Entry.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f0983b1c..08a67c34 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -133,7 +133,7 @@ class Entry /** * @var array * - * @ORM\Column(name="published_by", type="json_array", nullable=true) + * @ORM\Column(name="published_by", type="array", nullable=true) * * @Groups({"entries_for_user", "export_all"}) */ @@ -204,7 +204,7 @@ class Entry /** * @var array * - * @ORM\Column(name="headers", type="json_array", nullable=true) + * @ORM\Column(name="headers", type="array", nullable=true) * * @Groups({"entries_for_user", "export_all"}) */ @@ -733,7 +733,7 @@ class Entry } /** - * @param string $publishedBy + * @param array $publishedBy * * @return Entry */ @@ -753,7 +753,7 @@ class Entry } /** - * @param string $headers + * @param array $headers * * @return Entry */ -- cgit v1.2.3