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


PHP Book::setDesc方法代码示例

本文整理汇总了PHP中Book::setDesc方法的典型用法代码示例。如果您正苦于以下问题:PHP Book::setDesc方法的具体用法?PHP Book::setDesc怎么用?PHP Book::setDesc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Book的用法示例。


在下文中一共展示了Book::setDesc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handlePUT

function handlePUT(mysqli $conn)
{
    parse_str(file_get_contents("php://input"), $data);
    $book = new Book();
    $book->update($conn, $data['id']);
    $book->setTitle($data['title']);
    $book->setAuthor($data['author']);
    $book->setDesc($data['desc']);
}
开发者ID:RyszardRzepa,项目名称:REST_API,代码行数:9,代码来源:Books.php

示例2: handlePUT

function handlePUT()
{
    $conn = Connection::startConnection();
    parse_str(file_get_contents("php://input"), $data);
    header('Content-type: application/json');
    $book = new Book();
    $book->setName($data['name']);
    $book->setAuthor($data['author']);
    $book->setDesc($data['opis']);
    $book->updateBook($conn, $data['id']);
    Connection::stopConnecion($conn);
}
开发者ID:kfiatos,项目名称:Bookstore,代码行数:12,代码来源:books.php

示例3: Game

include 'database_connection.php';
include 'classes/MediaItem.php';
include 'classes/Game.php';
include 'classes/Book.php';
include 'classes/Music.php';
include 'classes/Movie.php';
$game = new Game();
$game->setTitle('Watch Dogs');
$game->setDesc('Crappy shit wannabe hacker game');
$game->setRating(1);
$game->setTags(['dnt']);
print '<p>' . ($game->save() ? "Saving successful" : "Saving unsuccessful") . '</p>';
$book = new Book();
$book->setTitle('Momo');
$book->setDesc('Dreamy and so on');
$book->setRating(4);
$book->setTags(['tc']);
print '<p>' . ($book->save() ? "Saving successful" : "Saving unsuccessful") . '</p>';
$movie = new Movie();
$movie->setTitle('The big short');
$movie->setDesc('Capitalism');
$movie->setRating(3);
$movie->setTags(['tc', 'wtf']);
print '<p>' . ($movie->save() ? "Saving successful" : "Saving unsuccessful") . '</p>';
$music = new Music();
$music->setTitle('Bravo Hits 666');
$music->setDesc('Diabolic Bullshit');
$music->setRating(1);
$music->setTags(['dnt']);
print '<p>' . ($music->save() ? "Saving successful" : "Saving unsuccessful") . '</p>';
开发者ID:xanobius,项目名称:how2web,代码行数:30,代码来源:testclass.php


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