当前位置: 首页>>代码示例>>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;未经允许,请勿转载。