本文整理汇总了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);
}
示例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()));
}
示例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);
}
示例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;
}