当前位置: 首页>>代码示例>>PHP>>正文


PHP Util::ucFirst方法代码示例

本文整理汇总了PHP中Util::ucFirst方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::ucFirst方法的具体用法?PHP Util::ucFirst怎么用?PHP Util::ucFirst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Util的用法示例。


在下文中一共展示了Util::ucFirst方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new ItemsetListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('itemsets'));
 }
开发者ID:saqar,项目名称:aowow,代码行数:7,代码来源:itemsets.php

示例2: generateTitle

 protected function generateTitle()
 {
     array_unshift($this->title, Util::ucFirst(Lang::game('pets')));
     if ($this->category) {
         array_unshift($this->title, Lang::pet('cat', $this->category[0]));
     }
 }
开发者ID:saqar,项目名称:aowow,代码行数:7,代码来源:pets.php

示例3: renderTooltip

 public function renderTooltip()
 {
     if (!$this->curTpl) {
         return array();
     }
     $x = '<table><tr><td>';
     $x .= '<span class="q' . $this->getField('quality') . '">' . Util::jsEscape($this->getField('name', true)) . '</span><br />';
     $nClasses = 0;
     if ($_ = $this->getField('classMask')) {
         $cl = Lang::getClassString($_, $__, $nClasses);
         $x .= Util::ucFirst($nClasses > 1 ? Lang::game('classes') : Lang::game('class')) . Lang::main('colon') . $cl . '<br />';
     }
     if ($_ = $this->getField('contentGroup')) {
         $x .= Util::jsEscape(Lang::itemset('notes', $_)) . ($this->getField('heroic') ? ' <i class="q2">(' . Lang::item('heroic') . ')</i>' : '') . '<br />';
     }
     if (!$nClasses || !$this->getField('contentGroup')) {
         $x .= Lang::itemset('types', $this->getField('type')) . '<br />';
     }
     if ($bonuses = $this->getBonuses()) {
         $x .= '<span>';
         foreach ($bonuses as $b) {
             $x .= '<br /><span class=\\"q13\\">' . $b['bonus'] . ' ' . Lang::itemset('_pieces') . Lang::main('colon') . '</span>' . Util::jsEscape($b['desc']);
         }
         $x .= '</span>';
     }
     $x .= '</td></tr></table>';
     return $x;
 }
开发者ID:saqar,项目名称:aowow,代码行数:28,代码来源:itemset.class.php

示例4: __construct

 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new CreatureListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('npcs'));
     $this->subCat = $pageParam ? '=' . $pageParam : '';
 }
开发者ID:TrinityCore,项目名称:aowow,代码行数:8,代码来源:npcs.php

示例5: generateTitle

 protected function generateTitle()
 {
     array_unshift($this->title, Util::ucFirst(Lang::game('achievements')));
     if ($this->category) {
         $catrow = DB::Aowow()->SelectRow('SELECT * FROM ?_achievementcategory WHERE id = ?d', end($this->category));
         array_unshift($this->title, Util::localizedString($catrow, 'name'));
     }
 }
开发者ID:saqar,项目名称:aowow,代码行数:8,代码来源:achievements.php

示例6: __construct

 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new EnchantmentListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('enchantments'));
     $this->subCat = $pageParam !== null ? '=' . $pageParam : '';
 }
开发者ID:saqar,项目名称:aowow,代码行数:8,代码来源:enchantments.php

示例7: __construct

 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new SpellListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('spells'));
     $this->subCat = $pageParam !== null ? '=' . $pageParam : '';
     $this->filter = ['classPanel' => false, 'glyphPanel' => false];
 }
开发者ID:TrinityCore,项目名称:aowow,代码行数:9,代码来源:spells.php

示例8: __construct

 public function __construct($pageCall, $pageParam)
 {
     $this->validCats = Util::$questClasses;
     // needs reviewing (not allowed to set this as default)
     $this->filterObj = new QuestListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('quests'));
     $this->subCat = $pageParam ? '=' . $pageParam : '';
 }
开发者ID:Carbenium,项目名称:aowow,代码行数:10,代码来源:quests.php

