Create ContentTransformer to access ContentHandler::preSaveTransform through the service. Prepare object to hold a data that required for ContentHandler::preSaveTranform params. This will require making a semi-backwards-incompatible change no matter what, we don't really have a great way of hard-deprecating overriding methods. However, with the ContentHandler calling Content and Content calling ContentHandler, and with the ProxyContent trick to stop infinite recursion, it doesn't matter whether callers use Content or ContentHandler. This will allow us to naturally convert all callers. But won't really allow hard-deprecation. Bug: T287156 Change-Id: If6a2025868ceca3a3b6f11baec39695e47292e40
28 lines
491 B
PHP
28 lines
491 B
PHP
<?php
|
|
namespace MediaWiki\Content\Transform;
|
|
|
|
use MediaWiki\Page\PageReference;
|
|
use MediaWiki\User\UserIdentity;
|
|
use ParserOptions;
|
|
|
|
/**
|
|
* @since 1.37
|
|
* An interface to hold pre-save transform params.
|
|
*/
|
|
interface PreSaveTransformParams {
|
|
|
|
/**
|
|
* @return PageReference
|
|
*/
|
|
public function getPage(): PageReference;
|
|
|
|
/**
|
|
* @return UserIdentity
|
|
*/
|
|
public function getUser(): UserIdentity;
|
|
|
|
/**
|
|
* @return ParserOptions
|
|
*/
|
|
public function getParserOptions(): ParserOptions;
|
|
}
|