Address.php
5 years ago
Company.php
5 years ago
Internet.php
5 years ago
Person.php
5 years ago
PhoneNumber.php
5 years ago
Address.php
73 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Faker\Provider\es_VE; |
| 4 | |
| 5 | class Address extends \Faker\Provider\es_ES\Address |
| 6 | { |
| 7 | protected static $cityPrefix = array('San', 'Santa', 'Puerto', 'Valle', 'Villa', 'Parroquia', 'El', 'Los', 'La', 'Las'); |
| 8 | protected static $citySuffix = array('del Valle', 'de Mara', 'de Altagracia', 'de Asis', 'del Tuy', 'de Mata'); |
| 9 | protected static $buildingNumber = array('###', '##', '#'); |
| 10 | protected static $streetPrefix = array( |
| 11 | 'Calle', 'Avenida', 'Av.', 'Cl.', 'Carretera', 'Callejón', 'Vereda' |
| 12 | ); |
| 13 | protected static $streetSuffix = array('Norte', 'Este', ' Sur', ' Oeste'); |
| 14 | protected static $postcode = array('####'); |
| 15 | protected static $state = array( |
| 16 | 'Amazonas', 'Anzoátegui', 'Apure', 'Aragua', 'Barinas', 'Bolívar', 'Carabobo', 'Cojedes', 'Delta Amacuro', |
| 17 | 'Distrito Capital', 'Falcón', 'Guárico', 'Lara', 'Mérida', 'Miranda', 'Monagas', 'Nueva Esparta', 'Portuguesa', |
| 18 | 'Sucre', 'Táchira', 'Trujillo', 'Vargas', 'Yaracuy', 'Zulia' |
| 19 | ); |
| 20 | protected static $cityFormats = array( |
| 21 | '{{cityPrefix}} {{firstName}}{{citySuffix}}', |
| 22 | '{{cityPrefix}} {{firstName}}', |
| 23 | '{{firstName}} {{citySuffix}}', |
| 24 | '{{lastName}} {{citySuffix}}', |
| 25 | ); |
| 26 | protected static $streetNameFormats = array( |
| 27 | '{{streetPrefix}} {{firstName}}', |
| 28 | '{{streetPrefix}} {{lastName}}', |
| 29 | '{{streetPrefix}} {{firstName}} {{lastName}}' |
| 30 | ); |
| 31 | protected static $streetAddressFormats = array( |
| 32 | '{{streetName}}, {{buildingNumber}}, {{secondaryAddress}}', |
| 33 | '{{streetName}}, {{secondaryAddress}}', |
| 34 | ); |
| 35 | protected static $addressFormats = array( |
| 36 | "{{streetAddress}}, {{city}} Edo. {{state}}", |
| 37 | "{{streetAddress}}, {{city}} Edo. {{state}}, {{postcode}}" |
| 38 | ); |
| 39 | protected static $secondaryAddressFormats = array('Nro #', 'Piso #', 'Casa #', 'Hab. #', 'Apto #', 'Nro ##', 'Piso ##', 'Casa ##', 'Hab. ##', 'Apto ##'); |
| 40 | |
| 41 | /** |
| 42 | * @example 'Avenida' |
| 43 | */ |
| 44 | public static function streetPrefix() |
| 45 | { |
| 46 | return static::randomElement(static::$streetPrefix); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * @example 'Villa' |
| 51 | */ |
| 52 | public static function cityPrefix() |
| 53 | { |
| 54 | return static::randomElement(static::$cityPrefix); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * @example 'Nro 3' |
| 59 | */ |
| 60 | public static function secondaryAddress() |
| 61 | { |
| 62 | return static::numerify(static::randomElement(static::$secondaryAddressFormats)); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * @example 'Aragua' |
| 67 | */ |
| 68 | public static function state() |
| 69 | { |
| 70 | return static::randomElement(static::$state); |
| 71 | } |
| 72 | } |
| 73 |