diff --git a/readme.md b/readme.md index bf52d085..b630657c 100644 --- a/readme.md +++ b/readme.md @@ -55,84 +55,84 @@ for ($i=0; $i < 10; $i++) { Each of the generator properties (like `name`, `address`, and `lorem`) are called "formatters". A faker generator has many of them, packaged in "providers". Here is a list of the bundled formatters in the default locale. -### `Faker\Provider\DateTime` +### `Faker\Provider\en_US\Name` - amPm // 'am' - century // 'V' - date($format = 'Y-m-d') // '2008-11-27' - dateTime // 2005-08-16 20:58:39 - dateTimeBetween($startDate = '-30 years', $endDate = 'now') // 1999-02-02 12:05:31 - dateTimeThisCentury // 1964-04-04 11:24:41 - dateTimeThisDecade // 2010-03-10 05:41:37 - dateTimeThisMonth // 2011-10-05 13:14:25 - dateTimeThisYear // 2011-09-19 09:47:16 - dayOfMonth // '29' - dayOfWeek // 'Thursday' - iso8601 // '2003-10-21T16:24:11+0000' - month // '06' - monthName // 'November' - time($format = 'H:i:s') // '15:17:03' - unixTime // 1061307820 - year // '1991' - -### `Faker\Provider\Internet` - - domainName // 'mueller.info' - domainWord // 'von' - email // 'cshields@rosenbaum.com' - freeEmail // 'dayna55@gmail.com' - freeEmailDomain // 'yahoo.com' - ipv4 // '237.149.115.38' - ipv6 // '35cd:186d:3e23:2986:ef9f:5b41:42a4:e6f1' - safeEmail // 'nbatz@example.org' - tld // 'info' - url // 'http://www.runolfsdottir.com/' - userName // 'tremblay.haylie' - -### `Faker\Provider\Lorem` - - lorem($nbParagraphs = 3) // 'Fuga totam reiciendis qui architecto fugiat. (...)' - paragraph($nbSentences = 3) // 'Sed a nam et sint autem. Aut officia aut. Blanditiis et ducimus.' - paragraphs($nb = 3) // array('Amet et est. (...)', 'Sequi cum culpa rem. Rerum exercitationem est.') - sentence($nbWords = 3) // 'Sit vitae voluptas sint non.' - sentences($nb = 3) // array('Ut optio quos qui illo error nihil.', 'Vero a officia id corporis incidunt.', 'Provident esse hic eligendi quos culpa ut.') - word // 'aut' - words($nb = 3) // array('porro', 'sed', 'magni') + prefix // 'Ms.' + suffix // 'Jr.' + name // 'Dr. Zane Stroman' + firstName // 'Maynard' + lastName // 'Zulauf' ### `Faker\Provider\en_US\Address` - address // '8888 Cummings Vista Apt. 101, Susanbury, NY 95473' - buildingNumber // '484' - city // 'West Judge' cityPrefix // 'Lake' - citySuffix // 'borough' - country // 'Falkland Islands (Malvinas)' - postcode // '17916' secondaryAddress // 'Suite 961' state // 'NewMexico' stateAbbr // 'OH' - streetAddress // '439 Karley Loaf Suite 897' - streetName // 'Keegan Trail' + citySuffix // 'borough' streetSuffix // 'Keys' - -### `Faker\Provider\en_US\Company` - - bs // 'e-enable robust architectures' - catchPhrase // 'Monitored regional contingency' - company // 'Bogan-Treutel' - companySuffix // 'and Sons' - -### `Faker\Provider\en_US\Name` - - firstName // 'Maynard' - lastName // 'Zulauf' - name // 'Dr. Zane Stroman' - prefix // 'Ms.' - suffix // 'Jr.' + buildingNumber // '484' + city // 'West Judge' + streetName // 'Keegan Trail' + streetAddress // '439 Karley Loaf Suite 897' + postcode // '17916' + address // '8888 Cummings Vista Apt. 101, Susanbury, NY 95473' + country // 'Falkland Islands (Malvinas)' ### `Faker\Provider\en_US\PhoneNumber` - phoneNumber // '132-149-0269x3767' + phoneNumber // '132-149-0269x3767' + +### `Faker\Provider\en_US\Company` + + catchPhrase // 'Monitored regional contingency' + bs // 'e-enable robust architectures' + company // 'Bogan-Treutel' + companySuffix // 'and Sons' + +### `Faker\Provider\Lorem` + + word // 'aut' + words($nb = 3) // array('porro', 'sed', 'magni') + sentence($nbWords = 6) // 'Sit vitae voluptas sint non voluptates.' + sentences($nb = 3) // array('Optio quos qui illo error.', 'Laborum vero a officia id corporis.', 'Saepe provident esse hic eligendi.') + paragraph($nbSentences = 3) // 'Ut ab voluptas sed a nam. Sint autem inventore aut officia aut aut blanditiis. Ducimus eos odit amet et est ut eum.' + paragraphs($nb = 3) // array('Quidem ut sunt et quidem est accusamus aut. Fuga est placeat rerum ut. Enim ex eveniet facere sunt.', 'Aut nam et eum architecto fugit repellendus illo. Qui ex esse veritatis.', 'Possimus omnis aut incidunt sunt. Asperiores incidunt iure sequi cum culpa rem. Rerum exercitationem est rem.') + text($maxNbChars = 200) // 'Fuga totam reiciendis qui architecto fugiat nemo. Consequatur recusandae qui cupiditate eos quod.' + +### `Faker\Provider\Internet` + + email // 'tkshlerin@collins.com' + safeEmail // 'king.alford@example.org' + freeEmail // 'bradley72@gmail.com' + freeEmailDomain // 'yahoo.com' + userName // 'wade55' + domainName // 'wolffdeckow.net' + domainWord // 'feeney' + tld // 'biz' + url // 'http://www.strackeframi.com/' + ipv4 // '109.133.32.252' + ipv6 // '8e65:933d:22ee:a232:f1c1:2741:1f10:117c' + +### `Faker\Provider\DateTime` + + unixTime // 58754961 + dateTime // 2008-04-18 23:11:35 + iso8601 // '2007-05-25T12:25:57+0000' + date($format = 'Y-m-d') // '1978-12-07' + time($format = 'H:i:s') // '04:46:58' + dateTimeBetween($startDate = '-30 years', $endDate = 'now') // 2000-04-13 00:11:22 + dateTimeThisCentury // 1983-02-02 19:44:03 + dateTimeThisDecade // 2002-02-25 08:17:41 + dateTimeThisYear // 2011-05-09 04:08:14 + dateTimeThisMonth // 2011-09-27 07:34:20 + amPm // 'pm' + dayOfMonth // '04' + dayOfWeek // 'Wednesday' + month // '09' + monthName // 'June' + year // '1985' + century // 'XII' ## Localization @@ -190,8 +190,8 @@ $generator = Faker\Factory::create(); - - address ?> + +
streetAddress ?> @@ -210,7 +210,7 @@ $generator = Faker\Factory::create();
lorem(3) ?> +text(400) ?> ]]>
@@ -224,146 +224,135 @@ Running this script produces a document looking like: ```xml - - + +
- 39640 Alize Radial - North Robbburgh - 06688-4406 + 182 Harrison Cove + North Lloyd + 45577 + Alabama +
+ + orchestrate compelling web-readiness + +
+ +
+
+ + +
+ 90111 Hegmann Inlet + South Geovanymouth + 69961-9311 Colorado
- - e-enable bleeding-edge interfaces - +
- - + +
- 973 Bruen Lock Suite 302 - Konopelskimouth - 11578-6604 - Nebraska + 9791 Nona Corner + Harberhaven + 74062-8191 + RhodeIsland
- + + +
+ + +
+ 11161 Schultz Via + Feilstad + 98019 + NewJersey +
+ +
- - + +
- 1715 King Island Suite 086 - Schmittside - 03005-2057 - Colorado + 6106 Nader Village Suite 753 + McLaughlinstad + 43189-8621 + Missouri
- + + expedite viral synergies +
- - + +
- 455 Mitchell Harbor Suite 177 - South Alfordville - 09848-8284 - Idaho + 7546 Kuvalis Plaza + South Wilfrid + 77069 + Georgia
- +
- - + + +
- 5024 Kulas Cliffs - West Carter - 24046 - SouthCarolina -
- - - -
- - -
- 4313 Edmond Lights - North Elenahaven - 40625 - Maryland -
- - - -
- -
-
- - -
- 6277 Bruen Pass - New Emeliaport - 55131-3794 - Arkansas -
- - -
- - -
- 9900 Wellington Center - Irvingbury - 58271 - Nevada -
- - -
- -
-
- - -
- 07633 Ryann Throughway - Hicklefurt - 97260 + 478 Daisha Landing Apt. 510 + West Lizethhaven + 30566-5362 WestVirginia
- + +
- - + + +
- 53265 Abernathy Lock - South Rosettastad - 85744 - Oklahoma + 0920 Adah Skyway + South Kristopher + 62693 + Mississippi
- + + +
+ + +
+ 91758 Sienna Burg Apt. 791 + Murrayfurt + 44284 + Virginia +
+ + + +
+ + +
+ 165 Bogisich Unions Apt. 630 + Corwinhaven + 57971 + Virginia +
+
diff --git a/test/test.php b/test/test.php index 932da57a..adfb415f 100644 --- a/test/test.php +++ b/test/test.php @@ -1,14 +1,15 @@ seed(5); ?> - - address ?> + +
streetAddress ?> @@ -27,7 +28,7 @@ $generator = Faker\Factory::create();
lorem(3) ?> +text(400) ?> ]]>