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