本文整理汇总了PHP中Card::printCardInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Card::printCardInfo方法的具体用法?PHP Card::printCardInfo怎么用?PHP Card::printCardInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card::printCardInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Character
//print_r($newdeck);
//echo '<br /><br />';
print "<h3>Testing the Character Class with a few cards.</h3>";
$ourup = 42;
$charname = 'A name';
require_once 'character.php';
$newchar = new Character($uidtotest, $charname, $ourup);
echo 'Initial character object: ';
$newchar->printCharInfo();
echo '<br /><br />Adding card: ';
$newcard->printCardInfo();
$newchar->addCard($newcard);
$newchar->saveCharacter();
//$newchar->printCharInfo();
echo '<br /><br />Adding a second card: ';
$testcard->printCardInfo();
$newchar->addCard($testcard);
$newchar->saveCharacter();
echo '<br /><br />Resulting character: ';
$newchar->printCharInfo();
echo '<br /><br />Removed a card: ';
$newchar->removeCard($newcard);
$newchar->saveCharacter();
$newchar->printCharInfo();
echo '<br /><br />Get a copy of the character from the DB';
$charcopy = new Character($uidtotest, '', 0);
$charcopy->getCharacter($newchar->getCharID(), $uidtotest);
echo '<br /><br />Comparing the copy to the original: ';
//$newchar->printCharInfo();
$newchar_str = $newchar->strRepresentation();
//$charcopy->printCharInfo();