{@inheritDoc}

@param observer {@inheritDoc}
207
@Override
    public void addDataObserver(Observer<DataProvider<M>, M> observer) {
        dataObserver.addObserver(observer);
    }
826185
public <T> void register(Class<T> event, EventObserver<T> observer){
        if(event == null){
            throw new IllegalArgumentException("Null Event type passed to register");
        }
        if(observer == null){
            throw new IllegalArgumentException("Null observer passed to register");
        }
        nullSafeGet(event).add(observer);
    }
770460
function (observer) {
            var observers = this.observers, i;
            for (i = observers.length - 1; i >= 0; --i) {
                /*
             If multiple identical EventListeners are registered on the same EventTarget
             with the same parameters the duplicate instances are discarded.
             They do not cause the EventListener to be called twice
             and since they are discarded
             they do not need to be removed with the removeEventListener method.
             */
                if (observer.equals(observers[i])) {
                    return i;
                }
            }
            return -1;
        }
1103262
public void addThreadLocalSQLAuditor(Consumer<String> observer)
	{
		List<Consumer<String>> observers = onPrepareStatementWatchers.get();

		if (observers == null)
		{
			observers = new CopyOnWriteArrayList<>();
			onPrepareStatementWatchers.set(observers);
		}

		observers.add(observer);
	}
207101
void observe(FolderObserver observer) {
    synchronized (idleMutex) {
      this.observer = observer;
      pushedData = new PushedData();
      idleAcknowledged.set(false);
    }
  }
1146275
public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $cookieNames = $this->getCookies();

        $metadata = $this->cookieMetadataFactory->createPublicCookieMetadata();
        $metadata->setPath($this->getCookieConfiguration()['path'] ?? '/');

        foreach ($cookieNames as $cookieName) {
            $this->cookieManager->deleteCookie($cookieName, $metadata);
        }
    }
1271363
public function execute(Observer $observer)
    {
        /** @var Subscriber $subscriber */
        $subscriber = $observer->getSubscriber();

        try {
            $store = $this->storeManager->getStore($subscriber->getStoreId());

            if ($subscriber->getCustomerId()) {
                $this->customerEventHandler->store(
                    $subscriber->getCustomerId(),
                    $store->getWebsiteId(),
                    $store->getId()
                );
            } else {
                $this->subscriptionEventHandler->store(
                    $subscriber,
                    $store->getWebsiteId(),
                    $store->getId(),
                    $this->subscriptionEventHandler->getEventType($observer->getEvent()->getName())
                );
            }
        } catch (\Exception $e) {
            $this->logger->warning('Emartech\\Emarsys\\Observers\\SubscriptionObserver: ' . $e->getMessage());
        }
    }
1367405
public function set_observer($observer) {
        $this->observer = $observer;
        foreach ($this->questionattempts as $qa) {
            $qa->set_observer($observer);
        }
    }
1157291
public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $order = $observer->getEvent()->getOrder();
        //order is new
        if (!$order->getId()) {
            $orderStatus = $order->getStatus();
        } else {
            // the reloaded status
            $reloaded = $this->orderFactory->create();
            $this->orderResource->load($reloaded, $order->getId());
            $orderStatus = $reloaded->getStatus();
        }
        //register the order status before change
        if (!$this->registry->registry('sales_order_status_before')) {
            $this->registry->register(
                'sales_order_status_before',
                $orderStatus
            );
        }

        return $this;
    }
167619
public void addClientObserver (ClientObserver observer)
    {
        _clobservers.add(observer);
        if (observer instanceof DetailedClientObserver) {
            _dclobservers.add((DetailedClientObserver)observer);
        }
    }
1065517
boolean removeObserver(ApptentiveNotificationObserver observer) {
		int index = indexOf(observer);
		if (index != -1) {
			observers.remove(index);
			return true;
		}
		return false;
	}
1053629
public void removeClientObserver (ClientObserver observer)
    {
        _clobservers.remove(observer);
        if (observer instanceof DetailedClientObserver) {
            _dclobservers.remove((DetailedClientObserver)observer);
        }
    }
1316152
public boolean removeObserver(BusObserver<M> observer) {
		logger.trace("removing observer {}", observer.getClass().getSimpleName());
		return observers.remove(observer);
	}
972387
public function detach(ObserverInterface $observer): void
    {
        $key = spl_object_hash($observer);

        unset($this->observers[$key]);
    }
716943
def addObserver(self, observer):
        
        with self._lock:
            self._weak_observers.append(weakref.ref(observer))
            if len(self._weak_observers) == 1:
                self.startThread()
1002472
def removeObserver(self, observer):
        
        with self._lock:
            self._weak_observers.remove(weakref.ref(observer))
            if len(self._weak_observers) == 0:
                self.stopThread()
597820
public function attach(ServerObserver $observer)
    {
        if ($this->state) {
            throw new \Error("Cannot attach observers after the server has started");
        }

        $this->observers->attach($observer);
    }