Address.php
5 years ago
Color.php
5 years ago
Company.php
5 years ago
Internet.php
5 years ago
Person.php
5 years ago
PhoneNumber.php
5 years ago
Company.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Faker\Provider\id_ID; |
| 4 | |
| 5 | class Company extends \Faker\Provider\Company |
| 6 | { |
| 7 | protected static $formats = array( |
| 8 | '{{companyPrefix}} {{lastName}}', |
| 9 | '{{companyPrefix}} {{lastName}} {{lastName}}', |
| 10 | '{{companyPrefix}} {{lastName}} {{companySuffix}}', |
| 11 | '{{companyPrefix}} {{lastName}} {{lastName}} {{companySuffix}}', |
| 12 | ); |
| 13 | |
| 14 | /** |
| 15 | * @link http://id.wikipedia.org/wiki/Jenis_badan_usaha |
| 16 | */ |
| 17 | protected static $companyPrefix = array('PT', 'CV', 'UD', 'PD', 'Perum'); |
| 18 | |
| 19 | /** |
| 20 | * @link http://id.wikipedia.org/wiki/Jenis_badan_usaha |
| 21 | */ |
| 22 | protected static $companySuffix = array('(Persero) Tbk', 'Tbk'); |
| 23 | |
| 24 | /** |
| 25 | * Get company prefix |
| 26 | * |
| 27 | * @return string company prefix |
| 28 | */ |
| 29 | public static function companyPrefix() |
| 30 | { |
| 31 | return static::randomElement(static::$companyPrefix); |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Get company suffix |
| 36 | * |
| 37 | * @return string company suffix |
| 38 | */ |
| 39 | public static function companySuffix() |
| 40 | { |
| 41 | return static::randomElement(static::$companySuffix); |
| 42 | } |
| 43 | } |
| 44 |