summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/src/Schema/Content/ContentHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/src/Schema/Content/ContentHandler.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/src/Schema/Content/ContentHandler.php74
1 files changed, 74 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/src/Schema/Content/ContentHandler.php b/www/wiki/extensions/SemanticMediaWiki/src/Schema/Content/ContentHandler.php
new file mode 100644
index 00000000..82a4ce4e
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/src/Schema/Content/ContentHandler.php
@@ -0,0 +1,74 @@
+<?php
+
+namespace SMW\Schema\Content;
+
+use JsonContentHandler;
+
+/**
+ * @license GNU GPL v2+
+ * @since 3.0
+ *
+ * @author mwjames
+ */
+class ContentHandler extends JsonContentHandler {
+
+ /**
+ * @since 3.0
+ *
+ * {@inheritDoc}
+ */
+ public function __construct() {
+ parent::__construct( CONTENT_MODEL_SMW_SCHEMA, [ CONTENT_FORMAT_JSON ] );
+ }
+
+ /**
+ * Returns true, because wikitext supports caching using the
+ * ParserCache mechanism.
+ *
+ * @since 1.21
+ *
+ * @return bool Always true.
+ *
+ * @see ContentHandler::isParserCacheSupported
+ */
+ public function isParserCacheSupported() {
+ return true;
+ }
+
+ /**
+ * @since 3.0
+ *
+ * {@inheritDoc}
+ */
+ protected function getContentClass() {
+ return Content::class;
+ }
+
+ /**
+ * @since 3.0
+ *
+ * {@inheritDoc}
+ */
+ public function supportsSections() {
+ return false;
+ }
+
+ /**
+ * @since 3.0
+ *
+ * {@inheritDoc}
+ */
+ public function supportsCategories() {
+ return false;
+ }
+
+ /**
+ * @since 3.0
+ *
+ * {@inheritDoc}
+ */
+ public function supportsRedirects() {
+ return false;
+ }
+
+}