Detailed Description
Engine 2: translates the weighted English country names from Engine 1 into the browser language, and builds the complete ordered "All" lists used by the country dropdown.
Mirrors ip-intelligence-dotnet's CountriesTranslationEngine. The base engine produces the weighted translated names; this engine then appends every other known country (alphabetically) to form the ordered All lists, with the most probable country first.
Inheritance diagram for fiftyone\pipeline\ipintelligence\translation\CountriesTranslationEngine:
Collaboration diagram for fiftyone\pipeline\ipintelligence\translation\CountriesTranslationEngine:
Public Member Functions | |
| __construct (?string $translationsDir=null) | |
| onRegistration (Pipeline $pipeline) | |
| Logs that a value was read from the deprecated environment variable, when one was and that has not been logged yet. | |
| 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\translation\TranslationEngine | |
| __construct (string|array $elementDataKey=[], ?string $sourceElementDataKey=null, array $propertyMap=[], array $localeMaps=[], ?string $fixedLanguage=null, string $missingTranslationBehavior=MissingTranslationBehavior::ORIGINAL, ?string $behavior=null) | |
| Builds the engine from its arguments, or from the settings array that PipelineBuilder::buildFromConfig passes every element it builds from a configuration file. | |
| getEvidenceKeyFilter () | |
| The Evidence this element accepts. | |
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. | |
Additional Inherited Members | |
Data Fields inherited from fiftyone\pipeline\translation\TranslationEngine | |
| string | $dataKey |
| const | EVIDENCE_KEYS |
| const | DEFAULT_ELEMENT_DATA_KEY = 'translation' |
| The element data key of an engine built from settings, the key the .NET Translation Engine uses. | |
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 inherited from fiftyone\pipeline\translation\TranslationEngine | |
| buildTranslatedProperties (FlowData $flowData, Translator $translator) | |
| Translate every mapped property and return the result keyed by lower-cased destination property name. | |
| resolveTranslator (FlowData $flowData) | |
| Resolve the translator and locale to use for this request. | |
| getEvidenceValue (FlowData $flowData) | |
| Read the first non-blank translation evidence value, in precedence order. | |
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. | |
Protected Attributes inherited from fiftyone\pipeline\translation\TranslationEngine | |
| array | $propertyMap |
| string | $sourceElementDataKey |
| string | $fixedLanguage |
| string | $behavior |
| array | $translators = [] |
| array | $availableLocales = [] |
| Translator | $emptyTranslator |
Member Function Documentation
◆ onRegistration()
| fiftyone\pipeline\ipintelligence\translation\CountriesTranslationEngine::onRegistration | ( | Pipeline | $pipeline | ) |
Logs that a value was read from the deprecated environment variable, when one was and that has not been logged yet.
Reimplemented from fiftyone\pipeline\core\FlowElement.
◆ processInternal()
| fiftyone\pipeline\ipintelligence\translation\CountriesTranslationEngine::processInternal | ( | FlowData | $flowData | ) |
Process FlowData - this is process function is usually overridden by specific FlowElements to do their core work.
Reimplemented from fiftyone\pipeline\translation\TranslationEngine.
