Merge "mediawiki.api: Remove console warning for legacy token type"
[mediawiki.git] / includes / page / Hook / PageViewUpdatesHook.php
blobc868828d3927f83caab3d581f84b36d063d0eeee
1 <?php
3 namespace MediaWiki\Page\Hook;
5 use MediaWiki\User\User;
6 use WikiPage;
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "PageViewUpdates" to register handlers implementing this interface.
12 * @stable to implement
13 * @ingroup Hooks
15 interface PageViewUpdatesHook {
16 /**
17 * Use this hook to make database (or other) changes after a
18 * page view is seen by MediaWiki. Note this does not capture views made
19 * via external caches such as Squid.
21 * @since 1.35
23 * @param WikiPage $wikipage Page being viewed
24 * @param User $user User who is viewing
25 * @return bool|void True or no return value to continue or false to abort
27 public function onPageViewUpdates( $wikipage, $user );