当前位置: 首页>>代码示例>>PHP>>正文


PHP SMWQueryProcessor::getResultFromQuery方法代码示例

本文整理汇总了PHP中SMWQueryProcessor::getResultFromQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP SMWQueryProcessor::getResultFromQuery方法的具体用法?PHP SMWQueryProcessor::getResultFromQuery怎么用?PHP SMWQueryProcessor::getResultFromQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SMWQueryProcessor的用法示例。


在下文中一共展示了SMWQueryProcessor::getResultFromQuery方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testExcelQueryPrinter

 function testExcelQueryPrinter()
 {
     $params = array();
     $context = SMWQueryProcessor::INLINE_QUERY;
     $format = "exceltable";
     $extraprintouts = array();
     $querystring = "[[Category:Car]]";
     $query = SMWQueryProcessor::createQuery($querystring, $params, $context, $format, $extraprintouts);
     $res = smwfGetStore()->getQueryResult($query);
     $result = SMWQueryProcessor::getResultFromQuery($query, $params, $extraprintouts, SMW_OUTPUT_FILE, $context, $format);
     $this->assertFileContentsIgnoringWhitespaces("testcases/resources/excel_qp_result.dat", $result);
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:12,代码来源:TestQueryPrinters.php

示例2: render

 /**
  * Method for handling the show parser function.
  *
  * @since 1.5.3
  *
  * @param Parser $parser
  */
 public static function render(Parser &$parser)
 {
     global $smwgQEnabled, $smwgIQRunningNumber, $wgTitle;
     if ($smwgQEnabled) {
         $smwgIQRunningNumber++;
         $rawParams = func_get_args();
         array_shift($rawParams);
         // We already know the $parser ...
         list($query, $params) = SMWQueryProcessor::getQueryAndParamsFromFunctionParams($rawParams, SMW_OUTPUT_WIKI, SMWQueryProcessor::INLINE_QUERY, true);
         $result = SMWQueryProcessor::getResultFromQuery($query, $params, SMW_OUTPUT_WIKI, SMWQueryProcessor::INLINE_QUERY);
         $queryKey = hash('md4', implode('|', $rawParams), false);
         SMWAsk::addQueryData($queryKey, $query, $params, $parser);
     } else {
         $result = smwfEncodeMessages(array(wfMessage('smw_iq_disabled')->inContentLanguage()->text()));
     }
     if (!is_null($wgTitle) && $wgTitle->isSpecialPage()) {
         global $wgOut;
         SMWOutputs::commitToOutputPage($wgOut);
     } else {
         SMWOutputs::commitToParser($parser);
     }
     return $result;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:30,代码来源:SMW_Show.php

示例3: getResultFromQueryString

 public static function getResultFromQueryString($querystring, $params, $extraprintouts, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY)
 {
     $format = SMWQueryProcessor::getResultFormat($params);
     $query = SMWSPARQLQueryProcessor::createQuery($querystring, $params, $context, $format, $extraprintouts);
     $result = SMWQueryProcessor::getResultFromQuery($query, $params, $extraprintouts, $outputmode, $context, $format);
     return $result;
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:7,代码来源:SMW_SPARQLQueryProcessor.php


注:本文中的SMWQueryProcessor::getResultFromQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。