categories = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set title. * * @param string $title * * @return Book */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title. * * @return string */ public function getTitle() { return $this->title; } /** * Set pages. * * @param int $pages * * @return Book */ public function setPages($pages) { $this->pages = $pages; return $this; } /** * Get pages. * * @return int */ public function getPages() { return $this->pages; } /** * Set publishedAt. * * @param \DateTime $publishedAt * * @return Book */ public function setPublishedAt($publishedAt) { $this->publishedAt = $publishedAt; return $this; } /** * Get publishedAt. * * @return \DateTime */ public function getPublishedAt() { return $this->publishedAt; } /** * Add category * * @param \AppBundle\Entity\Category $category * * @return Book */ public function addCategory(\AppBundle\Entity\Category $category) { $this->categories[] = $category; return $this; } /** * Remove category * * @param \AppBundle\Entity\Category $category */ public function removeCategory(\AppBundle\Entity\Category $category) { $this->categories->removeElement($category); } /** * Get categories * * @return \Doctrine\Common\Collections\Collection */ public function getCategories() { return $this->categories; } /** * Set author * * @param \AppBundle\Entity\Author $author * * @return Book */ public function setAuthor(\AppBundle\Entity\Author $author = null) { $this->author = $author; return $this; } /** * Get author * * @return \AppBundle\Entity\Author */ public function getAuthor() { return $this->author; } }