From 6ab7ca08530e722692d40d42dce395d136660111 Mon Sep 17 00:00:00 2001 From: Francois Zaninotto Date: Mon, 17 Oct 2011 14:17:33 +0200 Subject: [PATCH] Document Miscellaneous provider --- readme.md | 7 +++++++ src/Factory.php | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 32d30f38..98d65f99 100644 --- a/readme.md +++ b/readme.md @@ -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. diff --git a/src/Factory.php b/src/Factory.php index fbe45a0c..0ba229ad 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -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;