本文整理匯總了PHP中Book::printBookInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP Book::printBookInfo方法的具體用法?PHP Book::printBookInfo怎麽用?PHP Book::printBookInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Book
的用法示例。
在下文中一共展示了Book::printBookInfo方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Roller
echo "<hr>Volume cone 2: <br>";
echo "Objetosc 2: ".$cone2->volume()."<br>";
echo "<hr><hr>";
$roller1 = new Roller(2, 3, "yellow", 5, 10);
$roller2 = new Roller(2, 1, "black", 2, 12);
echo "<hr>Display roller 1: <br>";
$roller1->display();
echo "<hr>Display roller 2: <br>";
$roller2->display();
echo "<hr>Volume roller 1: <br>";
echo "Objetosc 1: ".$roller1->volume()."<br>";
echo "<hr>Volume roller 1: <br>";
echo "Objetosc 2: ".$roller2->volume()."<br>";
*/
//require_once ("./src/singleton");
require_once "./src/bookmark.php";
require_once "./src/book.php";
$book1 = new Book("Wiedzmin", "Sapkowski", 4241241241, 44.5);
$bookMark1 = new Bookmark(40, "mark1 for wiedxmin");
$book1->addBookmark($bookMark1);
$bookMark2 = new Bookmark(70, "marek2 for wiedxmin");
$book1->addBookmark($bookMark2);
$book1->printBookInfo();
var_dump($book1);
$book2 = clone $book1;
$book2->setPrice(40000);
var_dump($book2);
示例2: printBookInfo
public function printBookInfo()
{
echo "Print Ebook";
parent::printBookInfo();
echo $this->size;
}
示例3: printBookInfo
public function printBookInfo()
{
echo 'Print book info';
parent::printBookInfo();
}
示例4: Book
<?php
require_once './src/book.php';
require_once './src/ebook.php';
$book1 = new Book("Tytul", "Autor", 54.66, 54345654);
$book2 = new Book("Tytul2", "Autor2", 58.66, 54945654);
$book1->printBookInfo();
$book2->printBookInfo();
$book1 = new Ebook("Tytul", "Autor", 54.66, 54345654, 300);
$book1->printBookInfo();