• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ApiFormatBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getVersion

 /**
  * Returns the version information of this file, plus it includes
  * the versions for all files that are not callable proper API modules
  */
 public function getVersion()
 {
     $vers = array();
     $vers[] = 'MediaWiki: ' . SpecialVersion::getVersion() . "\n    http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/";
     $vers[] = __CLASS__ . ': $Id: ApiMain.php 70066 2010-07-28 05:52:32Z tstarling $';
     $vers[] = ApiBase::getBaseVersion();
     $vers[] = ApiFormatBase::getBaseVersion();
     $vers[] = ApiQueryBase::getBaseVersion();
     return $vers;
 }
开发者ID:rocLv,项目名称:conference,代码行数:14,代码来源:ApiMain.php


示例2: getVersion

 /**
  * Returns the version information of this file, plus it includes
  * the versions for all files that are not callable proper API modules
  */
 public function getVersion()
 {
     $vers = array();
     $vers[] = 'MediaWiki: ' . SpecialVersion::getVersion() . "\n    http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/";
     $vers[] = __CLASS__ . ': $Id: ApiMain.php 69990 2010-07-27 08:44:08Z tstarling $';
     $vers[] = ApiBase::getBaseVersion();
     $vers[] = ApiFormatBase::getBaseVersion();
     $vers[] = ApiQueryBase::getBaseVersion();
     $vers[] = ApiFormatFeedWrapper::getVersion();
     // not accessible with format=xxx
     return $vers;
 }
开发者ID:ruizrube,项目名称:spdef,代码行数:16,代码来源:ApiMain.php


示例3: __construct

 /**
  * Constructor
  * @param $main ApiMain object
  * @param $errorFallback ApiFormatBase object to fall back on for errors
  */
 public function __construct($main, $errorFallback)
 {
     parent::__construct($main, 'raw');
     $this->mErrorFallback = $errorFallback;
 }
开发者ID:tuxmania87,项目名称:GalaxyAdventures,代码行数:10,代码来源:ApiFormatRaw.php


