mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-21 15:59:52 +01:00
commit
33ea3dd01a
src/Faker/Provider/lv_LV
114
src/Faker/Provider/lv_LV/Address.php
Normal file
114
src/Faker/Provider/lv_LV/Address.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace Faker\Provider\lv_LV;
|
||||
|
||||
class Address extends \Faker\Provider\Base
|
||||
{
|
||||
protected static $cityPrefix = array('pilsēta');
|
||||
|
||||
protected static $regionSuffix = array('reģions');
|
||||
protected static $streetPrefix = array(
|
||||
'iela', 'bulvāris', 'skvērs', 'gāte',
|
||||
);
|
||||
|
||||
protected static $buildingNumber = array('##');
|
||||
protected static $postcode = array('LV ####');
|
||||
protected static $country = array(
|
||||
'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica (the territory South of 60 deg S)', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan',
|
||||
'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Bouvet Island (Bouvetoya)', 'Brazil', 'British Indian Ocean Territory (Chagos Archipelago)', 'British Virgin Islands', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi',
|
||||
'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Congo', 'Cook Islands', 'Costa Rica', 'Cote d\'Ivoire', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic',
|
||||
'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic',
|
||||
'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia',
|
||||
'Faroe Islands', 'Falkland Islands (Malvinas)', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories',
|
||||
'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana',
|
||||
'Haiti', 'Heard Island and McDonald Islands', 'Holy See (Vatican City State)', 'Honduras', 'Hong Kong', 'Hungary',
|
||||
'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy',
|
||||
'Jamaica', 'Japan', 'Jersey', 'Jordan',
|
||||
'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Korea', 'Kuwait', 'Kyrgyz Republic',
|
||||
'Lao People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lithuania', 'Luxembourg',
|
||||
'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar',
|
||||
'Namibia', 'Nauru', 'Nepal', 'Netherlands Antilles', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway',
|
||||
'Oman',
|
||||
'Pakistan', 'Palau', 'Palestinian Territory', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico',
|
||||
'Qatar',
|
||||
'Reunion', 'Romania', 'Russian Federation', 'Rwanda',
|
||||
'Saint Barthelemy', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia (Slovak Republic)', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Georgia and the South Sandwich Islands', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic',
|
||||
'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu',
|
||||
'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States of America', 'United States Minor Outlying Islands', 'United States Virgin Islands', 'Uruguay', 'Uzbekistan',
|
||||
'Vanuatu', 'Venezuela', 'Vietnam',
|
||||
'Wallis and Futuna', 'Western Sahara',
|
||||
'Yemen',
|
||||
'Zambia', 'Zimbabwe'
|
||||
);
|
||||
|
||||
protected static $region = array(
|
||||
'Kurzemes', 'Latgales', 'Rīgas', 'Vidzemes', 'Zemgales'
|
||||
);
|
||||
|
||||
protected static $city = array('Aizkraukle' ,'Aluksne','Balvi', 'Bauska','Cesis',
|
||||
'Daugavpils', 'Dobele','Gulbene', 'Jekabpils', 'Jelgava', 'Kraslava', 'Kuldiga', 'Liepaja',
|
||||
'Limbazi', 'Ludza', 'Madona', 'Mobile Phones', 'Ogre', 'Preili', 'Rezekne', 'Rīga', 'Ventspils'
|
||||
);
|
||||
|
||||
protected static $street = array(
|
||||
'Alfrēda Kalniņa', 'Alksnāja', 'Amatu', 'Anglikāņu', 'Arhitektu', 'Arsenāla', 'Artilērijas',
|
||||
'Aspazijas', 'Atgriežu', 'Audēju', 'Basteja', 'Baumaņa', 'Bīskapa', 'Blaumaņa', 'Brīvības', 'Brīvības',
|
||||
'Bruņinieku', 'Dainas', 'Daugavas'
|
||||
);
|
||||
|
||||
protected static $addressFormats = array(
|
||||
"{{postcode}}, {{region}} {{regionSuffix}}, {{city}} {{cityPrefix}}, {{street}} {{streetPrefix}}, {{buildingNumber}}",
|
||||
);
|
||||
|
||||
public static function buildingNumber()
|
||||
{
|
||||
return static::numerify(static::randomElement(static::$buildingNumber));
|
||||
}
|
||||
|
||||
public function address()
|
||||
{
|
||||
$format = static::randomElement(static::$addressFormats);
|
||||
|
||||
return $this->generator->parse($format);
|
||||
}
|
||||
|
||||
public static function country()
|
||||
{
|
||||
return static::randomElement(static::$country);
|
||||
}
|
||||
|
||||
public static function postcode()
|
||||
{
|
||||
return static::toUpper(static::bothify(static::randomElement(static::$postcode)));
|
||||
}
|
||||
|
||||
public static function regionSuffix()
|
||||
{
|
||||
return static::randomElement(static::$regionSuffix);
|
||||
}
|
||||
|
||||
public static function region()
|
||||
{
|
||||
return static::randomElement(static::$region);
|
||||
}
|
||||
|
||||
public static function cityPrefix()
|
||||
{
|
||||
return static::randomElement(static::$cityPrefix);
|
||||
}
|
||||
|
||||
public static function city()
|
||||
{
|
||||
return static::randomElement(static::$city);
|
||||
}
|
||||
|
||||
public static function streetPrefix()
|
||||
{
|
||||
return static::randomElement(static::$streetPrefix);
|
||||
}
|
||||
|
||||
public static function street()
|
||||
{
|
||||
return static::randomElement(static::$street);
|
||||
}
|
||||
}
|
32
src/Faker/Provider/lv_LV/Internet.php
Normal file
32
src/Faker/Provider/lv_LV/Internet.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Faker\Provider\lv_LV;
|
||||
|
||||
class Internet extends \Faker\Provider\Internet
|
||||
{
|
||||
protected static $freeEmailDomain = array('mail.lv','apollo.lv','inbox.lv','gmail.com', 'yahoo.com', 'hotmail.com');
|
||||
protected static $tld = array('com', 'com', 'net', 'org', 'lv', 'lv', 'lv', 'lv');
|
||||
|
||||
/**
|
||||
* @example 'jdoe'
|
||||
*/
|
||||
public function userName()
|
||||
{
|
||||
$format = static::randomElement(static::$userNameFormats);
|
||||
|
||||
return static::bothify($this->generator->parse($format));
|
||||
}
|
||||
|
||||
/**
|
||||
* @example 'faber'
|
||||
*/
|
||||
public function domainWord()
|
||||
{
|
||||
$company = $this->generator->format('company');
|
||||
$companyElements = explode(' ', $company);
|
||||
$company = $companyElements[0];
|
||||
$company = preg_replace('/,/u', '', $company);
|
||||
|
||||
return $company;
|
||||
}
|
||||
}
|
47
src/Faker/Provider/lv_LV/Person.php
Normal file
47
src/Faker/Provider/lv_LV/Person.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Faker\Provider\lv_LV;
|
||||
|
||||
class Person extends \Faker\Provider\Person
|
||||
{
|
||||
protected static $formats = array(
|
||||
'{{firstName}} {{lastName}}',
|
||||
);
|
||||
|
||||
/**
|
||||
* {@link} http://ru.wikipedia.org/wiki/%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%B5_%D0%BB%D0%B8%D1%87%D0%BD%D0%BE%D0%B5_%D0%B8%D0%BC%D1%8F
|
||||
**/
|
||||
protected static $firstName = array(
|
||||
'Enijs', 'Enno', 'Enoks', 'Enrijs', 'Enriko', 'Enriks', 'Eralds', 'Erasts', 'Erberts',
|
||||
'Erhards', 'Eriands', 'Eriens', 'Erihs', 'Eriks', 'Erims', 'Erlends', 'Ermanis', 'Ermans',
|
||||
'Ermīns', 'Ernando', 'Ernests', 'Ernis', 'Ernsts', 'Ero', 'Ervids', 'Ervijs', 'Ervils',
|
||||
'Ervīns', 'Ervins', 'Ervis', 'Esams', 'Etjēns', 'Euģenijs', 'Euģēnijs', 'Eugenijs', 'Eugēnijs',
|
||||
'Euzebijs', 'Evalds', 'Evarists', 'Evars', 'Evarts', 'Eventijs', 'Everts', 'Evgēnijs',
|
||||
'Evgenijs', 'Evģēnijs', 'Evģenijs', 'Evijs', 'Ādams', 'Ādolfs', 'Ārends', 'Ārens',
|
||||
'Ārijs', 'Āriks', 'Āris', 'Ārons', 'Ārvaldis', 'Ārvalds', 'Āvo', 'Žaklīna', 'Žaklina',
|
||||
'Žaklīne', 'Žana', 'Žaneta', 'Žanete', 'Žanija', 'Žanna', 'Žanneta', 'Žene', 'Ženija',
|
||||
'Žermēna', 'Žermena', 'Žozefina', 'Žuanete', 'Žubīte', 'Ērihs', 'Ēriks', 'Ērmanis',
|
||||
'Ēro', 'Ēvalds', 'Ēra', 'Ērika', 'Ēstere', 'Ēva', 'Ēvī', 'Ēvija', 'Ēvisa', 'Ūna', 'Ūnika',
|
||||
'Ūva', 'Ģederts', 'Ģedimins', 'Ģintars', 'Ģints', 'Ģirts', 'Čarita', 'Čelsija', 'Čereta',
|
||||
'Česlava', 'Čezeta', 'Īda', 'Īģe', 'Īna', 'Īra', 'Īrisa', 'Īva', 'Īvija', 'Īvis', 'Ņikifors',
|
||||
'Ņikita', 'Šandors', 'Ādolfina', 'Ādolfīne', 'Āra', 'Ārija', 'Ārika', 'Ārite', 'Ārvalda',
|
||||
'Valdis', 'Guntis', 'Dainis', 'Vilnis', 'Agris', 'Dzintars', 'Modris', 'Viesturs', 'Mārtiņš',
|
||||
'Ričards', 'Kārlis', 'Emīls'
|
||||
|
||||
);
|
||||
|
||||
/**
|
||||
* {@link} http://ru.wikipedia.org/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BE%D0%B1%D1%89%D0%B5%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D1%85_%D1%84%D0%B0%D0%BC%D0%B8%D0%BB%D0%B8%D0%B9
|
||||
**/
|
||||
protected static $lastName = array(
|
||||
'Raņķi', 'Muižeļi', 'Dumpji', 'Ozoliņi', 'Kalniņi', 'Sēļi', 'Kreši', 'Dāles', 'Rungaiņi',
|
||||
'Kalniņš', 'Lejiņš', 'Celmiņš', 'Bērziņš', 'Ozoliņš', 'Liepiņš', 'Siliņš', 'Vilciņš', 'Lācītis',
|
||||
'Priedīte', 'Saulīte', 'Gailītis', 'Muciņš', 'Krieviņš', 'Zviedrītis', 'Polītis',
|
||||
'Latkovskis', 'Lazovskis', 'Kovaļevskis', 'Dombrovskis', 'Jankovskis', 'Ratkēvičs', 'Kokorevičs', 'Jurēvics',
|
||||
'Jankevics', 'Baldunčiks', 'Šileiko', 'Budreiko', 'Andreiko', 'Blaumanis', 'Silmanis', 'Staltmanis',
|
||||
'Andersons', 'Kirhenšteins', 'Švarcbahs', 'Bendorfs', 'Veinbergs', 'Rozentāls', 'Neilands', 'Freidenfelds',
|
||||
'Veidenbaums', 'Kronvalds',
|
||||
);
|
||||
}
|
||||
|
||||
|
13
src/Faker/Provider/lv_LV/PhoneNumber.php
Normal file
13
src/Faker/Provider/lv_LV/PhoneNumber.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Faker\Provider\lv_LV;
|
||||
|
||||
class PhoneNumber extends \Faker\Provider\PhoneNumber
|
||||
{
|
||||
protected static $formats = array(
|
||||
'##-###-###',
|
||||
'##-######',
|
||||
'########',
|
||||
'+371 #######',
|
||||
);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user