本文整理汇总了PHP中Msg::getMsg方法的典型用法代码示例。如果您正苦于以下问题:PHP Msg::getMsg方法的具体用法?PHP Msg::getMsg怎么用?PHP Msg::getMsg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Msg
的用法示例。
在下文中一共展示了Msg::getMsg方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContents
/**
* Processa as visões e demais saídas do sistema;
*
* Esta função deve ser chamada no arquivo de template dentro da tag <body>
* e no container preparado para receber o conteúdo.
*/
public function getContents()
{
foreach ($this->_controllerVars as $key => $value) {
${$key} = $value;
}
echo Msg::getMsg();
include $this->_view;
if (DEBUG_MODE) {
echo '<div id="debugpanel" class="clearfix panel panel-default" style="margin-top:25px;padding:10px;">';
echo '<button type="button" class="close" aria-hidden="true" onclick="$(this).parent().fadeOut(500);">×</button>';
echo '<h1 class="text-muted">Debug:</h1>';
echo DebugMsg::getMsg();
echo '</div>';
}
}
示例2: elseif
$data = json_decode($json, false);
// loop through messages
foreach ($data->messages as $message) {
// check if message is connection
if ($message->type == 13 || $message->type == 3) {
// don't do anything
} elseif ($message->type == 11 || $message->type == 12) {
// don't do anything
// message was already added before sending it to the qaul app
} elseif (file_check_msg($message->msg)) {
// schedule file
file_schedule($message);
} elseif ($message->type == 1) {
// don't do anything
} elseif ($message->type == 2) {
// put message into data base
$msg = new Msg();
$msg->setType($message->type);
$msg->setName($message->name);
$msg->setMsg($message->msg);
$msg->setIp($message->ip);
$msg->setTime($message->time);
$msg->setStatus(0);
$msg->save();
// send message via twitter
$txt = twitter_message_string_utf8($msg->getMsg(), $msg->getName());
twitter_send2twitter($txt);
// wait before sending the next message
sleep(1);
}
}