/** * Schedules a modified object for persistence. * * @param object $object The modified object * @return void * @throws \TYPO3\FLOW3\Persistence\Exception\IllegalObjectTypeException * @api */ public function update($object) { if (!$object instanceof $this->objectType) { throw new \TYPO3\FLOW3\Persistence\Exception\IllegalObjectTypeException('The modified object given to update() was not of the type (' . $this->objectType . ') this repository manages.', 1249479625); } $this->persistenceManager->update($object); }
/** * Schedules a modified object for persistence. * * @param object $object The modified object * @throws \TYPO3\FLOW3\Persistence\Exception\IllegalObjectTypeException * @api */ public function update($object) { if (!is_object($object) || !$object instanceof $this->entityClassName) { $type = is_object($object) ? get_class($object) : gettype($object); throw new \TYPO3\FLOW3\Persistence\Exception\IllegalObjectTypeException('The value given to update() was ' . $type . ' , however the ' . get_class($this) . ' can only store ' . $this->entityClassName . ' instances.', 1249479625); } $this->persistenceManager->update($object); }