]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
first draft of hypermedia implementation
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index 937213b4477b85f294bf143529eaf38d032672e0..4f57eb0afcfbe993d211aab06041eb97a4866ea1 100644 (file)
@@ -4,17 +4,21 @@ namespace Wallabag\CoreBundle\Entity;
 
 use Doctrine\ORM\Mapping as ORM;
 use Symfony\Component\Validator\Constraints as Assert;
+use Hateoas\Configuration\Annotation as Hateoas;
+use JMS\Serializer\Annotation\XmlRoot;
 
 /**
  * Entry
  *
+ * @XmlRoot("entry")
  * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository")
  * @ORM\Table(name="entry")
  * @ORM\HasLifecycleCallbacks()
- *
+ * @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())")
  */
 class Entry
 {
+    /** @Serializer\XmlAttribute */
     /**
      * @var integer
      *