MediaWiki
1.28.0
|
Virtual HTTP service client for RESTBase. More...
Public Member Functions | |
__construct (array $params) | |
Example RESTBase v1 requests: GET /local/v1/page/html/{title}{/revision} POST /local/v1/transform/html/to/wikitext{/title}{/revision}. More... | |
onParsoid1Request (array $req, Closure $idGeneratorFunc) | |
Remap a Parsoid v1 request to a RESTBase v1 request. More... | |
onParsoid3Request (array $req, Closure $idGeneratorFunc) | |
Remap a Parsoid v3 request to a RESTBase v1 request. More... | |
onParsoidRequests (array $reqs, Closure $idGeneratorFunc) | |
Remaps Parsoid v1/v3 requests to RESTBase v1 requests. More... | |
onRequests (array $reqs, Closure $idGenFunc) | |
Public Member Functions inherited from VirtualRESTService | |
__construct (array $params) | |
getName () | |
Return the name of this service, in a form suitable for error reporting or debugging. More... | |
onRequests (array $reqs, Closure $idGeneratorFunc) | |
Prepare virtual HTTP(S) requests (for this service) for execution. More... | |
onResponses (array $reqs, Closure $idGeneratorFunc) | |
Mangle or replace virtual HTTP(S) requests which have been responded to. More... | |
Additional Inherited Members | |
Protected Attributes inherited from VirtualRESTService | |
array | $params = [] |
Key/value map. More... | |
Virtual HTTP service client for RESTBase.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html Virtual REST service for RESTBase
Definition at line 25 of file RestbaseVirtualRESTService.php.
RestbaseVirtualRESTService::__construct | ( | array | $params | ) |
Example RESTBase v1 requests: GET /local/v1/page/html/{title}{/revision} POST /local/v1/transform/html/to/wikitext{/title}{/revision}.
array | $params | Key/value map
|
Definition at line 51 of file RestbaseVirtualRESTService.php.
RestbaseVirtualRESTService::onParsoid1Request | ( | array | $req, |
Closure | $idGeneratorFunc | ||
) |
Remap a Parsoid v1 request to a RESTBase v1 request.
Example Parsoid v1 requests: GET /local/v1/page/$title/html/$oldid
NOTE: the POST APIs aren't "real" Parsoid v1 APIs, they are just what Visual Editor "pretends" the V1 API is like. (See ParsoidVirtualRESTService.)
Definition at line 154 of file RestbaseVirtualRESTService.php.
References $req, $title, and list.
Referenced by onParsoidRequests().
RestbaseVirtualRESTService::onParsoid3Request | ( | array | $req, |
Closure | $idGeneratorFunc | ||
) |
Remap a Parsoid v3 request to a RESTBase v1 request.
Example Parsoid v3 requests: GET /local/v3/page/html/$title/{$revision}
Definition at line 243 of file RestbaseVirtualRESTService.php.
Referenced by onParsoidRequests().
RestbaseVirtualRESTService::onParsoidRequests | ( | array | $reqs, |
Closure | $idGeneratorFunc | ||
) |
Remaps Parsoid v1/v3 requests to RESTBase v1 requests.
Definition at line 119 of file RestbaseVirtualRESTService.php.
References $req, as, onParsoid1Request(), and onParsoid3Request().
Referenced by onRequests().
RestbaseVirtualRESTService::onRequests | ( | array | $reqs, |
Closure | $idGenFunc | ||
) |
Definition at line 80 of file RestbaseVirtualRESTService.php.
References $req, as, and onParsoidRequests().