{@inheritdoc}
@see FlexObjectInterface::update()
358136
public function update(array $data, array $files = [])
    {
        if ($data) {
            $blueprint = $this->getBlueprint();

            // Process updated data through the object filters.
            $this->filterElements($data);

            // Get currently stored data.
            $elements = $this->getElements();

            // Merge existing object to the test data to be validated.
            $test = $blueprint->mergeData($elements, $data);

            // Validate and filter elements and throw an error if any issues were found.
            $blueprint->validate($test + ['storage_key' => $this->getStorageKey(), 'timestamp' => $this->getTimestamp()]);
            $data = $blueprint->filter($data, false, true);

            // Finally update the object.
            foreach ($blueprint->flattenData($data) as $key => $value) {
                if ($value === null) {
                    $this->unsetNestedProperty($key);
                } else {
                    $this->setNestedProperty($key, $value);
                }
            }

            // Store the changes
            $this->_changes = Utils::arrayDiffMultidimensional($this->getElements(), $elements);
        }

        if ($files && method_exists($this, 'setUpdatedMedia')) {
            $this->setUpdatedMedia($files);
        }

        return $this;
    }
714722
public function update($id, array $data)
    {
        $obj = $this->find($id);
        Event::fire('repository.updating', [$obj, $data]);
        $obj->update($data);
        return $obj;
    }
863529
public function update($subscription){
        if(!isset($this->_id) || null == $this->_id){
            throw new \Exception("You must especify an Id to perform subscription updates");
        }
        if($subscription instanceof SubscriptionFactory){
            $context = new ContextFactory((array) $subscription->get());
        }elseif(is_array($subscription) || is_object($subscription)){
            $context = new ContextFactory((array)$subscription);
        }
        return $this->_orion->patch($this->getBaseURI(), $context);
    }
633578
public function addUpdate(Update\ActionItem $update)
    {
        $this->update->add($update);

        return $this->qb;
    }
550897
public function update($set = array())
    {
        if (is_array($set)) {
            $params = array();
            foreach ($set as $field => $param) {
                $this->add('set', $field . ' = ?', true);
                $params[] = $param;
            }
            $this->params = array_merge($params, $this->params);
        } else {
            $this->add('set', $set, true);
        }
        $this->type = self::UPDATE;
        return $this->execute();
    }
626599
public function update()
    {
        $args    = func_get_args();
        $order = null;

        if (count($args) == 1 && $args[0] instanceof Order) {
            $order = $args[0];
        } elseif (count($args) == 2 && !empty($args[0]) && is_array($args[1])) {
            $order = $this->find($args[0]);
            $order->fill($args[1]);
        }

        if ($order instanceof Order) {
            if ($this->fireEvent('updating', array($order)) === false) {
                return false;
            }

            $order->setCaller($this);
            $order->save();

            $this->fireEvent('updated', array($order));

            return $order;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\Order',
            $this->name()
        ));
    }
319553
public function update($object, array $data)
	{
		$updated = $object->update($data);

		if( ! $updated)
		{
			return new Payload($object , 'not_updated');
		}

		// Replace the existing cached model with the updated model.
		Cache::tags($this->model->getTable())->forever($updated->getKey(), $updated);

		return new Payload($object, 'updated');
	}
1264318
public function update($table = null)
    {
        $this->type = self::TYPE_UPDATE;
        if ($table) {
            $this->table($table);
        }

        return $this;
    }
262419
public function update(SplSubject $subject)
    {
        if ($subject instanceof Model) {
            $this->data = \array_merge($this->data, $subject->get());
        }
    }
