Sets the data associated with the current iterator entry

@param Threaded $object
@param mixed $data
@return void
970813
public function setInfo(Threaded $object, $data)
    {
        foreach ($this->data as $key => $value) {
            if ($object->equals($value)) {
                $this->info[$key] = $data;
                break;
            }
        }
    }
254367
public static function cache_set($key, $object) {
		$handler = '\Skeleton\Object\Cache\Handler\\' . Config::$cache_handler;
		$handler::set($key, $object);
	}
563336
public function fill($object, array $data)
    {
        if (! $object instanceof ConversionInterface) {
            throw new InvalidArgumentException(sprintf(
                'Invalid object "%s" provided; must be an instance of "%s".',
                is_object($object) ? get_class($object) : gettype($object),
                ConversionInterface::CLASS
            ));
        }
        $object->fromArray($data);
    }
695447
public function set($key, $object) {
		
		if (! is_object($object)) {
			throw new \InvalidArgumentException("Registry only accepts objects, given: ".gettype($object));
		}
		
		$this->_data[$key] = $object;
		
		return $this;
	}
1351738
public function setObjects(array $objects)
    {
        foreach ($objects as $object) {
            $this->checkType(ObjectDataInterface::class, $object);
        }

        $this->objects = $objects;
    }
1285576
public function map($object, $data)
    {
        $object
            ->setId($data['OXID'])
            ->setRating($data['OXRATING'])
            ->setText($data['OXTEXT'])
            ->setObjectId($data['OXOBJECTID'])
            ->setUserId($data['OXUSERID'])
            ->setType($data['OXTYPE'])
            ->setCreatedAt($data['OXTIMESTAMP']);

        return $object;
    }
404128
public function SetData($Data) {
      if (is_object($Data) === TRUE) {
         // If this is a result object (/garden/library/database/class.dataset.php)
         // retrieve it's values as arrays
         if ($Data instanceof DataSet) {
            $ResultSet = $Data->ResultArray();
            if (count($ResultSet) > 0)
               $this->_DataArray = $ResultSet[0];
               
         } else {
            // Otherwise assume it is an object representation of a data row.
            $this->_DataArray = Gdn_Format::ObjectAsArray($Data);
         }
      } else if (is_array($Data)) {
         $this->_DataArray = $Data;
      }
   }
450670
public function setValues($object, $locale, array $data)
    {
        $propertyAccess = PropertyAccess::createPropertyAccessorBuilder()
            ->enableMagicCall()
            ->getPropertyAccessor();

        $structure = $object->getStructure();
        foreach ($data as $property => $value) {
            try {
                $propertyAccess->setValue($structure, $property, $value);
            } catch (\InvalidArgumentException $e) {
                //ignore not existing properties
            }
        }
    }
275338
public function performMappingOnObject(DataObject $object)
    {
        //By default, we already have our data mapped in the object (hopefully properly)
        //But we do need to convert things that may need converting
        foreach ($this->mapping as $field => $variable) {
            $modifier = false;
            $newField = $variable;

            if (strpos($variable, ':') !== false) {
                list($newField, $modifier) = explode(':', $variable);
                $object->$newField = $this->getMappedValue($object, $newField, $variable);
            }
        }
    }
346352
public static function set(&$object, $name, $value)
    {
        $names = explode('.', $name);
        $lastName = array_pop($names);
        $data = &$object;
        foreach ($names as $nameItem)
        {
            if(is_array($data))
            {
                if (!isset($data[$nameItem]))
                {
                    $data[$nameItem] = [];
                }
                $data = &$data[$nameItem];
            }
            else if(is_object($data))
            {
                if (!isset($data->$nameItem))
                {
                    $data->$nameItem = new stdClass;
                }
                $data = &$data->$nameItem;
            }
        }
        if(is_array($data))
        {
            $data[$lastName] = $value;
        }
        else if(is_object($data))
        {
            $data->$lastName = $value;
        }
    }
39767
private function setDataArrayForObjectOrArray($objectOrArray)
    {
        if ($objectOrArray instanceof EntityInterface) {
            $this->getAttributesFromObjectAndSetDataArray($objectOrArray);
        }
        elseif (is_array($objectOrArray)) {
            $this->data[] = $objectOrArray;
        }
    }
64155
public function setDataPost($dataPost) {
        if (!is_array($dataPost) || empty($dataPost)) {
            $this->dataPost = array();
        }

        $this->dataPost = $dataPost;
    }
1361401
public function offsetSet($object, $value) : void
    {
        $hash = spl_object_hash($object);

        $this->objects[$hash] = $object;
        $this->data[$hash] = $value;
    }
525486
public function applyTo($object)
	{
		foreach($this->toArray() as $key=>$value)
			$object->$key=$value;
	}
1160491
public static function setDataOptionAttributes($data, $object)
    {
        if(is_array($data) && count($data) > 0)
        {
            $keys = array_keys($data);

            $response = '';
            foreach($keys as $key)
            {
                $response .= ' data-' . $key . '="' . $object->{$data[$key]} . '"';
            }

            return $response;
        }

        return null;
    }
439791
protected function assign($data)
    {
        if (!is_null($data)) {
            foreach ($data as $key => $value) {
                $this->set($key, $value);
            }
        }
    }
894465
public function initialize($object)
    {
        if (!is_object($object)) {
            return;
        }

        foreach ($this->knownDependencies as $interface => $dependencyInfo) {
            list($setterMethod, $serviceId) = $dependencyInfo;

            if (is_a($object, $interface)) {
                $object->$setterMethod($this->container->get($serviceId));
            }
        }
    }