| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | /** |
| 6 | * This is a hook handler interface, see docs/Hooks.md. |
| 7 | * Use the hook name "GetMetadataVersion" to register handlers implementing this interface. |
| 8 | * |
| 9 | * @stable to implement |
| 10 | * @ingroup Hooks |
| 11 | */ |
| 12 | interface GetMetadataVersionHook { |
| 13 | /** |
| 14 | * Use this hook to modify the image metadata version currently in use. This |
| 15 | * is used when requesting image metadata from a ForeignApiRepo. Media handlers |
| 16 | * that need to have versioned metadata should add an element to the end of the |
| 17 | * version array of the form 'handler_name=version'. Most media handlers won't need |
| 18 | * to do this unless they broke backwards compatibility with a previous version of |
| 19 | * the media handler metadata output. |
| 20 | * |
| 21 | * @since 1.35 |
| 22 | * |
| 23 | * @param string[] &$version Array of version strings |
| 24 | * @return bool|void True or no return value to continue or false to abort |
| 25 | */ |
| 26 | public function onGetMetadataVersion( &$version ); |
| 27 | } |