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


PHP Dog::err方法代码示例

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


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

示例1: on_peak_Lc

 public function on_peak_Lc()
 {
     $channel = Dog::getChannel();
     if (false === ($peak = Dog_ChannelPeak::getPeak($channel))) {
         return Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     $date = $peak->getVar('lcpeak_date');
     $count = $peak->getVar('lcpeak_peak');
     $count_now = $channel->getUserCount();
     $age = GWF_Time::displayAge($date);
     $date = GWF_Time::displayDate($date);
     $args = array($count, $channel->getName(), Dog::getServer()->displayLongName(), $date, $age, $this->peekshowstring());
     $this->rply('old_peak', $args);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:14,代码来源:DOGMOD_Peak.php

示例2: on_REMOVEhang_Hb

 public function on_REMOVEhang_Hb()
 {
     $argv = $this->argv();
     if (1 !== ($argc = count($argv))) {
         return $this->showHelp('-hang');
     }
     $hang_word = strtolower($argv[0]);
     if (false === ($word = Hangman_Words::getByWord($hang_word)) && false === ($word = Hangman_Words::getByID($hang_word))) {
         return $this->rply('err_word');
     }
     $id = $word->getID();
     if (false === $word->delete()) {
         return Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return $this->rply('msg_deleted', array($word->getVar('hangman_text'), $id));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:16,代码来源:DOGMOD_Hangman.php

示例3: on_repo_checkout_Pb

 public function on_repo_checkout_Pb()
 {
     GDO::table('Dog_Repo')->createTable(true);
     GDO::table('Dog_RepoSubscribes')->createTable(true);
     GDO::table('Dog_RepoUsers')->createTable(true);
     GWF_File::removeDir(Dog_Repo::baseDir(), false, true, true);
     $argv = $this->argv();
     $argc = count($argv);
     if ($argc !== 3) {
         return $this->showHelp('checkout');
     }
     $type = $argv[1];
     if (!Dog_Repo::isValidType($type)) {
         return $this->rply('err_software');
     }
     $url = @parse_url($argv[2]);
     if (!isset($url['scheme'])) {
         return $this->rply('err_url', $url);
     }
     $url = $argv[2];
     if (!GWF_HTTP::pageExists($url)) {
         return $this->rply('err_connect');
     }
     $name = $argv[0];
     if (!Dog_Repo::isValidName($name)) {
         return $this->rply('err_repo_name');
     }
     if (Dog_Repo::exists($name)) {
         return $this->rply('err_repo_taken');
     }
     if (!GWF_File::createDir(Dog_Repo::repoDir($name))) {
         return $this->rply('err_create_dir');
     }
     if (!($repo = Dog_Repo::create($url, $name, $type))) {
         return Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     call_user_func(array($this, 'checkout_' . $type), $repo);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:38,代码来源:DOGMOD_Slaylert.php

示例4: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD% <channel>[!<SID>]. Try to join a channel.', 'already' => 'I am already on that channel.', 'trying' => 'Trying to join this channel.', 'unknown_serv' => 'This server is unknown.'), 'de' => array('help' => 'Nutze: %CMD% <Kanal>[!<SID>]. Versucht einem Kanal beizutreten.', 'already' => 'Ich bin schon in diesem Kanal.', 'trying' => 'Es wird versucht dem Kanal beizutreten.', 'unknown_serv' => 'Dieser Server ist nicht vorhanden.'));
$plugin = Dog::getPlugin();
if ($plugin->argc() !== 1) {
    return $plugin->showHelp();
}
$arg = $plugin->argv(0);
if (false === ($server = Dog::getServerBySuffix($arg))) {
    return $plugin->rply('unknown_serv');
}
if (false !== ($channel = Dog::getChannelByArg($arg))) {
    return $plugin->rply('already');
}
$chan_name = Common::substrFrom($arg, '!', $arg);
if (false === ($channel = Dog_Channel::getOrCreate($server, $chan_name))) {
    return Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
}
$plugin->rply('trying');
$channel->saveOption(Dog_Channel::AUTO_JOIN, true);
$server->joinChannel($channel);
开发者ID:sinfocol,项目名称:gwf3,代码行数:21,代码来源:join_Hb.php

示例5: setVar

 public static function setVar(array $vars, $scope = NULL, $varname, $value)
 {
     if (false === ($var = self::getVar($vars, $varname, $scope))) {
         Dog::rply('err_unk_var');
     } elseif (!self::isValid($var->getType(), $value)) {
         Dog::rply('err_variabl', array($var->displayName(), $varname, $var->displayType()));
     } elseif (!$var->hasPermission(Dog::getServer(), Dog::getChannel(), Dog::getUser())) {
         Dog::noPermission($var->getPriv());
     } elseif (false === ($oldval = $var->getValue())) {
         Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
     } elseif (!$var->setValue($value)) {
         Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
     } else {
         Dog::rply('msg_set_var', array($var->displayName(), $varname, $oldval, $var->getValue()));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:16,代码来源:Dog_Var.php

示例6: on_REMOVElink_Ob

 public function on_REMOVElink_Ob()
 {
     if ('' === ($message = $this->msgarg())) {
         $this->showHelp('-link');
     } elseif (false === ($link = Dog_Link::getByID($message))) {
         $this->rply('err_link_id', array(intval($message)));
     } elseif (!$link->delete()) {
         Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
     } else {
         $this->rply('deleted', array($link->getID()));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:12,代码来源:DOGMOD_Link.php

示例7: showGreetMode

 private function showGreetMode(Dog_Channel $channel, Dog_GreetMsg $msg)
 {
     $c = $channel->displayLongName();
     switch ($msg->getOptions() & Dog_GreetMsg::MODES) {
         case Dog_GreetMsg::MODE_CHAN:
             return $this->rply('set_to_c', array($c));
         case Dog_GreetMsg::MODE_NOTICE:
             return $this->rply('set_to_n', array($c));
         case Dog_GreetMsg::MODE_PRIVMSG:
             return $this->rply('set_to_p', array($c));
         default:
             Dog::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:14,代码来源:DOGMOD_Greetings.php


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