當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。