| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Parser\ParserCache; |
| 6 | use MediaWiki\Parser\ParserOptions; |
| 7 | use MediaWiki\Parser\ParserOutput; |
| 8 | use MediaWiki\Title\Title; |
| 9 | |
| 10 | /** |
| 11 | * This is a hook handler interface, see docs/Hooks.md. |
| 12 | * Use the hook name "ParserCacheSaveComplete" to register handlers implementing this interface. |
| 13 | * |
| 14 | * @stable to implement |
| 15 | * @ingroup Hooks |
| 16 | */ |
| 17 | interface ParserCacheSaveCompleteHook { |
| 18 | /** |
| 19 | * This hook is called after a ParserOutput has been committed to |
| 20 | * the parser cache. |
| 21 | * |
| 22 | * @since 1.35 |
| 23 | * |
| 24 | * @param ParserCache $parserCache ParserCache object $parserOutput was stored in |
| 25 | * @param ParserOutput $parserOutput ParserOutput object that was stored |
| 26 | * @param Title $title Title of the page that was parsed to generate $parserOutput |
| 27 | * @param ParserOptions $popts ParserOptions used for generating $parserOutput |
| 28 | * @param int $revId ID of the revision that was parsed to create $parserOutput |
| 29 | * @return bool|void True or no return value to continue or false to abort |
| 30 | */ |
| 31 | public function onParserCacheSaveComplete( $parserCache, $parserOutput, $title, |
| 32 | $popts, $revId |
| 33 | ); |
| 34 | } |