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


PHP Search_Type_Factory_Interface::numeric方法代碼示例

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


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

示例1: getDocumentPart

 function getDocumentPart(Search_Type_Factory_Interface $typeFactory)
 {
     $item = $this->getValue();
     $baseKey = $this->getBaseKey();
     $out = array($baseKey => $typeFactory->numeric($item));
     return $out;
 }
開發者ID:jkimdon,項目名稱:cohomeals,代碼行數:7,代碼來源:Numeric.php

示例2: getData

 function getData($objectType, $objectId, Search_Type_Factory_Interface $typeFactory, array $data = array())
 {
     $data = '';
     if ($objectType == 'forum post') {
         $forumId = $this->commentslib->get_comment_forum_id($objectId);
         $comment_count = $this->commentslib->count_comments_threads("forum:{$forumId}", $objectId);
     } else {
         $comment_count = $this->commentslib->count_comments("{$objectType}:{$objectId}");
         $data = implode(' ', $this->table->fetchColumn('data', array('object' => $objectId, 'objectType' => $objectType)));
     }
     return array('comment_count' => $typeFactory->numeric($comment_count), 'comment_data' => $typeFactory->plaintext($data));
 }
開發者ID:rjsmelo,項目名稱:tiki,代碼行數:12,代碼來源:CommentSource.php

示例3: getForumLastPostData

 /**
  * Return data array of last post for thread
  *
  * @param $threadId
  * @param Search_Type_Factory_Interface $typeFactory
  * @return array
  * @throws Exception
  */
 function getForumLastPostData($threadId, Search_Type_Factory_Interface $typeFactory)
 {
     $commentslib = TikiLib::lib('comments');
     $commentslib->extras_enabled(false);
     $comment = $commentslib->get_lastPost($threadId);
     $lastModification = isset($comment['commentDate']) ? $comment['commentDate'] : 0;
     $content = isset($comment['data']) ? $comment['data'] : '';
     $snippet = TikiLib::lib('tiki')->get_snippet($content);
     $author = array(isset($comment['userName']) ? $comment['userName'] : '');
     $commentslib->extras_enabled(true);
     $data = array('lastpost_title' => $typeFactory->sortable(isset($comment['title']) ? $comment['title'] : ''), 'lastpost_modification_date' => $typeFactory->timestamp($lastModification), 'lastpost_contributors' => $typeFactory->multivalue(array_unique($author)), 'lastpost_post_content' => $typeFactory->wikitext($content), 'lastpost_post_snippet' => $typeFactory->plaintext($snippet), 'lastpost_hits' => $typeFactory->numeric(isset($comment['hits']) ? $comment['hits'] : 0), 'lastpost_thread_id' => $typeFactory->identifier(isset($comment['thread_id']) ? $comment['thread_id'] : 0));
     return $data;
 }
開發者ID:rjsmelo,項目名稱:tiki,代碼行數:21,代碼來源:ForumPostSource.php

示例4: getDocumentPart

 function getDocumentPart($baseKey, Search_Type_Factory_Interface $typeFactory)
 {
     $data = $this->gatherVoteData();
     return array($baseKey => $typeFactory->numeric($data['voteavg']), "{$baseKey}_count" => $typeFactory->numeric($data['numvotes']), "{$baseKey}_sum" => $typeFactory->numeric($data['total']));
 }
開發者ID:hurcane,項目名稱:tiki-azure,代碼行數:5,代碼來源:Rating.php


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