Calls the update() function using the reference to each
registered observer - used by children of Observable
@return void
557489
public function notifyObservers($arg) {
        if($this->changed === false)
			return;
		
		$observers = count($this->observers);
		
        for ($i=0; $i<$observers; ++$i) {
            $this->observers[$i]->update($this, $arg);
        }
    }
1117533
private function executeExtraUpdates()
    {
        foreach ($this->extraUpdates as $oid => $update) {
            [$entity, $changeset] = $update;

            $this->entityChangeSets[$oid] = $changeset;

            $this->getEntityPersister(get_class($entity))->update($entity);
        }

        $this->extraUpdates = [];
    }
529471
public function postFlush(): void
    {
        try {
            foreach ($this->createdEntities as $entity) {
                $this->publishUpdate($entity, $this->createdEntities[$entity]);
            }

            foreach ($this->updatedEntities as $entity) {
                $this->publishUpdate($entity, $this->updatedEntities[$entity]);
            }

            foreach ($this->deletedEntities as $entity) {
                $this->publishUpdate($entity, $this->deletedEntities[$entity]);
            }
        } finally {
            $this->reset();
        }
    }
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;
    });
  }
842063
public function observe($event)
	{
		foreach ($this->observers() as $observer => $settings)
		{
			$events = isset($settings['events']) ? $settings['events'] : array();
			if ((empty($events) or in_array($event, $events))
				and empty($this->_disabled_events[$event]))
			{
				if ( ! class_exists($observer))
				{
					$observer_class = \Inflector::get_namespace($observer).'Observer_'.\Inflector::denamespace($observer);
					if ( ! class_exists($observer_class))
					{
						throw new \UnexpectedValueException($observer);
					}

					// Add the observer with the full classname for next usage
					unset(static::$_observers_cached[$observer]);
					static::$_observers_cached[$observer_class] = $events;
					$observer = $observer_class;
				}

				try
				{
					call_user_func(array($observer, 'orm_notify'), $this, $event);
				}
				catch (\Exception $e)
				{
					// Unfreeze before failing
					$this->unfreeze();

					throw $e;
				}
			}
		}
	}
692337
def update(self, observable, handlers):
        """"""
        addedreaders, removedreaders = handlers
        for reader in addedreaders:
            item = self.Append(str(reader))
            self.SetClientData(item, reader)
        for reader in removedreaders:
            item = self.FindString(str(reader))
            if wx.NOT_FOUND != item:
                self.Delete(item)
        selection = self.GetSelection()
1262218
public function callInitialize()
    {
        foreach ($this->pluginCollection as $plugin) {
            $subscriber = new EventSubscriber();
            $plugin->initialize($subscriber);

            $this->eventSubscriberPlugins[] = [$plugin, $subscriber];

            $this->addListeners($plugin, $subscriber);
        }
    }
16623
void update() {
        Application.update(filter, list, main, footer, toggleAll, count, clearCompleted);
    }
585431
function() {
		edbml.Update.prototype.update.call(this);
		var element = this.element();
		if (this._beforeUpdate(element)) {
			this._update(element);
			this._afterUpdate(element);
			this._report();
		}
	}
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);
            }
        }
    }
654851
protected function update()
    {
        foreach ($this->scheduledForUpdate as $objectHashId => $entity) {
            // If this entity was a child of aggregate roots, then call its methods to set the aggregate root Id
            $this->entityRegistry->runAggregateRootCallbacks($entity);
            $dataMapper = $this->getDataMapper($this->entityRegistry->getClassName($entity));
            $dataMapper->update($entity);
            $this->entityRegistry->registerEntity($entity);
        }
    }
459712
final public function notify()
  {
    $observers = array_values($this->_observers);
    foreach ($observers as $observer) {
      switch (false) {
        case is_array($observer):
        case isset($observer[0]):
        case isset($observer[1]):
        case is_string($observer[0]):
          break;
        default:
          Loader::loadClass($observer[0]);
          break;
      }

      if (!is_callable($observer)) {
        continue;
      }

      call_user_func($observer, $this);
    }

    return $this;
  }
