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