wiki.techinc.nl/includes/Rest/SimpleHandler.php
Daimona Eaytoy c659bc6308 Unsuppress another phan issue (part 7)
Bug: T231636
Depends-On: I2cd24e73726394e3200a570c45d5e86b6849bfa9
Depends-On: I4fa3e6aad872434ca397325ed7a83f94973661d0
Change-Id: Ie6233561de78457cae5e4e44e220feec2d1272d8
2019-09-03 17:19:21 +00:00

21 lines
600 B
PHP

<?php
namespace MediaWiki\Rest;
/**
* A handler base class which unpacks parameters from the path template and
* passes them as formal parameters to run().
*
* run() must be declared in the subclass. It cannot be declared as abstract
* here because it has a variable parameter list.
* @todo Declare it as abstract after dropping HHVM
*
* @package MediaWiki\Rest
*/
class SimpleHandler extends Handler {
public function execute() {
$params = array_values( $this->getRequest()->getPathParams() );
// @phan-suppress-next-line PhanUndeclaredMethod
return $this->run( ...$params );
}
}