DirectHelpManualMappingFileStorage
in package
Class representing the manual links mapping file storage
Table of Contents
- FALLBACK_CONTENT = '{ "root": "https://developers.gambio.de/manual.html", "links": {} }'
- Fallback remote content (if the remote server can not be reached)
- HTTP_NOT_FOUND_STATUS_CODE = 404
- HTTP Not-Found status code
- $cacheLocation : string
- Local file location
- $mapping : array<string|int, mixed>
- Online manual page link mapping
- $remoteLocation : string
- Remote file location
- $rootPage : string
- Online manual root page
- $shopVersion : string
- Shop version
- $ttl : int
- Maximum cache time
- __construct() : mixed
- Create instance
- mapping() : array<string|int, mixed>
- Return the online manual page link mapping
- rootPage() : string
- Return the online manual root page
- content() : array<string|int, mixed>
- Return the decoded mapping file content
- localContent() : string|null
- Return the cached file content
- remoteContent() : string
- Return the content from remote file
- renewCache() : mixed
- Renew cache file
Constants
FALLBACK_CONTENT
Fallback remote content (if the remote server can not be reached)
public
string
FALLBACK_CONTENT
= '{ "root": "https://developers.gambio.de/manual.html", "links": {} }'
HTTP_NOT_FOUND_STATUS_CODE
HTTP Not-Found status code
public
int
HTTP_NOT_FOUND_STATUS_CODE
= 404
Properties
$cacheLocation
Local file location
protected
string
$cacheLocation
$mapping
Online manual page link mapping
protected
array<string|int, mixed>
$mapping
$remoteLocation
Remote file location
protected
string
$remoteLocation
$rootPage
Online manual root page
protected
string
$rootPage
$shopVersion
Shop version
protected
string
$shopVersion
$ttl
Maximum cache time
protected
int
$ttl
Methods
__construct()
Create instance
public
__construct(IntType $ttl, NonEmptyStringType $localLocation, NonEmptyStringType $remoteLocation, NonEmptyStringType $version) : mixed
Parameters
- $ttl : IntType
-
Maximum cache time
- $localLocation : NonEmptyStringType
-
Local cache file location
- $remoteLocation : NonEmptyStringType
-
Remote file location
- $version : NonEmptyStringType
-
Shop version
Return values
mixed —mapping()
Return the online manual page link mapping
public
mapping() : array<string|int, mixed>
Return values
array<string|int, mixed> —rootPage()
Return the online manual root page
public
rootPage() : string
Return values
string —content()
Return the decoded mapping file content
protected
content() : array<string|int, mixed>
Return values
array<string|int, mixed> —localContent()
Return the cached file content
protected
localContent() : string|null
Return values
string|null —remoteContent()
Return the content from remote file
protected
remoteContent() : string
Return values
string —renewCache()
Renew cache file
protected
renewCache(string $content) : mixed
Parameters
- $content : string
-
New file content