Beispiel #1
0
function AlphaNumeric_generate_item($row, $options, $existing_row_data)
{
    $formats = explode("|", $options);
    $chosen_format = $formats[0];
    if (count($formats) > 1) {
        $chosen_format = $formats[rand(0, count($formats) - 1)];
    }
    return gd_generate_random_alphanumeric_str($chosen_format);
}
Beispiel #2
0
function PostalZip_convert($str)
{
    $formats = explode("|", $str);
    if (count($formats) == 1) {
        $format = $formats[0];
    } else {
        $format = $formats[rand(0, count($formats) - 1)];
    }
    return gd_generate_random_alphanumeric_str($format);
}
Beispiel #3
0
function GUID_generate_item($row, $options, $existing_row_data)
{
    global $GUID_generated;
    $guid = gd_generate_random_alphanumeric_str("HHHHHHHH-HHHH-HHHH-HHHH-HHHH-HHHHHHHH");
    // pretty sodding unlikely, but just in case!
    while (in_array($guid, $GUID_generated)) {
        $guid = gd_generate_random_alphanumeric_str("HHHHHHHH-HHHH-HHHH-HHHH-HHHH-HHHHHHHH");
    }
    $GUID_generated[] = $guid;
    return $guid;
}