protected function _normalizeEvent($event, $params = [], $target = null)
    {
        if (is_string($event) || $event instanceof Stringable) {
            return $this->_createEvent($this->_normalizeString($event), $params, $target);
        }

        if (!($event instanceof EventInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a string, stringable object or event instance'),
                null,
                null,
                $event
            );
        }

        if ($target !== null) {
            $event->setTarget($target);
        }

        if (count($params) > 0) {
            $event->setParams($params + $event->getParams());
        }

        return $event;
    }
protected function _normalizeEvent($event, $params = [], $target = null)
    {
        if (is_string($event) || $event instanceof Stringable) {
            return $this->_createEvent($this->_normalizeString($event), $params, $target);
        }

        if (!($event instanceof EventInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a string, stringable object or event instance'),
                null,
                null,
                $event
            );
        }

        if ($target !== null) {
            $event->setTarget($target);
        }

        if (count($params) > 0) {
            $event->setParams($params + $event->getParams());
        }

        return $event;
    }
protected function _normalizeEvent ( $ event , $ params = [ ] , $ target = null ) { if ( is_string ( $ event ) || $ event instanceof Stringable ) { return $ this -> _createEvent ( $ this -> _normalizeString ( $ event ) , $ params , $ target ) ; } if ( ! ( $ event instanceof EventInterface ) ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Argument is not a string, stringable object or event instance' ) , null , null , $ event ) ; } if ( $ target !== null ) { $ event -> setTarget ( $ target ) ; } if ( count ( $ params ) > 0 ) { $ event -> setParams ( $ params + $ event -> getParams ( ) ) ; } return $ event ; }
Normalizes the given event into an Event instance.

@since [*next-version*]

@param EventInterface|string|Stringable $event  Event instance or an event name string.
@param array                            $params The event parameters; will be added to existing parameters if
the $event argument is an {@see EventInterface} instance.
@param object                           $target The target of the event.

@return EventInterface The event instance.
Normalizes the given event into an Event instance .