2011-10-15 00:49:26 +02:00
|
|
|
<?php
|
2011-10-25 22:49:57 +02:00
|
|
|
require_once __DIR__ . '/../src/autoload.php';
|
|
|
|
|
2011-10-15 01:11:42 +02:00
|
|
|
$generator = Faker\Factory::create();
|
2011-10-16 23:06:54 +02:00
|
|
|
$generator->seed(5);
|
2011-10-15 00:49:26 +02:00
|
|
|
?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<contacts>
|
|
|
|
<?php for ($i=0; $i < 10; $i++): ?>
|
2011-10-15 21:56:49 +02:00
|
|
|
<contact firstName="<?php echo $generator->firstName ?>" lastName="<?php echo $generator->lastName ?>" email="<?php echo $generator->email ?>"/>
|
2011-10-15 00:49:26 +02:00
|
|
|
<phone number="<?php echo $generator->phoneNumber ?>"/>
|
2011-10-16 23:06:54 +02:00
|
|
|
<?php if (mt_rand(0,3) == 0): ?>
|
|
|
|
<birth date="<?php echo $generator->dateTimeThisCentury->format('Y-m-d') ?>" place="<?php echo $generator->city ?>"/>
|
2011-10-15 00:49:26 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
<address>
|
|
|
|
<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 $generator->company ?>" catchPhrase="<?php echo $generator->catchPhrase ?>">
|
|
|
|
<?php if (mt_rand(0,2) == 0): ?>
|
|
|
|
<offer><?php echo $generator->bs ?></offer>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if (mt_rand(0,3) == 0): ?>
|
2011-10-15 21:56:49 +02:00
|
|
|
<director name="<?php echo $generator->name ?>" />
|
2011-10-15 00:49:26 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
</company>
|
|
|
|
<?php if (mt_rand(0,5) == 0): ?>
|
|
|
|
<details>
|
2011-10-15 13:21:13 +02:00
|
|
|
<![CDATA[
|
2011-10-16 23:06:54 +02:00
|
|
|
<?php echo $generator->text(400) ?>
|
2011-10-15 13:21:13 +02:00
|
|
|
]]>
|
2011-10-15 00:49:26 +02:00
|
|
|
</details>
|
|
|
|
<?php endif; ?>
|
|
|
|
</contact>
|
|
|
|
<?php endfor; ?>
|
2011-10-15 14:02:17 +02:00
|
|
|
</contacts>
|