Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Api\Hook;
4
5// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
6use MediaWiki\Context\IContextSource;
7use stdClass;
8
9/**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "ApiFeedContributions::feedItem" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16interface ApiFeedContributions__feedItemHook {
17    /**
18     * Use this hook to convert the result of ContribsPager into a MediaWiki\Feed\FeedItem instance
19     * that ApiFeedContributions can consume. Implementors of this hook may cancel
20     * the hook to signal that the item is not viewable in the provided context.
21     *
22     * @param stdClass $row A row of data from ContribsPager. The set of data returned by
23     *   ContribsPager can be adjusted by handling the ContribsPager::reallyDoQuery
24     *   hook.
25     * @param IContextSource $context
26     * @param \MediaWiki\Feed\FeedItem|null &$feedItem Set this to a FeedItem instance if the callback can handle the
27     *   provided row. This is provided to the hook as a null, if it is non-null then
28     *   another callback has already handled the hook.
29     * @return bool|void True or no return value to continue or false to abort
30     * @since 1.35
31     *
32     */
33    public function onApiFeedContributions__feedItem( $row, $context, &$feedItem );
34}