src/Model.php
protected function fire_model_event( $event, $arguments = array() ) {

		if ( ! static::$_event_dispatcher ) {
			return;
		}

		$event = static::table()->get_slug() . ".$event";

		static::$_event_dispatcher->dispatch( $event, new GenericEvent( $this, $arguments ) );
	}
protected function fire_model_event( $event, $arguments = array() ) {

		if ( ! static::$_event_dispatcher ) {
			return;
		}

		$event = static::table()->get_slug() . ".$event";

		static::$_event_dispatcher->dispatch( $event, new GenericEvent( $this, $arguments ) );
	}
Fire a model event.

Will bail early if no event dispatcher is available.

@since 2.0

@param string $event     Event name.
@param array  $arguments Additional arguments passed to the GenericEvent object.