LinkRenderer: Re-implement noclasses as makePreloadedLink function
authorKunal Mehta <legoktm@member.fsf.org>
Wed, 25 May 2016 23:37:21 +0000 (16:37 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 26 May 2016 07:24:06 +0000 (00:24 -0700)
commita95e8e7262af964d843e7f4c7ab376e6b936b3f7
treedd8ea897e0a67bb3f5e8c5cc74cee0201ec40f3b
parent06ab9c0942f66317b20130ed12e677607783a61e
LinkRenderer: Re-implement noclasses as makePreloadedLink function

'noclasses' makes more sense as a per-link option rather than an
instance member of the LinkRenderer instance, since it depends entirely
on whether the calling code has preloaded the link classes.

Introduce LinkRenderer::makePreloadedLink() which makes this clear and
requires passing in the classes as a separate parameter. As a side-
effect, due to the way LinkRenderer::mergeAttribs() is implemented, the
'class' attribute will always appear before the 'title' attribute in the
final output.

Change-Id: I0545aa9d7139794bc22f9d3d6d6eccde003b2982
includes/Linker.php
includes/linker/LinkRenderer.php
includes/linker/LinkRendererFactory.php
tests/parser/parserTests.txt
tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/linker/LinkRendererFactoryTest.php