{@inheritDoc}
@see \Seeren\View\Observer\ObserverInterface::update()
15919
public function update(SubjectInterface $subject)
   {
       try {
           foreach ($this->observer as $value) {
               $value->update($subject);
           }
       } catch (Throwable $e) {
           throw new ViewException(
               "Can't update " . static::class . " " . $e->getMessage()
           );
       }
   }
639839
public function update()
    {
        $this->apply(function ($config) {
            $foreignKey = snake_case($this->key($config['foreignKey']));
            $amount = $this->model->{$config['columnToSum']};

            if ($this->model->getOriginal($foreignKey) && $this->model->{$foreignKey} != $this->model->getOriginal($foreignKey)) {
                $this->updateCacheRecord($config, '-', $amount, $this->model->getOriginal($foreignKey));
                $this->updateCacheRecord($config, '+', $amount, $this->model->{$foreignKey});
            }
        });
    }
321274
protected function _update()
    {
        $this->setUpdateSeo(true);
        $this->_setUpdateSeoOnFieldChange('oxtitle');

        $this->_skipSaveFields();

        return parent::_update();
    }
1237694
public function update($entity)
    {
        $this->gateway->update($this->tableName, $this->builder->reduce($entity), $this->getIdentifier($entity));
        $this->builder->resolve($entity);
    }
995029
public static function update()
	{
		$results = array();

		$db = Factory::getDBO();

		/***
		 * UPGRADES FOR 1.1.0 Patch 2
		 ***/
		//see if the columns exists
		$query = 'SHOW COLUMNS FROM #__jfusion';
		$db->setQuery($query);
		$columns = $db->loadColumn();

		/**
		 * for 2.0
		 */
		$query = 'ALTER TABLE #__jfusion_sync_details CHANGE  `message`  `message` TEXT';
		$db->setQuery($query);
		$db->execute();

		$query = 'SHOW COLUMNS FROM #__jfusion';
		$db->setQuery($query);
		$columns = $db->loadColumn();

		//remove the plugin_files if it exists
		if (in_array('plugin_files', $columns)) {
			//remove the column
			$query = 'ALTER TABLE #__jfusion DROP column plugin_files';
			$db->setQuery($query);
			$db->execute();
		}

		// let's update to json
		$query = $db->getQuery(true)
			->select('params, id')
			->from('#__jfusion');

		$db->setQuery($query);
		$rows = $db->loadObjectList();
		if(!empty($rows)) {
			foreach ($rows as $row) {
				if ($row->params) {
					$params = base64_decode($row->params);
					if (strpos($params, 'a:') === 0) {
						ob_start();
						$params = unserialize($params);
						ob_end_clean();
						if (is_array($params)) {
							$params = new Registry($params);
							$row->params  = $params->toString();
							$db->updateObject('#__jfusion', $row, 'id');
						}
					}
				}
			}
		}

		/**
		 * 3.0
		 */
		//remove the plugin_files if it exists
		if (in_array('master', $columns)) {
			//remove master
			$query = 'ALTER TABLE #__jfusion DROP column master';
			$db->setQuery($query);
			$db->execute();
			//remove slave
			$query = 'ALTER TABLE #__jfusion DROP column slave';
			$db->setQuery($query);
			$db->execute();
			//remove search
			$query = 'ALTER TABLE #__jfusion DROP column search';
			$db->setQuery($query);
			$db->execute();
			//remove discussion
			$query = 'ALTER TABLE #__jfusion DROP column discussion';
			$db->setQuery($query);
			$db->execute();
		}

		//add a active column for user sync
		$query = 'SHOW COLUMNS FROM #__jfusion_sync';
		$db->setQuery($query);
		$columns = $db->loadColumn();
		if (!in_array('type', $columns)) {
			$query = 'ALTER TABLE #__jfusion_sync
					ADD COLUMN `type` VARCHAR(50) DEFAULT NULL';
			$db->setQuery($query);
			$db->execute();
		}

		//cleanup unused plugins
		$query = $db->getQuery(true)
			->select('name')
			->from('#__jfusion')
			->where('(params IS NULL OR params = ' . $db->quote('') . ' OR params = ' . $db->quote('0') . ')')
			->where('status = 0');

		$db->setQuery($query);
		$rows = $db->loadObjectList();
		if(!empty($rows)) {
			foreach ($rows as $row) {
				$query = $db->getQuery(true)
					->select('count(*)')
					->from('#__jfusion')
					->where('original_name LIKE ' . $db->quote($row->name));

				$db->setQuery($query);
				$copys = $db->loadResult();
				if (!$copys) {
					$model = new Plugin();
					$model->uninstall($row->name);
				}
			}
		}
		return true;
	}
