本文整理汇总了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']);
}