- public function getMimeType() {
- return null;
- }
-
- /**
- * Optimization - no need to sanitize data that will not be needed
- *
- * @return bool
- */
- public function getNeedsRawData() {
- return true;
- }
-
- /**
- * ChannelFeed doesn't give us a method to print errors in a friendly
- * manner, so just punt errors to the default printer.
- * @return bool
- */
- public function canPrintErrors() {
- return false;
- }
-
- /**
- * 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 execute() {
- $data = $this->getResultData();
- if ( isset( $data['_feed'] ) && isset( $data['_feeditems'] ) ) {
- $feed = $data['_feed'];
- $items = $data['_feeditems'];
-
- $feed->outHeader();
- foreach ( $items as & $item ) {
- $feed->outItem( $item );
- }
- $feed->outFooter();
- } else {
- // Error has occurred, print something useful
- ApiBase::dieDebug( __METHOD__, 'Invalid feed class/item' );
- }
+ protected function markDeprecated() {
+ $fm = $this->getIsHtml() ? 'fm' : '';
+ $name = $this->getModuleName();
+ $this->logFeatureUsage( "format=$name" );
+ $this->setWarning( "format=$name has been deprecated. Please use format=json$fm instead." );