本文整理匯總了PHP中Notify::sendData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Notify::sendData方法的具體用法?PHP Notify::sendData怎麽用?PHP Notify::sendData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Notify
的用法示例。
在下文中一共展示了Notify::sendData方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setResult
$result = $news->getList($type, $limit, $page);
setResult(true, $router, $result);
break;
case 'add':
$type = $router->getParams("type", 0, true);
$header = $router->getParams("header", 0, true);
$text = $router->getParams("text", 0, true);
$images = $router->getParams("images", 0, true);
$date = $router->getParams("date", 0);
$notify = $router->getParams("notify", 0);
$clean = $router->getParams("clean", 0);
$images = json_decode($images, true);
$result = $news->add($type, $header, $text, $images, $date);
if ($notify == 1) {
$notifyController = new Notify();
$notifyController->sendData($header, $result);
}
setResult(true, $router, $result);
break;
case 'render':
$id = $router->getParams("id", 0, true);
$path = $config["global"]["path"];
echo file_get_contents("http://" . $_SERVER["HTTP_HOST"] . $path . "renderNews.php?id=" . $id);
exit;
default:
setBadRequest('Unknown method for module news');
}
break;
case 'push':
$notifyController = new Notify();
switch ($router->getMethod()) {