示例4: getVersion

 /**
  * Returns the version information of this file, plus it includes
  * the versions for all files that are not callable proper API modules
  *
  * @return array
  */
 public function getVersion()
 {
     $vers = array();
     $vers[] = 'MediaWiki: ' . SpecialVersion::getVersion() . "\n    https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/";
     $vers[] = __CLASS__ . ': $Id$';
     $vers[] = ApiBase::getBaseVersion();
     $vers[] = ApiFormatBase::getBaseVersion();
     $vers[] = ApiQueryBase::getBaseVersion();
     return $vers;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:16,代码来源:ApiMain.php


示例5: getVersion

 /**
  * Returns the version information of this file, plus it includes
  * the versions for all files that are not callable proper API modules
  */
 public function getVersion()
 {
     $vers = array();
     $vers[] = 'MediaWiki ' . SpecialVersion::getVersion();
     $vers[] = __CLASS__ . ': $Id: ApiMain.php 24494 2007-07-31 17:53:37Z yurik $';
     $vers[] = ApiBase::getBaseVersion();
     $vers[] = ApiFormatBase::getBaseVersion();
     $vers[] = ApiQueryBase::getBaseVersion();
     $vers[] = ApiFormatFeedWrapper::getVersion();
     // not accessible with format=xxx
     return $vers;
 }
开发者ID:mediawiki-extensions,项目名称:bizzwiki,代码行数:16,代码来源:ApiMain.php


示例6: getDescription

 public function getDescription()
 {
     return 'DEPRECATED! Output data in YAML format' . ApiFormatBase::getDescription();
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:4,代码来源:ApiFormatYaml.php


示例7: getDescription

 public function getDescription()
 {
     if ($this->mIsRaw) {
         return 'Output data with the debugging elements in JSON format' . parent::getDescription();
     }
     return 'Output data in JSON format' . parent::getDescription();
 }
开发者ID:crippsy14,项目名称:orange-smorange,代码行数:7,代码来源:ApiFormatJson.php


示例8: __construct

	public function __construct( $main, $format ) {
		parent :: __construct( $main, $format );
		$this->dmRecords = array();
		$this->languages = array();
		$this->excluded = array();
		$this->errorMessages = array();
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:7,代码来源:ApiWikiDataFormatBase.php


示例9: getDescription

 protected function getDescription()
 {
     if ($this->mIsRaw) {
         return 'Output data with the debuging elements in JSON format' . parent::getDescription();
     } else {
         return 'Output data in JSON format' . parent::getDescription();
     }
 }
开发者ID:negabaro,项目名称:alfresco,代码行数:8,代码来源:ApiFormatJson.php


示例10: closePrinter

 public function closePrinter()
 {
     $data = $this->getResult()->getResultData();
     if (isset($data['error'])) {
         $this->errorFallback->closePrinter();
     } else {
         parent::closePrinter();
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:9,代码来源:ApiFormatRaw.php


示例11: closePrinter

 public function closePrinter()
 {
     if ($this->isDisabled()) {
         return;
     }
     if ($this->file) {
         ob_clean();
         readfile($this->file);
     } else {
         return parent::closePrinter();
     }
 }
开发者ID:saper,项目名称:organic-extensions,代码行数:12,代码来源:ApiFormatFile.php


示例12: __construct

 public function __construct(ApiMain $main, $format)
 {
     parent::__construct($main, $format);
     $this->isRaw = $format === 'rawfm';
     if ($this->getMain()->getCheck('callback')) {
         # T94015: jQuery appends a useless '_' parameter in jsonp mode.
         # Mark the parameter as used in that case to avoid a warning that's
         # outside the control of the end user.
         # (and do it here because ApiMain::reportUnusedParams() gets called
         # before our ::execute())
         $this->getMain()->getCheck('_');
     }
 }
开发者ID:ucfengzhun,项目名称:mediawiki,代码行数:13,代码来源:ApiFormatJson.php


示例13: initPrinter

 /**
  * This class expects the result data to be in a custom format set by self::setResult()
  * $result['_feed'] - an instance of one of the $wgFeedClasses classes
  * $result['_feeditems'] - an array of FeedItem instances
  */
 public function initPrinter($unused = false)
 {
     parent::initPrinter($unused);
     if ($this->isDisabled()) {
         return;
     }
     $data = $this->getResult()->getResultData();
     if (isset($data['_feed']) && isset($data['_feeditems'])) {
         $data['_feed']->httpHeaders();
     } else {
         // Error has occurred, print something useful
         ApiBase::dieDebug(__METHOD__, 'Invalid feed class/item');
     }
 }
开发者ID:jpena88,项目名称:mediawiki-dokku-deploy,代码行数:19,代码来源:ApiFormatFeedWrapper.php


示例14: reportUnusedParams

 /**
  * Report unused parameters, so the client gets a hint in case it gave us parameters we don't know,
  * for example in case of spelling mistakes or a missing 'g' prefix for generators.
  */
 protected function reportUnusedParams()
 {
     $paramsUsed = $this->getParamsUsed();
     $allParams = $this->getRequest()->getValueNames();
     if (!$this->mInternalMode) {
         // Printer has not yet executed; don't warn that its parameters are unused
         $printerParams = array_map([$this->mPrinter, 'encodeParamName'], array_keys($this->mPrinter->getFinalParams() ?: []));
         $unusedParams = array_diff($allParams, $paramsUsed, $printerParams);
     } else {
         $unusedParams = array_diff($allParams, $paramsUsed);
     }
     if (count($unusedParams)) {
         $s = count($unusedParams) > 1 ? 's' : '';
         $this->setWarning("Unrecognized parameter{$s}: '" . implode($unusedParams, "', '") . "'");
     }
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:20,代码来源:ApiMain.php


示例15: getDescription

 public function getDescription()
 {
     return 'Output data in serialized PHP format' . parent::getDescription();
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:4,代码来源:ApiFormatPhp.php


示例16: __construct

 public function __construct($main)
 {
     parent::__construct($main, 'feed');
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:4,代码来源:ApiFormatBase.php


示例17: __construct

 public function __construct(ApiMain $main, $format)
 {
     parent::__construct($main, $format);
     $this->isRaw = $format === 'rawfm';
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:5,代码来源:ApiFormatJson.php


示例18: setHelp

 /**
  * Sets whether the pretty-printer should format *bold* and $italics$
  *
  * @deprecated since 1.25
  * @param bool $help
  */
 public function setHelp($help = true)
 {
     wfDeprecated(__METHOD__, '1.25');
     $this->mPrinter->setHelp($help);
 }
开发者ID:soumyag213,项目名称:mediawiki,代码行数:11,代码来源:ApiMain.php


示例19: getAllowedParams

 public function getAllowedParams()
 {
     if ($this->isRaw) {
         return parent::getAllowedParams();
     }
     $ret = parent::getAllowedParams() + array('callback' => array(ApiBase::PARAM_HELP_MSG => 'apihelp-json-param-callback'), 'utf8' => array(ApiBase::PARAM_DFLT => false, ApiBase::PARAM_HELP_MSG => 'apihelp-json-param-utf8'), 'ascii' => array(ApiBase::PARAM_DFLT => false, ApiBase::PARAM_HELP_MSG => 'apihelp-json-param-ascii'), 'formatversion' => array(ApiBase::PARAM_TYPE => array(1, 2, 'latest'), ApiBase::PARAM_DFLT => 1, ApiBase::PARAM_HELP_MSG => 'apihelp-json-param-formatversion'));
     return $ret;
 }
开发者ID:OrBin,项目名称:mediawiki,代码行数:8,代码来源:ApiFormatJson.php


示例20: getDescription

 protected function getDescription()
 {
     return 'Output data in XML format' . parent::getDescription();
 }
开发者ID:mediawiki-extensions,项目名称:bizzwiki,代码行数:4,代码来源:ApiFormatXml.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ApiMain类代码示例发布时间:2022-05-23
下一篇:
PHP ApiException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap