From baa8e362e8ed30ecdcdca6fc6a96196e436799d6 Mon Sep 17 00:00:00 2001 From: Roman Shvets Date: Wed, 10 Jul 2013 16:33:23 +0300 Subject: [PATCH] lv_LV locale --- src/Faker/Provider/lv_LV/Address.php | 114 +++++++++++++++++++++++ src/Faker/Provider/lv_LV/Internet.php | 32 +++++++ src/Faker/Provider/lv_LV/Person.php | 47 ++++++++++ src/Faker/Provider/lv_LV/PhoneNumber.php | 13 +++ 4 files changed, 206 insertions(+) create mode 100644 src/Faker/Provider/lv_LV/Address.php create mode 100644 src/Faker/Provider/lv_LV/Internet.php create mode 100644 src/Faker/Provider/lv_LV/Person.php create mode 100644 src/Faker/Provider/lv_LV/PhoneNumber.php diff --git a/src/Faker/Provider/lv_LV/Address.php b/src/Faker/Provider/lv_LV/Address.php new file mode 100644 index 00000000..ca659b75 --- /dev/null +++ b/src/Faker/Provider/lv_LV/Address.php @@ -0,0 +1,114 @@ +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); + } +} diff --git a/src/Faker/Provider/lv_LV/Internet.php b/src/Faker/Provider/lv_LV/Internet.php new file mode 100644 index 00000000..20483159 --- /dev/null +++ b/src/Faker/Provider/lv_LV/Internet.php @@ -0,0 +1,32 @@ +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; + } +} diff --git a/src/Faker/Provider/lv_LV/Person.php b/src/Faker/Provider/lv_LV/Person.php new file mode 100644 index 00000000..39870b21 --- /dev/null +++ b/src/Faker/Provider/lv_LV/Person.php @@ -0,0 +1,47 @@ +