Storage
in package
implements
EphemeralStorageInterface
FinalYes
Legacy cache and remote loading facade.
Included for historical compatibility only. This API is out of support and should not be used in new code.
Tags
Table of Contents
Interfaces
- EphemeralStorageInterface
- Storage backend for named payloads that expire by modification time.
Properties
- $cleanseTime : int
- $dbmsTable : Table|null
- $dbName : string
- $dom : DOMHelper
- $now : int
- $storageList : array<string|int, mixed>
- $tableName : string
- $touchList : array<string|int, mixed>
Methods
- __construct() : mixed
- __destruct() : void
- _getStorageNameFromURI() : string
- cleanse() : void
- clearExternalDocument() : bool
- cron() : bool
- delete() : bool
- exists() : bool
- getLogDirectory() : string
- getLogEnabled() : bool
- getTouchOnExit() : bool
- install() : void
- loadExternalDocument() : DOMDocument|null
- loadExternalFile() : string|null
- loadExternalHeader() : array<string|int, mixed>|null
- loadExternalJSON() : mixed|null
- loadExternalXPath() : DOMXPath|null
- loadStorage() : EphemeralStorageInterface
- retrieve() : mixed|null
- retrieveDocument() : DOMDocument|null
- retrieveJSON() : mixed
- retrieveXML() : DOMNode|null
- sendTouch() : void
- setLogDirectory() : void
- setLogEnabled() : void
- setTouchOnExit() : void
- store() : bool
- storeDocument() : bool
- storeJSON() : bool
- storeXML() : bool
- _createLog() : void
- _DOMHelper() : DOMHelper
- _getHostFromURI() : mixed
- _getSchemeFromURI() : mixed
- _getStorageByURI() : EphemeralStorageInterface
- _hash() : string
- _httpOAuth() : string
- _httpOptions() : void
- _httpRequest() : XMLHttpRequest
- _name() : string
- _randomCheck() : bool
- randomly force-download an already existing resource
- getDBMSTable() : Table
- touch() : void
Properties
$cleanseTime
protected
int
$cleanseTime
$dbmsTable
protected
Table|null
$dbmsTable
= null
$dbName
protected
string
$dbName
= 'storage'
$dom
protected
static DOMHelper
$dom
$now
protected
int
$now
$storageList
protected
static array<string|int, mixed>
$storageList
= []
$tableName
protected
string
$tableName
= 'default'
$touchList
protected
array<string|int, mixed>
$touchList
Methods
__construct()
public
__construct([mixed $storageName = null ]) : mixed
Parameters
- $storageName : mixed = null
__destruct()
public
__destruct() : void
_getStorageNameFromURI()
public
static _getStorageNameFromURI(mixed $uri) : string
Parameters
- $uri : mixed
Tags
Return values
stringcleanse()
public
cleanse() : void
clearExternalDocument()
public
static clearExternalDocument(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : bool
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Tags
Return values
boolcron()
public
cron() : bool
Return values
booldelete()
public
delete(string $name) : bool
Parameters
- $name : string
Return values
boolexists()
public
exists(string $name, int $modifyTime) : bool
Parameters
- $name : string
- $modifyTime : int
Return values
boolgetLogDirectory()
public
static getLogDirectory() : string
Return values
stringgetLogEnabled()
public
static getLogEnabled() : bool
Return values
boolgetTouchOnExit()
public
static getTouchOnExit() : bool
Return values
boolinstall()
public
install() : void
loadExternalDocument()
public
static loadExternalDocument(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : DOMDocument|null
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Tags
Return values
DOMDocument|nullloadExternalFile()
public
static loadExternalFile(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : string|null
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Tags
Return values
string|nullloadExternalHeader()
public
static loadExternalHeader(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : array<string|int, mixed>|null
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Tags
Return values
array<string|int, mixed>|nullloadExternalJSON()
public
static loadExternalJSON(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : mixed|null
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Tags
Return values
mixed|nullloadExternalXPath()
public
static loadExternalXPath(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : DOMXPath|null
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Tags
Return values
DOMXPath|nullloadStorage()
public
static loadStorage(string $name) : EphemeralStorageInterface
Parameters
- $name : string
Return values
EphemeralStorageInterfaceretrieve()
public
retrieve(string $name, int $modifyTime) : mixed|null
Parameters
- $name : string
- $modifyTime : int
Return values
mixed|nullretrieveDocument()
public
retrieveDocument(string $name, int $modifyTime) : DOMDocument|null
Parameters
- $name : string
- $modifyTime : int
Return values
DOMDocument|nullretrieveJSON()
public
retrieveJSON(string $name, int $modifyTime) : mixed
Parameters
- $name : string
- $modifyTime : int
Tags
retrieveXML()
public
retrieveXML(string $name, int $modifyTime[, DOMDocument|null $targetDoc = null ]) : DOMNode|null
Parameters
- $name : string
- $modifyTime : int
- $targetDoc : DOMDocument|null = null
Return values
DOMNode|nullsendTouch()
public
sendTouch() : void
setLogDirectory()
public
static setLogDirectory(string $directory) : void
Parameters
- $directory : string
setLogEnabled()
public
static setLogEnabled(bool $value) : void
Parameters
- $value : bool
setTouchOnExit()
public
static setTouchOnExit(bool $value) : void
Parameters
- $value : bool
store()
public
store(string $name, string $payload, int $modifyTime) : bool
Parameters
- $name : string
- $payload : string
- $modifyTime : int
Return values
boolstoreDocument()
public
storeDocument(string $name, DOMDocument $dataDoc, int $modifyTime) : bool
Parameters
- $name : string
- $dataDoc : DOMDocument
- $modifyTime : int
Return values
boolstoreJSON()
public
storeJSON(string $name, mixed $dataObject, int $modifyTime) : bool
Parameters
- $name : string
- $dataObject : mixed
- $modifyTime : int
Return values
boolstoreXML()
public
storeXML(string $name, DOMNode $dataNode, int $modifyTime) : bool
Parameters
- $name : string
- $dataNode : DOMNode
- $modifyTime : int
Return values
bool_createLog()
protected
_createLog(mixed $method, mixed $name, mixed $ret) : void
Parameters
- $method : mixed
- $name : mixed
- $ret : mixed
_DOMHelper()
protected
static _DOMHelper() : DOMHelper
Return values
DOMHelper_getHostFromURI()
protected
static _getHostFromURI(mixed $uri) : mixed
Parameters
- $uri : mixed
_getSchemeFromURI()
protected
static _getSchemeFromURI(mixed $uri) : mixed
Parameters
- $uri : mixed
_getStorageByURI()
protected
static _getStorageByURI(string $uri) : EphemeralStorageInterface
Parameters
- $uri : string
Tags
Return values
EphemeralStorageInterface_hash()
protected
static _hash(string $name) : string
Parameters
- $name : string
Return values
string_httpOAuth()
protected
static _httpOAuth(array<string|int, mixed> $options, string $uri) : string
Parameters
- $options : array<string|int, mixed>
- $uri : string
Return values
string_httpOptions()
protected
static _httpOptions(mixed &$options) : void
Parameters
- $options : mixed
_httpRequest()
protected
static _httpRequest(array<string|int, mixed> $options, mixed $uri, mixed $data) : XMLHttpRequest
Parameters
- $options : array<string|int, mixed>
- $uri : mixed
- $data : mixed
Tags
Return values
XMLHttpRequest_name()
protected
static _name(array<string|int, mixed> $options, mixed $uri, mixed $data) : string
Parameters
- $options : array<string|int, mixed>
- $uri : mixed
- $data : mixed
Return values
string_randomCheck()
randomly force-download an already existing resource
protected
static _randomCheck() : bool
Return values
boolgetDBMSTable()
protected
getDBMSTable() : Table
Return values
Tabletouch()
protected
touch(int $id) : void
Parameters
- $id : int