\r\n

51Degrees Pipeline PHP  4.1Newer Version 4.4

51Degrees Pipeline for PHP

fiftyone\pipeline\core\SetHeaderElement Class Reference

Detailed Description

Set response headers element class.

This is used to get response headers based on what the browser supports. For example, newer Chrome browsers support the Accept-CH header

Inheritance diagram for fiftyone\pipeline\core\SetHeaderElement:

[legend]

Collaboration diagram for fiftyone\pipeline\core\SetHeaderElement:

[legend]

Public Member Functions

 processInternal ($flowData)
Add the response header dictionary to the FlowData. More...
 getSetHeaderPropertiesPipeline ($pipeline)
Get All the properties starting with SetHeader string from pipeline. More...
 getResponseHeaderValue ($flowData, $setHeaderPropertiesDict)
Get response header value using set header properties from FlowData. More...
 getPropertyValue ($flowData, $elementKey, $propertyKey)
Try to get the value for the given element and property. More...
 getResponseHeaderName ($propertyKey)
Determines which response header the property value will be appended to by stripping the 'SetHeader' string and the 'Component Name' from the property name. 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 = "set-headers"

Data Fields inherited from fiftyone\pipeline\core\FlowElement

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

Member Function Documentation

◆ getPropertyValue()

fiftyone\pipeline\core\SetHeaderElement::getPropertyValue (   $flowData,
  $elementKey,
  $propertyKey  
)

Try to get the value for the given element and property.

If the value cannot be found or is null/unknown, then "" will be returned.

Parameters
flowData - A processed FlowData instance to get the value from.
elementKey - Key for the element data to get the value from
propertyKey - Name of the property to get the value for.
Returns
value or empty string

◆ getResponseHeaderName()

fiftyone\pipeline\core\SetHeaderElement::getResponseHeaderName (   $propertyKey )

Determines which response header the property value will be appended to by stripping the 'SetHeader' string and the 'Component Name' from the property name.

Parameters
propertyKey - Key for SetHeaderAcceptCH property
Returns
Response Header name

◆ getResponseHeaderValue()

fiftyone\pipeline\core\SetHeaderElement::getResponseHeaderValue (   $flowData,
  $setHeaderPropertiesDict  
)

Get response header value using set header properties from FlowData.

Parameters
flowdata - A processed FlowData object containing setheader properties
setHeaderPropertiesDict - A processed FlowData object containing setheader properties
Returns
A dictionary object containing SetHeader properties list against flowElement

◆ getSetHeaderPropertiesPipeline()

fiftyone\pipeline\core\SetHeaderElement::getSetHeaderPropertiesPipeline (   $pipeline )

Get All the properties starting with SetHeader string from pipeline.

Parameters
pipeline - Pipeline
Returns
A dictionary object containing SetHeader properties list against flowElement

◆ processInternal()

fiftyone\pipeline\core\SetHeaderElement::processInternal (   $flowData )

Add the response header dictionary to the FlowData.

Parameters
FlowData - FlowData
On This Page