| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Page\Hook; |
| 4 | |
| 5 | use File; |
| 6 | use ImagePage; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "ImagePageFindFile" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface ImagePageFindFileHook { |
| 16 | /** |
| 17 | * This hook is called when fetching the file associated with an image |
| 18 | * page. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param ImagePage $page |
| 23 | * @param File|false &$file False on input, can be replaced with a File |
| 24 | * @param File|false &$displayFile False on input, can be replaced with a |
| 25 | * file to display. |
| 26 | * @return bool|void True or no return value to continue or false to abort |
| 27 | */ |
| 28 | public function onImagePageFindFile( $page, &$file, &$displayFile ); |
| 29 | } |