Curl
extends AbstractRetriever
in package
Tries to retrieve JSON schemas from a URI using cURL library
Tags
Table of Contents
Properties
- $contentType : string
- Media content type
- $messageBody : mixed
Methods
- __construct() : mixed
- getContentType() : string
- Get media content type
- retrieve() : mixed
- Retrieve a schema from the specified URI
- fetchContentType() : bool
- fetchMessageBody() : mixed
Properties
$contentType
Media content type
protected
string
$contentType
$messageBody
protected
mixed
$messageBody
Methods
__construct()
public
__construct() : mixed
getContentType()
Get media content type
public
getContentType() : string
Tags
Return values
stringretrieve()
Retrieve a schema from the specified URI
public
retrieve(mixed $uri) : mixed
Parameters
- $uri : mixed
-
URI that resolves to a JSON schema
Tags
Return values
mixed —string|null
fetchContentType()
protected
fetchContentType(string $response) : bool
Parameters
- $response : string
-
cURL HTTP response
Return values
bool —Whether the Content-Type header was found or not
fetchMessageBody()
private
fetchMessageBody(string $response) : mixed
Parameters
- $response : string
-
cURL HTTP response