mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-18 09:20:37 +00:00
27b7bcd50d
Change-Id: I25e91ff3294eaebe042bb8cbc90af72f37b4f1a9
37 lines
790 B
PHP
37 lines
790 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Thanks;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
/**
|
|
* Service container class for the Thanks extension.
|
|
*/
|
|
class ThanksServices {
|
|
|
|
/** @var MediaWikiServices */
|
|
private MediaWikiServices $services;
|
|
|
|
/**
|
|
* Convenience method for returning an instance without having to use new, for chaining.
|
|
* @param MediaWikiServices $services
|
|
* @return self
|
|
*/
|
|
public static function wrap( MediaWikiServices $services ): self {
|
|
return new self( $services );
|
|
}
|
|
|
|
/**
|
|
* @param MediaWikiServices $services
|
|
*/
|
|
public function __construct( MediaWikiServices $services ) {
|
|
$this->services = $services;
|
|
}
|
|
|
|
/** @return ThanksQueryHelper */
|
|
public function getQueryHelper(): ThanksQueryHelper {
|
|
return $this->services->get( 'ThanksQueryHelper' );
|
|
}
|
|
|
|
}
|