/** * Set value of a single composite field * * @param string $field * @param mixed $value * @param bool $markChanged * @return $this */ public function setField($field, $value, $markChanged = true) { $this->objCacheClear(); // Skip non-db fields if (!$this->hasField($field)) { return $this; } // Set changed if ($markChanged) { $this->isChanged = true; } // Set bound object if ($this->record instanceof DataObject) { $key = $this->getName() . $field; $this->record->setField($key, $value); return $this; } // Set local record $this->record[$field] = $value; return $this; }