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_NZ;
4
 
5
class Address extends \Faker\Provider\en_US\Address
6
{
7
    /**
8
     * An array of en_NZ (New Zealand) building number formats
9
     *
10
     * @var array
11
     */
12
    protected static $buildingNumber = ['%', '%#', '%##'];
13
 
14
    /**
15
     * An array of en_NZ (New Zealand) street suffixes
16
     *
17
     * @var array
18
     */
19
    protected static $streetSuffix = [
20
        'Avenue', 'Close', 'Court', 'Crescent', 'Drive', 'Esplanade', 'Grove', 'Heights', 'Highway', 'Hill', 'Lane', 'Line', 'Mall', 'Parade', 'Place', 'Quay', 'Rise', 'Road', 'Square', 'Street', 'Terrace', 'Way',
21
    ];
22
 
23
    /**
24
     * City suffixes
25
     *
26
     * @var array
27
     */
28
    protected static $citySuffix = ['ville', 'ston'];
29
 
30
    /**
31
     * City formats
32
     *
33
     * @var array
34
     */
35
    protected static $cityFormats = ['{{firstName}}{{citySuffix}}'];
36
 
37
    /**
38
     * An array of en_NZ (New Zealand) regions
39
     *
40
     * @see http://en.wikipedia.org/wiki/Regions_of_New_Zealand
41
     *
42
     * @var array
43
     */
44
    protected static $region = [
45
        'Auckland', 'Bay of Plenty', 'Canterbury', 'Gisborne', 'Hawkes Bay', 'Manawatu-Whanganui', 'Marlborough', 'Nelson', 'Northland', 'Otago', 'Southland', 'Taranaki', 'Tasman', 'Waikato', 'Wellington', 'West Coast',
46
    ];
47
 
48
    /**
49
     * An array of en_NZ (New Zealand) poscode formats
50
     *
51
     * @var array
52
     */
53
    protected static $postcode = ['####'];
54
 
55
    /**
56
     * An array of en_NZ (New Zealand) address formats
57
     *
58
     * @var array
59
     */
60
    protected static $addressFormats = ['{{buildingNumber}} {{streetName}}, {{city}}, {{region}}, {{postcode}}'];
61
 
62
    /**
63
     * An array of en_NZ (New Zealand) street address formats
64
     *
65
     * @var array
66
     */
67
    protected static $streetAddressFormats = ['{{buildingNumber}} {{streetName}}'];
68
 
69
    /**
70
     * Return a en_NZ (New Zealand) postcode
71
     *
72
     * @return string
73
     */
74
    public static function postcode()
75
    {
76
        return static::numerify(static::randomElement(static::$postcode));
77
    }
78
 
79
    /**
80
     * Return a en_NZ (New Zealand) region
81
     *
82
     * @return string
83
     */
84
    public static function region()
85
    {
86
        return static::randomElement(static::$region);
87
    }
88
}