本文整理汇总了PHP中Card::fromString方法的典型用法代码示例。如果您正苦于以下问题:PHP Card::fromString方法的具体用法?PHP Card::fromString怎么用?PHP Card::fromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card::fromString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addCard
public function addCard($mCard)
{
$oCard = is_string($mCard) ? Card::fromString($mCard) : $mCard;
$this->aCards[] = $oCard;
}
示例2: standard
/**
* @param DeckId $deckId
* @return Deck
*/
public static function standard(DeckId $deckId)
{
return new Deck($deckId, [Card::fromString('As'), Card::fromString('2s'), Card::fromString('3s'), Card::fromString('4s'), Card::fromString('5s'), Card::fromString('6s'), Card::fromString('7s'), Card::fromString('8s'), Card::fromString('9s'), Card::fromString('Ts'), Card::fromString('Js'), Card::fromString('Qs'), Card::fromString('Ks'), Card::fromString('Ad'), Card::fromString('2d'), Card::fromString('3d'), Card::fromString('4d'), Card::fromString('5d'), Card::fromString('6d'), Card::fromString('7d'), Card::fromString('8d'), Card::fromString('9d'), Card::fromString('Td'), Card::fromString('Jd'), Card::fromString('Qd'), Card::fromString('Kd'), Card::fromString('Ac'), Card::fromString('2c'), Card::fromString('3c'), Card::fromString('4c'), Card::fromString('5c'), Card::fromString('6c'), Card::fromString('7c'), Card::fromString('8c'), Card::fromString('9c'), Card::fromString('Tc'), Card::fromString('Jc'), Card::fromString('Qc'), Card::fromString('Kc'), Card::fromString('Ah'), Card::fromString('2h'), Card::fromString('3h'), Card::fromString('4h'), Card::fromString('5h'), Card::fromString('6h'), Card::fromString('7h'), Card::fromString('8h'), Card::fromString('9h'), Card::fromString('Th'), Card::fromString('Jh'), Card::fromString('Qh'), Card::fromString('Kh')]);
}