666844
public function update($options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'FriendlyName' => $options['friendlyName'],
            'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'],
            'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'],
            'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'],
            'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']),
            'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']),
            'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'],
            'ConsumptionReportInterval' => $options['consumptionReportInterval'],
            'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']),
            'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'],
            'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
            'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'],
            'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
            'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'],
            'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
            'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'],
            'PreWebhookUrl' => $options['preWebhookUrl'],
            'PostWebhookUrl' => $options['postWebhookUrl'],
            'WebhookMethod' => $options['webhookMethod'],
            'WebhookFilters' => Serialize::map($options['webhookFilters'], function($e) { return $e; }),
            'Webhooks.OnMessageSend.Url' => $options['webhooksOnMessageSendUrl'],
            'Webhooks.OnMessageSend.Method' => $options['webhooksOnMessageSendMethod'],
            'Webhooks.OnMessageSend.Format' => $options['webhooksOnMessageSendFormat'],
            'Webhooks.OnMessageUpdate.Url' => $options['webhooksOnMessageUpdateUrl'],
            'Webhooks.OnMessageUpdate.Method' => $options['webhooksOnMessageUpdateMethod'],
            'Webhooks.OnMessageUpdate.Format' => $options['webhooksOnMessageUpdateFormat'],
            'Webhooks.OnMessageRemove.Url' => $options['webhooksOnMessageRemoveUrl'],
            'Webhooks.OnMessageRemove.Method' => $options['webhooksOnMessageRemoveMethod'],
            'Webhooks.OnMessageRemove.Format' => $options['webhooksOnMessageRemoveFormat'],
            'Webhooks.OnChannelAdd.Url' => $options['webhooksOnChannelAddUrl'],
            'Webhooks.OnChannelAdd.Method' => $options['webhooksOnChannelAddMethod'],
            'Webhooks.OnChannelAdd.Format' => $options['webhooksOnChannelAddFormat'],
            'Webhooks.OnChannelDestroy.Url' => $options['webhooksOnChannelDestroyUrl'],
            'Webhooks.OnChannelDestroy.Method' => $options['webhooksOnChannelDestroyMethod'],
            'Webhooks.OnChannelDestroy.Format' => $options['webhooksOnChannelDestroyFormat'],
            'Webhooks.OnChannelUpdate.Url' => $options['webhooksOnChannelUpdateUrl'],
            'Webhooks.OnChannelUpdate.Method' => $options['webhooksOnChannelUpdateMethod'],
            'Webhooks.OnChannelUpdate.Format' => $options['webhooksOnChannelUpdateFormat'],
            'Webhooks.OnMemberAdd.Url' => $options['webhooksOnMemberAddUrl'],
            'Webhooks.OnMemberAdd.Method' => $options['webhooksOnMemberAddMethod'],
            'Webhooks.OnMemberAdd.Format' => $options['webhooksOnMemberAddFormat'],
            'Webhooks.OnMemberRemove.Url' => $options['webhooksOnMemberRemoveUrl'],
            'Webhooks.OnMemberRemove.Method' => $options['webhooksOnMemberRemoveMethod'],
            'Webhooks.OnMemberRemove.Format' => $options['webhooksOnMemberRemoveFormat'],
            'Webhooks.OnMessageSent.Url' => $options['webhooksOnMessageSentUrl'],
            'Webhooks.OnMessageSent.Method' => $options['webhooksOnMessageSentMethod'],
            'Webhooks.OnMessageSent.Format' => $options['webhooksOnMessageSentFormat'],
            'Webhooks.OnMessageUpdated.Url' => $options['webhooksOnMessageUpdatedUrl'],
            'Webhooks.OnMessageUpdated.Method' => $options['webhooksOnMessageUpdatedMethod'],
            'Webhooks.OnMessageUpdated.Format' => $options['webhooksOnMessageUpdatedFormat'],
            'Webhooks.OnMessageRemoved.Url' => $options['webhooksOnMessageRemovedUrl'],
            'Webhooks.OnMessageRemoved.Method' => $options['webhooksOnMessageRemovedMethod'],
            'Webhooks.OnMessageRemoved.Format' => $options['webhooksOnMessageRemovedFormat'],
            'Webhooks.OnChannelAdded.Url' => $options['webhooksOnChannelAddedUrl'],
            'Webhooks.OnChannelAdded.Method' => $options['webhooksOnChannelAddedMethod'],
            'Webhooks.OnChannelAdded.Format' => $options['webhooksOnChannelAddedFormat'],
            'Webhooks.OnChannelDestroyed.Url' => $options['webhooksOnChannelDestroyedUrl'],
            'Webhooks.OnChannelDestroyed.Method' => $options['webhooksOnChannelDestroyedMethod'],
            'Webhooks.OnChannelDestroyed.Format' => $options['webhooksOnChannelDestroyedFormat'],
            'Webhooks.OnChannelUpdated.Url' => $options['webhooksOnChannelUpdatedUrl'],
            'Webhooks.OnChannelUpdated.Method' => $options['webhooksOnChannelUpdatedMethod'],
            'Webhooks.OnChannelUpdated.Format' => $options['webhooksOnChannelUpdatedFormat'],
            'Webhooks.OnMemberAdded.Url' => $options['webhooksOnMemberAddedUrl'],
            'Webhooks.OnMemberAdded.Method' => $options['webhooksOnMemberAddedMethod'],
            'Webhooks.OnMemberAdded.Format' => $options['webhooksOnMemberAddedFormat'],
            'Webhooks.OnMemberRemoved.Url' => $options['webhooksOnMemberRemovedUrl'],
            'Webhooks.OnMemberRemoved.Method' => $options['webhooksOnMemberRemovedMethod'],
            'Webhooks.OnMemberRemoved.Format' => $options['webhooksOnMemberRemovedFormat'],
            'Limits.ChannelMembers' => $options['limitsChannelMembers'],
            'Limits.UserChannels' => $options['limitsUserChannels'],
        ));

        $payload = $this->version->update(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new ServiceInstance($this->version, $payload, $this->solution['sid']);
    }
