Make it easier to subclass Content and ContentHandler subclasses
authorKunal Mehta <legoktm@gmail.com>
Sun, 17 Aug 2014 06:04:08 +0000 (23:04 -0700)
committerKunal Mehta <legoktm@gmail.com>
Sun, 17 Aug 2014 06:04:08 +0000 (23:04 -0700)
commitccee80b8a663b9882818f4a149cf38117e4b1919
tree5f5d109397d5cf7da9773d3451d1ca1d2dd3ae59
parent28fdbd9ea29fb95e2937c7f330952cafa3f09f10
Make it easier to subclass Content and ContentHandler subclasses

Currently the names of associated Content classes are hardcoded,
meaning that any extension that wishes to subclass these implementations
must also re-implement that function, usually copying it exactly
with just the class name changed. Using "static" avoids that issue.

For ContentHandlers, I added a TextContentHandler::getContentClass,
which should be used when creating new Content objects.

Change-Id: I70f1a3291aec3460120ec20121a23f4cb68e04d1
includes/content/CssContent.php
includes/content/CssContentHandler.php
includes/content/JSONContentHandler.php
includes/content/JavaScriptContent.php
includes/content/JavaScriptContentHandler.php
includes/content/TextContentHandler.php
includes/content/WikitextContent.php
includes/content/WikitextContentHandler.php