src/Events.php
/**
     * Run actions based on the event in the header.
     *
     * @param array $headers Attributes of the message headers
     * @param array $body    Attributes of the message body
     */
Run actions based on the event in the header.
@param array $headers Attributes of the message headers
@param array $body    Attributes of the message body
Run actions based on the event in the header . @param array $headers Attributes of the message headers @param array $body Attributes of the message body
public function triggerActions(array $headers, array $body): void
    {
        $event = static::class . '::' . $headers['event'];
        $actions = Constant::getActions($event);
        if (empty($actions) === true) {
            MessageConsumer::log('WARNING', 'UNDEFINED_EVENT', 'IGNORED', $headers, $body);
        } else {
            each($actions, $this->triggerAction($headers, $body));
        }
    }
public function triggerActions ( array $ headers , array $ body ) : void { $ event = static :: class . '::' . $ headers [ 'event' ] ; $ actions = Constant :: getActions ( $ event ) ; if ( empty ( $ actions ) === true ) { MessageConsumer :: log ( 'WARNING' , 'UNDEFINED_EVENT' , 'IGNORED' , $ headers , $ body ) ; } else { each ( $ actions , $ this -> triggerAction ( $ headers , $ body ) ) ; } }
Run actions based on the event in the header.
Run actions based on the event in the header .