本文整理汇总了PHP中Card::getStat方法的典型用法代码示例。如果您正苦于以下问题:PHP Card::getStat方法的具体用法?PHP Card::getStat怎么用?PHP Card::getStat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card::getStat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Deck
require_once 'deck.php';
$newdeck = new Deck($uidtotest);
$expectedvals = array("userid" => 4321, "acard" => $testcard);
print "<ul>";
if ($newdeck->getUserID() == $expectedvals["userid"]) {
print "<li>The user id of the deck object is <font color='green'>correct</font> as ";
print_r($newdeck->getUserID());
print "</li>";
$goodtests++;
} else {
print "<li>The user id of the deck object is <font color='red'>incorrect</font> as ";
print_r($newdeck->getUserID());
print "</li>";
$badtests++;
}
if ($newdeck->hasCard($testcard->getStat("id"))) {
print "<li>The deck <font color='green'>has</font> the expected card in it: ";
$newdeck->getCard($testcard->getStat("id"))->printCardInfo();
print "</li>";
$goodtests++;
} else {
print "<li>The deck <font color='red'>does not have</font> the expected card in it: ";
$newdeck->getCard($testcard->getStat("id"))->printCardInfo();
print "</li>";
$badtests++;
}
print "</ul>";
//print_r($newdeck);
//echo '<br /><br />';
print "<h3>Testing the Character Class with a few cards.</h3>";
$ourup = 42;