From ded8bd5d749046b92d725f94a728b8eccf4b7a89 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 22 Apr 2020 13:10:41 -0400 Subject: [PATCH] Add extension registration mechanism to SiteConfig This will be called by the ExtensionRegistry in core for extensions that are Parsoid-compatible. The set of registered extensions is part of the SiteConfig, which bundles all the configuration for a particular Parsoid instance. In addition, renamed some classes to make things clearer: `ExtensionModule` is the thing which is registered; it bundles a number of `ExtensionTagHandler`s, `ContentModelHandler`s, and DOM processors (which don't have a proper interface yet). There are a set of core handlers, which include wikitext, JSON, and a few extension tags (
, , ).

Change-Id: Iadbeb378bacb09264a4b1d3ee430a914eec23e48
---
 src/Parsoid/Poem.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Parsoid/Poem.php b/src/Parsoid/Poem.php
index 995b37a..a57b44f 100644
--- a/src/Parsoid/Poem.php
+++ b/src/Parsoid/Poem.php
@@ -5,18 +5,18 @@ namespace Wikimedia\Parsoid\Ext\Poem;
 
 use DOMDocument;
 use DOMElement;
-use Wikimedia\Parsoid\Ext\Extension;
-use Wikimedia\Parsoid\Ext\ExtensionTag;
+use Wikimedia\Parsoid\Ext\ExtensionModule;
+use Wikimedia\Parsoid\Ext\ExtensionTagHandler;
 use Wikimedia\Parsoid\Ext\ParsoidExtensionAPI;
 use Wikimedia\Parsoid\Utils\DOMCompat;
 use Wikimedia\Parsoid\Utils\DOMUtils;
 
-class Poem extends ExtensionTag implements Extension {
+class Poem extends ExtensionTagHandler implements ExtensionModule {
 
 	/** @inheritDoc */
 	public function getConfig(): array {
 		return [
-			'name' => 'poem',
+			'name' => 'Poem',
 			'domProcessors' => [
 				'wt2htmlPostProcessor' => self::class
 			],