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:
Collaboration diagram for fiftyone\pipeline\core\SetHeaderElement:
Public Member Functions | |
| processInternal (FlowData $flowData) | |
| Add the response header dictionary to the FlowData. | |
| getSetHeaderPropertiesPipeline (Pipeline $pipeline) | |
| Get All the properties starting with SetHeader string from pipeline. | |
| getPropertyValue (FlowData $flowData, string $elementKey, string $propertyKey) | |
| Try to get the value for the given element and property. | |
| getResponseHeaderName (string $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. | |
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. | |
| process (FlowData $flowData) | |
| General wrapper function that calls a FlowElement's processInternal method. | |
| getEvidenceKeyFilter () | |
| Function for getting the FlowElement's EvidenceKeyFilter Used by the filterEvidence method. | |
| filterEvidence (FlowData $flowData) | |
| Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. | |
| filterEvidenceKey (string $key) | |
| Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. | |
| onRegistration (Pipeline $pipeline) | |
| Callback called when an engine is added to a pipeline. | |
| 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 = 'set-headers' |
Data Fields inherited from fiftyone\pipeline\core\FlowElement | |
| string | $dataKey |
| array | $properties = [] |
| array | $pipelines = [] |
Member Function Documentation
◆ getPropertyValue()
| fiftyone\pipeline\core\SetHeaderElement::getPropertyValue | ( | FlowData | $flowData, |
| string | $elementKey, | ||
| string | $propertyKey ) |
Try to get the value for the given element and property.
If the value cannot be found or is null/unknown, then an empty string will be returned.
- Parameters
-
\fiftyone\pipeline\core\FlowData $flowData A processed FlowData instance to get the value from string $elementKey Key for the element data to get the value from string $propertyKey name of the property to get the value for
@phpstan-var null|\fiftyone\pipeline\core\AspectPropertyValue $property
◆ getResponseHeaderName()
| fiftyone\pipeline\core\SetHeaderElement::getResponseHeaderName | ( | string | $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
-
string $propertyKey Key for SetHeaderAcceptCH property
- Returns
- string Response header name
- Exceptions
-
Exception
@phpstan-var array<string> $parts
◆ getSetHeaderPropertiesPipeline()
| fiftyone\pipeline\core\SetHeaderElement::getSetHeaderPropertiesPipeline | ( | Pipeline | $pipeline | ) |
Get All the properties starting with SetHeader string from pipeline.
- Returns
- array<string, array<int, mixed>> A dictionary object containing SetHeader properties list against flowElement
◆ processInternal()
| fiftyone\pipeline\core\SetHeaderElement::processInternal | ( | FlowData | $flowData | ) |
Add the response header dictionary to the FlowData.
Reimplemented from fiftyone\pipeline\core\FlowElement.