示例9: generateContent

 protected function generateContent()
 {
     /***********/
     /* Infobox */
     /***********/
     $infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
     // has Animation
     if ($this->subject->getField('isAnimated')) {
         $infobox[] = Lang::emote('isAnimated');
     }
     /****************/
     /* Main Content */
     /****************/
     $text = '';
     if ($aliasses = DB::Aowow()->selectCol('SELECT command FROM ?_emotes_aliasses WHERE id = ?d AND locales & ?d', $this->typeId, 1 << User::$localeId)) {
         $text .= '[h3]' . Lang::emote('aliases') . '[/h3][ul]';
         foreach ($aliasses as $a) {
             $text .= '[li]/' . $a . '[/li]';
         }
         $text .= '[/ul][br][br]';
     }
     $texts = [];
     if ($_ = $this->subject->getField('self', true)) {
         $texts[Lang::emote('self')] = $_;
     }
     if ($_ = $this->subject->getField('target', true)) {
         $texts[Lang::emote('target')] = $_;
     }
     if ($_ = $this->subject->getField('noTarget', true)) {
         $texts[Lang::emote('noTarget')] = $_;
     }
     if (!$texts) {
         $text .= '[div][i class=q0]' . Lang::emote('noText') . '[/i][/div]';
     } else {
         foreach ($texts as $h => $t) {
             $text .= '[pad][b]' . $h . '[/b][ul][li][span class=s4]' . preg_replace('/%\\d?\\$?s/', '<' . Util::ucFirst(Lang::main('name')) . '>', $t) . '[/span][/li][/ul]';
         }
     }
     $this->extraText = $text;
     $this->infobox = $infobox ? '[ul][li]' . implode('[/li][li]', $infobox) . '[/li][/ul]' : null;
     /**************/
     /* Extra Tabs */
     /**************/
     // tab: achievement
     $condition = array(['ac.type', ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE], ['ac.value1', $this->typeId]);
     $acv = new AchievementList($condition);
     $this->lvTabs[] = ['achievement', ['data' => array_values($acv->getListviewData())]];
     $this->extendGlobalData($acv->getJsGlobals());
 }
开发者ID:TrinityCore,项目名称:aowow,代码行数:49,代码来源:emote.php

示例10: generateContent

 protected function generateContent()
 {
     $tabData = array('data' => [], 'name' => Util::ucFirst(Lang::game('enchantments')));
     $conditions = [];
     if (!User::isInGroup(U_GROUP_EMPLOYEE)) {
         $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
     }
     if ($_ = $this->filterObj->getConditions()) {
         $conditions[] = $_;
     }
     $ench = new EnchantmentList($conditions);
     $tabData['data'] = array_values($ench->getListviewData());
     $this->extendGlobalData($ench->getJSGlobals());
     // recreate form selection
     $this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
     $this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
     $this->filter['fi'] = $this->filterObj->getForm();
     $xCols = $this->filterObj->getForm('extraCols', true);
     foreach (Util::$itemFilter as $fiId => $str) {
         if (array_column($tabData['data'], $str)) {
             $xCols[] = $fiId;
         }
     }
     if (array_column($tabData['data'], 'dmg')) {
         $xCols[] = 34;
     }
     if ($xCols) {
         $this->filter['fi']['extraCols'] = "fi_extraCols = " . Util::toJSON(array_values(array_unique($xCols))) . ";";
     }
     if (!empty($this->filter['fi']['extraCols'])) {
         $tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
     }
     if ($ench->getMatches() > CFG_SQL_LIMIT_DEFAULT) {
         $tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_enchantmentsfound', $ench->getMatches(), CFG_SQL_LIMIT_DEFAULT);
         $tabData['_truncated'] = 1;
     }
     if (array_filter(array_column($tabData['data'], 'spells'))) {
         $tabData['visibleCols'] = ['trigger'];
     }
     if (!$ench->hasSetFields(['skillLine'])) {
         $tabData['hiddenCols'] = ['skill'];
     }
     if ($this->filterObj->error) {
         $tabData['_errors'] = '$1';
     }
     $this->lvTabs[] = ['enchantment', $tabData, 'enchantment'];
 }
开发者ID:TrinityCore,项目名称:aowow,代码行数:47,代码来源:enchantments.php

示例11: account

