/** * update - Updates an existing message in the database. * @param MessageInterface $entity * @param String $where * @param String $tableName * @param HydratorInterface $hydrator */ protected function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { if (!$where) { $where = 'id = ' . $entity->getId(); } return parent::update($entity, $where, $tableName, $hydrator); }
/** * updateMessage * * @param MessageInterface $message * @return MessageInterface */ public function updateMessage(MessageInterface $message) { $message->setPostTime(new \DateTime()); return $this->messageMapper->persist($message); }