wiki.techinc.nl/includes/Rest/SimpleHandler.php
Tim Starling 4b07863b72 REST: Rename attributes to path params
Change-Id: I1cd7297715bf0f9902949a5117ea7ab94b689a37
2019-06-14 17:01:15 +10:00

19 lines
497 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.
*
* @package MediaWiki\Rest
*/
class SimpleHandler extends Handler {
public function execute() {
$params = array_values( $this->getRequest()->getPathParams() );
return $this->run( ...$params );
}
}