当前位置: 首页>>代码示例>>PHP>>正文


PHP Artist::delete方法代码示例

本文整理汇总了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');
 }
开发者ID:nioc,项目名称:web-music-player,代码行数:12,代码来源:ArtistTest.php

示例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
开发者ID:nioc,项目名称:web-music-player,代码行数:31,代码来源:artist.php

示例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']);
}
开发者ID:parmindersingh1,项目名称:musiclib,代码行数:31,代码来源:database.php


注:本文中的Artist::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。