Updates this object from a stdClass instance.

@param stdClass $object

@return void
17677
public function updateFromObject(stdClass $object)
    {

        $this->name  = property_exists($object, 'name') ? $object->name : null;
        $this->email = property_exists($object, 'email') ? $object->email : null;
    }
958346
public function copyData($object)
    {
        if ($object instanceof CNabuDataObject) {
            $this->data = $object->data;
        } elseif (is_array($object)) {
            $this->data = $object;
        }
    }
476630
public function preUpdate($object)
    {
        if ($contentObject = $object->getContent()) {
            $this->getModelManager()->update($contentObject);
        }
        $this->autoPageDraft($object->getPage());
    }
820708
public function update(SplSubject $subject)
    {
        if ($this->hasMethod('__update') && is_callable([$this, '__update'])) {
            $this->__update($subject);
        }
    }
1245510
public function update($data, $object)
	{
		$updated = $object->update($data);

		// @todo: Double Check that we should be returning updated not object
		if( ! $updated)
		{
			return new Payload($object , 'not_updated');
		}

		return new Payload($object, 'updated');
	}
1034222
protected function updateSubclassInheritance($class)
    {
        foreach ($class->subclasses as $subclass) {
            $subclass = $this->classes[$subclass];
            $subclass->events = array_merge($class->events, $subclass->events);
            $subclass->constants = array_merge($class->constants, $subclass->constants);
            $subclass->properties = array_merge($class->properties, $subclass->properties);
            $subclass->methods = array_merge($class->methods, $subclass->methods);
            $this->updateSubclassInheritance($subclass);
        }
    }
1116416
protected function doRestore($object): void
    {
        $changeSet = $this->uow->getObjectChangeSet($object);
        $ref = new \ReflectionClass($object);

        foreach ($changeSet as $field => $values) {
            $fv = new FieldVote($object, $field);

            if ($this->isRestoreViewGranted($fv, $values)) {
                $property = $ref->getProperty($field);
                $property->setAccessible(true);
                $property->setValue($object, $values['old']);
            }
        }
    }
317799
public function offsetUnset($object)
       {
            if (parent::contains($object)) {
                parent::offsetUnset($object);
                $index = array_search(spl_object_hash($object), $this->map, true);
                unset($this->map[$index]);
            }
       }
249514
public function updateAction($data, $object)
    {
        return $this->forward()->dispatch(
            $this->getEvent()->getRouteMatch()->getParam('controller'),
            ['action' => 'notFound']
        );
    }
84164
public function update($object)
    {
        if ($this->isNewObject($object)) {
            throw new UnknownObjectException('The object of type "' . get_class($object) . '" (identifier: "' . $this->getIdentifierByObject($object) . '") which was passed to EntityManager->update() is not a previously persisted object. Check the code which updates this entity and make sure that only objects are updated which were persisted before. Alternatively use add() for persisting new objects."', 1313663277);
        }
        try {
            $this->entityManager->persist($object);
        } catch (\Exception $exception) {
            throw new PersistenceException('Could not merge object of type "' . get_class($object) . '"', 1297778180, $exception);
        }
    }
627899
public function update($data, $object)
	{
		// Process data given.
		$processPayload = $this->process(__FUNCTION__, $data);

		if( ! $processPayload->isStatus(Payload::STATUS_VALID))
		{
			return $processPayload;
		}

		return $this->dataSource->update($processPayload->getData(), $object);
	}
125028
public function update($object)
    {
        $id = $object->getId();

        $db = new DatabaseManager();
        $connection = $db->getDbh();

        $objectAsArrayForSqlInsert = DatatbaseUtility::objectToArrayLessId($object);
        $fields = array_keys($objectAsArrayForSqlInsert);
        $updateFieldList = DatatbaseUtility::fieldListToUpdateString($fields);

        $sql = 'UPDATE :table SET :updateFieldList WHERE id=:id';
        $sql = str_replace(':table', $this->tableName, $sql);
        $sql = str_replace(':updateFieldList', $updateFieldList, $sql);

        $statement = $connection->prepare($sql);

        // add 'id' to parameters array
        $objectAsArrayForSqlInsert['id'] = $id;

        $queryWasSuccessful = $statement->execute($objectAsArrayForSqlInsert);

        return $queryWasSuccessful;
    }
548588
public function update($object, $flushed = true)
    {
        $this->preUpdate($object, $flushed);
        $em = $this->getEntityManager();
        $em->persist($object);
        if ($flushed) {
            $em->flush($object);
        }
        $this->postUpdate($object, $flushed);
        return $object;
    }
1220258
public function persist(IdentifiableObject $object): void
    {
        $id = (string)$object->id();

        $allData = $this->loadAllObjects();
        $allData[$id] = $object;
        $this->saveAllObjects($allData);

        stdout(line(make_cyan('Persisted'), get_class($object), ':', $id));
    }
440945
private function executeUpdates($class)
    {
        $className        = $class->getClassName();
        $persister        = $this->getEntityPersister($className);
        $preUpdateInvoke  = $this->listenersInvoker->getSubscribedSystems($class, Events::preUpdate);
        $postUpdateInvoke = $this->listenersInvoker->getSubscribedSystems($class, Events::postUpdate);

        foreach ($this->entityUpdates as $oid => $entity) {
            if ($this->em->getClassMetadata(get_class($entity))->getClassName() !== $className) {
                continue;
            }

            if ($preUpdateInvoke !== ListenersInvoker::INVOKE_NONE) {
                $this->listenersInvoker->invoke($class, Events::preUpdate, $entity, new PreUpdateEventArgs($entity, $this->em, $this->getEntityChangeSet($entity)), $preUpdateInvoke);

                $this->recomputeSingleEntityChangeSet($class, $entity);
            }

            if (! empty($this->entityChangeSets[$oid])) {
                $persister->update($entity);
            }

            unset($this->entityUpdates[$oid]);

            if ($postUpdateInvoke !== ListenersInvoker::INVOKE_NONE) {
                $this->listenersInvoker->invoke($class, Events::postUpdate, $entity, new LifecycleEventArgs($entity, $this->em), $postUpdateInvoke);
            }
        }
    }
101161
public static function reset($object)
	{
		if (!($object instanceof FieldDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\FieldDescriptorProto.');
		}
		$object->name = NULL;
		$object->number = NULL;
		$object->label = NULL;
		$object->type = NULL;
		$object->typeName = NULL;
		$object->extendee = NULL;
		$object->defaultValue = NULL;
		$object->oneofIndex = NULL;
		$object->jsonName = NULL;
		$object->options = NULL;
	}
1097412
public function save($object, $flush = true)
    {
        $this->isExpectedObject($object);
        $this->objectManager->persist($object);
        if ($flush) {
            $this->flush();
        }
    }