function account()
{
    $fields = array('name' => ['Username', false], 'pass1' => ['Enter Password', true], 'pass2' => ['Confirm Password', true]);
    if (CLISetup::readInput($fields)) {
        CLISetup::log();
        if (!User::isValidName($fields['name'], $e)) {
            CLISetup::log(Lang::account($e == 1 ? 'errNameLength' : 'errNameChars'), CLISetup::LOG_ERROR);
        } else {
            if (!User::isValidPass($fields['pass1'], $e)) {
                CLISetup::log(Lang::account($e == 1 ? 'errPassLength' : 'errPassChars'), CLISetup::LOG_ERROR);
            } else {
                if ($fields['pass1'] != $fields['pass2']) {
                    CLISetup::log(Lang::account('passMismatch'), CLISetup::LOG_ERROR);
                } else {
                    if ($_ = DB::Aowow()->SelectCell('SELECT 1 FROM ?_account WHERE user = ? AND (status <> ?d OR (status = ?d AND statusTimer > UNIX_TIMESTAMP()))', $fields['name'], ACC_STATUS_NEW, ACC_STATUS_NEW)) {
                        CLISetup::log(Lang::account('nameInUse'), CLISetup::LOG_ERROR);
                    } else {
                        // write to db
                        $ok = DB::Aowow()->query('REPLACE INTO ?_account (user, passHash, displayName, joindate, email, allowExpire, userGroups, userPerms) VALUES (?, ?, ?, UNIX_TIMESTAMP(), ?, 0, ?d, 1)', $fields['name'], User::hashCrypt($fields['pass1']), Util::ucFirst($fields['name']), CFG_CONTACT_EMAIL, U_GROUP_ADMIN);
                        if ($ok) {
                            $newId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE user = ?', $fields['name']);
                            Util::gainSiteReputation($newId, SITEREP_ACTION_REGISTER);
                            CLISetup::log("account " . $fields['name'] . " created successfully", CLISetup::LOG_OK);
                        } else {
                            // something went wrong
                            CLISetup::log(Lang::main('intError'), CLISetup::LOG_ERROR);
                        }
                    }
                }
            }
        }
    } else {
        CLISetup::log();
        CLISetup::log("account creation aborted", CLISetup::LOG_WARN);
    }
}
开发者ID:Carbenium,项目名称:aowow,代码行数:36,代码来源:account.func.php

示例12: __construct

 public function __construct($pageCall, $pageParam)
 {
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('skills'));
 }
开发者ID:TrinityCore,项目名称:aowow,代码行数:6,代码来源:skills.php