276994
function() {
		if (this._bindingState.child === false && this._childToParent === true) {
			var options = this._options;
			this._bindingState.child = true;
			turnOnListeningAndUpdate(options.child, options.parent, this._updateParent, options.queue);
		}
	}
501119
protected function _update()
    {
        $this->setUpdateSeo(true);
        $this->_setUpdateSeoOnFieldChange('oxtitle');

        // Function is called from inside a transaction in Category::save (see ESDEV-3804 and ESDEV-3822).
        // No need to explicitly force master here.
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sOldParentID = $database->getOne("select oxparentid from oxcategories where oxid = " . $database->quote($this->getId()));

        if ($this->_blIsSeoObject && $this->isAdmin()) {
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderCategory::class)->markRelatedAsExpired($this);
        }

        $blRes = parent::_update();

        // #872C - need to update category tree oxleft and oxright values (nested sets),
        // then sub trees are moved inside one root, or to another root.
        // this is done in 3 basic steps
        // 1. increase oxleft and oxright values of target root tree by $iTreeSize, where oxleft>=$iMoveAfter , oxright>=$iMoveAfter
        // 2. modify current subtree, we want to move by adding $iDelta to it's oxleft and oxright,  where oxleft>=$sOldParentLeft and oxright<=$sOldParentRight values,
        //    in this step we also modify rootid's if they were changed
        // 3. decreasing oxleft and oxright values of current root tree, where oxleft >= $sOldParentRight+1 , oxright >= $sOldParentRight+1

        // did we change position in tree ?
        if ($this->oxcategories__oxparentid->value != $sOldParentID) {
            $sOldParentLeft = $this->oxcategories__oxleft->value;
            $sOldParentRight = $this->oxcategories__oxright->value;

            $iTreeSize = $sOldParentRight - $sOldParentLeft + 1;

            $sNewRootID = $database->getOne("select oxrootid from oxcategories where oxid = " . $database->quote($this->oxcategories__oxparentid->value));

            //If empty rootID, we set it to categorys oxid
            if ($sNewRootID == "") {
                //echo "<br>* ) Creating new root tree ( {$this->_sOXID} )";
                $sNewRootID = $this->getId();
            }
            $sNewParentLeft = $database->getOne("select oxleft from oxcategories where oxid = " . $database->quote($this->oxcategories__oxparentid->value));

            //if(!$sNewParentLeft){
            //the current node has become root node, (oxrootid == "oxrootid")
            //    $sNewParentLeft = 0;
            //}

            $iMoveAfter = $sNewParentLeft + 1;

            //New parentid can not be set to it's child
            if ($sNewParentLeft > $sOldParentLeft && $sNewParentLeft < $sOldParentRight && $this->oxcategories__oxrootid->value == $sNewRootID) {
                //echo "<br>* ) Can't asign category to it's child";

                //Restoring old parentid, stoping further actions
                $sRestoreOld = "UPDATE oxcategories SET OXPARENTID = " . $database->quote($sOldParentID) . " WHERE oxid = " . $database->quote($this->getId());
                $database->execute($sRestoreOld);

                return false;
            }

            //Old parent will be shifted too, if it is in the same tree
            if ($sOldParentLeft > $iMoveAfter && $this->oxcategories__oxrootid->value == $sNewRootID) {
                $sOldParentLeft += $iTreeSize;
                $sOldParentRight += $iTreeSize;
            }

            $iDelta = $iMoveAfter - $sOldParentLeft;

            //echo "Size=$iTreeSize, NewStart=$iMoveAfter, delta=$iDelta";

            $sAddOld = " and oxshopid = '" . $this->getShopId() . "' and OXROOTID = " . $database->quote($this->oxcategories__oxrootid->value) . ";";
            $sAddNew = " and oxshopid = '" . $this->getShopId() . "' and OXROOTID = " . $database->quote($sNewRootID) . ";";

            //Updating everything after new position
            $database->execute("UPDATE oxcategories SET OXLEFT = (OXLEFT + " . $iTreeSize . ") WHERE OXLEFT >= " . $iMoveAfter . $sAddNew);
            $database->execute("UPDATE oxcategories SET OXRIGHT = (OXRIGHT + " . $iTreeSize . ") WHERE OXRIGHT >= " . $iMoveAfter . $sAddNew);
            //echo "<br>1.) + $iTreeSize, >= $iMoveAfter";

            $sChangeRootID = "";
            if ($this->oxcategories__oxrootid->value != $sNewRootID) {
                //echo "<br>* ) changing root IDs ( {$this->oxcategories__oxrootid->value} -> {$sNewRootID} )";
                $sChangeRootID = ", OXROOTID=" . $database->quote($sNewRootID);
            }

            //Updating subtree
            $database->execute("UPDATE oxcategories SET OXLEFT = (OXLEFT + " . $iDelta . "), OXRIGHT = (OXRIGHT + " . $iDelta . ") " . $sChangeRootID . " WHERE OXLEFT >= " . $sOldParentLeft . " AND OXRIGHT <= " . $sOldParentRight . $sAddOld);
            //echo "<br>2.) + $iDelta, >= $sOldParentLeft and <= $sOldParentRight";

            //Updating everything after old position
            $database->execute("UPDATE oxcategories SET OXLEFT = (OXLEFT - " . $iTreeSize . ") WHERE OXLEFT >=   " . ($sOldParentRight + 1) . $sAddOld);
            $database->execute("UPDATE oxcategories SET OXRIGHT = (OXRIGHT - " . $iTreeSize . ") WHERE OXRIGHT >=   " . ($sOldParentRight + 1) . $sAddOld);
            //echo "<br>3.) - $iTreeSize, >= ".($sOldParentRight+1);
        }

        if ($blRes && $this->_blIsSeoObject && $this->isAdmin()) {
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderCategory::class)->markRelatedAsExpired($this);
        }

        return $blRes;
    }