147179
protected function update($step)
    {
        $contentService = $this->repository->getContentService();
        $contentTypeService = $this->repository->getContentTypeService();

        $contentCollection = $this->matchContents('update', $step);

        if (count($contentCollection) > 1 && isset($step->dsl['references'])) {
            throw new \Exception("Can not execute Content update because multiple contents match, and a references section is specified in the dsl. References can be set when only 1 content matches");
        }

        if (count($contentCollection) > 1 && isset($step->dsl['main_location'])) {
            throw new \Exception("Can not execute Content update because multiple contents match, and a main_location section is specified in the dsl. References can be set when only 1 content matches");
        }

        $contentType = array();

        foreach ($contentCollection as $key => $content) {
            $contentInfo = $content->contentInfo;

            if (!isset($contentType[$contentInfo->contentTypeId])) {
                $contentType[$contentInfo->contentTypeId] = $contentTypeService->loadContentType($contentInfo->contentTypeId);
            }

            if (isset($step->dsl['attributes']) || isset($step->dsl['version_creator'])) {
                $contentUpdateStruct = $contentService->newContentUpdateStruct();

                if (isset($step->dsl['attributes'])) {
                    $this->setFields($contentUpdateStruct, $step->dsl['attributes'], $contentType[$contentInfo->contentTypeId], $step);
                }

                $versionCreator = null;
                if (isset($step->dsl['version_creator'])) {
                    $versionCreator = $this->getUser($step->dsl['version_creator']);
                }

                $draft = $contentService->createContentDraft($contentInfo, null, $versionCreator);
                $contentService->updateContent($draft->versionInfo, $contentUpdateStruct);
                $content = $contentService->publishVersion($draft->versionInfo);
            }

            if (isset($step->dsl['always_available']) ||
                isset($step->dsl['new_remote_id']) ||
                isset($step->dsl['owner']) ||
                isset($step->dsl['modification_date']) ||
                isset($step->dsl['publication_date'])) {

                $contentMetaDataUpdateStruct = $contentService->newContentMetadataUpdateStruct();

                if (isset($step->dsl['always_available'])) {
                    $contentMetaDataUpdateStruct->alwaysAvailable = $step->dsl['always_available'];
                }

                if (isset($step->dsl['new_remote_id'])) {
                    $contentMetaDataUpdateStruct->remoteId = $step->dsl['new_remote_id'];
                }

                if (isset($step->dsl['owner'])) {
                    $owner = $this->getUser($step->dsl['owner']);
                    $contentMetaDataUpdateStruct->ownerId = $owner->id;
                }

                if (isset($step->dsl['modification_date'])) {
                    $contentMetaDataUpdateStruct->modificationDate = $this->toDateTime($step->dsl['modification_date']);
                }

                if (isset($step->dsl['publication_date'])) {
                    $contentMetaDataUpdateStruct->publishedDate = $this->toDateTime($step->dsl['publication_date']);
                }

                $content = $contentService->updateContentMetadata($content->contentInfo, $contentMetaDataUpdateStruct);
            }

            if (isset($step->dsl['section'])) {
                $this->setSection($content, $step->dsl['section']);
            }

            if (isset($step->dsl['object_states'])) {
                $this->setObjectStates($content, $step->dsl['object_states']);
            }

            if (isset($step->dsl['main_location'])) {
                $this->setMainLocation($content, $step->dsl['main_location']);

            }
            $contentCollection[$key] = $content;
        }

        $this->setReferences($contentCollection, $step);

        return $contentCollection;
    }
