1 | <?php |
||
19 | class City extends FakerModuleGenerator |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * City model class instance |
||
24 | * @var \gplcart\core\models\City $city |
||
25 | */ |
||
26 | protected $city; |
||
27 | |||
28 | /** |
||
29 | * State model class instance |
||
30 | * @var \gplcart\core\models\CountryState $state |
||
31 | */ |
||
32 | protected $state; |
||
33 | |||
34 | /** |
||
35 | * @param CityModel $city |
||
36 | * @param CountryStateModel $state |
||
37 | */ |
||
38 | public function __construct(CityModel $city, CountryStateModel $state) |
||
45 | |||
46 | /** |
||
47 | * Returns the generator name |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getName() |
||
54 | |||
55 | /** |
||
56 | * Generate a single city |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function create() |
||
77 | |||
78 | /** |
||
79 | * Returns a random state |
||
80 | * @staticvar array $states |
||
81 | * @return array |
||
82 | */ |
||
83 | protected function getState() |
||
91 | |||
92 | } |
||
93 |