當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Book::getIsbn方法代碼示例

本文整理匯總了PHP中Book::getIsbn方法的典型用法代碼示例。如果您正苦於以下問題:PHP Book::getIsbn方法的具體用法?PHP Book::getIsbn怎麽用?PHP Book::getIsbn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Book的用法示例。


在下文中一共展示了Book::getIsbn方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: filterByBook

 /**
  * Filter the query by a related Book object
  *
  * @param     Book|PropelCollection $book The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    ItemQuery The current query, for fluid interface
  */
 public function filterByBook($book, $comparison = null)
 {
     if ($book instanceof Book) {
         return $this->addUsingAlias(ItemPeer::ISBN, $book->getIsbn(), $comparison);
     } elseif ($book instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ItemPeer::ISBN, $book->toKeyValue('PrimaryKey', 'Isbn'), $comparison);
     } else {
         throw new PropelException('filterByBook() only accepts arguments of type Book or PropelCollection');
     }
 }
開發者ID:therealchiko,項目名稱:getchabooks,代碼行數:21,代碼來源:BaseItemQuery.php

示例2: setBook

 /**
  * Declares an association between this object and a Book object.
  *
  * @param      Book $v
  * @return     Item The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setBook(Book $v = null)
 {
     if ($v === null) {
         $this->setIsbn(NULL);
     } else {
         $this->setIsbn($v->getIsbn());
     }
     $this->aBook = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Book object, it will not be re-added.
     if ($v !== null) {
         $v->addItem($this);
     }
     return $this;
 }
開發者ID:therealchiko,項目名稱:getchabooks,代碼行數:22,代碼來源:BaseItem.php

示例3: printItemRow

/**
 * Prints the metadata and prices for an item
 * @param Item|Book $item   an Item (Section mode) or Book (ISBN mode) object
 * @param int $requiredStatus
 */
function printItemRow($item, $status = null)
{
    global $app;
    ?>
    <tr>
        <th>
            <span class="tooltip" style="display: none;">
                <img src="<?php 
    echo $item->getImageUrl();
    ?>
">
                <h1><?php 
    echo $item->getTitle();
    ?>
</h1>
                <h2><?php 
    echo $item->getAuthor();
    ?>
</h2>
                <?php 
    if ($edition = $item->getEdition()) {
        ?>
                    <div class="edition"><strong>Edition:</strong> <?php 
        echo $edition;
        ?>
</div>
                <?php 
    }
    if ($publisher = $item->getPublisher()) {
        ?>
                    <div class="publisher"><strong>Publisher:</strong> <?php 
        echo $publisher;
        ?>
</div>
                <?php 
    }
    if ($isbn = $item->getIsbn()) {
        ?>
                    <div class="isbn"><strong>ISBN:</strong> <span class="isbn"><?php 
        echo $isbn;
        ?>
</span></div>
                <?php 
    }
    ?>
            </span>
            <?php 
    $indented = $item->isPackageComponent() || $status === SectionHasItem::BOOKSTORE_RECOMMENDED;
    $class = $indented ? " packageComponent" : "";
    ?>

            <span class="bookdata <?php 
    echo $class;
    ?>
">
                <span class="title"><?php 
    echo $item->getTitle();
    ?>
</span><br>
                <?php 
    if ($edition || $item->getAuthor()) {
        ?>
                <span class="minimetadata"><?php 
        echo ($edition ? "{$edition}, " : "") . $item->getAuthor();
        ?>
</span>
                <?php 
    }
    ?>
                <?php 
    // e.g. (Recommended)
    if ($stat = Item::getStatusText($status)) {
        ?>
                    <br/><span class="minimetadata"><?php 
        echo $stat;
        ?>
</span>
                <?php 
    }
    // sentence about being a package or component
    if ($description = $item->getDescription($status)) {
        ?>
                    <br/><span class="minimetadata important"><?php 
        echo $description;
        ?>
</span>
                <?php 
    }
    ?>
            </span>
        </th>

    <?php 
    foreach ($item->prices as $v => $p) {
        if ($p === null) {
//.........這裏部分代碼省略.........
開發者ID:therealchiko,項目名稱:getchabooks,代碼行數:101,代碼來源:table.php


注:本文中的Book::getIsbn方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。