766207
protected function update($step)
    {
        $stateCollection = $this->matchObjectStates('update', $step);

        if (count($stateCollection) > 1 && array_key_exists('references', $step->dsl)) {
            throw new \Exception("Can not execute Object State update because multiple states match, and a references section is specified in the dsl. References can be set when only 1 state matches");
        }

        if (count($stateCollection) > 1 && isset($step->dsl['identifier'])) {
            throw new \Exception("Can not execute Object State update because multiple states match, and an identifier is specified in the dsl.");
        }

        $objectStateService = $this->repository->getObjectStateService();

        foreach ($stateCollection as $state) {
            $objectStateUpdateStruct = $objectStateService->newObjectStateUpdateStruct();

            if (isset($step->dsl['identifier'])) {
                $objectStateUpdateStruct->identifier = $this->referenceResolver->resolveReference($step->dsl['identifier']);
            }
            if (isset($step->dsl['names'])) {
                foreach ($step->dsl['names'] as $name) {
                    $objectStateUpdateStruct->names[$name['languageCode']] = $name['name'];
                }
            }
            if (isset($step->dsl['descriptions'])) {
                foreach ($step->dsl['descriptions'] as $languageCode => $description) {
                    $objectStateUpdateStruct->descriptions[$languageCode] = $description;
                }
            }
            $state = $objectStateService->updateObjectState($state, $objectStateUpdateStruct);

            $this->setReferences($state, $step);
        }

        return $stateCollection;
    }
435324
public function update(\Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $initial, 
			\Composer\Package\PackageInterface $target) {
		if (!$this->needsUpdate($initial)) {
			//add the new version of the module to the composer.lock
			$repo->removePackage($initial);
			if (!$repo->hasPackage($target)) {
				$repo->addPackage(clone $target);
			}
			return;
		}
				
    	$this->moveBackResources($initial);
				
		parent::update($repo, $initial, $target);
		
		$this->removeResources($target);
		$this->installResources($target);
	}
512040
public function update()
	{
		// Get group config
		$groupsConfig = \Component::params('com_groups');

		// Path to group folder
		$directory  = PATH_APP . DS . trim($groupsConfig->get('uploadpath', '/site/groups'), DS);
		$directory .= DS . $this->group->get('gidNumber');

		// Get task, defaults to update
		$task = ($this->arguments->getOpt(3)) ? $this->arguments->getOpt(3) : 'update';

		// Set our group directory & call update
		$this->arguments->setOpt('r', $directory);
		\App::get('client')->call('repository', $task, $this->arguments, $this->output);
	}
888511
public function update()
    {
        $updated = $this->repository->update(Request::all());

        return response()->json([
            'error' => !$updated,
        ]);
    }
799688
public function update()
	{
		$package = $this->arguments->getOpt('package');
		if (empty($package))
		{
			$this->output->error('A package name is required');
		}

		Composer::updatePackage($package);
		$this->output->addLine("Done. $package updated to latest version");
	}
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');
	}