OutputPage: Make use of WrappedStringList in headElement()
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 7 Jul 2016 19:26:36 +0000 (20:26 +0100)
committerOri.livneh <ori@wikimedia.org>
Tue, 12 Jul 2016 18:56:48 +0000 (18:56 +0000)
commit7f26cff2cc0dc8b626083e922a88ae4899696747
treed150056a9908f0e83ebe8e9fda46ebedfe3d3b96
parent52017fad77be3ca263d90a28209f2d7d7871fb51
OutputPage: Make use of WrappedStringList in headElement()

Right now, getInlineHeadScripts(), buildCssLinks() and getExternalHeadScripts()
all return WrappedString::join(). But because they don't know about each other
and because they need to return strings (not arrays), headElement() has no way
of merging them.

WrappedStringList allows this array to be kept, whilst still being backward-compatible
with code that calls these methods and assumig a string (since it will lazy-join
the array if the object is treated like a string).

To be used by I8b6c6a10d965e7396. Output is not changed in this commit.
Merely refactoring.

Change-Id: Iae08345473bd93cc0948d51b62c48aeb1ea460a3
includes/OutputPage.php