1 | <?php |
||
21 | class ApiSemanticFormsSelect extends ApiBase { |
||
22 | |||
23 | /** |
||
24 | * @see ApiBase::execute |
||
25 | 1 | */ |
|
26 | public function execute() { |
||
27 | 1 | $parser = $this->getParser(); |
|
28 | 1 | $parser->setTitle( Title::newFromText( 'NO TITLE' ) ); |
|
29 | 1 | $parser->mOptions = new ParserOptions(); |
|
30 | 1 | $parser->mOutput = new ParserOutput(); |
|
31 | |||
32 | 1 | $apiRequestProcessor = new \SFS\ApiSemanticFormsSelectRequestProcessor( $parser ); |
|
33 | 1 | $apiRequestProcessor->setDebugFlag( $GLOBALS['wgSF_Select_debug'] ); |
|
34 | |||
35 | 1 | $resultValues = $apiRequestProcessor->getJsonDecodedResultValuesForRequestParameters( |
|
36 | 1 | $this->extractRequestParams() |
|
37 | 1 | ); |
|
38 | |||
39 | 1 | $result = $this->getResult(); |
|
40 | 1 | $result->setIndexedTagName( $resultValues->values, 'value' ); |
|
41 | 1 | $result->addValue( $this->getModuleName(), 'values', $resultValues->values ); |
|
42 | 1 | $result->addValue( $this->getModuleName(), 'count', $resultValues->count ); |
|
43 | |||
44 | 1 | return true; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @see ApiBase::getAllowedParams |
||
49 | */ |
||
50 | 1 | public function getAllowedParams() { |
|
66 | |||
67 | /** |
||
68 | * @see ApiBase::getDescription |
||
69 | */ |
||
70 | public function getDescription() { |
||
75 | |||
76 | /** |
||
77 | * @see ApiBase::getParamDescription |
||
78 | */ |
||
79 | public function getParamDescription() { |
||
85 | |||
86 | /** |
||
87 | * @see ApiBase::getVersion |
||
88 | */ |
||
89 | public function getVersion() { |
||
92 | |||
93 | // Compatibility helper for MW < 1.32 |
||
94 | private function getParser(): Parser { |
||
103 | |||
104 | } |
||
105 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.