public function forwardAllEvents($eventNames)
    {
        if (!$this->enabled) {
            return $this;
        }

        if (!is_array($eventNames)) {
            $eventNames = array($eventNames);
        }

        foreach ($eventNames as $eventName) {
            $this->dispatcher->addListener(
                $eventName,
                array($this, 'forwardEvent')
            );
        }

        return $this;
    }
public function forwardAllEvents($eventNames)
    {
        if (!$this->enabled) {
            return $this;
        }

        if (!is_array($eventNames)) {
            $eventNames = array($eventNames);
        }

        foreach ($eventNames as $eventName) {
            $this->dispatcher->addListener(
                $eventName,
                array($this, 'forwardEvent')
            );
        }

        return $this;
    }
public function forwardAllEvents ( $ eventNames ) { if ( ! $ this -> enabled ) { return $ this ; } if ( ! is_array ( $ eventNames ) ) { $ eventNames = array ( $ eventNames ) ; } foreach ( $ eventNames as $ eventName ) { $ this -> dispatcher -> addListener ( $ eventName , array ( $ this , 'forwardEvent' ) ) ; } return $ this ; }
Automatically forward RestApi events to push server.

@param string|string[] $eventNames Can be an event name or an array of event names.

@return self
Automatically forward RestApi events to push server .