當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Items::ItemClass方法代碼示例

本文整理匯總了PHP中Items::ItemClass方法的典型用法代碼示例。如果您正苦於以下問題:PHP Items::ItemClass方法的具體用法?PHP Items::ItemClass怎麽用?PHP Items::ItemClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Items的用法示例。


在下文中一共展示了Items::ItemClass方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ItemClasses

 public static function ItemClasses($JSONP)
 {
     $Result = Items::ItemSubClass(null, null, false, true);
     $JSONArray = [];
     foreach ($Result as $Key => $Value) {
         $ClassArray = [];
         $ClassArray['class'] = $Key;
         $ClassArray['name'] = Items::ItemClass($Key)['translation'];
         $ClassArray['subclasses'] = [];
         foreach ($Value as $SKey => $SValue) {
             $ClassArray['subclasses'][] = ['subclass' => $SValue['subclass'], "name" => $SValue['translation']];
         }
         $JSONArray[] = $ClassArray;
     }
     parent::Encode($JSONArray, $JSONP, 'classes');
 }
開發者ID:anonymous33rus,項目名稱:FreedomCore,代碼行數:16,代碼來源:Data.FreedomCoreAPI.php

示例2: GetAllItems

 public static function GetAllItems($Offset)
 {
     global $FCCore;
     $Result = array();
     $Statement = Items::$WConnection->prepare('
         SELECT
             it.*,
             LOWER(fi.iconname) as icon
         FROM
             item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         ORDER BY it.ItemLevel DESC
         LIMIT 50 OFFSET ' . $Offset . '
     ');
     $Statement->execute();
     $Result['item_list'] = $Statement->fetchAll(PDO::FETCH_ASSOC);
     for ($i = 0; $i < 1; $i++) {
         $Result['category_data'] = array('name' => Items::ItemClass($Result['item_list'][$i]['class']));
     }
     $Index = 0;
     foreach ($Result['item_list'] as $Item) {
         $Result['item_list'][$Index]['subclass'] = Items::ItemSubClass($Item['class'], $Item['subclass']);
         $Result['item_list'][$Index]['class'] = Items::ItemClass($Item['class']);
         $Index++;
     }
     return array('count' => Items::SelectCount('item_template'), 'items' => $Result);
 }
開發者ID:Expecto,項目名稱:FreedomCore,代碼行數:28,代碼來源:Items.FreedomCore.php

示例3: SearchForItems

 private static function SearchForItems($ItemName)
 {
     global $FCCore;
     $Statement = Search::$WConnection->prepare('
       SELECT
       *,
       LOWER(fi.iconname) as icon
         FROM
           item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         WHERE name LIKE ?
         ORDER BY it.ItemLevel DESC');
     $Statement->execute(array('%' . $ItemName . '%'));
     $Result = $Statement->fetchAll(PDO::FETCH_ASSOC);
     if (empty($Result)) {
         return false;
     } else {
         $Index = 0;
         foreach ($Result as $Item) {
             $Result[$Index]['subclass'] = Items::ItemSubClass($Item['class'], $Item['subclass']);
             $Result[$Index]['class'] = Items::ItemClass($Item['class']);
             $Index++;
         }
         return $Result;
     }
 }
開發者ID:anonymous33rus,項目名稱:FreedomCore,代碼行數:27,代碼來源:Search.FreedomCore.php

示例4: GetItemArrayData

 private static function GetItemArrayData($ItemArray)
 {
     global $FCCore;
     $SQL = 'SELECT
             it.entry,
             it.class,
             it.subclass,
             it.name,
             it.displayid,
             it.Quality,
             it.BuyPrice,
             it.SellPrice,
             it.bonding,
             it.RequiredLevel,
             it.InventoryType,
             LOWER(fi.iconname) as icon
         FROM
             item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         WHERE
             entry IN (' . $ItemArray . ')';
     $Statement = Zones::$WConnection->prepare($SQL);
     $Statement->execute();
     $Result = $Statement->fetchAll(PDO::FETCH_ASSOC);
     $ArrayIndex = 0;
     foreach ($Result as $Item) {
         $Result[$ArrayIndex]['subclass'] = Items::ItemSubClass($Item['class'], $Item['subclass']);
         $Result[$ArrayIndex]['class'] = Items::ItemClass($Item['class']);
         $Result[$ArrayIndex]['BuyPrice'] = Text::MoneyToCoins($Item['BuyPrice']);
         $Result[$ArrayIndex]['SellPrice'] = Text::MoneyToCoins($Item['SellPrice']);
         $Result[$ArrayIndex]['bond_translation'] = Items::BondTranslation($Item['bonding']);
         $Result[$ArrayIndex]['it_translation'] = Items::InventoryTypeTranslation($Item['InventoryType']);
         $ArrayIndex++;
     }
     return $Result;
 }
開發者ID:anonymous33rus,項目名稱:FreedomCore,代碼行數:37,代碼來源:Zones.FreedomCore.php


注:本文中的Items::ItemClass方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。