◆ __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 -