Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Faker\Provider\en_IN;
4
 
5
class Address extends \Faker\Provider\Address
6
{
7
    protected static $city = [
8
        'Agra', 'Ahmedabad', 'Ajmer', 'Alwar',
9
        'Bengaluru', 'Bhubhaneshwar', 'Bhopal', 'Bikaner',
10
        'Chennai', 'Chandigarh',
11
        'Darjeeling', 'Dehra Dun', 'Delhi',
12
        'Faridabad',
13
        'Gandhinagar', 'Guwahati', 'Gangtok', 'Gurgaon',
14
        'Hyderabad', 'Hisar',
15
        'Indore',
16
        'Jaipur', 'Jodhpur', 'Jammu', 'Jamnagar', 'Jabalpur',
17
        'Kolkata', 'Kanpur', 'Kota', 'Kochi',
18
        'Ludhiana', 'Lucknow',
19
        'Mumbai', 'Meerut', 'Mysore',
20
        'Nagpur', 'Nashik', 'Noida', 'New Delhi',
21
        'Pune', 'Patna', 'Panaji', 'Pilani', 'Pondicherry',
22
        'Ratlam', 'Raipur', 'Ranchi', 'Rajkot',
23
        'Surat', 'Simla', 'Srinagar',
24
        'Thiruvananthapuram', 'Trichy',
25
        'Udaipur',
26
        'Vishakhapattanam', 'Vadodara',
27
        'Warangal',
28
    ];
29
 
30
    protected static $state = [
31
 
32
        // States
33
        'Andhra Pradesh', 'Arunachal Pradesh', 'Assam',
34
        'Bihar',
35
        'Chhattisgarh',
36
        'Goa', 'Gujarat',
37
        'Haryana', 'Himachal Pradesh',
38
        'Jammu and Kashmir',
39
        'Jharkhand',
40
        'Karnataka', 'Kerala',
41
        'Madhya Pradesh', 'Maharashtra', 'Manipur', 'Meghalaya', 'Mizoram',
42
        'Nagaland',
43
        'Odisha',
44
        'Punjab',
45
        'Rajasthan',
46
        'Sikkim',
47
        'Tamil Nadu', 'Telangana', 'Tripura',
48
        'Uttar Pradesh', 'Uttarakhand',
49
        'West Bengal',
50
 
51
        // Union Territories
52
        'Andaman and Nicobar Islands',
53
        'Chandigarh',
54
        'Dadra and Nagar Haveli', 'Daman and Diu', 'Delhi',
55
        'Lakshadweep',
56
        'Puducherry',
57
    ];
58
 
59
    protected static $stateAbbr = [
60
        'AP', 'AR', 'AS', 'BR', 'CG', 'GA', 'GJ', 'HR', 'HP', 'JK', 'JH', 'KA', 'KL', 'MP', 'MH', 'MN', 'ML', 'MZ', 'NL', 'OD', 'PB', 'RJ', 'SK', 'TN', 'TS', 'TR', 'UP', 'UK', 'WB', 'AN', 'CH', 'DN', 'DD', 'DL', 'LD', 'PY',
61
    ];
62
 
63
    protected static $country = [
64
        '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',
65
        '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',
66
        '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',
67
        'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic',
68
        'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia',
69
        'Faroe Islands', 'Falkland Islands (Malvinas)', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories',
70
        'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana',
71
        'Haiti', 'Heard Island and McDonald Islands', 'Holy See (Vatican City State)', 'Honduras', 'Hong Kong', 'Hungary',
72
        'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy',
73
        'Jamaica', 'Japan', 'Jersey', 'Jordan',
74
        'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Korea', 'Kuwait', 'Kyrgyz Republic',
75
        'Lao People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lithuania', 'Luxembourg',
76
        'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar',
77
        'Namibia', 'Nauru', 'Nepal', 'Netherlands Antilles', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway',
78
        'Oman',
79
        'Pakistan', 'Palau', 'Palestinian Territories', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico',
80
        'Qatar',
81
        'Reunion', 'Romania', 'Russian Federation', 'Rwanda',
82
        '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',
83
        'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu',
84
        'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States of America', 'United States Minor Outlying Islands', 'United States Virgin Islands', 'Uruguay', 'Uzbekistan',
85
        'Vanuatu', 'Venezuela', 'Vietnam',
86
        'Wallis and Futuna', 'Western Sahara',
87
        'Yemen',
88
        'Zambia', 'Zimbabwe',
89
    ];
90
    protected static $localityName = [
91
        'Aundh', 'Andheri',
92
        'Borivali', 'Bandra',
93
        'Chinchwad', 'Chandpole', 'Churchgate', 'Cyber City',
94
        'Dadar', 'Deccan Gymkhana',
95
        'Goregaon',
96
        'Hadapsar', 'Harmada', 'Hinjewadi',
97
        'Kormangala', 'Kharadi',
98
        'Marathahalli', 'Model Town', 'Mansarovar', 'Malad',
99
        'Sodala',
100
        'Virar', 'Vikhroli',
101
        'Yerwada', 'Yeshwanthpura',
102
    ];
103
    protected static $areaSuffix = [
104
        ' Nagar', 'Pur', 'Garh', 'Gunj', ' Chowk',
105
    ];
106
    protected static $postcode = [
107
        '1#####', '2#####', '3#####', '4#####', '5#####',
108
    ];
109
    protected static $localityFormats = [
110
        '{{firstName}}{{areaSuffix}}',
111
        '{{localityName}}',
112
    ];
113
    protected static $addressFormats = [
114
        '{{streetAddress}} {{city}} - {{postcode}}',
115
    ];
116
    protected static $societySuffix = [
117
        'Society', 'Apartments', 'Heights', 'Villas',
118
    ];
119
    protected static $societyNameFormat = [
120
        '{{firstName}} {{societySuffix}}',
121
    ];
122
    protected static $streetAddressFormats = [
123
 
124
        '{{buildingNumber}}, {{locality}},',
125
        '{{buildingNumber}}, {{societyName}}, {{locality}}',
126
    ];
127
 
128
    public function societySuffix()
129
    {
130
        return static::randomElement(static::$societySuffix);
131
    }
132
 
133
    /**
134
     * @example Shanti Apartments
135
     */
136
    public function societyName()
137
    {
138
        return $this->generator->parse(static::randomElement(static::$societyNameFormat));
139
    }
140
 
141
    /**
142
     * @example Mumbai
143
     */
144
    public function city()
145
    {
146
        return static::randomElement(static::$city);
147
    }
148
 
149
    /**
150
     * @example Vaishali Nagar
151
     */
152
    public function locality()
153
    {
154
        return $this->generator->parse(static::randomElement(static::$localityFormats));
155
    }
156
 
157
    /**
158
     * @example Kharadi
159
     */
160
    public function localityName()
161
    {
162
        return $this->generator->parse(static::randomElement(static::$localityName));
163
    }
164
 
165
    /**
166
     * @example Nagar
167
     */
168
    public function areaSuffix()
169
    {
170
        return static::randomElement(static::$areaSuffix);
171
    }
172
 
173
    /**
174
     * @example 'Delhi'
175
     */
176
    public static function state()
177
    {
178
        return static::randomElement(static::$state);
179
    }
180
 
181
    /**
182
     * @example 'DL'
183
     */
184
    public static function stateAbbr()
185
    {
186
        return static::randomElement(static::$stateAbbr);
187
    }
188
}