Mwjames has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71251


Change subject: Use \SMW\ParserFunctionFactory instead
......................................................................

Use \SMW\ParserFunctionFactory instead

Requires [1] in order to elminate DI exposure

[1] https://gerrit.wikimedia.org/r/#/c/71250/

Change-Id: Ie0d51faa00478b6188b80621864895a5c0d6dd39
---
M SIO_SubobjectAlias.php
1 file changed, 2 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticInternalObjects 
refs/changes/51/71251/1

diff --git a/SIO_SubobjectAlias.php b/SIO_SubobjectAlias.php
index 1402a07..67c23bf 100644
--- a/SIO_SubobjectAlias.php
+++ b/SIO_SubobjectAlias.php
@@ -57,11 +57,7 @@
 
                if ( class_exists( 'SMW\SubobjectParserFunction' ) ) {
                        // SMW 1.9+
-                       $subobjectFunction = new SMW\SubobjectParserFunction(
-                               new SMW\ParserData( $parser->getTitle(), 
$parser->getOutput() ),
-                               new SMW\Subobject( $parser->getTitle() ),
-                               new SMW\MessageFormatter( 
$parser->getTargetLanguage() )
-                       );
+                       $subobjectFunction = 
\SMW\ParserFunctionFactory::newFromParser( $parser )->getSubobjectParser();
                        return $subobjectFunction->parse( new 
SMW\ParserParameterFormatter( $subobjectArgs ) );
                } else {
                        // SMW 1.8
@@ -81,12 +77,7 @@
 
                if ( class_exists( 'SMW\RecurringEventsParserFunction' ) ) {
                        // SMW 1.9+
-                       $recurringEventFunction = new 
SMW\RecurringEventsParserFunction(
-                               new SMW\ParserData( $parser->getTitle(), 
$parser->getOutput() ),
-                               new SMW\Subobject( $parser->getTitle() ),
-                               new SMW\MessageFormatter( 
$parser->getTargetLanguage() ),
-                               \SMW\Settings::newFromGlobals()
-                       );
+                       $recurringEventFunction = 
\SMW\ParserFunctionFactory::newFromParser( $parser 
)->getRecurringEventsParser();
                        return $recurringEventFunction->parse( new 
SMW\ParserParameterFormatter( $params ) );
                } else {
                        // SMW 1.8

-- 
To view, visit https://gerrit.wikimedia.org/r/71251
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0d51faa00478b6188b80621864895a5c0d6dd39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticInternalObjects
Gerrit-Branch: master
Gerrit-Owner: Mwjames <jamesin.hongkon...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to