Class SimpleID\Util\Events\BaseDataCollectionEvent

extends BaseEvent
implements GenericEventInterface
uses GenericEventTrait

A generic event used to collect data.

This class implements f3-event-dispatcher's GenericEventInterface, and therefore the event name is specified by the $eventName parameter passed in the constructor.

Listeners add data by calling the addResult() method. How this is added to the existing data depends on the merge strategy:

  • If the merge strategy is MERGE_APPEND, then the result is appended to the existing data
  • If the merge strategy is MERGE_PLAIN, then the result is merged to the existing data using array_merge
  • If the merge strategy is MERGE_RECURSIVE, then the result is merged to the existing data using array_merge_recursive
  • If the merge strategy is MERGE_DEFAULT, then the result is appended if it is a scalar, or merged if it is an array

The emitter can retrieve the collected data by calling the getResults() method.

Methods
Methods used from SimpleID\Util\Events\GenericEventTrait
setEventName(), getEventName()
Constants
Properties
Properties used from SimpleID\Util\Events\GenericEventTrait
$eventName