PHP Class Nelmio\Alice\Faker\GeneratorFactory

The factory implements the singleton pattern as it is not meant to be used with a Dependency Injection container as new instances are created with a locale value which is determined at runtime.
ファイルを表示 Open project: nelmio/alice Class Usage Examples

Public Methods

Method Description
__construct ( Generator $generator )
createOrReturnExistingInstance ( string $locale ) : Generator
getSeedGenerator ( ) : Generator

Method Details

__construct() public method

public __construct ( Generator $generator )
$generator Faker\Generator

createOrReturnExistingInstance() public method

public createOrReturnExistingInstance ( string $locale ) : Generator
$locale string e.g. 'fr_FR', 'en_US'
return Faker\Generator

getSeedGenerator() public method

public getSeedGenerator ( ) : Generator
return Faker\Generator