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