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


PHP Dog::getPlugin方法代码示例

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


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

示例1: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD% [<server>]. List the channels where %BOT% is online.', 'none' => 'I am not connected to any channel on %s.', 'out' => 'I am in %d channels on %s: %s.'));
$plugin = Dog::getPlugin();
$argv = $plugin->argv();
$argc = count($argv);
if ($argc === 0) {
    $server = Dog::getServer();
} elseif ($argc !== 1) {
    return $plugin->showHelp();
} else {
    if (false === ($server = Dog::getServerByArg($argv[0]))) {
        return Dog::rply('err_server');
    }
}
if (!$server->isConnected()) {
    return Dog::rply('err_connection');
}
$out = '';
$channels = $server->getChannels();
foreach ($channels as $channel) {
    $channel instanceof Lamb_Channel;
    $out .= sprintf(', %s(%d)', $channel->getName(), count($channel->getUsers()));
}
if ($out === '') {
    return $plugin->rply('none', array($server->displayName()));
}
$plugin->rply('out', array(count($channels), $server->displayName(), substr($out, 2)));
开发者ID:sinfocol,项目名称:gwf3,代码行数:28,代码来源:channels_Pb.php

示例2: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD%. Print memory usage statistics.', 'usage' => 'Currently there are %s in use. Max memory peak was %s.'), 'de' => array('help' => 'Nutze: %CMD%. Gibt Statistiken über die Speichernutzung aus.', 'usage' => 'Zur Zeit werden %s Speicher verwendet. Die maximale Auslastung betrug %s.'));
Dog::getPlugin()->rply('usage', array(GWF_Upload::humanFilesize(memory_get_usage(true), '1000'), GWF_Upload::humanFilesize(memory_get_peak_usage(true), '1000')));
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:mem_Pb.php

示例3: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD%. Find out what gizmore means.', 'gizmore' => 'Gizmore means guess more and is a parody on the gremlins movie. Also a gremlin means unknown hardware issues, appropiate for my master.'));
return Dog::getPlugin()->rply('gizmore');
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:gizmore_Lb.php

示例4: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD%. Print info on Pharao momo.', 'momo' => 'momo is the Pharao of math at wechall. He likes pyramids very much.'));
Dog::getPlugin()->rply('momo');
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:momo_Lb.php

示例5:

<?php

Dog::getPlugin()->rply('His name is blitzed, he is the ritz!');
开发者ID:sinfocol,项目名称:gwf3,代码行数:3,代码来源:blitzed_Pc.php

示例6: array

<?php

$lang = array('en' => array('help' => 'svn co https://trac.gwf3.gizmore.org/GWF3/ gwf3'));
Dog::getPlugin()->showHelp();
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:svn_Pb.php

示例7: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD%. Print database connection statistics.', 'stats' => 'Database stats since last startup: Total DB time is %.02fs with %d queries within %s (%.02f qps). Queries opened/closed: %s/%s.'), 'de' => array('help' => 'Nutze: %CMD%. Zeige DATENBANKZUGRIFFSSTATISTIKEN!!!!!', 'stats' => 'Datenbank Statistiken seit dem letzten Startvorgang: Verbrachte Zeit in der DB ist %.02fs mit %d Abfragen in %s (%.02f QpS). Abfragen Offen/Beendet: %s/%s.'));
$db = gdo_db();
$c = $db->getQueryCount();
$ct = $db->getQueryTime();
$t = microtime(true) - Dog_Init::getStartupTime();
$dt = GWF_Time::humanDuration($t);
$tps = $c / $t;
$qo = $db->getQueriesOpened();
$qc = $db->getQueriesClosed();
Dog::getPlugin()->rply('stats', array($ct, $c, $dt, $tps, $qo, $qc));
开发者ID:sinfocol,项目名称:gwf3,代码行数:12,代码来源:db_Pb.php


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