Merge data of an object into this object

@param  Item $object
@return Model
497593
public function merge(Model $object) {
		$mergeData       = $object->toArray();
		$this->_data     = $mergeData + $this->_data;
		$this->_changed += array_fill_keys(array_keys($mergeData), true);
		
		return $this;
	}
1353393
public function addItem(Item $item)
    {
        if (!$this->items->contains($item)) {
            $this->items->add($item);
            $item->setType($this);
        }

        return $this;
    }
606714
public static function ArrayObjectMerge (\ArrayObject $array_object) {
		$args = func_get_args();
		array_shift($args);
		return static::_ArrayObjectMerge($array_object, $args);
	}
500240
protected function mergeItems() {
        ksort($this->items);
        $this->mergedItems = array();
        foreach ($this->items as $items) {
            $this->mergedItems = array_merge($this->mergedItems, $items);
        }
        return $this;
    }
218526
public function addItem(Item $item)
    {
        if (!$this->items->contains($item)) {
            $this->items->add($item);
            $item->addLabel($this);
        }

        return $this;
    }
344664
public static function pairs($object)
    {
        $result = [];
        static::each($object, function ($item, $key) use (& $result) {
            $result[] = [$key, $item];
        });

        return $result;
    }
1145638
public function isObject($item=null) {
    list($item) = self::_wrapArgs(func_get_args(), 1);
    return self::_wrap(is_object($item));
  }
1040285
public function merge($items)
    {
        if ($items instanceof ArrayInterface) {
            $this->items = array_merge($this->items, $items->all());
        } else {
            $this->items = array_merge($this->items, $items);
        }

        return $this;
    }
895935
public function merge($object, $dataObject, array $mapping = [])
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('You must specify an object in order to merge the array in it.');
        }
        if (is_object($dataObject) && $this->serializer) {
            // Serialize/deserialize object into array
            // This allows to merge two objects together
            $dataObject = json_decode($this->serializer->serialize($dataObject, 'json'), true);
        }
        if (!count($dataObject)) {
            throw new \InvalidArgumentException('If you want to merge an array into an entity, you must populate this array.');
        }

        return $this->doMerge($object, $dataObject, $mapping);
    }
1017465
public function writeItem(array $item)
    {
        //convert
        $objectOrItem = $this->convert($item);

        //write
        $this->write($objectOrItem);

        return $this;
    }
29325
protected function install($object)
    {
        $model = Property::find()->where(['var_name' => $object->varName()])->one();
        if ($model) {
            $model->setAttributes([
                'module_name' => $object->moduleName,
                'class_name' => $object::className(),
            ]);
            $model->update(false);
    
            return $model->id;
        } else {
            $model = new Property();
            $model->setAttributes([
                'var_name' => $object->varName(),
                'module_name' => $object->moduleName,
                'class_name' => $object::className(),
            ]);
            $insert = $model->insert(false);
            if ($insert) {
                return $model->id;
            }
        }
    }
576212
public function mergePropertyData(array $data)
    {
        $this->propertyData = array_replace($this->propertyData, $data);

        if (!$this->isMergingWidgetData) {
            $this->setCoreData($this->propertyData);
        }

        if ($this->property) {
            $this->property->setData($data);
        }

        return $this;
    }
1264634
public function setItem(Item $item)
    {
        if ($this->item !== $item) {
            $this->item = $item->setType($this);
        }

        return $this;
    }
1021341
public static function fromObject($object)
    {
        if (\is_object($object)) {
            $object = (array)$object;
        }
        if (\is_array($object)) {
            $array = [];
            foreach ($object as $key => $value) {
                $array[$key] = self::fromObject($value);
            }
        } else {
            $array = $object;
        }
        return $array;
    }
179584
public function addItem(Item $item)
    {
        if (!$this->items->contains($item)) {
            $this->items->add($item);
            $item->setCountry($this);
        }

        return $this;
    }
1224708
public function deserialize($data, ItemObject $itemObject = null, array $options = [])
    {
        $itemObject = $itemObject ?: new ItemObject();

        $this->sipe('id', 'setUuid', $data, $itemObject);

        if (in_array(Transfer::REFRESH_UUID, $options)) {
            $itemObject->refreshUuid();
        }
        $this->sipe('type', 'setMimeType', $data, $itemObject);
        $this->sipe('url', 'setData', $data, $itemObject);
        $this->sipe('data', 'setData', $data, $itemObject);

        return $itemObject;
    }
1057692
public function convert( $object )
    {
        if ( $object instanceof eZContentObject )
        {
            return $this->repository->getContentService()->loadContent( $object->attribute( 'id' ) );
        }
        else if ( $object instanceof eZContentObjectTreeNode )
        {
            return $this->repository->getLocationService()->loadLocation( $object->attribute( 'node_id' ) );
        }

        return $object;
    }