本文整理汇总了PHP中Flux::getEquipJobsList方法的典型用法代码示例。如果您正苦于以下问题:PHP Flux::getEquipJobsList方法的具体用法?PHP Flux::getEquipJobsList怎么用?PHP Flux::getEquipJobsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flux
的用法示例。
在下文中一共展示了Flux::getEquipJobsList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: equippableJobs
/**
*
*/
public function equippableJobs($equipJob)
{
$jobs = array();
$equipJob = (int) $equipJob;
$equipJobs = Flux::getEquipJobsList();
foreach ($equipJobs as $bit => $name) {
if ($equipJob & $bit) {
$jobs[] = $name;
}
}
if (count($jobs) === count($equipJobs)) {
return array('All Jobs');
} else {
if (count($jobs) === count($equipJobs) - 1 && !in_array($equipJobs[0], $jobs)) {
return array('All Jobs Except Novice');
} else {
return $jobs;
}
}
}
示例2: foreach
<?php
}
?>
</select>
<p class="action">
<span class="anchor" onclick="$('#equip_upper option').attr('selected', 'selected')">Selecionar Tudo</span> |
<span class="anchor" onclick="$('#equip_upper option').attr('selected', false)">Não Selecionar Nada</span>
</p>
</td>
</tr>
<tr>
<th><label for="equip_jobs">Classes Equipáveis</label></th>
<td colspan="3">
<select class="multi-select" name="equip_jobs[]" id="equip_jobs" size="10" multiple="multiple">
<?php
foreach (Flux::getEquipJobsList() as $bit => $className) {
?>
<option value="<?php
echo htmlspecialchars($bit);
?>
"<?php
if ($equipJobs && in_array($bit, $equipJobs)) {
echo ' selected="selected"';
}
?>
>
<?php
echo htmlspecialchars($className);
?>
</option>
<?php
示例3: foreach
break;
}
}
}
if (empty($errorMessage) && is_array($equipUpper)) {
$upper = Flux::getEquipUpperList();
foreach ($equipUpper as $bit) {
if (!array_key_exists($bit, $upper)) {
$errorMessage = 'Invalid equip upper specified.';
$equipUpper = null;
break;
}
}
}
if (empty($errorMessage) && is_array($equipJobs)) {
$jobs = Flux::getEquipJobsList();
foreach ($equipJobs as $bit) {
if (!array_key_exists($bit, $jobs)) {
$errorMessage = 'Invalid equippable job specified.';
$equipJobs = null;
break;
}
}
}
if (empty($errorMessage)) {
require_once 'Flux/TemporaryTable.php';
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");
}