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


PHP Dog::getTrigger方法代碼示例

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


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

示例1: replaceArgs

 private function replaceArgs($back, $args = NULL)
 {
     $t = Dog::getTrigger();
     $back = str_replace(array('%BOT%', '%CMD%', '%T%'), array(Dog::getNickname(), $t . $this->name, $t), $back);
     return $args === NULL ? $back : vsprintf($back, $args);
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:6,代碼來源:Dog_Plugin.php

示例2: scumInit

 private function scumInit(Dog_User $user)
 {
     if (false === ($slot = $this->getGameSlot())) {
         return $this->errorSlot();
     }
     if (!isset($this->games[$slot])) {
         $this->games[$slot] = new Dog_ScumGame(Dog::getChannel());
     }
     $game = $this->games[$slot];
     $game instanceof Dog_ScumGame;
     if ($game->isInited()) {
         return $this->errorInited();
     }
     if ($game->isRunning()) {
         return $this->errorRunning();
     }
     $game->init();
     $game->join($user);
     return $this->lang('msg_inited', array($this->getMaxPlayers() - 1, Dog::getTrigger()));
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:20,代碼來源:DOGMOD_Scum.php

示例3: replaceLang

 private function replaceLang($text, $args, $trigger = '')
 {
     $t = Dog::getTrigger();
     $text = str_replace(array('%T%', '%CMD%', '%BOT%'), array($t, $t . $trigger, Dog::getNickname()), $text);
     return $args === NULL ? $text : vsprintf($text, $args);
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:6,代碼來源:Dog_Module.php

示例4: displayItem

 private function displayItem(Dog_Server $server)
 {
     $count = count($this->queue);
     // Display one
     if ($count > 0) {
         $this->displayItemB($server, array_shift($this->queue));
         $count--;
     }
     // Done?
     if ($count === 0) {
         return $this->onDone($server);
     }
     // We displayed one more
     $this->displaycount++;
     if ($this->displaycount === self::DISPLAYCOUNT_IDLE) {
         $this->runlevel = 5;
         # Idle a while
         $t = Dog::getTrigger();
         $this->response($server, sprintf('There are %d more news from %s in the queue. Type %snews to see them or %snews drop.', $count, $this->feed->getVar('lnf_name'), $t, $t));
     }
     return true;
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:22,代碼來源:Mod_News.php


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