Example #1
0
<?php

include 'Bidder.php';
include 'Article.php';
include 'Bid.php';
use Bidder\Bidder;
use Article\Article;
use Bid\Bid;
$bidder1 = new Bidder("Bert", "Rose", "*****@*****.**", "female");
$bidder2 = new Bidder("Rush", "Tommy", "*****@*****.**", "male");
$article = new Article("Gold Watch", "10", "New with tags: A brand-new, unused, and unworn item (including handmade items) in the original packaging\n    (such as the original box or bag) and/or with the original tags attached", '2015-10-26 15:45');
$bid1 = new Bid($bidder1, "12", '2015-10-25 12:22');
$bid2 = new Bid($bidder2, "13", '2014-10-26 9:13');
$bid3 = new Bid($bidder1, "15.50", '2015-10-26 15:00');
echo "<dl>";
echo "<dt>{$article->getArticle()}</dt>\n    <dd><p>{$article->getAnotation()}</p>\n    <p>Price: {$article->getPrice()}&euro;</p>\n    <p>Ended {$article->getDate()}</p>\n    <p><ul>\n        <li>{$bid3->getBidder()->getFirstName()}; {$bid3->getValue()}&euro;; {$bid3->getDate()}; Sold;</li>\n        <li>{$bid2->getBidder()->getFirstName()}; {$bid2->getValue()}&euro;; {$bid2->getDate()}</li>\n        <li>{$bid1->getBidder()->getFirstName()}; {$bid1->getValue()}&euro;; {$bid1->getDate()}</li>\n    </ul></p>\n    </dd>";
$bidder1->setFirstName("Miguel")->setLastName("Howard")->setMail("*****@*****.**")->setGender("male");
$article->setArticle("Linen Jacket")->setAnotation("It has a smooth chalk stripe pattern which gives the suit a refined look. The 6 buttons of his double\n    breasted jacket are all buttoned up with the exception of one, it adds a casual touch to an elegant look.<br>\n    The jacket is the same length all around, it has vents at either side, there's a pocket on either side and there's\n    a breast pocket which contains a stylish pocket square.")->setPrice("135")->setDate("2015-10-29 12:00");
$bid1->setBidder($bidder1)->setValue("140")->setDate('2015-10-28 13:58');
$bid2->setBidder($bidder2)->setValue("155")->setDate('2015-10-29 9:13');
echo "<dt>{$article->getArticle()}</dt>\n    <dd><p>{$article->getAnotation()}</p>\n    <p>Price: {$article->getPrice()}&euro;</p>\n    <p>Ended {$article->getDate()}</p>\n    <p><ul>\n        <li>{$bid2->getBidder()->getFirstName()}; {$bid2->getValue()}&euro;; {$bid2->getDate()}</li>\n        <li>{$bid1->getBidder()->getFirstName()}; {$bid1->getValue()}&euro;; {$bid1->getDate()}</li>\n    </ul></p>\n    </dd>";
echo "</dl>";
$bidder1->setFirstName("Zygimantas")->setLastName("Koncius")->setMail("*****@*****.**")->setGender("male");
$article->setArticle("Kebab")->setAnotation("Extremely tasty and fresh")->setPrice("50")->setDate("2015-10-29 22:00");
$bid1->setBidder($bidder1)->setValue("60")->setDate('2015-10-28 13:58');
$bid2->setBidder($bidder2)->setValue("70")->setDate('2015-10-29 9:13');
$bid3->setBidder($bidder1)->setValue("100")->setDate('2015-10-29 21:59');
echo "<dl>";
echo "<dt>{$article->getArticle()}</dt>\n    <dd><p>{$article->getAnotation()}</p>\n    <p>Price: {$article->getPrice()}&euro;</p>\n    <p>Ended {$article->getDate()}</p>\n    <p><ul>\n        <li>{$bid3->getBidder()->getFirstName()}; {$bid3->getValue()}&euro;; {$bid3->getDate()}; Sold;</li>\n        <li>{$bid2->getBidder()->getFirstName()}; {$bid2->getValue()}&euro;; {$bid2->getDate()}</li>\n        <li>{$bid1->getBidder()->getFirstName()}; {$bid1->getValue()}&euro;; {$bid1->getDate()}</li>\n    </ul></p>\n    </dd>";
$bidder1->setFirstName("Zygimantas")->setLastName("Koncius")->setMail("*****@*****.**")->setGender("male");
$article->setArticle("PC")->setAnotation("Extremely powerful, light and slim")->setPrice("420")->setDate("2015-10-31 23:59");