| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Revision\RevisionRecord; |
| 6 | use stdClass; |
| 7 | use XmlDumpWriter; |
| 8 | |
| 9 | /** |
| 10 | * This is a hook handler interface, see docs/Hooks.md. |
| 11 | * Use the hook name "XmlDumpWriterWriteRevision" to register handlers implementing this interface. |
| 12 | * |
| 13 | * @stable to implement |
| 14 | * @ingroup Hooks |
| 15 | */ |
| 16 | interface XmlDumpWriterWriteRevisionHook { |
| 17 | /** |
| 18 | * This hook is called at the end of a revision in an XML dump, to add extra metadata. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param XmlDumpWriter $obj |
| 23 | * @param string &$out Text being output |
| 24 | * @param stdClass $row Database row for the revision being dumped. DEPRECATED, use $rev instead. |
| 25 | * @param string $text Revision text to be dumped. DEPRECATED, use $rev instead. |
| 26 | * @param RevisionRecord $rev RevisionRecord that is being dumped to XML |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onXmlDumpWriterWriteRevision( $obj, &$out, $row, $text, $rev ); |
| 30 | } |