Soong
Soong provides a general-purpose ETL library for data migration.
KeyMap Interface Reference

Represents the mapping of extracted keys to loaded keys. More...

Inheritance diagram for KeyMap:
ConfigurableComponent Countable KeyMapBase

Public Member Functions

 saveKeyMap (array $extractedKey, array $loadedKey)
 Persist the mapping of an extracted key to the corresponding loaded key. More...
 
 lookupLoadedKey (array $extractedKey)
 Retrieve the loaded key corresponding to a given extracted key. More...
 
 lookupExtractedKeys (array $loadedKey)
 Retrieve any extracted keys mapped to a given loaded key. More...
 
 delete (array $extractedKey)
 Remove the mapping for a given extracted key from the map. More...
 
 iterate ()
 Iterate over the key map, generating the keys. More...
 
- Public Member Functions inherited from ConfigurableComponent
 getConfigurationValue (string $optionName)
 Retrieve a configuration value for a named option. More...
 
 getAllConfigurationValues ()
 Retrieve a list of all available configuration values. More...
 

Detailed Description

Represents the mapping of extracted keys to loaded keys.

Member Function Documentation

◆ saveKeyMap()

saveKeyMap ( array  $extractedKey,
array  $loadedKey 
)

Persist the mapping of an extracted key to the corresponding loaded key.

Parameters
array$extractedKeyExtracted key values, keyed by key names.
array$loadedKeyLoaded key values, keyed by key names.
Exceptions

◆ lookupLoadedKey()

lookupLoadedKey ( array  $extractedKey)

Retrieve the loaded key corresponding to a given extracted key.

Parameters
array$extractedKeyExtracted key values, keyed by key names.
Returns
array Loaded key values, keyed by key names.

◆ lookupExtractedKeys()

lookupExtractedKeys ( array  $loadedKey)

Retrieve any extracted keys mapped to a given loaded key.

Note that multiple extracted keys may map to one loaded key - while lookupLoadedKey returns a single key array, lookupExtractedKeys returns an array of key arrays.

Parameters
array$loadedKeyLoaded key values, keyed by key names.
Returns
array[] Array of extracted keys, each of which is keyed by key names.

◆ delete()

delete ( array  $extractedKey)

Remove the mapping for a given extracted key from the map.

Parameters
array$extractedKeyExtracted key values, keyed by key names.

◆ iterate()

iterate ( )

Iterate over the key map, generating the keys.

Returns
iterable