From 905ae369bd0238cc24c3c4e0ac60d578d30b54bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 5 Feb 2015 22:33:36 +0100 Subject: normalize entries fields --- src/Wallabag/CoreBundle/Entity/Entries.php | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/Wallabag/CoreBundle/Entity') diff --git a/src/Wallabag/CoreBundle/Entity/Entries.php b/src/Wallabag/CoreBundle/Entity/Entries.php index ab5b859b..f06a2940 100644 --- a/src/Wallabag/CoreBundle/Entity/Entries.php +++ b/src/Wallabag/CoreBundle/Entity/Entries.php @@ -42,16 +42,16 @@ class Entries /** * @var boolean * - * @ORM\Column(name="is_read", type="boolean", nullable=true, options={"default" = false}) + * @ORM\Column(name="is_archived", type="boolean", nullable=true, options={"default" = false}) */ - private $isRead = false; + private $isArchived = false; /** * @var boolean * - * @ORM\Column(name="is_fav", type="boolean", nullable=true, options={"default" = false}) + * @ORM\Column(name="is_starred", type="boolean", nullable=true, options={"default" = false}) */ - private $isFav = false; + private $isStarred = false; /** * @var boolean @@ -180,61 +180,61 @@ class Entries } /** - * Set isRead + * Set isArchived * - * @param string $isRead + * @param string $isArchived * @return Entries */ - public function setRead($isRead) + public function setArchived($isArchived) { - $this->isRead = $isRead; + $this->isArchived = $isArchived; return $this; } /** - * Get isRead + * Get isArchived * * @return string */ - public function isRead() + public function isArchived() { - return $this->isRead; + return $this->isArchived; } public function toggleArchive() { - $this->isRead = $this->getIsRead() ^ 1; + $this->isArchived = $this->isArchived() ^ 1; return $this; } /** - * Set isFav + * Set isStarred * - * @param string $isFav + * @param string $isStarred * @return Entries */ - public function setFav($isFav) + public function setStarred($isStarred) { - $this->isFav = $isFav; + $this->isStarred = $isStarred; return $this; } /** - * Get isFav + * Get isStarred * * @return string */ - public function isFav() + public function isStarred() { - return $this->isFav; + return $this->isStarred; } public function toggleStar() { - $this->isFav = $this->getIsFav() ^ 1; + $this->isStarred = $this->isStarred() ^ 1; return $this; } -- cgit v1.2.3 From be463487cc195026b11e92f1d6d6276f5851b97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 6 Feb 2015 07:45:32 +0100 Subject: rename Entries to Entry --- src/Wallabag/CoreBundle/Entity/Entries.php | 417 ----------------------------- src/Wallabag/CoreBundle/Entity/Entry.php | 412 ++++++++++++++++++++++++++++ 2 files changed, 412 insertions(+), 417 deletions(-) delete mode 100644 src/Wallabag/CoreBundle/Entity/Entries.php create mode 100644 src/Wallabag/CoreBundle/Entity/Entry.php (limited to 'src/Wallabag/CoreBundle/Entity') diff --git a/src/Wallabag/CoreBundle/Entity/Entries.php b/src/Wallabag/CoreBundle/Entity/Entries.php deleted file mode 100644 index f06a2940..00000000 --- a/src/Wallabag/CoreBundle/Entity/Entries.php +++ /dev/null @@ -1,417 +0,0 @@ -id; - } - - /** - * Set title - * - * @param string $title - * @return Entries - */ - public function setTitle($title) - { - $this->title = $title; - - return $this; - } - - /** - * Get title - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Set url - * - * @param string $url - * @return Entries - */ - public function setUrl($url) - { - $this->url = $url; - - return $this; - } - - /** - * Get url - * - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Set isArchived - * - * @param string $isArchived - * @return Entries - */ - public function setArchived($isArchived) - { - $this->isArchived = $isArchived; - - return $this; - } - - /** - * Get isArchived - * - * @return string - */ - public function isArchived() - { - return $this->isArchived; - } - - public function toggleArchive() - { - $this->isArchived = $this->isArchived() ^ 1; - - return $this; - } - - /** - * Set isStarred - * - * @param string $isStarred - * @return Entries - */ - public function setStarred($isStarred) - { - $this->isStarred = $isStarred; - - return $this; - } - - /** - * Get isStarred - * - * @return string - */ - public function isStarred() - { - return $this->isStarred; - } - - public function toggleStar() - { - $this->isStarred = $this->isStarred() ^ 1; - - return $this; - } - - /** - * Set content - * - * @param string $content - * @return Entries - */ - public function setContent($content) - { - $this->content = $content; - - return $this; - } - - /** - * Get content - * - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Set userId - * - * @param string $userId - * @return Entries - */ - public function setUserId($userId) - { - $this->userId = $userId; - - return $this; - } - - /** - * Get userId - * - * @return string - */ - public function getUserId() - { - return $this->userId; - } - - /** - * @return string - */ - public function isDeleted() - { - return $this->isDeleted; - } - - /** - * @param string $isDeleted - */ - public function setDeleted($isDeleted) - { - $this->isDeleted = $isDeleted; - } - - /** - * @return mixed - */ - public function getCreatedAt() - { - return $this->createdAt; - } - - /** - * @param mixed $createdAt - * @ORM\PrePersist - */ - public function setCreatedAt() - { - $this->createdAt = new \DateTime(); - } - - /** - * @return string - */ - public function getUpdatedAt() - { - return $this->updatedAt; - } - - /** - * @param string $updatedAt - * @ORM\PreUpdate - */ - public function setUpdatedAt() - { - $this->updatedAt = new \DateTime(); - } - - /** - * @return string - */ - public function getComments() - { - return $this->comments; - } - - /** - * @param string $comments - */ - public function setComments($comments) - { - $this->comments = $comments; - } - - /** - * @return string - */ - public function getMimetype() - { - return $this->mimetype; - } - - /** - * @param string $mimetype - */ - public function setMimetype($mimetype) - { - $this->mimetype = $mimetype; - } - - /** - * @return int - */ - public function getReadingTime() - { - return $this->readingTime; - } - - /** - * @param int $readingTime - */ - public function setReadingTime($readingTime) - { - $this->readingTime = $readingTime; - } - - /** - * @return string - */ - public function getDomainName() - { - return $this->domainName; - } - - /** - * @param string $domainName - */ - public function setDomainName($domainName) - { - $this->domainName = $domainName; - } - - /** - * @return boolean - */ - public function isPublic() - { - return $this->isPublic; - } - - /** - * @param boolean $isPublic - */ - public function setPublic($isPublic) - { - $this->isPublic = $isPublic; - } -} diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php new file mode 100644 index 00000000..70c1dc08 --- /dev/null +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -0,0 +1,412 @@ +id; + } + + /** + * Set title + * + * @param string $title + * @return Entry + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get title + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set url + * + * @param string $url + * @return Entry + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * Get url + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set isArchived + * + * @param string $isArchived + * @return Entry + */ + public function setArchived($isArchived) + { + $this->isArchived = $isArchived; + + return $this; + } + + /** + * Get isArchived + * + * @return string + */ + public function isArchived() + { + return $this->isArchived; + } + + public function toggleArchive() + { + $this->isArchived = $this->isArchived() ^ 1; + + return $this; + } + + /** + * Set isStarred + * + * @param string $isStarred + * @return Entry + */ + public function setStarred($isStarred) + { + $this->isStarred = $isStarred; + + return $this; + } + + /** + * Get isStarred + * + * @return string + */ + public function isStarred() + { + return $this->isStarred; + } + + public function toggleStar() + { + $this->isStarred = $this->isStarred() ^ 1; + + return $this; + } + + /** + * Set content + * + * @param string $content + * @return Entry + */ + public function setContent($content) + { + $this->content = $content; + + return $this; + } + + /** + * Get content + * + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Set userId + * + * @param string $userId + * @return Entry + */ + public function setUserId($userId) + { + $this->userId = $userId; + + return $this; + } + + /** + * Get userId + * + * @return string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * @return string + */ + public function isDeleted() + { + return $this->isDeleted; + } + + /** + * @param string $isDeleted + */ + public function setDeleted($isDeleted) + { + $this->isDeleted = $isDeleted; + } + + /** + * @return mixed + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + * @return string + */ + public function getUpdatedAt() + { + return $this->updatedAt; + } + + /** + * @ORM\PrePersist + * @ORM\PreUpdate + */ + public function timestamps() + { + if (is_null($this->createdAt)) { + $this->createdAt = new \DateTime(); + } + + $this->updatedAt = new \DateTime(); + } + + /** + * @return string + */ + public function getComments() + { + return $this->comments; + } + + /** + * @param string $comments + */ + public function setComments($comments) + { + $this->comments = $comments; + } + + /** + * @return string + */ + public function getMimetype() + { + return $this->mimetype; + } + + /** + * @param string $mimetype + */ + public function setMimetype($mimetype) + { + $this->mimetype = $mimetype; + } + + /** + * @return int + */ + public function getReadingTime() + { + return $this->readingTime; + } + + /** + * @param int $readingTime + */ + public function setReadingTime($readingTime) + { + $this->readingTime = $readingTime; + } + + /** + * @return string + */ + public function getDomainName() + { + return $this->domainName; + } + + /** + * @param string $domainName + */ + public function setDomainName($domainName) + { + $this->domainName = $domainName; + } + + /** + * @return boolean + */ + public function isPublic() + { + return $this->isPublic; + } + + /** + * @param boolean $isPublic + */ + public function setPublic($isPublic) + { + $this->isPublic = $isPublic; + } +} -- cgit v1.2.3