public static function convertUserProfileToMap($userProfile)
    {
        $userProfileMap = array(
            self::USER_ID_KEY => $userProfile->getUserId(),
            self::EXPERIMENT_BUCKET_MAP_KEY => array()
        );
        $experimentBucketMap = $userProfile->getExperimentBucketMap();
        foreach ($experimentBucketMap as $experimentId => $decision) {
            $userProfileMap[self::EXPERIMENT_BUCKET_MAP_KEY][$experimentId] = array(
                    self::VARIATION_ID_KEY => $decision->getVariationId()
                );
        }
        return $userProfileMap;
    }
public static function convertUserProfileToMap($userProfile)
    {
        $userProfileMap = array(
            self::USER_ID_KEY => $userProfile->getUserId(),
            self::EXPERIMENT_BUCKET_MAP_KEY => array()
        );
        $experimentBucketMap = $userProfile->getExperimentBucketMap();
        foreach ($experimentBucketMap as $experimentId => $decision) {
            $userProfileMap[self::EXPERIMENT_BUCKET_MAP_KEY][$experimentId] = array(
                    self::VARIATION_ID_KEY => $decision->getVariationId()
                );
        }
        return $userProfileMap;
    }
public static function convertUserProfileToMap ( $ userProfile ) { $ userProfileMap = array ( self :: USER_ID_KEY => $ userProfile -> getUserId ( ) , self :: EXPERIMENT_BUCKET_MAP_KEY => array ( ) ) ; $ experimentBucketMap = $ userProfile -> getExperimentBucketMap ( ) ; foreach ( $ experimentBucketMap as $ experimentId => $ decision ) { $ userProfileMap [ self :: EXPERIMENT_BUCKET_MAP_KEY ] [ $ experimentId ] = array ( self :: VARIATION_ID_KEY => $ decision -> getVariationId ( ) ) ; } return $ userProfileMap ; }
Convert the given UserProfile object into a map.

@param $userProfile UserProfile The user profile object to convert to a map.

@return array The map representing the user profile object.
Convert the given UserProfile object into a map .