mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-19 06:49:50 +01:00
Document Miscellaneous provider
This commit is contained in:
parent
c9efa35efa
commit
6ab7ca0853
@ -134,6 +134,13 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle
|
||||
year // '1985'
|
||||
century // 'XII'
|
||||
|
||||
### `Faker\Provider\Miscellaneous`
|
||||
|
||||
boolean // true
|
||||
md5 // '67cc5698854132383fdad62fc845cd48'
|
||||
sha1 // 'ea791e73ad1d3a7f78e8e3e61dfbf2fc44401663'
|
||||
sha256 // '6327f9f323561921ae55041d39a03b7a515a58a9f780ae3a6c62a0ca8c4905f4'
|
||||
|
||||
## Localization
|
||||
|
||||
`Faker\Factory` can take a locale as an argument, to return localized data. If no localized provider is found, the factory fallbacks to the default locale.
|
||||
|
@ -8,7 +8,7 @@ class Factory
|
||||
{
|
||||
const DEFAULT_LOCALE = 'en_US';
|
||||
|
||||
protected static $defaultProviders = array('Name', 'Address', 'PhoneNumber', 'Company', 'Lorem', 'Internet', 'DateTime');
|
||||
protected static $defaultProviders = array('Name', 'Address', 'PhoneNumber', 'Company', 'Lorem', 'Internet', 'DateTime', 'Miscellaneous');
|
||||
|
||||
public static function create($locale = self::DEFAULT_LOCALE)
|
||||
{
|
||||
@ -21,7 +21,7 @@ class Factory
|
||||
return $generator;
|
||||
}
|
||||
|
||||
protected function getProviderClassname($provider, $locale = '')
|
||||
protected static function getProviderClassname($provider, $locale = '')
|
||||
{
|
||||
if ($providerClass = self::findProviderClassname($provider, $locale)) {
|
||||
return $providerClass;
|
||||
|
Loading…
x
Reference in New Issue
Block a user