src/AbstractEntityService.php
protected function trigger($name, array $params)
    {
        $event = clone $this->getEvent();
        $event->setName($name);
        $event->setParams($params);

        $responseCollection = $this->getEventManager()->triggerEvent($event);

        if ($responseCollection->stopped() && $event->isError()) {
            throw new RuntimeException($event->getError(), $event->getErrorNr());
        }

        return $event->getResult();
    }
protected function trigger($name, array $params)
    {
        $event = clone $this->getEvent();
        $event->setName($name);
        $event->setParams($params);

        $responseCollection = $this->getEventManager()->triggerEvent($event);

        if ($responseCollection->stopped() && $event->isError()) {
            throw new RuntimeException($event->getError(), $event->getErrorNr());
        }

        return $event->getResult();
    }
protected function trigger ( $ name , array $ params ) { $ event = clone $ this -> getEvent ( ) ; $ event -> setName ( $ name ) ; $ event -> setParams ( $ params ) ; $ responseCollection = $ this -> getEventManager ( ) -> triggerEvent ( $ event ) ; if ( $ responseCollection -> stopped ( ) && $ event -> isError ( ) ) { throw new RuntimeException ( $ event -> getError ( ) , $ event -> getErrorNr ( ) ) ; } return $ event -> getResult ( ) ; }
will prepare the event object and trigger the event using the internal EventManager

@param  string $name
@param  array $params
@return mixed
@throws \Zend\EventManager\Exception\InvalidArgumentException
@throws \PolderKnowledge\EntityService\Exception\RuntimeException
will prepare the event object and trigger the event using the internal EventManager