From 4dc872238a61f33c886c423c5812cc578b3b1cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 26 Feb 2016 13:59:08 +0100 Subject: Rename CommentBundle with AnnotationBundle --- .../AnnotationBundle/Entity/Annotation.php | 270 +++++++++++++++++++++ 1 file changed, 270 insertions(+) create mode 100644 src/Wallabag/AnnotationBundle/Entity/Annotation.php (limited to 'src/Wallabag/AnnotationBundle/Entity') diff --git a/src/Wallabag/AnnotationBundle/Entity/Annotation.php b/src/Wallabag/AnnotationBundle/Entity/Annotation.php new file mode 100644 index 00000000..db9590b0 --- /dev/null +++ b/src/Wallabag/AnnotationBundle/Entity/Annotation.php @@ -0,0 +1,270 @@ +user = $user; + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set text. + * + * @param string $text + * + * @return Annotation + */ + public function setText($text) + { + $this->text = $text; + + return $this; + } + + /** + * Get text. + * + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * @ORM\PrePersist + * @ORM\PreUpdate + */ + public function timestamps() + { + if (is_null($this->createdAt)) { + $this->createdAt = new \DateTime(); + } + $this->updatedAt = new \DateTime(); + } + + /** + * Get created. + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + * Get updated. + * + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->updatedAt; + } + + /** + * Get quote. + * + * @return string + */ + public function getQuote() + { + return $this->quote; + } + + /** + * Set quote. + * + * @param string $quote + * + * @return Annotation + */ + public function setQuote($quote) + { + $this->quote = $quote; + + return $this; + } + + /** + * Get ranges. + * + * @return array + */ + public function getRanges() + { + return $this->ranges; + } + + /** + * Set ranges. + * + * @param array $ranges + * + * @return Annotation + */ + public function setRanges($ranges) + { + $this->ranges = $ranges; + + return $this; + } + + /** + * Set user. + * + * @param string $user + * + * @return Annotation + */ + public function setUser($user) + { + $this->user = $user; + + return $this; + } + + /** + * Get user. + * + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * @VirtualProperty + * @SerializedName("user") + */ + public function getUserName() + { + return $this->user->getName(); + } + + /** + * Set entry. + * + * @param Entry $entry + * + * @return Annotation + */ + public function setEntry($entry) + { + $this->entry = $entry; + $entry->setAnnotation($this); + + return $this; + } + + /** + * Get entry. + * + * @return Entry + */ + public function getEntry() + { + return $this->entry; + } + + /** + * @VirtualProperty + * @SerializedName("annotator_schema_version") + */ + public function getVersion() + { + return 'v1.0'; + } +} -- cgit v1.2.3