/** * Gets changes to original entity * * @return mixed */ public function getChanges() { if (null === $this->changes) { $this->changes = false; if ($this->entity && method_exists($this->entity, 'getChanges')) { $this->changes = $this->entity->getChanges(); // Reset changes if (method_exists($this->entity, 'resetChanges')) { $this->entity->resetChanges(); } } } return $this->changes; }
/** * Gets changes to original entity * * @return mixed */ public function getChanges() { return $this->entity && method_exists($this->entity, 'getChanges') ? $this->entity->getChanges() : false; }