| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Page\Hook; |
| 4 | |
| 5 | use MediaWiki\User\User; |
| 6 | use WikiPage; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "PageViewUpdates" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 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. |
| 20 | * |
| 21 | * @since 1.35 |
| 22 | * |
| 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 |
| 26 | */ |
| 27 | public function onPageViewUpdates( $wikipage, $user ); |
| 28 | } |