134759
public function update() {
		$message = new CRUDMessage ( "Modifications were successfully saved", "Updating" );
		$instance = $_SESSION ["instance"] ?? null;
		if (isset ( $instance )) {
			$isNew = $instance->_new;
			try {
				$updated = CRUDHelper::update ( $instance, $_POST );
				if ($updated) {
					$message->setType ( "success" )->setIcon ( "check circle outline" );
					$message = $this->_getEvents ()->onSuccessUpdateMessage ( $message, $instance );
					$this->refreshInstance ( $instance, $isNew );
				} else {
					$message->setMessage ( "An error has occurred. Can not save changes." )->setType ( "error" )->setIcon ( "warning circle" );
					$message = $this->_getEvents ()->onErrorUpdateMessage ( $message, $instance );
				}
			} catch ( \Exception $e ) {
				$instanceString = $this->getInstanceToString ( $instance );
				$message = new CRUDMessage ( "Exception : can not update `" . $instanceString . "`", "Exception", "warning", "warning" );
				$message = $this->_getEvents ()->onErrorUpdateMessage ( $message, $instance );
			}
			echo $this->_showSimpleMessage ( $message, "updateMsg" );
			echo $this->jquery->compile ( $this->view );
			return $instance;
		} else {
			throw new \Exception ( '$_SESSION["instance"] is null' );
		}
	}
1182833
private function internalDataListUpdate()
    {
        $this->internalDataListData = $this->internalDataListUpdateData($this->internalDataListData, $this->internalDataListActions);
        $this->internalDataListActions = [];
    }
86618
public function update($data)
    {
        if (count($this) == 0) {
            return;
        }
        $ids = $this->getPrimaryKeyList();
        $updater = new $this->className();
        $updater->in($updater->getPrimaryKey(), $ids)->update($data);
    }