mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-04-05 16:12:35 +02:00
modify XML example to showcase new Internet Provider capabilities
This commit is contained in:
parent
77d61ed2a0
commit
2f7ebbfcea
279
readme.md
279
readme.md
@ -145,33 +145,35 @@ The following script generates a valid XML document:
|
||||
```php
|
||||
<?php
|
||||
require_once '/path/to/Faker/src/Factory.php';
|
||||
$faker = Faker\Factory::create();
|
||||
$generator = Faker\Factory::create();
|
||||
?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<contacts>
|
||||
<?php for ($i=0; $i < 10; $i++): ?>
|
||||
<contact firstName="<?php echo $faker->firstName ?>" lastName="<?php echo $faker->lastName ?>">
|
||||
<phone number="<?php echo $faker->phoneNumber ?>"/>
|
||||
<contact firstName="<?php echo $generator->firstName ?>" lastName="<?php echo $generator->lastName ?>" email="<?php echo $generator->email ?>"/>
|
||||
<phone number="<?php echo $generator->phoneNumber ?>"/>
|
||||
<?php if (mt_rand(0,5) == 0): ?>
|
||||
<countryOfBirth><?php echo $faker->country ?></countryOfBirth>
|
||||
<countryOfBirth><?php echo $generator->address ?></countryOfBirth>
|
||||
<?php endif; ?>
|
||||
<address>
|
||||
<street><?php echo $faker->streetAddress ?></street>
|
||||
<city><?php echo $faker->city ?></city>
|
||||
<postcode><?php echo $faker->postcode ?></postcode>
|
||||
<state><?php echo $faker->state ?></state>
|
||||
<street><?php echo $generator->streetAddress ?></street>
|
||||
<city><?php echo $generator->city ?></city>
|
||||
<postcode><?php echo $generator->postcode ?></postcode>
|
||||
<state><?php echo $generator->state ?></state>
|
||||
</address>
|
||||
<company name="<?php echo $faker->company ?>" catchPhrase="<?php echo $faker->catchPhrase ?>">
|
||||
<company name="<?php echo $generator->company ?>" catchPhrase="<?php echo $generator->catchPhrase ?>">
|
||||
<?php if (mt_rand(0,2) == 0): ?>
|
||||
<offer><?php echo $faker->bs ?></offer>
|
||||
<offer><?php echo $generator->bs ?></offer>
|
||||
<?php endif; ?>
|
||||
<?php if (mt_rand(0,3) == 0): ?>
|
||||
<director name="<?php echo $faker->name ?>"/>
|
||||
<director name="<?php echo $generator->name ?>" />
|
||||
<?php endif; ?>
|
||||
</company>
|
||||
<?php if (mt_rand(0,5) == 0): ?>
|
||||
<details>
|
||||
<![CDATA[<?php echo $faker->lorem(3) ?>]]>
|
||||
<![CDATA[
|
||||
<?php echo $generator->lorem(3) ?>
|
||||
]]>
|
||||
</details>
|
||||
<?php endif; ?>
|
||||
</contact>
|
||||
@ -184,147 +186,146 @@ Running this script produces a document looking like:
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<contacts>
|
||||
<contact firstName="Rosario" lastName="Collier">
|
||||
<phone number="(931)716-3327x645"/>
|
||||
<contact firstName="Celestino" lastName="Gottlieb" email="katlyn35@hilll.com"/>
|
||||
<phone number="03923563989"/>
|
||||
<address>
|
||||
<street>09678 Douglas Throughway</street>
|
||||
<city>Cronaville</city>
|
||||
<postcode>97573-1273</postcode>
|
||||
<state>Wisconsin</state>
|
||||
<street>39640 Alize Radial</street>
|
||||
<city>North Robbburgh</city>
|
||||
<postcode>06688-4406</postcode>
|
||||
<state>Colorado</state>
|
||||
</address>
|
||||
<company name="Rowe-Crist" catchPhrase="Persevering disintermediate support">
|
||||
<offer>enhance scalable vortals</offer>
|
||||
<director name="Lucy Bechtelar"/>
|
||||
</company>
|
||||
<details>
|
||||
<![CDATA[Ea libero quia ratione. Architecto reiciendis et. Qui provident natus quo ut inventore. Voluptas quisquam deleniti. Sed ut voluptas.
|
||||
Distinctio quo pariatur at natus vel. Ut deleniti eos voluptatem ut voluptas. Odit sint est temporibus et. Accusamus quam qui ad. Qui dolorem et earum. Rerum qui cupiditate iusto.
|
||||
Autem quis suscipit molestias cumque incidunt. Porro omnis autem. Odit quia ipsum et iste. Iure veniam qui.
|
||||
Assumenda numquam et itaque beatae ut ullam. Itaque totam dolor error ducimus facilis. Consequatur adipisci cum voluptate optio vel velit. Optio velit repellat magnam suscipit. Commodi repellat vel et quaerat. Amet ut corrupti tenetur voluptates dignissimos quo.
|
||||
Debitis nostrum sunt sit porro maiores voluptates. Expedita perspiciatis est labore ex ipsam sint. Consequatur ipsa consequatur. Adipisci voluptatibus voluptate dolorem consequatur ducimus. Delectus suscipit explicabo ea nostrum.
|
||||
Rerum sunt eos. Sed exercitationem iure consequatur doloribus. Itaque ratione error porro omnis dolorem. Accusantium sed sint iste fugit quidem veniam. Molestiae facilis consequatur. Optio ducimus eum rerum maxime.]]>
|
||||
</details>
|
||||
</contact>
|
||||
<contact firstName="Korey" lastName="Donnelly">
|
||||
<phone number="028-470-4927"/>
|
||||
<address>
|
||||
<street>413 Harber Street Apt. 536</street>
|
||||
<city>Port Kaleighport</city>
|
||||
<postcode>16436</postcode>
|
||||
<state>Oregon</state>
|
||||
</address>
|
||||
<company name="Bradtke, Klein and Kiehn" catchPhrase="Pre-emptive directional throughput">
|
||||
<company name="Johnston, Eichmann and Hoppe" catchPhrase="Compatible regional leverage">
|
||||
<offer>e-enable bleeding-edge interfaces</offer>
|
||||
<director name="Ms. Elton Walsh" />
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Jettie" lastName="Rutherford">
|
||||
<phone number="175-227-9402x7968"/>
|
||||
<contact firstName="Gladyce" lastName="Fritsch" email="nicola77@moore.com"/>
|
||||
<phone number="+21(1)6349842909"/>
|
||||
<address>
|
||||
<street>034 Pollich Fords Suite 763</street>
|
||||
<city>Port Cloydberg</city>
|
||||
<postcode>95235</postcode>
|
||||
<state>NewHampshire</state>
|
||||
</address>
|
||||
<company name="Mohr, Koelpin and Stroman" catchPhrase="User-centric demand-driven migration">
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Ambrose" lastName="Willms">
|
||||
<phone number="(992)690-3531x30946"/>
|
||||
<placeOfBirth>Pitcairn Islands</placeOfBirth>
|
||||
<address>
|
||||
<street>70028 Wisoky Wall</street>
|
||||
<city>Tremblayberg</city>
|
||||
<postcode>59624-3945</postcode>
|
||||
<state>Ohio</state>
|
||||
</address>
|
||||
<company name="Farrell, Leffler and Paucek" catchPhrase="Enhanced global strategy">
|
||||
<offer>unleash front-end deliverables</offer>
|
||||
<director name="Fletcher Lind"/>
|
||||
</company>
|
||||
<details>
|
||||
<![CDATA[Nesciunt accusantium qui voluptatum. Eum alias sequi a. Ut iusto quos. Molestiae explicabo quam ut reiciendis veritatis velit. Dolor incidunt quaerat.
|
||||
Molestias harum quidem. Animi velit aut qui. Sunt qui culpa explicabo id id rerum. Consequatur omnis porro.
|
||||
Numquam nisi maiores eveniet. Sint aut praesentium et fugiat necessitatibus. Esse excepturi non excepturi eaque id illo. Voluptas ea rerum voluptates quidem minima. Dolorum vel odio itaque optio.
|
||||
Nisi aliquid est autem aspernatur. Quasi eveniet et quas et accusamus. Non nostrum quo. Molestiae dolores aliquam dignissimos non ea ea. Magni molestiae nobis quasi voluptate expedita illum. Illo aperiam et saepe voluptatem vel.
|
||||
Qui repellendus fuga corrupti perferendis. Magnam amet beatae repellendus. Architecto et et quam. Omnis explicabo maxime qui. Libero et est quasi. Omnis nisi eveniet eum repellendus ut.
|
||||
Repellat sequi quidem eum quam. Rerum optio totam corporis aut libero necessitatibus. Quisquam nihil aut beatae tempore maxime.]]>
|
||||
</details>
|
||||
</contact>
|
||||
<contact firstName="Clair" lastName="Schumm">
|
||||
<phone number="+54(9)9521808817"/>
|
||||
<address>
|
||||
<street>5208 Celia Route Suite 082</street>
|
||||
<city>Port Albin</city>
|
||||
<postcode>91670-9099</postcode>
|
||||
<state>Wisconsin</state>
|
||||
</address>
|
||||
<company name="Bins-Effertz" catchPhrase="Triple-buffered systematic initiative">
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Orland" lastName="Collier">
|
||||
<phone number="(788)806-3732"/>
|
||||
<address>
|
||||
<street>692 Nelda Branch</street>
|
||||
<city>North Shaina</city>
|
||||
<postcode>40220</postcode>
|
||||
<street>973 Bruen Lock Suite 302</street>
|
||||
<city>Konopelskimouth</city>
|
||||
<postcode>11578-6604</postcode>
|
||||
<state>Nebraska</state>
|
||||
</address>
|
||||
<company name="Schuster and Sons" catchPhrase="Triple-buffered background synergy">
|
||||
<offer>exploit sexy models</offer>
|
||||
<director name="Mary Carter PhD"/>
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Jacinto" lastName="Kozey">
|
||||
<phone number="271.710.1171x50715"/>
|
||||
<address>
|
||||
<street>620 Watsica Extension</street>
|
||||
<city>Quigleybury</city>
|
||||
<postcode>31688-4724</postcode>
|
||||
<state>Alaska</state>
|
||||
</address>
|
||||
<company name="Kuphal-Casper" catchPhrase="Advanced well-modulated policy">
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Filomena" lastName="Jacobs">
|
||||
<phone number="(317)630-2597x835"/>
|
||||
<address>
|
||||
<street>026 Florian Lights Apt. 130</street>
|
||||
<city>North Mireille</city>
|
||||
<postcode>68929</postcode>
|
||||
<state>Maryland</state>
|
||||
</address>
|
||||
<company name="Romaguera, Buckridge and Kutch" catchPhrase="Self-enabling systemic portal">
|
||||
<offer>cultivate rich infomediaries</offer>
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Ettie" lastName="McCullough">
|
||||
<phone number="481-073-8855x07450"/>
|
||||
<address>
|
||||
<street>485 Imani Falls Suite 202</street>
|
||||
<city>Marvinbury</city>
|
||||
<postcode>12186-1993</postcode>
|
||||
<state>WestVirginia</state>
|
||||
</address>
|
||||
<company name="Volkman-Hand" catchPhrase="User-friendly analyzing groupware">
|
||||
<offer>streamline granular users</offer>
|
||||
<director name="Bennie Stroman"/>
|
||||
<company name="Volkman, Bergnaum and Kub" catchPhrase="Secured intangible firmware">
|
||||
</company>
|
||||
<details>
|
||||
<![CDATA[Iure optio sint dolorum modi. Voluptas est numquam non et. Et ducimus atque ipsam. Rerum cupiditate enim accusantium. Sint adipisci nobis quasi qui. Sed vitae et quaerat illo omnis et.
|
||||
Illum praesentium non praesentium eum. Occaecati ex voluptatem eos ut velit sunt. Ut quia optio qui.
|
||||
Temporibus omnis ullam autem voluptatem. Quae est nulla impedit ratione. Quasi quo quo et. Aspernatur delectus aliquid nostrum distinctio perspiciatis autem.
|
||||
Est voluptate explicabo voluptatibus officia aut sequi. Eveniet vero voluptas quo quaerat. Nihil voluptas exercitationem qui rerum. Magni et aut amet iste. Eum quia et quia quos. Commodi commodi temporibus voluptas.]]>
|
||||
<![CDATA[
|
||||
Et eum voluptatibus dolorum possimus aut beatae. Nam voluptatem maiores reiciendis blanditiis fuga. Eum laborum et voluptate. Architecto quia similique autem consequatur.
|
||||
Ex nostrum quos. Et adipisci at quod iure quas. Ipsa totam ut dignissimos. Consectetur corrupti quaerat et expedita numquam nesciunt. Recusandae sunt dolor itaque reprehenderit hic. Sunt quibusdam consequatur atque consequatur eos.
|
||||
Explicabo inventore debitis. Iste ea quidem. Accusantium eum velit aut ab repudiandae voluptate. Dicta aut sit id fuga maxime ea. Aut ex perferendis nisi autem. Voluptas praesentium odio.
|
||||
Perferendis optio sit possimus voluptate provident sunt. Et temporibus dolores nemo provident neque ut. Natus facilis deleniti alias quam odio.
|
||||
Voluptatem et dolorum natus tenetur doloremque. Necessitatibus distinctio architecto et natus fuga repudiandae. Rerum natus minus eos.
|
||||
Autem porro doloribus. Nam non officiis vero vitae autem. Ad nihil unde facere. Aliquam deleniti nesciunt eligendi. Harum accusamus sed consectetur nisi.
|
||||
]]>
|
||||
</details>
|
||||
</contact>
|
||||
<contact firstName="Petra" lastName="Lebsack">
|
||||
<phone number="1-065-470-3688x528"/>
|
||||
<placeOfBirth>Italy</placeOfBirth>
|
||||
<contact firstName="Rick" lastName="Emard" email="schulist.branson@mckenzie.net"/>
|
||||
<phone number="135.692.0747x21203"/>
|
||||
<address>
|
||||
<street>36949 Weissnat Cape</street>
|
||||
<city>Swiftfort</city>
|
||||
<postcode>80494</postcode>
|
||||
<street>1715 King Island Suite 086</street>
|
||||
<city>Schmittside</city>
|
||||
<postcode>03005-2057</postcode>
|
||||
<state>Colorado</state>
|
||||
</address>
|
||||
<company name="Willms-Hessel" catchPhrase="Progressive neutral pricingstructure">
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Thad" lastName="Windler" email="will99@brown.info"/>
|
||||
<phone number="1-150-356-8950x9389"/>
|
||||
<address>
|
||||
<street>455 Mitchell Harbor Suite 177</street>
|
||||
<city>South Alfordville</city>
|
||||
<postcode>09848-8284</postcode>
|
||||
<state>Idaho</state>
|
||||
</address>
|
||||
<company name="Erdman and Sons" catchPhrase="Operative multi-state encoding">
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Irma" lastName="Schneider" email="ykeeling@jenkins.net"/>
|
||||
<phone number="1-623-377-9667"/>
|
||||
<address>
|
||||
<street>5024 Kulas Cliffs</street>
|
||||
<city>West Carter</city>
|
||||
<postcode>24046</postcode>
|
||||
<state>SouthCarolina</state>
|
||||
</address>
|
||||
<company name="Armstrong, Hoeger and Goodwin" catchPhrase="Quality-focused bottom-line access">
|
||||
<director name="Miss Neha Stanton" />
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Ellis" lastName="Wolff" email="ebert.myron@schuster.biz"/>
|
||||
<phone number="(990)523-4464x553"/>
|
||||
<address>
|
||||
<street>4313 Edmond Lights</street>
|
||||
<city>North Elenahaven</city>
|
||||
<postcode>40625</postcode>
|
||||
<state>Maryland</state>
|
||||
</address>
|
||||
<company name="Crist LLC" catchPhrase="Realigned homogeneous GraphicInterface">
|
||||
<director name="Jayce Schroeder" />
|
||||
</company>
|
||||
<details>
|
||||
<![CDATA[
|
||||
Impedit aut rerum praesentium consequatur. Non ut ducimus vel quia impedit ipsa. Explicabo quasi eius et. Sed numquam illo dolores debitis delectus.
|
||||
Nisi dolore corporis cumque aut enim. Et modi fuga dicta. Quo rem voluptatem. Nulla consequatur vel aut expedita quae.
|
||||
Rerum sunt qui voluptatem dicta facilis. Rerum maiores omnis repellat. Dolor sed quia rerum qui qui. Accusantium eos ipsa repellendus velit voluptatem asperiores. Et et amet sit in. Explicabo voluptas ut.
|
||||
Dignissimos porro autem veniam quo aut. Eos perspiciatis rerum magnam adipisci. Ratione quas modi. Ea quia delectus rem dolores. Ea commodi hic.
|
||||
Fuga quia et facilis nemo voluptate aliquam. Dignissimos aut qui ipsum. Provident distinctio rerum omnis et enim. Qui odit dicta. Soluta distinctio dolorum molestiae sunt ipsa. Nesciunt quaerat beatae exercitationem dolores facere hic.
|
||||
Dolorem consequuntur repellendus suscipit. Et dolorem consequuntur sint doloremque repellat ad. Impedit reiciendis asperiores. Quod aspernatur nesciunt facere. Nisi minus asperiores ex sed et. Fugiat alias repellendus distinctio nesciunt.
|
||||
]]>
|
||||
</details>
|
||||
</contact>
|
||||
<contact firstName="Stanton" lastName="Bruen" email="pacocha.avis@buckridgedavis.com"/>
|
||||
<phone number="1-180-800-6214x0417"/>
|
||||
<address>
|
||||
<street>6277 Bruen Pass</street>
|
||||
<city>New Emeliaport</city>
|
||||
<postcode>55131-3794</postcode>
|
||||
<state>Arkansas</state>
|
||||
</address>
|
||||
<company name="Shanahan-Mitchell" catchPhrase="Secured grid-enabled throughput">
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Amalia" lastName="Dietrich" email="romaguera.fatima@bogisich.com"/>
|
||||
<phone number="250.571.3328"/>
|
||||
<address>
|
||||
<street>9900 Wellington Center</street>
|
||||
<city>Irvingbury</city>
|
||||
<postcode>58271</postcode>
|
||||
<state>Nevada</state>
|
||||
</address>
|
||||
<company name="Purdy, Paucek and Hintz" catchPhrase="Ergonomic tertiary data-warehouse">
|
||||
</company>
|
||||
<details>
|
||||
<![CDATA[
|
||||
Voluptas doloremque asperiores. Quaerat iste quia suscipit consectetur. Consectetur placeat rem distinctio numquam.
|
||||
Ab debitis odio neque. Repellat autem ea quas sequi exercitationem. Tempore omnis totam optio consectetur perferendis. Consectetur saepe voluptatem dolorem quae.
|
||||
Sed aliquid labore alias libero vitae amet. Asperiores accusantium quidem nihil amet necessitatibus rerum. Aut inventore cupiditate quisquam voluptatibus nesciunt. In sunt quam.
|
||||
At quis fugiat ut possimus debitis eos. Labore ipsum veniam. Aliquid consequatur voluptatem fugiat deserunt. Natus non voluptatum nam minima. Eveniet libero incidunt dolores iure deleniti. Dolorem deserunt aliquam eius commodi odio.
|
||||
]]>
|
||||
</details>
|
||||
</contact>
|
||||
<contact firstName="Laurine" lastName="Prohaska" email="dovie53@jenkinsokuneva.info"/>
|
||||
<phone number="502.295.9840x98725"/>
|
||||
<address>
|
||||
<street>07633 Ryann Throughway</street>
|
||||
<city>Hicklefurt</city>
|
||||
<postcode>97260</postcode>
|
||||
<state>WestVirginia</state>
|
||||
</address>
|
||||
<company name="Nienow LLC" catchPhrase="Balanced grid-enabled task-force">
|
||||
<company name="Hermiston LLC" catchPhrase="Inverse bi-directional projection">
|
||||
</company>
|
||||
</contact>
|
||||
<contact firstName="Brett" lastName="Lehner" email="tdooley@weber.com"/>
|
||||
<phone number="251.924.8740x80198"/>
|
||||
<address>
|
||||
<street>53265 Abernathy Lock</street>
|
||||
<city>South Rosettastad</city>
|
||||
<postcode>85744</postcode>
|
||||
<state>Oklahoma</state>
|
||||
</address>
|
||||
<company name="Monahan LLC" catchPhrase="Operative analyzing middleware">
|
||||
</company>
|
||||
</contact>
|
||||
</contacts>
|
||||
|
Loading…
x
Reference in New Issue
Block a user