JoelKP has submitted this change and it was merged.
Change subject: Support passing SemanticQueryInterface constructor options.
......................................................................
Support passing SemanticQueryInterface constructor options.
Change-Id: I6e068873f00fdba37184296ce9a833baeba69496
---
M includes/SMWExtSQI.php
1 file changed, 9 insertions(+), 2 deletions(-)
Approvals:
JoelKP: Verified; Looks good to me, approved
diff --git a/includes/SMWExtSQI.php b/includes/SMWExtSQI.php
index f0265f0..073647c 100644
--- a/includes/SMWExtSQI.php
+++ b/includes/SMWExtSQI.php
@@ -8,11 +8,11 @@
*/
class SMWExtSQI extends \PhpTags\GenericObject {
- public function m___construct() {
+ public function m___construct( $config = null ) {
if ( false === class_exists( '\\SQI\\SemanticQueryInterface' )
) {
throw new \Exception( wfMessage(
'phptagssmw-ext-sqi-not-installed' )->text() );
}
- $this->value = new \SQI\SemanticQueryInterface();
+ $this->value = new \SQI\SemanticQueryInterface( $config );
return true;
}
@@ -64,6 +64,13 @@
public static function checkArguments( $object, $method, &$arguments,
$expects = false ) {
switch ( $method ) {
+ case '__construct':
+ $expects = array(
+ \PhpTags\Hooks::TYPE_ARRAY,
+
\PhpTags\Hooks::EXPECTS_MINIMUM_PARAMETERS => 0,
+
\PhpTags\Hooks::EXPECTS_MAXIMUM_PARAMETERS => 1,
+ );
+ break;
case 'from':
$expects = array(
\PhpTags\Hooks::TYPE_STRING,
--
To view, visit https://gerrit.wikimedia.org/r/168004
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6e068873f00fdba37184296ce9a833baeba69496
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsSMW
Gerrit-Branch: master
Gerrit-Owner: JoelKP <[email protected]>
Gerrit-Reviewer: JoelKP <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits