51Degrees Pipeline for PHP

fiftyone\pipeline\core\FlowData Class Reference

Collaboration diagram for fiftyone\pipeline\core\FlowData:

[legend]

Public Member Functions

 __construct (Pipeline $pipeline)
 Constructor for FlowData.
 __get (string $flowElementKey)
 Magic getter to allow $FlowData->FlowElementKey getting.
 process ()
 process function runs the process function on every attached FlowElement allowing data to be changed based on evidence This can only be run once per FlowData instance.
 close ()
 Release the native resources held by the element data in this FlowData, such as the results of an on-premise engine, which keep the engine's data in memory until they are released.
 getFromElement (FlowElement $flowElement)
 Retrieve data by FlowElement object.
 get (string $flowElementKey)
 Retrieve data by FlowElement key.
 setElementData (ElementData $data)
 Set data (used by FlowElement).
 setError (string $key, \Throwable $error)
 Set error (should be keyed by FlowElement dataKey).
 getEvidenceDataKey ()
 Get an array evidence stored in the FlowData, filtered by its FlowElements' EvidenceKeyFilters.
 stop ()
 Stop processing any subsequent FlowElements.
 getWhere (string $metaKey, $metaValue)
 Get data from FlowElement based on property metadata.

Data Fields

Pipeline $pipeline
bool $stopped = false
Evidence $evidence
array $data = []
bool $processed = false
array $errors = []

Constructor & Destructor Documentation

◆ __construct()

fiftyone\pipeline\core\FlowData::__construct ( Pipeline $pipeline)

Constructor for FlowData.

Parameters
\fiftyone\pipeline\core\Pipeline$pipelineParent Pipeline

Member Function Documentation

◆ close()

fiftyone\pipeline\core\FlowData::close ( )

Release the native resources held by the element data in this FlowData, such as the results of an on-premise engine, which keep the engine's data in memory until they are released.

Call it in a finally block once the FlowData is finished with, so that this happens straight away rather than when the garbage collector next runs.

Only element data with a close method of its own is closed, so element data that needs no cleanup, such as an entry in a results cache, is left alone. Values already read are unaffected.

◆ get()

fiftyone\pipeline\core\FlowData::get ( string $flowElementKey)

Retrieve data by FlowElement key.

Exceptions

Exception

◆ getEvidenceDataKey()

fiftyone\pipeline\core\FlowData::getEvidenceDataKey ( )

Get an array evidence stored in the FlowData, filtered by its FlowElements' EvidenceKeyFilters.

Returns
array<string, int|string>

◆ getWhere()

fiftyone\pipeline\core\FlowData::getWhere ( string $metaKey,
$metaValue )

Get data from FlowElement based on property metadata.

Parameters
mixed$metaValue
Returns
array<string, mixed>

◆ process()

fiftyone\pipeline\core\FlowData::process ( )

process function runs the process function on every attached FlowElement allowing data to be changed based on evidence This can only be run once per FlowData instance.

Returns
static