FileGetContents
extends AbstractRetriever
in package
Tries to retrieve JSON schemas from a URI using file_get_contents()
Tags
Table of Contents
Properties
- $contentType : string
- Media content type
- $messageBody : mixed
Methods
- getContentType() : string
- Get media content type
- retrieve() : mixed
- Retrieve a schema from the specified URI
- getContentTypeMatchInHeader() : string|null
- fetchContentType() : bool
Properties
$contentType
Media content type
protected
string
$contentType
$messageBody
protected
mixed
$messageBody
Methods
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
getContentTypeMatchInHeader()
protected
static getContentTypeMatchInHeader(string $header) : string|null
Parameters
- $header : string
Return values
string|nullfetchContentType()
private
fetchContentType(array<string|int, mixed> $headers) : bool
Parameters
- $headers : array<string|int, mixed>
-
HTTP Response Headers
Return values
bool —Whether the Content-Type header was found or not