本文整理汇总了PHP中Notifications::Find方法的典型用法代码示例。如果您正苦于以下问题:PHP Notifications::Find方法的具体用法?PHP Notifications::Find怎么用?PHP Notifications::Find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notifications
的用法示例。
在下文中一共展示了Notifications::Find方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
exit;
}
//ação de criar aluno/cliente
if ($action == 'create') {
$notifications->info = $_GET['info'];
$notifications->data = $_GET['data'];
$creation = $notifications->Create();
if (isset($creation) && !empty($creation)) {
echo json_encode($creation);
} else {
echo json_encode(['error' => 'true']);
}
}
//ação de retrieve/busca de informação unica
if ($action == 'retrieve') {
$notifications->id = $_GET['id'];
$notifications->Find();
echo json_encode($notifications->variables);
}
//ação de lista de dados
if ($action == 'list') {
$page = isset($_GET['page']) && !empty($_GET['page']) && $_GET['page'] >= 1 ? intval($_GET['page']) - 1 : 0;
$limit = isset($_GET['limit']) && !empty($_GET['limit']) ? intval($_GET['limit']) : $notifications->limit;
$notifications->limit = $limit;
//defino a quantidade de resultados
$notifications->orderby = "id";
$notifications->order = " DESC ";
$notifications->ListAll($page);
$data = ['data' => $notifications->variables, 'rows' => $notifications->rows];
echo json_encode($data);
}