本文整理汇总了PHP中Book::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Book::get方法的具体用法?PHP Book::get怎么用?PHP Book::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Book
的用法示例。
在下文中一共展示了Book::get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: books
function books()
{
$objs = new Book();
$objs->get();
$data = array('books' => $objs);
$this->load->view('backend/books', $data);
}
示例2: testTicket2
public function testTicket2()
{
$obj = new Book();
$obj->set('name', 'yes2');
$obj->save();
$this->assertEqual($obj->get('name'), 'yes2');
$obj->save();
}
示例3: setUp
function setUp()
{
include 'mysql_conn.php';
$isbn = new Isbn('0596002068');
$book = new Book(array('author' => 'Linke, Maikel', 'title' => 'uBook Test', 'isbn' => $isbn->toString(), 'price' => '0,00', 'year' => '2011', 'description' => 'This is only a test.'));
$query = 'insert into books' . ' (id, author, title, isbn, price, year, description) values' . ' (1, "' . $book->get('author') . '", "' . $book->get('title') . '", "' . $book->get('isbn') . '", "' . $book->get('price') . '", "' . $book->get('year') . '", "' . $book->get('description') . '");';
mysql_query($query);
$this->isbn = $isbn;
$this->book = $book;
}
示例4: getBook
public function getBook()
{
$book = new Book();
return $book->get("id = " . $this->book_id);
}
示例5: detalhe
function detalhe($id)
{
global $twig;
$book = new Book();
echo $twig->render('book_detail.html', array('book' => $book->get("id = {$id}")));
}