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


PHP Check::findAll方法代码示例

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


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

示例1: catch

            fMessaging::create('affected', fURL::get(), $check->getName());
            fMessaging::create('success', fURL::get(), 'The check ' . $check->getName() . ' was successfully updated');
        }
    } catch (fNotFoundException $e) {
        fMessaging::create('error', fURL::get(), 'The check requested, ' . fHTML::encode($check_id) . ', could not be found');
        fURL::redirect($check_list_url);
    } catch (fExpectedException $e) {
        fMessaging::create('error', fURL::get(), $e->getMessage());
    }
    include VIEW_PATH . '/add_edit.php';
    // --------------------------------- //
} elseif ('add' == $action) {
    $check = new Check();
    if (fRequest::isPost()) {
        try {
            $check->populate();
            fRequest::validateCSRFToken(fRequest::get('token'));
            $check->store();
            fMessaging::create('affected', fURL::get(), $check->getName());
            fMessaging::create('success', fURL::get(), 'The check ' . $check->getName() . ' was successfully created');
            fURL::redirect($check_list_url);
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e->getMessage());
        }
    }
    include VIEW_PATH . '/add_edit.php';
} else {
    $page_num = fRequest::get('page', 'int', 1);
    $checks = Check::findAll($sort, $sort_dir, $GLOBALS['PAGE_SIZE'], $page_num);
    include VIEW_PATH . '/list_checks.php';
}
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:check.php

示例2:

        <tr>
            <th>Name</th>
            <th class="masterTooltip" title="Graph Target that will be checked in Graphite">Target</th>
            <th class="masterTooltip" title="The threshold level at which a Warning will be triggered">Warn</th>
            <th class="masterTooltip" title="The threshold level at which an Error will be triggered">Error</th>
            <th class="masterTooltip" title="Number of data points to use when calculating the moving average. Each data point spans one minute">Sample</th>
            <th>Baseline</th>
            <th class="masterTooltip" title="Over will trigger an alert when the value retrieved from Graphite is greater than the warning or error threshold. Under will trigger an alert when the value retrieved from Graphite is less than the warning or the error threshold">Over/Under</th>
            <th class="masterTooltip" title="Public checks can be subscribed to by any user while private checks remain hidden from other users">Visibility</th>
            <th>Action</th>
        </tr></thead>
    <tbody>    
        <?php 
$first = TRUE;
if ($filter_group_id == -1) {
    $checks = Check::findAll($check_type);
} else {
    $checks = Check::findAllByGroupId($check_type, $filter_group_id);
}
if (isset($filter_text) && $filter_text != '') {
    $filtered_checks = $checks->filter(array('getTarget|getName~' => $filter_text));
} else {
    $filtered_checks = $checks;
}
foreach ($filtered_checks as $check) {
    ?>
            <tr>
                <td class="name">
                    <a href="<?php 
    echo CheckResult::makeURL('list', $check);
    ?>
开发者ID:nagyist,项目名称:Tattle,代码行数:31,代码来源:list_filtered_checks.php

示例3: catch

            fMessaging::create('affected', fURL::get(), $check->getName());
            fMessaging::create('success', fURL::get(), 'The check ' . $check->getName() . ' was successfully updated');
        }
    } catch (fNotFoundException $e) {
        fMessaging::create('error', $check_list_url, 'The check requested, ' . fHTML::encode($check_id) . ', could not be found');
        fURL::redirect($check_list_url);
    } catch (fExpectedException $e) {
        fMessaging::create('error', fURL::get(), $e->getMessage());
    }
    include VIEW_PATH . '/add_edit.php';
    // --------------------------------- //
} elseif ('add' == $action) {
    $check = new Check();
    if (fRequest::isPost()) {
        try {
            $check->populate();
            fRequest::validateCSRFToken(fRequest::get('token'));
            $check->store();
            fMessaging::create('affected', $check_list_url, $check->getName());
            fMessaging::create('success', $check_list_url, 'The check ' . $check->getName() . ' was successfully created');
            fURL::redirect($check_list_url);
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e->getMessage());
        }
    }
    include VIEW_PATH . '/add_edit.php';
} else {
    //$checks = Check::findUsersActive($sort,$sort_dir);
    $checks = Check::findAll($sort, $sort_dir);
    include VIEW_PATH . '/list_checks.php';
}
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:31,代码来源:check.php


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