54 return $this->params[
'name'] ?? static::class;
79 public function onRequests( array $reqs, Closure $idGeneratorFunc ) {
81 foreach ( $reqs as $key => $req ) {
85 $parts = array_map(
'rawurlencode', explode(
'/', $req[
'url'] ) );
86 $req[
'url'] = $this->params[
'baseUrl'] .
'/' . implode(
'/', $parts );
114 public function onResponses( array $reqs, Closure $idGeneratorFunc ) {
Virtual HTTP service instance that can be mounted on to a VirtualRESTService.
array $params
Key/value map.
onResponses(array $reqs, Closure $idGeneratorFunc)
Mangle or replace virtual HTTP(S) requests which have been responded to.
__construct(array $params)
onRequests(array $reqs, Closure $idGeneratorFunc)
Prepare virtual HTTP(S) requests (for this service) for execution.
getName()
Return the name of this service, in a form suitable for error reporting or debugging.