public function dispatch(Event $event, $data, ArrayObject $options)
    {
        $eventName = $event->getName();
        if (empty($this->_config['events'][$eventName])) {
            return;
        }

        $fields = $this->_config['events'][$eventName];

        if ($data instanceof EntityInterface) {
            $this->_injectEntity($data, $options, $fields);

            return;
        }

        if ($data instanceof Query) {
            $this->_injectConditions($data, $options, $fields);

            return;
        }

        throw new InvalidArgumentException(sprintf(
            'Event "%s" is not supported.',
            $eventName
        ));
    }