Document setupTemplate method and mark Vector as @final

Various skins may extend SkinVector (although none are in production)
(https://github.com/search?q=%22extends+SkinVector%22&type=Code)
This makes it clear we no longer support that behaviour.

Because of the skins that are extending SkinVector currently we have
not resorted to using the final keyword at this time.

Depends-On: Ie3759c2acbf53c628577f6b05cfed17e0998a6bb
Bug: T248399
Change-Id: I2af8b2930c80f888791247bdaa2ae1c80576317e
This commit is contained in:
jdlrobson 2020-03-25 08:11:54 -07:00 committed by Jdlrobson
parent f855c3948e
commit 4091a6729f
1 changed files with 7 additions and 2 deletions

View File

@ -26,6 +26,8 @@ use Vector\Constants;
/**
* Skin subclass for Vector
* @ingroup Skins
* @final skins extending SkinVector are not supported
* @unstable
*/
class SkinVector extends SkinTemplate {
public $skinname = 'vector';
@ -74,12 +76,15 @@ class SkinVector extends SkinTemplate {
}
/**
* Set up the VectorTemplate
* Set up the VectorTemplate. Overrides the default behaviour of SkinTemplate allowing
* the safe calling of constructor with additional arguments. If dropping this method
* please ensure that VectorTemplate constructor arguments match those in SkinTemplate.
*
* @internal
* @param string $classname
* @return VectorTemplate
*/
public function setupTemplate( $classname ) {
protected function setupTemplate( $classname ) {
$template = new VectorTemplate( $this->getConfig() );
$template->setTemplateParser( new TemplateParser( __DIR__ . '/templates' ) );
return $template;