本文整理汇总了PHP中Flux::isStackableItemType方法的典型用法代码示例。如果您正苦于以下问题:PHP Flux::isStackableItemType方法的具体用法?PHP Flux::isStackableItemType怎么用?PHP Flux::isStackableItemType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flux
的用法示例。
在下文中一共展示了Flux::isStackableItemType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$categories = Flux::config('ShopCategories')->toArray();
if ($server->isRenewal) {
$fromTables = array("{$server->charMapDatabase}.item_db_re", "{$server->charMapDatabase}.item_db2_re");
} else {
$fromTables = array("{$server->charMapDatabase}.item_db", "{$server->charMapDatabase}.item_db2");
}
$tableName = "{$server->charMapDatabase}.items";
$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);
$shopTable = Flux::config('FluxTables.ItemShopTable');
$col = "id AS item_id, name_japanese AS item_name, type";
$sql = "SELECT {$col} FROM {$tableName} WHERE items.id = ?";
$sth = $server->connection->getStatement($sql);
$sth->execute(array($itemID));
$item = $sth->fetch();
$stackable = false;
if ($item && Flux::isStackableItemType($item->type)) {
$stackable = true;
}
if ($item && count($_POST)) {
$maxCost = (int) Flux::config('ItemShopMaxCost');
$maxQty = (int) Flux::config('ItemShopMaxQuantity');
$category = $params->get('category');
$shop = new Flux_ItemShop($server);
$cost = (int) $params->get('cost');
$quantity = (int) $params->get('qty');
$info = trim(htmlspecialchars($params->get('info')));
$image = $files->get('image');
$useExisting = (int) $params->get('use_existing');
if (!$cost) {
$errorMessage = 'You must input a credit cost greater than zero.';
} elseif ($cost > $maxCost) {
示例2: Flux_ItemShop
$stackable = false;
$shopItemID = $params->get('id');
$shop = new Flux_ItemShop($server);
$categories = Flux::config('ShopCategories')->toArray();
$item = $shop->getItem($shopItemID);
if ($item) {
$fromTables = array("{$server->charMapDatabase}.item_db", "{$server->charMapDatabase}.item_db2");
$tableName = "{$server->charMapDatabase}.items";
$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);
$shopTable = Flux::config('FluxTables.ItemShopTable');
$col = "id AS item_id, name_japanese AS item_name, type";
$sql = "SELECT {$col} FROM {$tableName} WHERE items.id = ?";
$sth = $server->connection->getStatement($sql);
$sth->execute(array($item->shop_item_nameid));
$originalItem = $sth->fetch();
if ($originalItem && Flux::isStackableItemType($originalItem->type)) {
$stackable = true;
}
if (count($_POST)) {
$maxCost = (int) Flux::config('ItemShopMaxCost');
$maxQty = (int) Flux::config('ItemShopMaxQuantity');
$category = $params->get('category');
$cost = (int) $params->get('cost');
$quantity = (int) $params->get('qty');
$info = trim($params->get('info'));
$image = $files->get('image');
$useExisting = (int) $params->get('use_existing');
if (!$cost) {
$errorMessage = 'Você deve colocar um custo de crédito maior que zero.';
} elseif ($cost > $maxCost) {
$errorMessage = "O custo do item não pode exceder {$maxCost}.";