本文整理汇总了PHP中Info::getItemName方法的典型用法代码示例。如果您正苦于以下问题:PHP Info::getItemName方法的具体用法?PHP Info::getItemName怎么用?PHP Info::getItemName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Info
的用法示例。
在下文中一共展示了Info::getItemName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addItems
public static function addItems(&$itemArray, $items, $killTime, $inContainer = 0, $parentFlag = 0)
{
if ($items == null) {
return;
}
if (is_array($items)) {
foreach ($items as $item) {
$typeID = $item['itemType']['id'];
$item['typeID'] = $typeID;
$item['price'] = Price::getItemPrice($typeID, $killTime);
$item['inContainer'] = $inContainer;
if ($inContainer) {
$item['flag'] = $parentFlag;
}
if ($inContainer && strpos(Info::getItemName($typeID), 'Blueprint')) {
$item['singleton'] = 2;
}
unset($item['_stringValue']);
$itemArray[] = $item;
$subItems = isset($item['items']) ? $item['items'] : null;
unset($item['items']);
if ($subItems != null) {
self::addItems($itemArray, $subItems, $killTime, 1, $item['flag']);
}
}
}
}
示例2: addItems
public static function addItems(&$itemArray, $items, $killTime, $inContainer = 0, $parentFlag = 0)
{
if (is_array($items)) {
foreach ($items as $item) {
$typeID = $item["typeID"];
$priceLookup = Db::queryRow("select * from zz_item_price_lookup where typeID = :typeID and priceDate = date(:date)", array(":typeID" => $typeID, ":date" => $killTime), 3600);
$item["price"] = $priceLookup["price"];
$item["inContainer"] = $inContainer;
if ($inContainer) {
$item["flag"] = $parentFlag;
}
if ($inContainer && strpos(Info::getItemName($typeID), "Blueprint")) {
$item["singleton"] = 2;
}
unset($item["_stringValue"]);
$itemArray[] = $item;
$subItems = isset($item["items"]) ? $item["items"] : null;
unset($item["items"]);
if ($subItems != null) {
self::addItems($itemArray, $subItems, $killTime, 1, $item["flag"]);
}
}
}
}
示例3: getInvolved
private static function getInvolved(&$kills, $team)
{
$involved = array();
foreach ($kills as $kill) {
$kill = static::$killstorage[$kill['victim']['killID']];
$attackers = $kill['involved'];
array_shift($attackers);
if (is_array($attackers)) {
foreach ($attackers as $entry) {
$add = false;
if (in_array(@$entry['allianceID'], $team)) {
$add = true;
}
if (in_array(@$entry['corporationID'], $team)) {
$add = true;
}
if ($add) {
$key = @$entry['characterID'] . ':' . @$entry['corporationID'] . ':' . @$entry['allianceID'] . ':' . @$entry['shipTypeID'];
$entry['shipName'] = Info::getItemName(@$entry['shipTypeID']);
if (!in_array($key, $involved)) {
$involved[$key] = $entry;
}
}
}
}
}
return $involved;
}