Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?php
-
- namespace common\components;
-
- use Faker\Factory;
- use Faker\Generator;
- use Faker\Provider\fr_FR\Address;
- use Faker\Provider\fr_FR\Person;
- use Faker\Provider\fr_FR\PhoneNumber;
-
- class Faker
- {
- protected Generator $faker;
-
- public function __construct()
- {
- $this->faker = Factory::create();
- $this->faker->addProvider(new Person($this->faker));
- $this->faker->addProvider(new PhoneNumber($this->faker));
- $this->faker->addProvider(new Address($this->faker));
- }
-
- public function name(): string
- {
- return $this->faker->name;
- }
-
- public function email(): string
- {
- return $this->faker->email;
- }
-
- public function phoneNumber(): string
- {
- return $this->faker->mobileNumber;
- }
-
- public function address(): string
- {
- return $this->faker->address;
- }
- }
|