public function readNotifyHeap(): self
    {
        foreach ($this->notifyHeap as $notifyIndex => $notifyDatas) {
            $this->action  = $notifyDatas->action;
            $this->context = $notifyDatas->context;
            
            $this->notify();
            
            //Remove the current notification from list
            unset($this->notifyHeap[$notifyIndex]);
        }
        
        //Some new notifications has been added during the loop
        if (count($this->notifyHeap) > 0) {
            $this->readNotifyHeap();
        }

        return $this;
    }
public function readNotifyHeap(): self
    {
        foreach ($this->notifyHeap as $notifyIndex => $notifyDatas) {
            $this->action  = $notifyDatas->action;
            $this->context = $notifyDatas->context;
            
            $this->notify();
            
            //Remove the current notification from list
            unset($this->notifyHeap[$notifyIndex]);
        }
        
        //Some new notifications has been added during the loop
        if (count($this->notifyHeap) > 0) {
            $this->readNotifyHeap();
        }

        return $this;
    }
public function readNotifyHeap ( ) : self { foreach ( $ this -> notifyHeap as $ notifyIndex => $ notifyDatas ) { $ this -> action = $ notifyDatas -> action ; $ this -> context = $ notifyDatas -> context ; $ this -> notify ( ) ; //Remove the current notification from list unset ( $ this -> notifyHeap [ $ notifyIndex ] ) ; } //Some new notifications has been added during the loop if ( count ( $ this -> notifyHeap ) > 0 ) { $ this -> readNotifyHeap ( ) ; } return $ this ; }
Read the notify heap list and send each notify into the list.

@return $this
Read the notify heap list and send each notify into the list .