51Degrees Pipeline for PHP

fiftyone\pipeline\cloudrequestengine\CloudEngine Class Reference

Detailed Description

This is a template for all 51Degrees cloud engines.

It requires the 51Degrees cloudRequestEngine to be placed in a pipeline before it. It takes that raw JSON response and parses it to extract the device part. It also uses this data to generate a list of properties. It reads no Evidence, so it accepts none.

Inheritance diagram for fiftyone\pipeline\cloudrequestengine\CloudEngine:

[legend]

Collaboration diagram for fiftyone\pipeline\cloudrequestengine\CloudEngine:

[legend]

Public Member Functions

 onRegistration (Pipeline $pipeline)
 Callback called when an engine is added to a pipeline.
 getEvidenceKeyFilter ()
 A cloud engine reads only the Cloud Request Engine's response, so it accepts no Evidence.
 processInternal (FlowData $flowData)
 Process FlowData - this is process function is usually overridden by specific FlowElements to do their core work.

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

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

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

 __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.
 filterEvidence (FlowData $flowData)
 Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
 filterEvidenceKey (string $key)
 Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
 getProperties ()
 Get properties Usually overridden by specific FlowElements.
 updatePropertyList ()
 Update a FlowElement's property list This is used by elements that are only aware of their properties at a later stage, such as cloud request based FlowElements or FlowElements that change their properties later based on new datafiles.

Data Fields

string $dataKey = 'CloudEngineBase'
array $aspectProperties

Data Fields inherited from fiftyone\pipeline\engines\Engine

array $restrictedProperties

Data Fields inherited from fiftyone\pipeline\core\FlowElement

string $dataKey
array $properties = []
array $pipelines = []

Protected Member Functions

 logMissingProduct (FlowData $flowData)
 Log once, at warning level, when the products the Cloud Request Engine found hold nothing for this engine's Data Key.

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

 holdsValueForOneRequest (ElementData $data)
 Whether a result holds a value created for the one request that asked for it, such as a 51Did.

Member Function Documentation

◆ getEvidenceKeyFilter()

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

A cloud engine reads only the Cloud Request Engine's response, so it accepts no Evidence.

Reimplemented from fiftyone\pipeline\core\FlowElement.

◆ logMissingProduct()

fiftyone\pipeline\cloudrequestengine\CloudEngine::logMissingProduct ( FlowData $flowData)
protected

Log once, at warning level, when the products the Cloud Request Engine found hold nothing for this engine's Data Key.

A Resource Key with no product for the engine is not an error. Call this after reading the Cloud Request Engine's Element Data, because the products are found before that data is set.

◆ onRegistration()

fiftyone\pipeline\cloudrequestengine\CloudEngine::onRegistration ( Pipeline $pipeline)

Callback called when an engine is added to a pipeline.

Exceptions

Exception

Reimplemented from fiftyone\pipeline\core\FlowElement.

◆ processInternal()

fiftyone\pipeline\cloudrequestengine\CloudEngine::processInternal ( FlowData $flowData)

Process FlowData - this is process function is usually overridden by specific FlowElements to do their core work.

Reimplemented from fiftyone\pipeline\core\FlowElement.

Reimplemented in fiftyone\pipeline\devicedetection\HardwareProfileCloud, and fiftyone\pipeline\ipintelligence\IpIntelligenceCloud.