当前位置: 首页>>代码示例>>PHP>>正文


PHP message::all方法代码示例

本文整理汇总了PHP中message::all方法的典型用法代码示例。如果您正苦于以下问题:PHP message::all方法的具体用法?PHP message::all怎么用?PHP message::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在message的用法示例。


在下文中一共展示了message::all方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Exception

<?php

if (!hasRight('messageview')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$selectPlugin = init('plugin');
if ($selectPlugin != '') {
    $listMessage = message::byPlugin($selectPlugin);
} else {
    $listMessage = message::all();
}
?>
<a class="btn btn-danger pull-right" id="bt_clearMessage"><i class="fa fa-trash-o icon-white"></i> {{Vider}}</a>
<select id="sel_plugin" class="form-control" style="width: 200px;">
    <option value="" selected>{{Tout}}</option>
    <?php 
foreach (message::listPlugin() as $plugin) {
    if ($selectPlugin == $plugin['plugin']) {
        echo '<option value="' . $plugin['plugin'] . '" selected>' . $plugin['plugin'] . '</option>';
    } else {
        echo '<option value="' . $plugin['plugin'] . '">' . $plugin['plugin'] . '</option>';
    }
}
?>
</select>

<table class="table table-condensed table-bordered tablesorter" id="table_message" style="margin-top: 5px;">
    <thead>
        <tr>
            <th data-sorter="false" data-filter="false"></th><th>{{Date et heure}}</th><th>{{Plugin}}</th><th>{{Description}}</th><th data-sorter="false" data-filter="false">{{Action}}</th>
        </tr>
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:message.php

示例2: isset

 if ($jsonrpc->getMethod() == 'log::list') {
     $jsonrpc->makeSuccess(log::liste());
 }
 if ($jsonrpc->getMethod() == 'log::empty') {
     $jsonrpc->makeSuccess(log::clear($params['log']));
 }
 if ($jsonrpc->getMethod() == 'log::remove') {
     $jsonrpc->makeSuccess(log::remove($params['log']));
 }
 /*             * ************************Messages*************************** */
 if ($jsonrpc->getMethod() == 'message::removeAll') {
     message::removeAll();
     $jsonrpc->makeSuccess('ok');
 }
 if ($jsonrpc->getMethod() == 'message::all') {
     $jsonrpc->makeSuccess(utils::o2a(message::all()));
 }
 /*             * ************************Interact*************************** */
 if ($jsonrpc->getMethod() == 'interact::tryToReply') {
     $jsonrpc->makeSuccess(interactQuery::tryToReply($params['query']));
 }
 /*             * ************************USB mapping*************************** */
 if ($jsonrpc->getMethod() == 'jeedom::getUsbMapping') {
     $name = isset($params['name']) ? $params['name'] : '';
     $gpio = isset($params['gpio']) ? $params['gpio'] : false;
     $jsonrpc->makeSuccess(jeedom::getUsbMapping($name, $gpio));
 }
 /*             * ************************Plugin*************************** */
 if ($jsonrpc->getMethod() == 'plugin::install') {
     try {
         $market = market::byId($params['plugin_id']);
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:jeeApi.php

示例3: foreach

echo "\n**************************************************\n";
echo "*                 DATE                           *";
echo "\n**************************************************\n";
echo "Check if Jeedom date's is good...";
if (jeedom::isDateOk()) {
    echo "OK";
} else {
    echo "NOK";
}
$cache = cache::byKey('jeedom::lastDate');
echo " (" . $cache->getValue() . ")\n";
echo "\n**************************************************\n";
echo "*                 MESSAGE                        *";
echo "\n**************************************************\n";
echo "DATE | PLUGIN | LOGICALID | MESSAGE\n";
foreach (message::all() as $message) {
    echo $message->getDate();
    echo " | ";
    echo $message->getPlugin();
    echo " | ";
    echo $message->getLogicalId();
    echo " | ";
    echo $message->getMessage();
    echo "\n";
}
echo "\n**************************************************\n";
echo "*                 PLUGIN                         *";
echo "\n**************************************************\n";
echo "ID | NAME | STATE\n";
foreach (plugin::listPlugin() as $plugin) {
    echo $plugin->getId();
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:sick.php

示例4:

<?php

if (s::get('messages')) {
    ?>
	<?php 
    echo message::all();
}
开发者ID:aoimedia,项目名称:aurer-kirby,代码行数:7,代码来源:messages.php

示例5: dirname

try {
    require_once dirname(__FILE__) . '/../../core/php/core.inc.php';
    include_file('core', 'authentification', 'php');
    if (!isConnect()) {
        throw new Exception(__('401 - Accès non autorisé', __FILE__));
    }
    if (init('action') == 'clearMessage') {
        message::removeAll(init('plugin'));
        ajax::success();
    }
    if (init('action') == 'nbMessage') {
        ajax::success(message::nbMessage());
    }
    if (init('action') == 'all') {
        if (init('plugin') == '') {
            $messages = utils::o2a(message::all());
        } else {
            $messages = utils::o2a(message::byPlugin(init('plugin')));
        }
        foreach ($messages as &$message) {
            $message['message'] = htmlentities($message['message']);
        }
        ajax::success($messages);
    }
    if (init('action') == 'removeMessage') {
        $message = message::byId(init('id'));
        if (!is_object($message)) {
            throw new Exception(__('Message inconnu verifié l\'id', __FILE__));
        }
        $message->remove();
        ajax::success();
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:message.ajax.php


注:本文中的message::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。