PHP code example of mohaaosman / persona-generator
1. Go to this page and download the library: Download mohaaosman/persona-generator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mohaaosman / persona-generator example snippets
use PersonaGenerator\PersonaFactory;
use PersonaGenerator\ValueObjects\Gender;
$persona = PersonaFactory::new()->locale('so')->seed(1234)->make();
$persona->full_name; // "Faadumo Maxamed Cabdullaahi"
$persona->genderCode(); // "F"
$persona->age; // 31
$persona->education(); // Collection<EducationEntry>, oldest → newest
$persona->workExperience(); // Collection<EmploymentEntry>, exactly one current
$persona->spokenLanguages(); // ["Somali", "Arabic", "English"]
$persona->bio(); // memoised prose
$persona->coverLetter(); // memoised prose
PersonaFactory::new()->seed(1)->makeMany(8); // array<Persona>