public function forwardEventsToPushServer(array $eventsNames)
    {
        if (!$this->offsetExists('sandstone.push')) {
            throw new \LogicException(sprintf(
                'You must register a Push server service provider (%s) in order to use %s method.',
                PushServiceProvider::class,
                __METHOD__
            ));
        }

        if ($this->booted) {
            $this['sandstone.push.event_forwarder']->forwardAllEvents($eventsNames);
        } else {
            $this->events []= $eventsNames;
        }

        return $this;
    }
public function forwardEventsToPushServer(array $eventsNames)
    {
        if (!$this->offsetExists('sandstone.push')) {
            throw new \LogicException(sprintf(
                'You must register a Push server service provider (%s) in order to use %s method.',
                PushServiceProvider::class,
                __METHOD__
            ));
        }

        if ($this->booted) {
            $this['sandstone.push.event_forwarder']->forwardAllEvents($eventsNames);
        } else {
            $this->events []= $eventsNames;
        }

        return $this;
    }
public function forwardEventsToPushServer ( array $ eventsNames ) { if ( ! $ this -> offsetExists ( 'sandstone.push' ) ) { throw new \ LogicException ( sprintf ( 'You must register a Push server service provider (%s) in order to use %s method.' , PushServiceProvider :: class , __METHOD__ ) ) ; } if ( $ this -> booted ) { $ this [ 'sandstone.push.event_forwarder' ] -> forwardAllEvents ( $ eventsNames ) ; } else { $ this -> events [ ] = $ eventsNames ; } return $ this ; }
Automatically forward rest API events to push server.

@param string[] $eventsNames

@return self
Automatically forward rest API events to push server .