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