Populates the specified field of the given object.

@param DataObject $object
@param string $name
@param mixed $value

@return void
349751
public function populateField(DataObject $object, $name, $value)
    {
        // Detect Value Type:
        
        if (is_array($value) && $object->hasField($name)) {
            
            // Handle Array Value:
            
            if ($object->dbObject($name) instanceof DBComposite) {
                
                // Handle Composite Field:
                
                foreach ($value as $k => $v) {
                    $object->dbObject($name)->setField($k, $this->processValue($v));
                }
                
            } else {
                
                // Handle Regular Field (JSON-encode):
                
                $object->setField($name, $this->processArray($value, true));
                
            }
            
        } else {
            
            // Handle Regular Value:
            
            $object->setField($name, $this->processValue($value));
            
        }
    }
1091526
protected function setProperty(&$object, $name, $value)
    {
        $property = $this->getPropertyInstance($object, $name);
        $oldValue = $property->getValue($object);
        $property->setValue($object, $value);

        return $oldValue;
    }
491614
public function set($object, $key, $value)
    {
        $object->set($this->local, $value->{$this->foreign});
    }
1042045
public function set($name, $value)
    {
        $name = $this->parseName($name);
        ObjectArrayHelper::set($this->data, $name, $value);
        $this->isChanged = true;
    }
498251
public function set($name, $value)
    {
        if (!$value instanceof Data && !$value instanceof DataSet) {
            $value = new Data($value);
        }

        if ($name !== null) {
            $this->data[$name] = $value;
        } else {
            array_push($this->data, $value);
        }

        return $this;
    }
987181
public function isField(DataObject $object, $name)
    {
        return (
            !$this->isRelation($object, $name) &&
            !$this->isObject($object, $name) &&
            !$this->isChild($object, $name)
        );
    }
651391
private function dumpObject($value, $name): void
  {
    list($id, $ref) = $this->isReference($value);

    if ($ref===null)
    {
      $this->writer->writeObjectOpen($id, $name, get_class($value));

      // Dump all fields of the object, unless the object is me.
      if ($this!==$value)
      {
        $reflect    = new \ReflectionClass($value);
        $properties = $reflect->getProperties();

        if (strpos(get_class($value), '\\')!==false)
        {
          foreach ($properties as $property)
          {
            $propertyName = $property->getName();
            if ($property->isStatic())
            {
              $propertyValue = &self::getStaticProperty($value, $propertyName);
            }
            else
            {
              $propertyValue = &self::getProperty($value, $propertyName);
            }

            $this->recursiveDump($propertyValue, $propertyName);
          }
        }
        elseif (get_class($value)=='stdClass')
        {
          foreach ($value as $propertyName => $propertyValue)
          {
            $this->recursiveDump($propertyValue, $propertyName);
          }
        }
      }

      $this->writer->writeObjectClose($id, $name, get_class($value));
    }
    else
    {
      $this->writer->writeObjectReference($ref, $name, get_class($value));
    }
  }
1092077
protected function _setField($name, $value)
    {
        // e.g. consumerBillingFirstname
        $this->_consumerData[self::$PREFIX . $name] = (string) $value;
    }
760728
protected function setProperty($object, $name)
    {
        $this->loadPropertyTypes();
        if (empty($this->restrictedProperties) && $this->frozen) {
            $this->restrictedProperties = $this->getRestrictedProperties(get_class());
        }
        if ($name) {
            $this->assignProperty($name, $object);
        } else {
            $objectClass = get_class($object);
            $match = null;
            foreach ($this->propertyTypes as $name => $type) {
                if ($object instanceof $type) {
                    if ($match) {
                        throw new \FW\DI\Exception("You must specify a name for the property of type $objectClass,
                        since at least two parameters ($match and $name) share the same class");
                    }
                    $match = $name;
                }
            }
            if (!$match) {
                // We gave an unused class in the DI, it doesn't serve any purpose but it won't break the build
                trigger_error("Object of class $objectClass given to " . get_class() . " but it seems unused.", E_USER_WARNING);
            } else {
                $this->assignProperty($match, $object);
            }
        }
        return $this;
    }
583775
public function addField(string $name, string $value) : void
    {
        $this->fields[$name][] = $value;
    }
1066419
public function set($name, $value)
    {
        $this->helper()->arr()->set($this->object, $name, $value);
    }
1232629
public function assign($name, $value = '')
    {
        if (is_array($name)) {
            $this->data = array_merge($this->data, $name);
        } else {
            $this->data[$name] = $value;
        }
    }
420711
protected function setInaccessibleProperty($object, $name, $value)
    {
        $property = $this->getProperty($object, $name);
        $property->setAccessible(true);
        $property->setValue(is_object($object) ? $object : null, $value);
    }
228669
public function bind($name, $obj = null)
    {
        if (is_array($name)) {
            $this->bind = array_merge($this->bind, $name);
        } else {
            $this->bind[$name] = $obj;
        }
    }
1343369
public function setField($name, $key, $value)
    {
        if (!array_key_exists($name, $this->fields)) {
            $this->fields[$name] = [];
        }
        $this->fields[$name][$key] = $value;
    }
402153
public function isHasManyRelation(DataObject $object, $name)
    {
        return (boolean) $this->getSchema()->hasManyComponent($object, $name);
    }
161306
protected function setValue($object, $value, $setter)
    {
        if (method_exists($object, $setter)) {
            $object->$setter($value);
        }
    }