src/MultiTierArchitecture/Mapper/Definition/EntityMapperAbstract.php
private static function returnKey($key, $mappingArray)
    {
        if (!is_array($mappingArray)) {
            return $key;
        }

        foreach ($mappingArray as $mappingKey => $mappingData) {
            if (is_array($mappingData)) {
                if (isset($mappingData[$key])) {
                    return $mappingData[$key];
                }
            }
            else {
                if ($mappingKey == $key) {
                    return $mappingData;
                }
            }
        }
        return $key;
    }
private static function returnKey($key, $mappingArray)
    {
        if (!is_array($mappingArray)) {
            return $key;
        }

        foreach ($mappingArray as $mappingKey => $mappingData) {
            if (is_array($mappingData)) {
                if (isset($mappingData[$key])) {
                    return $mappingData[$key];
                }
            }
            else {
                if ($mappingKey == $key) {
                    return $mappingData;
                }
            }
        }
        return $key;
    }
private static function returnKey ( $ key , $ mappingArray ) { if ( ! is_array ( $ mappingArray ) ) { return $ key ; } foreach ( $ mappingArray as $ mappingKey => $ mappingData ) { if ( is_array ( $ mappingData ) ) { if ( isset ( $ mappingData [ $ key ] ) ) { return $ mappingData [ $ key ] ; } } else { if ( $ mappingKey == $ key ) { return $ mappingData ; } } } return $ key ; }
Search for mapping key

@param int|string  $key           Key that will be used in the search
@param array       $mappingArray  Array of array that has mapping data

@return mixed
Search for mapping key