Exemplo n.º 1
0
function StreetAddress_generate_item($row, $options, $existing_row_data)
{
    global $g_words, $LANG;
    $street_address = "";
    $street_name = ucwords(gd_generate_random_text_str($g_words, false, "fixed", 1));
    $valid_street_types = explode(",", $LANG["StreetAddress_street_types"]);
    $street_type = $valid_street_types[rand(0, count($valid_street_types) - 1)];
    $format = rand(1, 4);
    switch ($format) {
        case "1":
            $street_address = $LANG["StreetAddress_po_box"] . " " . rand(100, 999) . ", " . rand(100, 9999) . " {$street_name} " . $street_type;
            break;
        case "2":
            $street_address = rand(100, 999) . "-" . rand(100, 9999) . " {$street_name} " . $street_type;
            break;
        case "3":
            $street_address = $LANG["StreetAddress_ap_num"] . rand(100, 999) . "-" . rand(100, 9999) . " {$street_name} " . $street_type;
            break;
        case "4":
            $street_address = rand(100, 9999) . " {$street_name} " . $street_type;
            break;
    }
    return $street_address;
}
Exemplo n.º 2
0
function TextRandom_generate_item($row, $options, $existing_row_data)
{
    global $g_words;
    return gd_generate_random_text_str($g_words, $options["startsWithLipsum"], "range", $options["numWordsMin"], $options["numWordsMax"]);
}
Exemplo n.º 3
0
function TextFixed_generate_item($row, $options, $existing_row_data)
{
    global $g_words;
    return gd_generate_random_text_str($g_words, false, "fixed", $options);
}