\r\n

51Degrees Pipeline PHP  4.4

51Degrees Pipeline for PHP

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine Class Reference

Inheritance diagram for fiftyone\pipeline\cloudrequestengine\CloudRequestEngine:

[legend]

Collaboration diagram for fiftyone\pipeline\cloudrequestengine\CloudRequestEngine:

[legend]

Public Member Functions

 __construct ($settings)
Constructor for CloudRequestEngine. More...
 getEvidenceKeyFilter ()
Instance of EvidenceKeyFilter based on the evidence keys fetched from the cloud service by the private getEvidenceKeys() method. More...
 processInternal ($flowData)
Processing function for the CloudRequestEngine Makes a request to the cloud service with the supplied resource key and evidence and returns a JSON object that is then parsed by cloud engines placed later in the pipeline. More...
 getContent ($flowData)
Generate the Content to send in the POST request. More...
 addQueryData ($queryData, $allEvidence, $evidence)
Add query data to the evidence. More...
 getSelectedEvidence ($evidence, $type)
Get evidence with specified prefix. More...
 keyHasPrefix ($itemKey, $prefix)
Check that the key of a KeyValuePair has the given prefix. More...

Public Member Functions inherited from fiftyone\pipeline\engines\Engine

 getDataSourceTier ()
Get the tier to which the current data source belongs. More...
 setCache ($cache)
Add a cache to an engine. More...
 setRestrictedProperties ($propertiesList)
Add a subset of properties. More...
 inCache ($flowData)
A method to check if a flowData's evidence is in the cache. More...
 process ($flowData)
Engine's core process function. More...

Public Member Functions inherited from fiftyone\pipeline\core\FlowElement

 process ($flowData)
General wrapper function that calls a FlowElement's processInternal method. More...
 getEvidenceKeyFilter ()
Function for getting the FlowElement's EvidenceKeyFilter Used by the filterEvidence method. More...
 filterEvidence ($flowData)
Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. More...
 filterEvidenceKey ($key)
Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. More...
 onRegistration ($pipeline)
Callback called when an engine is added to a pipeline. More...
 processInternal ($flowData)
Process FlowData - this is process function is usually overriden by specific FlowElements to do their core work. More...
 getProperties ()
Get properties is usually overriden by specific FlowElements. More...
 updatePropertyList ()
Update a FlowElement's property list This is used by elements that are only aware of their properites at a later stage, such as cloud request based FlowElements or FlowElements that change their properties later based on new datafiles.
 __construct ()
A default dummy constructor is needed for there are classes inheriting this class deeper than 1-level of inheritance and calling parent::__construct() in their explicit constructors unfortunately intermediates do not define their own __construct() so the call propagates up to the base class FlowElement and fails. More...

Data Fields

 $dataKey = "cloud"
 $baseURL
 $cloudRequestOrigin
 $flowElementProperties = array()
 $resourceKey

Data Fields inherited from fiftyone\pipeline\engines\Engine

 $restrictedProperties

Data Fields inherited from fiftyone\pipeline\core\FlowElement

 $dataKey  $properties = []  $pipelines = []

Constructor & Destructor Documentation

◆ __construct()

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine::__construct (   $settings )

Constructor for CloudRequestEngine.

Parameters
array - settings Settings should contain a resourceKey and optionally: 1) a cloudEndPoint to overwrite the default baseurl 2) an cloudRequestOrigin to use when sending requests to cloud

Member Function Documentation

◆ addQueryData()

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine::addQueryData (   $queryData,
  $allEvidence,
  $evidence  
)

Add query data to the evidence.

Parameters
queryData - The destination Array to add query data to.
allEvidence - All evidence in the flow data. This is used to report which evidence keys are conflicting.
evidence - Evidence to add to the query Data.

◆ getContent()

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine::getContent (   $flowData )

Generate the Content to send in the POST request.

The evidence keys e.g. 'query.' and 'header.' have an order of precedence. These are added to the evidence in reverse order, if there is conflict then the queryData value is overwritten.

'query.' evidence should take precedence over all other evidence. If there are evidence keys other than 'query.' that conflict then this is unexpected so a warning will be logged.

Parameters
FlowData -
Returns
Array

◆ getEvidenceKeyFilter()

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine::getEvidenceKeyFilter ( )

Instance of EvidenceKeyFilter based on the evidence keys fetched from the cloud service by the private getEvidenceKeys() method.

Returns
BasicListEvidenceKeyFilter

◆ getSelectedEvidence()

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine::getSelectedEvidence (   $evidence,
  $type  
)

Get evidence with specified prefix.

Parameters
evidence - All evidence in the flow data.
type - Required evidence key prefix

◆ keyHasPrefix()

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine::keyHasPrefix (   $itemKey,
  $prefix  
)

Check that the key of a KeyValuePair has the given prefix.

Parameters
itemKey - Key to check
prefix - The prefix to check for.
Returns
: True if the key has the prefix.

◆ processInternal()

fiftyone\pipeline\cloudrequestengine\CloudRequestEngine::processInternal (   $flowData )

Processing function for the CloudRequestEngine Makes a request to the cloud service with the supplied resource key and evidence and returns a JSON object that is then parsed by cloud engines placed later in the pipeline.

Parameters
FlowData -
On This Page