本文整理匯總了PHP中Dog::isItself方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dog::isItself方法的具體用法?PHP Dog::isItself怎麽用?PHP Dog::isItself使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Dog
的用法示例。
在下文中一共展示了Dog::isItself方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: event_join
public function event_join()
{
$user = Dog::getUser();
$server = Dog::getServer();
$channel = Dog::getChannel();
$cid = $channel->getID();
if (Dog::isItself() || Dog_Greeting::hasBeenGreeted($user->getID(), $cid) || false === ($greeting = Dog_GreetMsg::getGreetMsg($server, $channel)) || $greeting->isDisabled()) {
return;
}
$message = $greeting->getVar('dgm_msg');
switch ($greeting->getGreetMode()) {
case Dog_GreetMsg::MODE_CHAN:
$server->sendPRIVMSG($channel->getName(), $user->getName() . ': ' . $message);
break;
case Dog_GreetMsg::MODE_NOTICE:
$server->sendNOTICE($user->getName(), $message);
break;
case Dog_GreetMsg::MODE_PRIVMSG:
$server->sendPRIVMSG($user->getName(), $message);
break;
default:
Dog_Log::error('Invalid type of greeting in ' . __FILE__ . ' line ' . __LINE__ . '!');
return;
}
Dog_Greeting::markGreeted($user->getID(), $cid);
}
示例2: elseif
<?php
# :gizmore!gizmore@localhost PART #sr :"Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"
$msg = Dog::getIRCMsg();
$serv = Dog::getServer();
$user = Dog::setupUser();
$chan_name = $msg->getArg(0);
#$quit_msg = $msg->getArg(1);
$chan = Dog::setupChannel();
if (!$user instanceof Dog_User) {
} elseif (Dog::isItself()) {
$serv->removeChannel($chan);
} elseif ($chan instanceof Dog_Channel) {
$chan->removeUser($user);
}