]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
Few fixes
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index f0983b1c0ff95f58434098f6f0a5b6d8c22ce1d9..a0503c3918170dfbb9fc8bb29a0e8a4f22f72f4c 100644 (file)
@@ -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"})
      */
@@ -550,7 +550,7 @@ class Entry
     }
 
     /**
-     * @return ArrayCollection<Tag>
+     * @return ArrayCollection
      */
     public function getTags()
     {
@@ -685,7 +685,22 @@ class Entry
     }
 
     /**
-     * @return int
+     * Used in the entries filter so it's more explicit for the end user than the uid.
+     * Also used in the API.
+     *
+     * @VirtualProperty
+     * @SerializedName("is_public")
+     * @Groups({"entries_for_user"})
+     *
+     * @return bool
+     */
+    public function isPublic()
+    {
+        return null !== $this->uid;
+    }
+
+    /**
+     * @return string
      */
     public function getHttpStatus()
     {
@@ -693,7 +708,7 @@ class Entry
     }
 
     /**
-     * @param int $httpStatus
+     * @param string $httpStatus
      *
      * @return Entry
      */
@@ -733,7 +748,7 @@ class Entry
     }
 
     /**
-     * @param string $publishedBy
+     * @param array $publishedBy
      *
      * @return Entry
      */
@@ -753,7 +768,7 @@ class Entry
     }
 
     /**
-     * @param string $headers
+     * @param array $headers
      *
      * @return Entry
      */