本文整理汇总了PHP中Club::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::delete方法的具体用法?PHP Club::delete怎么用?PHP Club::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Club
的用法示例。
在下文中一共展示了Club::delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
});
$app->get('/club/{id}', function ($request, $response, $args) {
require_once 'club.inc.php';
return Club::getOne($request, $response, $args, $this);
});
$app->post('/club', function ($request, $response, $args) {
require_once 'club.inc.php';
return Club::post($request, $response, $args, $this);
});
$app->put('/club/{id}', function ($request, $response, $args) {
require_once 'club.inc.php';
return Club::put($request, $response, $args, $this);
});
$app->delete('/club/{id}', function ($request, $response, $args) {
require_once 'club.inc.php';
return Club::delete($request, $response, $args, $this);
});
/***********************************************************************************************************************
***************************************************** Athletes *********************************************************
***********************************************************************************************************************/
$app->get('/athlete', function ($request, $response, $args) {
require_once 'athlete.inc.php';
return Athlete::getAll($request, $response, $args, $this);
});
$app->get('/athlete/:id', function ($request, $response, $args) {
require_once 'athlete.inc.php';
return Athlete::getOne($request, $response, $args, $this);
});
$app->post('/athlete', function ($request, $response, $args) {
require_once 'athlete.inc.php';
return Athlete::post($request, $response, $args, $this);
示例2: header
$club->save();
header('Location: ' . $config['url'] . "/" . basename(__FILE__));
}
if (isset($_GET['id'])) {
$club_id = intval($_GET['id']);
render("clubs/editer", array('club' => $cr->findById($club_id)));
} else {
header('Location: ' . $config['url'] . "/" . basename(__FILE__));
}
break;
case "supprimer":
if (isset($_GET['id'])) {
$club_id = intval($_GET['id']);
$club = new Club();
$club->setId($club_id);
$club->delete();
}
header('Location: ' . $config['url'] . "/" . basename(__FILE__));
break;
case "voir":
if (isset($_GET['id'])) {
$club_id = intval($_GET['id']);
render("clubs/voir", array('club' => $cr->findById($club_id), 'entraineur' => $er->findOneByClubId($club_id), 'responsables' => $rr->findByClubId($club_id), 'joueurs' => $jr->findByClubId($club_id)));
} else {
$_SESSION['flash'] = "Aucun id renseigné";
goto LOCATION;
}
break;
default:
goto RENDER;
LOCATION: