51Degrees Pipeline for PHP

fiftyone\pipeline\core\Pipeline Class Reference

Detailed Description

Pipeline holding a list of FlowElements for processing, can create FlowData that will be passed through these, collecting ElementData Should be constructed through the PipelineBuilder class.

Collaboration diagram for fiftyone\pipeline\core\Pipeline:

[legend]

Public Member Functions

 __construct (array $flowElements, array $settings)
 Pipeline constructor.
 createFlowData ()
 Create a FlowData based on what's in the Pipeline.
 close ()
 Close the FlowElements that have a close method, which releases the native resources they hold, unless the autoCloseElements setting is false.
 log (string $level, string $message)
 getElement (string $key)
 Get a FlowElement by its name.
 updatePropertyDatabaseForFlowElement (FlowElement $flowElement)
 Update metadata store for a FlowElement based on its list of properties.

Data Fields

array $flowElements
array $flowElementsList = []
Logger $logger
 $metaDataStore
 @phpstan-ignore-next-line
bool $suppressProcessExceptions
bool $autoCloseElements
 If true, the default, closing the Pipeline closes its FlowElements.
array $propertyDatabase

Constructor & Destructor Documentation

◆ __construct()

fiftyone\pipeline\core\Pipeline::__construct ( array $flowElements,
array $settings )

Pipeline constructor.

Parameters
array<

fiftyone\pipeline\core\FlowElement> $flowElements List of FlowElements

Parameters
array<string,mixed>$settings

Member Function Documentation

◆ close()

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

Close the FlowElements that have a close method, which releases the native resources they hold, unless the autoCloseElements setting is false.

Call it in a finally block once the Pipeline is finished with.

FlowData created by the Pipeline are not closed by it. Close each one as well, because the results it holds keep the engine's data in memory until they are released.

Field Documentation

◆ $autoCloseElements

bool fiftyone\pipeline\core\Pipeline::$autoCloseElements

If true, the default, closing the Pipeline closes its FlowElements.

Set the autoCloseElements setting to false when the elements are shared with another Pipeline, and close each element once every Pipeline using it is finished with.