本文整理匯總了PHP中Artist::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Artist::delete方法的具體用法?PHP Artist::delete怎麽用?PHP Artist::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Artist
的用法示例。
在下文中一共展示了Artist::delete方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testDelete
/**
* @covers Artist::delete
*/
public function testDelete()
{
$this->object->id = 'alpha';
$this->assertFalse($this->object->delete(), 'Artist should not be deleted');
$this->object->id = null;
$this->assertFalse($this->object->delete(), 'Artist should not be deleted');
$this->object->id = 2;
$this->assertTrue($this->object->delete(), 'Artist should be deleted');
}
示例2: Artist
if (!$api->checkAuth()) {
//User not authentified/authorized
return;
}
if (!$api->checkScope('admin')) {
$api->output(403, 'Admin scope is required for deleting artist');
//indicate the requester do not have the required scope for deleting artist
return;
}
if (!$api->checkParameterExists('id', $id)) {
$api->output(400, 'Artist identifier must be provided');
//artist was not provided, return an error
return;
}
$artist = new Artist($id);
if (!$artist->delete()) {
$api->output(500, 'Error during artist deletion');
//something gone wrong :(
return;
}
$api->output(204, null);
break;
case 'PUT':
//update artist
if (!$api->checkAuth()) {
//User not authentified/authorized
return;
}
if (!$api->checkScope('admin')) {
$api->output(403, 'Admin scope is required for editing artist');
//indicate the requester do not have the required scope for updating artist
示例3: Notarizealbum
$data = $data . $date . "," . $row[4] . "," . $row[5] . ";";
}
$stmt->closeCursor();
$data = convertToUTF8($data);
echo $data;
}
//partie suppression
if (isset($_GET['action']) && $_GET['action'] == 1) {
$notarizealbum = new Notarizealbum($_GET['user'], $_GET['id']);
$notarizealbum->delete($_GET['user'], $_GET['id']);
}
if (isset($_GET['action']) && $_GET['action'] == 2) {
$notarizeartist = new Notarizeartist($_GET['user'], $_GET['id']);
$notarizeartist->delete($_GET['user'], $_GET['id']);
}
if (isset($_GET['action']) && $_GET['action'] == 3) {
$comment = new Comment($_GET['user'], $_GET['id']);
$comment->delete($_GET['user'], $_GET['id']);
}
if (isset($_GET['type']) && $_GET['type'] == 'artist') {
$artist = new Artist($_GET['id']);
$artist->delete($_GET['id']);
}
if (isset($_GET['type']) && $_GET['type'] == 'album') {
$album = new Album($_GET['id']);
$album->delete($_GET['id']);
}
if (isset($_GET['type']) && $_GET['type'] == 'song') {
$song = new Song($_GET['id']);
$song->delete($_GET['id']);
}