/** * Constructor */ public function __construct($fname = '', $lname = '', $gender = '') { $this->setFirstname($fname); $this->setLastname($lname); $this->setGender($gender); parent::__construct(); }
/** * Is the given User the author of this product * * @return bool */ public function isAuthor(User $user) { if ($user->getId() === $this->getUser()->getId()) { return true; } return false; }