本文整理汇总了PHP中Exercise::Get方法的典型用法代码示例。如果您正苦于以下问题:PHP Exercise::Get方法的具体用法?PHP Exercise::Get怎么用?PHP Exercise::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Exercise
的用法示例。
在下文中一共展示了Exercise::Get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
$errors = Exercise::Delete($_REQUEST['Exercise_id']);
if ($errors) {
$model = Exercise::Get($_REQUEST['Exercise_id']);
$view = "exercise/delete.php";
} else {
header("Location: ?sub_action={$sub_action}&id={$_REQUEST['Exercise_id']}");
die;
}
break;
case 'search_GET':
$model = Exercise::Search($_REQUEST['q']);
$view = 'exercise/index.php';
break;
case 'index_GET':
default:
$model = Exercise::Get();
$view = 'exercise/index.php';
break;
}
switch ($format) {
case 'json':
echo json_encode($model);
break;
case 'plain':
include __DIR__ . "/../Views/{$view}";
break;
case 'web':
default:
include __DIR__ . "/../Views/shared/_template.php";
break;
}
示例2: header
} else {
header("Location: ?sub_action={$sub_action}&id={$_REQUEST['id']}");
die;
}
break;
case 'search_GET':
$exercises = Exercise::Search($_REQUEST['q']);
$view = 'exercises/meal.php';
break;
case 'meal_GET':
case 'view_GET':
$exercises = Exercise::Get($_REQUEST['id']);
$view = "exercises/view.php";
break;
default:
$exercises = Exercise::Get();
$view = 'exercises/exercise.php';
break;
}
switch ($format) {
case 'json':
echo json_encode($exercises);
break;
case 'plain':
include __DIR__ . "/../Views/{$view}";
break;
case 'web':
default:
include __DIR__ . "/../Views/shared/_Template.php";
break;
}