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_AU;
4
 
5
/**
6
 * @see http://www.ipaustralia.gov.au/about-us/corporate/address-standards/
7
 */
8
class Address extends \Faker\Provider\en_US\Address
9
{
10
    protected static $cityPrefix = ['North', 'East', 'West', 'South', 'New', 'Lake', 'Port', 'St.'];
11
 
12
    protected static $buildingNumber = ['%##', '%#', '%'];
13
 
14
    protected static $buildingLetters = ['A', 'B', 'C', 'D'];
15
 
16
    protected static $streetSuffix = [
17
        'Access', 'Alley', 'Alleyway', 'Amble', 'Anchorage', 'Approach', 'Arcade', 'Artery', 'Avenue', 'Basin', 'Beach', 'Bend', 'Block', 'Boulevard', 'Brace', 'Brae', 'Break', 'Bridge', 'Broadway', 'Brow', 'Bypass', 'Byway', 'Causeway', 'Centre', 'Centreway', 'Chase', 'Circle', 'Circlet', 'Circuit', 'Circus', 'Close', 'Colonnade', 'Common', 'Concourse', 'Copse', 'Corner', 'Corso', 'Court', 'Courtyard', 'Cove', 'Crescent', 'Crest', 'Cross', 'Crossing', 'Crossroad', 'Crossway', 'Cruiseway', 'Cul-de-sac', 'Cutting', 'Dale', 'Dell', 'Deviation', 'Dip', 'Distributor', 'Drive', 'Driveway', 'Edge', 'Elbow', 'End', 'Entrance', 'Esplanade', 'Estate', 'Expressway', 'Extension', 'Fairway', 'Fire Track', 'Firetrail', 'Flat', 'Follow', 'Footway', 'Foreshore', 'Formation', 'Freeway', 'Front', 'Frontage', 'Gap', 'Garden', 'Gardens', 'Gate', 'Gates', 'Glade', 'Glen', 'Grange', 'Green', 'Ground', 'Grove', 'Gully', 'Heights', 'Highroad', 'Highway', 'Hill', 'Interchange', 'Intersection', 'Junction', 'Key', 'Landing', 'Lane', 'Laneway', 'Lees', 'Line', 'Link', 'Little', 'Lookout', 'Loop', 'Lower', 'Mall', 'Meander', 'Mew', 'Mews', 'Motorway', 'Mount', 'Nook', 'Outlook', 'Parade', 'Park', 'Parklands', 'Parkway', 'Part', 'Pass', 'Path', 'Pathway', 'Piazza', 'Place', 'Plateau', 'Plaza', 'Pocket', 'Point', 'Port', 'Promenade', 'Quad', 'Quadrangle', 'Quadrant', 'Quay', 'Quays', 'Ramble', 'Ramp', 'Range', 'Reach', 'Reserve', 'Rest', 'Retreat', 'Ride', 'Ridge', 'Ridgeway', 'Right Of Way', 'Ring', 'Rise', 'River', 'Riverway', 'Riviera', 'Road', 'Roads', 'Roadside', 'Roadway', 'Ronde', 'Rosebowl', 'Rotary', 'Round', 'Route', 'Row', 'Rue', 'Run', 'Service Way', 'Siding', 'Slope', 'Sound', 'Spur', 'Square', 'Stairs', 'State Highway', 'Steps', 'Strand', 'Street', 'Strip', 'Subway', 'Tarn', 'Terrace', 'Thoroughfare', 'Tollway', 'Top', 'Tor', 'Towers', 'Track', 'Trail', 'Trailer', 'Triangle', 'Trunkway', 'Turn', 'Underpass', 'Upper', 'Vale', 'Viaduct', 'View', 'Villas', 'Vista', 'Wade', 'Walk', 'Walkway', 'Way', 'Wynd',
18
    ];
19
 
20
    protected static $postcode = [
21
        // as per https://en.wikipedia.org/wiki/Postcodes_in_Australia
22
        // NSW
23
        '1###',
24
        '20##', '21##', '22##', '23##', '24##', '25##',
25
        '2619', '262#', '263#', '264#', '265#', '266#', '267#', '268#', '269#', '27##', '28##',
26
        '292#', '293#', '294#', '295#', '296#', '297#', '298#', '299#',
27
        // ACT
28
        '02##',
29
        '260#', '261#',
30
        '290#', '291#', '2920',
31
        // VIC
32
        '3###',
33
        '8###',
34
        // QLD
35
        '4###',
36
        '9###',
37
        // SA
38
        '5###',
39
        // WA
40
        '6###',
41
        // TAS
42
        '7###',
43
        // NT
44
        '08##',
45
        '09##',
46
    ];
47
 
48
    protected static $state = [
49
        'Australian Capital Territory', 'New South Wales', 'Northern Territory', 'Queensland', 'South Australia', 'Tasmania', 'Victoria', 'Western Australia',
50
    ];
51
 
52
    protected static $stateAbbr = [
53
        'ACT', 'NSW', 'NT', 'QLD', 'SA', 'TAS', 'VIC', 'WA',
54
    ];
55
 
56
    protected static $streetAddressFormats = [
57
        '{{buildingNumber}} {{streetName}}',
58
        '{{buildingNumber}}{{buildingLetter}} {{streetName}}',
59
        '{{secondaryAddress}} {{buildingNumber}} {{streetName}}',
60
    ];
61
 
62
    protected static $secondaryAddressFormats = [
63
        'Apt. ###',
64
        'Flat ##',
65
        'Suite ###',
66
        'Unit ##',
67
        'Level #',
68
        '### /',
69
        '## /',
70
        '# /',
71
    ];
72
 
73
    /**
74
     * Returns a sane building letter
75
     *
76
     * @example B
77
     */
78
    public static function buildingLetter()
79
    {
80
        return static::toUpper(static::randomElement(static::$buildingLetters));
81
    }
82
 
83
    /**
84
     * Returns a sane city prefix
85
     *
86
     * @example West
87
     */
88
    public static function cityPrefix()
89
    {
90
        return static::randomElement(static::$cityPrefix);
91
    }
92
 
93
    /**
94
     * Returns a sane street suffix
95
     *
96
     * @example Beach
97
     */
98
    public static function streetSuffix()
99
    {
100
        return static::randomElement(static::$streetSuffix);
101
    }
102
 
103
    /**
104
     * Returns a sane state
105
     *
106
     * @example New South Wales
107
     */
108
    public static function state()
109
    {
110
        return static::randomElement(static::$state);
111
    }
112
}