[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/_test/tests/inc/ -> httpclient_mock.php (summary)

(no description)

File Size: 70 lines (2 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTTPMockClient:: (4 methods):
  __construct()
  noconnection()
  sendRequest()
  errorInfo()


Class: HTTPMockClient  - X-Ref

Class HTTPMockClient

Does not really mock the client, it still does real connections but will retry failed connections
to work around shaky connectivity.
__construct()   X-Ref
Sets shorter timeout


noconnection()   X-Ref
Returns true if the connection timed out

return: bool

sendRequest($url, $data = '', $method = 'GET')   X-Ref
Retries sending the request multiple times

return: bool
param: string $url
param: string $data
param: string $method

errorInfo($info = '')   X-Ref
Return detailed error data

return: string
param: string $info optional additional info