public function update() { if (!$this->createdAt) { $this->createdAt = R::isoDateTime(); } if ($this->bean->getMeta("tainted")) { $this->updatedAt = R::isoDateTime(); } }