示例13: createEffects

 private function createEffects(&$infobox, &$redButtons)
 {
     // proc data .. maybe use more information..?
     $procData = DB::World()->selectRow('SELECT IF(ppmRate > 0, -ppmRate, customChance) AS chance, cooldown FROM spell_proc_event WHERE entry = ?d', $this->typeId);
     if (!isset($procData['cooldown'])) {
         $procData['cooldown'] = 0;
     }
     $effects = [];
     $spellIdx = array_unique(array_merge($this->subject->canTriggerSpell(), $this->subject->canTeachSpell()));
     $itemIdx = $this->subject->canCreateItem();
     // Iterate through all effects:
     for ($i = 1; $i < 4; $i++) {
         if ($this->subject->getField('effect' . $i . 'Id') <= 0) {
             continue;
         }
         $effId = (int) $this->subject->getField('effect' . $i . 'Id');
         $effMV = (int) $this->subject->getField('effect' . $i . 'MiscValue');
         $effBP = (int) $this->subject->getField('effect' . $i . 'BasePoints');
         $effDS = (int) $this->subject->getField('effect' . $i . 'DieSides');
         $effRPPL = $this->subject->getField('effect' . $i . 'RealPointsPerLevel');
         $effAura = (int) $this->subject->getField('effect' . $i . 'AuraId');
         $foo =& $effects[];
         // Icons:
         // .. from item
         if (in_array($i, $itemIdx)) {
             $_ = $this->subject->getField('effect' . $i . 'CreateItemId');
             foreach ($this->subject->relItems->iterate() as $itemId => $__) {
                 if ($itemId != $_) {
                     continue;
                 }
                 $foo['icon'] = array('id' => $this->subject->relItems->id, 'name' => $this->subject->relItems->getField('name', true), 'quality' => $this->subject->relItems->getField('quality'), 'count' => $effDS + $effBP, 'icon' => $this->subject->relItems->getField('iconString'));
                 break;
             }
             if ($effDS > 1) {
                 $foo['icon']['count'] = "'" . ($effBP + 1) . '-' . $foo['icon']['count'] . "'";
             }
         } else {
             if (in_array($i, $spellIdx) || $effId == 133) {
                 $_ = $this->subject->getField('effect' . $i . 'TriggerSpell');
                 if (!$_) {
                     $_ = $this->subject->getField('effect' . $i . 'MiscValue');
                 }
                 $trig = new SpellList(array(['s.id', (int) $_]));
                 $foo['icon'] = array('id' => $_, 'name' => $trig->error ? Util::ucFirst(Lang::game('spell')) . ' #' . $_ : $trig->getField('name', true), 'count' => 0);
                 $this->extendGlobalData($trig->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
             }
         }
         // Effect Name
         $foo['name'] = (User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'EffectId: ' . $effId, Util::$spellEffectStrings[$effId]) : Util::$spellEffectStrings[$effId]) . Lang::main('colon');
         if ($this->subject->getField('effect' . $i . 'RadiusMax') > 0) {
             $foo['radius'] = $this->subject->getField('effect' . $i . 'RadiusMax');
         }
         if (!in_array($i, $itemIdx) && !in_array($i, $spellIdx) && !in_array($effAura, [225, 227])) {
             $foo['value'] = ($effDS && $effDS != 1 ? $effBP + 1 . Lang::game('valueDelim') : null) . ($effBP + $effDS);
         }
         if ($effRPPL != 0) {
             $foo['value'] = (isset($foo['value']) ? $foo['value'] : '0') . sprintf(Lang::spell('costPerLevel'), $effRPPL);
         }
         if ($this->subject->getField('effect' . $i . 'Periode') > 0) {
             $foo['interval'] = Util::formatTime($this->subject->getField('effect' . $i . 'Periode'));
         }
         if ($_ = $this->subject->getField('effect' . $i . 'Mechanic')) {
             $foo['mechanic'] = Lang::game('me', $_);
         }
         if (!empty($procData['chance'])) {
             $foo['procData'] = array($procData['chance'], $procData['cooldown'] ? Util::formatTime($procData['cooldown'] * 1000, true) : null);
         } else {
             if (in_array($i, $this->subject->canTriggerSpell()) && $this->subject->getField('procChance')) {
                 $foo['procData'] = array($this->subject->getField('procChance'), $procData['cooldown'] ? Util::formatTime($procData['cooldown'] * 1000, true) : null);
             }
         }
         // parse masks and indizes
         switch ($effId) {
             case 8:
                 // Power Drain
             // Power Drain
             case 30:
                 // Energize
             // Energize
             case 137:
                 // Energize Pct
                 $_ = Lang::spell('powerTypes', $effMV);
                 if ($_ && User::isInGroup(U_GROUP_EMPLOYEE)) {
                     $_ = sprintf(Util::$dfnString, Lang::spell('_value') . Lang::main('colon') . $effMV, $_);
                 } else {
                     if (!$_) {
                         $_ = $effMV;
                     }
                 }
                 if ($effMV == POWER_RAGE || $effMV == POWER_RUNIC_POWER) {
                     $foo['value'] = ($effDS && $effDS != 1 ? ($effBP + 1) / 10 . Lang::game('valueDelim') : null) . ($effBP + $effDS) / 10;
                 }
                 $foo['name'] .= ' (' . $_ . ')';
                 break;
             case 16:
                 // QuestComplete
                 if ($_ = QuestList::getName($effMV)) {
                     $foo['name'] .= '(<a href="?quest=' . $effMV . '">' . $_ . '</a>)';
                 } else {
                     $foo['name'] .= Util::ucFirst(Lang::game('quest')) . ' #' . $effMV;
//.........这里部分代码省略.........
开发者ID:Niknox,项目名称:aowow,代码行数:101,代码来源:spell.php

示例14: generateTitle

 protected function generateTitle()
 {
     $this->title[] = Util::ucFirst(Lang::game('profiles'));
 }
开发者ID:saqar,项目名称:aowow,代码行数:4,代码来源:profiles.php

示例15: generateTitle

 protected function generateTitle()
 {
     array_unshift($this->title, Util::ucFirst(Lang::main('_cpHead')));
 }
开发者ID:saqar,项目名称:aowow,代码行数:4,代码来源:profiler.php


注:本文中的Util::ucFirst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。