src/ORM/FieldType/DBComposite.php
public function setField($field, $value, $markChanged = true)
    {
        $this->objCacheClear();

        // Non-db fields get assigned as normal properties
        if (!$this->hasField($field)) {
            parent::setField($field, $value);

            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;
    }
public function setField($field, $value, $markChanged = true)
    {
        $this->objCacheClear();

        // Non-db fields get assigned as normal properties
        if (!$this->hasField($field)) {
            parent::setField($field, $value);

            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;
    }
public function setField ( $ field , $ value , $ markChanged = true ) { $ this -> objCacheClear ( ) ; // Non-db fields get assigned as normal properties if ( ! $ this -> hasField ( $ field ) ) { parent :: setField ( $ field , $ value ) ; 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 ; }
Set value of a single composite field

@param string $field
@param mixed $value
@param bool $markChanged
@return $this
Set value of a single composite field