Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
WikispeechServices
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 6
156
0.00% covered (danger)
0.00%
0 / 1
 getConfiguredLexiconStorage
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
 getLexiconHandler
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
 getLexiconWikiStorage
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
 getLexiconSpeechoidStorage
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
 getLexiconWanCacheStorage
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
 getSpeechoidConnector
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3namespace MediaWiki\Wikispeech;
4
5use MediaWiki\MediaWikiServices;
6use MediaWiki\Wikispeech\Lexicon\ConfiguredLexiconStorage;
7use MediaWiki\Wikispeech\Lexicon\LexiconHandler;
8use MediaWiki\Wikispeech\Lexicon\LexiconSpeechoidStorage;
9use MediaWiki\Wikispeech\Lexicon\LexiconWanCacheStorage;
10use MediaWiki\Wikispeech\Lexicon\LexiconWikiStorage;
11use Psr\Container\ContainerInterface;
12
13class WikispeechServices {
14
15    /**
16     * @param ContainerInterface|null $services Service container to
17     *  use. If null, global MediaWikiServices::getInstance() will be
18     *  used instead.
19     *
20     * @return ConfiguredLexiconStorage
21     */
22    public static function getConfiguredLexiconStorage(
23        ContainerInterface $services = null
24    ): ConfiguredLexiconStorage {
25        return ( $services ?: MediaWikiServices::getInstance() )
26            ->get( 'Wikispeech.ConfiguredLexiconStorage' );
27    }
28
29    /**
30     * @param ContainerInterface|null $services Service container to
31     *  use. If null, global MediaWikiServices::getInstance() will be
32     *  used instead.
33     *
34     * @return LexiconHandler
35     */
36    public static function getLexiconHandler(
37        ContainerInterface $services = null
38    ): LexiconHandler {
39        return ( $services ?: MediaWikiServices::getInstance() )
40            ->get( 'Wikispeech.LexiconHandler' );
41    }
42
43    /**
44     * @param ContainerInterface|null $services Service container to
45     *  use. If null, global MediaWikiServices::getInstance() will be
46     *  used instead.
47     *
48     * @return LexiconWikiStorage
49     */
50    public static function getLexiconWikiStorage(
51        ContainerInterface $services = null
52    ): LexiconWikiStorage {
53        return ( $services ?: MediaWikiServices::getInstance() )
54            ->get( 'Wikispeech.LexiconWikiStorage' );
55    }
56
57    /**
58     * @param ContainerInterface|null $services Service container to
59     *  use. If null, global MediaWikiServices::getInstance() will be
60     *  used instead.
61     *
62     * @return LexiconSpeechoidStorage
63     */
64    public static function getLexiconSpeechoidStorage(
65        ContainerInterface $services = null
66    ): LexiconSpeechoidStorage {
67        return ( $services ?: MediaWikiServices::getInstance() )
68            ->get( 'Wikispeech.LexiconSpeechoidStorage' );
69    }
70
71    /**
72     * @param ContainerInterface|null $services Service container to
73     *  use. If null, global MediaWikiServices::getInstance() will be
74     *  used instead.
75     *
76     * @return LexiconWanCacheStorage
77     */
78    public static function getLexiconWanCacheStorage(
79        ContainerInterface $services = null
80    ): LexiconWanCacheStorage {
81        return ( $services ?: MediaWikiServices::getInstance() )
82            ->get( 'Wikispeech.LexiconWanCacheStorage' );
83    }
84
85    /**
86     * @param ContainerInterface|null $services Service container to
87     *  use. If null, global MediaWikiServices::getInstance() will be
88     *  used instead.
89     *
90     * @return SpeechoidConnector
91     */
92    public static function getSpeechoidConnector(
93        ContainerInterface $services = null
94    ): SpeechoidConnector {
95        return ( $services ?: MediaWikiServices::getInstance() )
96            ->get( 'Wikispeech.SpeechoidConnector' );
97    }
98}