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\Hook;
4
5use MediaWiki\Status\Status;
6use MediaWiki\User\User;
7use WikiPage;
8
9/**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "WatchArticle" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16interface WatchArticleHook {
17    /**
18     * This hook is called before a watch is added to an article.
19     *
20     * @since 1.35
21     *
22     * @param User $user User that will watch
23     * @param WikiPage $page WikiPage object to be watched
24     * @param Status &$status Status object to be returned if the hook returns false
25     * @param string|null $expiry Optional expiry timestamp in any format acceptable to wfTimestamp()
26     * @return bool|void True or no return value to continue or false to abort and
27     *   return Status object
28     */
29    public function onWatchArticle( $user, $page, &$status, $expiry );
30}