Skip to main content

GF_Feed_Processor

GF_Feed_Processor Class.

Since: 2.2

Source: includes/addon/class-gf-feed-processor.php:18

Details

  • Kind: class
  • Namespace: (global)
  • Extends: GF_Background_Process

Properties

PropertyTypeDescription
$actionstringThe action name.
$supports_attemptsboolIndicates if the task uses an array that supports the attempts key.
$add_onnull | GFFeedAddOnNull or the add-on instance.

Methods

MethodDescription
__construct()Instantiates the class.
get_instance()Get instance of this class.
push_to_queue()Push to queue
can_process_feed()Determines if the feed can be processed based on the contents of the processed feeds entry meta.
log_debug()Writes a message to the add-on or core log.
log_error()Writes an error message to the add-on or core log.

Method Reference

__construct()

public function __construct( $allowed_batch_data_classes=true, $add_on=null )

Instantiates the class.

Parameters

NameTypeDefaultDescription
$allowed_batch_data_classesbool | arraytrueOptional. Array of class names that can be unserialized. Default true (any class).
$add_onnull | GFFeedAddOnnullOptional. The add-on instance.

Since: 2.9.25

Source: includes/addon/class-gf-feed-processor.php:65

get_instance()

public static function get_instance( $add_on=null )

Get instance of this class.

Parameters

NameTypeDefaultDescription
$add_onnull | GFFeedAddOnnullOptional. The add-on instance.

Returns

Since:

  • 2.2
  • 2.9.25 (Added the $add_on param.)

Source: includes/addon/class-gf-feed-processor.php:83

push_to_queue()

public function push_to_queue( $data )

Push to queue

Parameters

NameTypeDefaultDescription
$datamixedData.

Returns

  • $this

Since: 2.9.25

Source: includes/addon/class-gf-feed-processor.php:103

can_process_feed()

public function can_process_feed( $feed, $entry, $form, $addon )

Determines if the feed can be processed based on the contents of the processed feeds entry meta.

Parameters

NameTypeDefaultDescription
$feedarrayThe feed queued for processing.
$entryarrayThe entry being processed.
$formarrayThe form the entry belongs to.
$addonGFFeedAddOnThe current instance of the add-on the feed belongs to.

Returns

  • bool

Since: 2.9.2

Source: includes/addon/class-gf-feed-processor.php:290

log_debug()

public function log_debug( $message )

Writes a message to the add-on or core log.

Parameters

NameTypeDefaultDescription
$messagestringThe message to be logged.

Returns

  • void

Since: 2.9.25

Source: includes/addon/class-gf-feed-processor.php:379

log_error()

public function log_error( $message )

Writes an error message to the add-on or core log.

Parameters

NameTypeDefaultDescription
$messagestringThe message to be logged.

Returns

  • void

Since: 2.9.25

Source: includes/addon/class-gf-feed-processor.php:396