| 1 | <?php |
||
| 8 | class CountryFactory |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var CountryRepository $countryRepository |
||
| 12 | */ |
||
| 13 | private $countryRepository; |
||
| 14 | |||
| 15 | 1 | private function __construct() |
|
| 18 | |||
| 19 | private function __clone() |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $id |
||
| 25 | * @return Country |
||
| 26 | */ |
||
| 27 | 3 | public static function generate(string $id): Country |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @param CountryRepository $countryRepository |
||
| 41 | */ |
||
| 42 | public function setCountryRepository(CountryRepository $countryRepository): void |
||
| 46 | } |
||
| 47 |