id; } /** * Set firstname * * @param string $firstname * * @return Author */ public function setFirstname($firstname) { $this->firstname = $firstname; return $this; } /** * Get firstname * * @return string */ public function getFirstname() { return $this->firstname; } /** * Set lastname * * @param string $lastname * * @return Author */ public function setLastname($lastname) { $this->lastname = $lastname; return $this; } /** * Get lastname * * @return string */ public function getLastname() { return $this->lastname; } /** * Constructor */ public function __construct() { $this->books = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Add book * * @param \AppBundle\Entity\Book $book * * @return Author */ public function addBook(\AppBundle\Entity\Book $book) { $this->books[] = $book; return $this; } /** * Remove book * * @param \AppBundle\Entity\Book $book */ public function removeBook(\AppBundle\Entity\Book $book) { $this->books->removeElement($book); } /** * Get books * * @return \Doctrine\Common\Collections\Collection */ public function getBooks() { return $this->books; } }