89526
public function update()
    {
        // convert to condition.
        $args = func_get_args();
        $attributes = array_shift($args);
        $cond = call_user_func_array(array($this, 'toCondition'), $args);

        // to SQL.
        $sql = $cond->toUpdateSQL($attributes);
        var_dump($sql, $cond->getParams());

        // query.
        $sth = $this->query($sql, $cond->getParams());
        return $sth->isSuccess();
    }
1198951
public function update(Request $request)
    {
        $key = $request->get('key');
        $type = $request->get('type');

        /** @var DataType $class */
        $class = $this->{$type}();

        $class->update($request->all());

        $class->setTtl($key, $request->get('ttl'));
    }
369789
public function update($module)
    {
        $module = $this->module->findOrFail($module);

        chdir(base_path());

        $this->installRequires($module);
        $this->installDevRequires($module);
        $this->copyScriptsToMainComposerJson($module);
    }
1264318
public function update($table = null)
    {
        $this->type = self::TYPE_UPDATE;
        if ($table) {
            $this->table($table);
        }

        return $this;
    }
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']);
    }
280047
public function update($opts = ['prod' => false])
    {
        $prod = isset($opts['prod']) && $opts['prod'] ? true : false;
        $this->info('Updating project dependencies');
        $this->composerUpdate(['prod' => $prod]);
        $this->info('Project dependencies updated');
    }
1226723
public function updateValue()
    {
        $name = $this->getName();
        foreach ($this->getDataSources() as $ds) {
            if (null !== ($value = $ds->getValue($name))) {
                $this->setValue($value);
                return;
            }
        }
        parent::updateValue();
    }
1055396
private function update()
    {
        if ($this->urlObject) {
            \Closure::bind(function ($urlObject, $query) {
                $urlObject->url->query = $query === '' ? null : $query;
            }, null, $this->urlObject)->__invoke($this->urlObject, lib\URLencoding::serializeURLencoded($this->list));
        }
    }
886111
function update() {
    var $this = this,
      self = User.resourceConstructor().call(this, this.id);

    return self.update.apply(self, arguments).then(function (updated) {
      Utils.extend($this, updated, true);
      return updated;
    });
  }
654327
public function update($id)
    {
        try {
            $entry = $this->collection->findOne($id);
        } catch (Exception $e) {
            // noop
        }

        if (is_null($entry)) {
            return $this->app->notFound();
        }

        if ($this->request->isPost() || $this->request->isPut()) {
            try {
                $merged = array_merge(
                    isset($entry) ? $entry->dump() : array(),
                    $this->request->getBody() ?: array()
                );

                $entry->set($merged)->save();

                h('notification.info', $this->clazz.' updated');

                h('controller.update.success', array(
                    'model' => $entry,
                ));
            } catch (Stop $e) {
                throw $e;
            } catch (Exception $e) {
                h('notification.error', $e);

                if (empty($entry)) {
                    $model = null;
                }

                h('controller.update.error', array(
                    'error' => $e,
                    'model' => $entry,
                ));
            }
        }

        $this->data['entry'] = $entry;
    }
244071
protected function update()
    {
        $key = $this->aggregate->getEntityKeyName();
        $value = $this->aggregate->getEntityKeyValue();

        $this->query->where($key, $value);

        $dirtyAttributes = $this->aggregate->getDirtyRawAttributes();

        if (count($dirtyAttributes) > 0) {
            $this->query->update($dirtyAttributes);
        }
    }
562209
public function update($source=null) {
        $this->timemodified = time();

        if ($result = parent::update($source)) {
            if (!empty($this->courseid)) {
                $this->use_in($this->courseid);
            }
        }
        return $result;
    }