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


PHP Publisher::getCount方法代碼示例

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


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

示例1: InitializeContent

 public function InitializeContent()
 {
     global $config;
     $this->title = $config['cops_title_default'];
     $this->subtitle = $config['cops_subtitle_default'];
     if (Base::noDatabaseSelected()) {
         $i = 0;
         foreach (Base::getDbNameList() as $key) {
             $nBooks = Book::getBookCount($i);
             array_push($this->entryArray, new Entry($key, "cops:{$i}:catalog", str_format(localize("bookword", $nBooks), $nBooks), "text", array(new LinkNavigation("?" . DB . "={$i}")), "", $nBooks));
             $i++;
             Base::clearDb();
         }
     } else {
         if (!in_array(PageQueryResult::SCOPE_AUTHOR, getCurrentOption('ignored_categories'))) {
             array_push($this->entryArray, Author::getCount());
         }
         if (!in_array(PageQueryResult::SCOPE_SERIES, getCurrentOption('ignored_categories'))) {
             $series = Serie::getCount();
             if (!is_null($series)) {
                 array_push($this->entryArray, $series);
             }
         }
         if (!in_array(PageQueryResult::SCOPE_PUBLISHER, getCurrentOption('ignored_categories'))) {
             $publisher = Publisher::getCount();
             if (!is_null($publisher)) {
                 array_push($this->entryArray, $publisher);
             }
         }
         if (!in_array(PageQueryResult::SCOPE_TAG, getCurrentOption('ignored_categories'))) {
             $tags = Tag::getCount();
             if (!is_null($tags)) {
                 array_push($this->entryArray, $tags);
             }
         }
         if (!in_array(PageQueryResult::SCOPE_RATING, getCurrentOption('ignored_categories'))) {
             $rating = Rating::getCount();
             if (!is_null($rating)) {
                 array_push($this->entryArray, $rating);
             }
         }
         if (!in_array("language", getCurrentOption('ignored_categories'))) {
             $languages = Language::getCount();
             if (!is_null($languages)) {
                 array_push($this->entryArray, $languages);
             }
         }
         foreach ($config['cops_calibre_custom_column'] as $lookup) {
             $customId = CustomColumn::getCustomId($lookup);
             if (!is_null($customId)) {
                 array_push($this->entryArray, CustomColumn::getCount($customId));
             }
         }
         $this->entryArray = array_merge($this->entryArray, Book::getCount());
         if (Base::isMultipleDatabaseEnabled()) {
             $this->title = Base::getDbName();
         }
     }
 }
開發者ID:Klemart3D,項目名稱:COPS,代碼行數:59,代碼來源:base.php


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