src/FakerFactory.php
/**
     * Prepares data providers defined in specification file
     *
     * @param $spec
     * @param string $locale
     * @return \Faker\Generator
     */
Prepares data providers defined in specification file
@param $spec
@param string $locale
@return \Faker\Generator
Prepares data providers defined in specification file @param $spec @param string $locale @return \ Faker \ Generator
public static function createFromSpec($spec, $locale = self::DEFAULT_LOCALE)
    {
        $faker = self::create($locale);
        foreach ($spec as $key => $providerConfig) {
            $provider = self::extractProvider($providerConfig);
            $faker->addProvider($provider->instantiateProvider($faker));
            ProviderProxyMap::add($key, $provider);
        }
        return $faker;
    }
public static function createFromSpec ( $ spec , $ locale = self :: DEFAULT_LOCALE ) { $ faker = self :: create ( $ locale ) ; foreach ( $ spec as $ key => $ providerConfig ) { $ provider = self :: extractProvider ( $ providerConfig ) ; $ faker -> addProvider ( $ provider -> instantiateProvider ( $ faker ) ) ; ProviderProxyMap :: add ( $ key , $ provider ) ; } return $ faker ; }
Prepares data providers defined in specification file
 @param $spec
 @param string $locale
 @return \Faker\Generator
Prepares data providers defined in specification file @param $spec @param string $locale @return \ Faker \ Generator