You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
566 B
PHTML
25 lines
566 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace App\Helper\RebateGiftItem;
|
||
|
|
||
|
use App\Exception\BusinessException;
|
||
|
|
||
|
class Manager
|
||
|
{
|
||
|
private function getGameItemClassMap() {
|
||
|
return [
|
||
|
11 => Game11::class
|
||
|
];
|
||
|
}
|
||
|
|
||
|
public function getTypeItemsMap($baseGameId) {
|
||
|
$gameItemClass = $this->getGameItemClassMap()[$baseGameId] ?: null;
|
||
|
if (empty($gameItemClass)) {
|
||
|
throw new BusinessException('GameItem类不存在');
|
||
|
}
|
||
|
$gameItem = new $gameItemClass();
|
||
|
return $gameItem->getAllItems();
|
||
|
}
|
||
|
}
|