本文整理匯總了PHP中CApplication::end方法的典型用法代碼示例。如果您正苦於以下問題:PHP CApplication::end方法的具體用法?PHP CApplication::end怎麽用?PHP CApplication::end使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CApplication
的用法示例。
在下文中一共展示了CApplication::end方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionEditSensor
public function actionEditSensor()
{
$result = array();
if (isset($_POST['sensor_id'])) {
$form = new StationSensorEditForm();
if ($form->loadBySensorId((int) $_POST['sensor_id'])) {
$result['form'] = $form->draw();
}
}
if (isset($_POST['StationSensorEditForm'])) {
$form = new StationSensorEditForm();
$form->attributes = $_POST['StationSensorEditForm'];
if ($form->validate()) {
$result = $form->saveSensor();
if (empty($result)) {
$result['form'] = $form->draw();
}
} else {
$result['form'] = $form->draw();
}
}
echo json_encode($result);
CApplication::end();
}
示例2: actionDeleteScheduleTypeDestination
public function actionDeleteScheduleTypeDestination()
{
$ex_schedule_id = isset($_REQUEST['sid']) ? intval($_REQUEST['sid']) : null;
$destination_id = isset($_REQUEST['did']) ? intval($_REQUEST['did']) : null;
$return = array('ok' => 0);
if ($ex_schedule_id && $destination_id) {
$res = ScheduleTypeReportDestination::model()->deleteAllByAttributes(array('ex_schedule_id' => $ex_schedule_id, 'ex_schedule_destination_id' => $destination_id));
if ($res) {
$return['ok'] = 1;
}
}
print json_encode($return);
CApplication::end();
}