Storage
in package
implements
EphemeralStorageInterface
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
- Defines a data repository with built-in decay.
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() : mixed
- _getStorageNameFromURI() : mixed
- cleanse() : mixed
- clearExternalDocument() : bool
- cron() : mixed
- delete() : bool
- exists() : bool
- getLogDirectory() : string
- getLogEnabled() : bool
- getTouchOnExit() : bool
- install() : void
- loadExternalDocument() : null|DOMDocument
- loadExternalFile() : null|string
- loadExternalHeader() : null|array<string|int, mixed>
- loadExternalJSON() : null|mixed
- loadExternalXPath() : null|DOMXPath
- loadStorage() : EphemeralStorageInterface
- retrieve() : null|mixed
- retrieveDocument() : null|DOMDocument
- retrieveJSON() : mixed
- retrieveXML() : DOMNode|null
- sendTouch() : mixed
- setLogDirectory() : mixed
- setLogEnabled() : mixed
- setTouchOnExit() : mixed
- store() : bool
- storeDocument() : bool
- storeJSON() : bool
- storeXML() : bool
- _createLog() : mixed
- _DOMHelper() : mixed
- _getHostFromURI() : mixed
- _getSchemeFromURI() : mixed
- _getStorageByURI() : EphemeralStorageInterface
- _hash() : string
- _httpOAuth() : mixed
- _httpOptions() : mixed
- _httpRequest() : mixed
- _name() : mixed
- _randomCheck() : bool
- randomly force-download an already existing resource
- getDBMSTable() : mixed
- touch() : mixed
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() : mixed
_getStorageNameFromURI()
public
static _getStorageNameFromURI(mixed $uri) : mixed
Parameters
- $uri : mixed
cleanse()
public
cleanse() : mixed
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
Return values
boolcron()
public
cron() : mixed
delete()
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 ]) : null|DOMDocument
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Return values
null|DOMDocumentloadExternalFile()
public
static loadExternalFile(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : null|string
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Return values
null|stringloadExternalHeader()
public
static loadExternalHeader(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : null|array<string|int, mixed>
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Return values
null|array<string|int, mixed>loadExternalJSON()
public
static loadExternalJSON(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : null|mixed
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Return values
null|mixedloadExternalXPath()
public
static loadExternalXPath(string $uri[, int $cacheTime = null ][, mixed $data = null ][, mixed $options = null ]) : null|DOMXPath
Parameters
- $uri : string
- $cacheTime : int = null
- $data : mixed = null
- $options : mixed = null
Return values
null|DOMXPathloadStorage()
public
static loadStorage(string $name) : EphemeralStorageInterface
Parameters
- $name : string
Return values
EphemeralStorageInterfaceretrieve()
public
retrieve(string $name, int $modifyTime) : null|mixed
Parameters
- $name : string
- $modifyTime : int
Return values
null|mixedretrieveDocument()
public
retrieveDocument(string $name, int $modifyTime) : null|DOMDocument
Parameters
- $name : string
- $modifyTime : int
Return values
null|DOMDocumentretrieveJSON()
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() : mixed
setLogDirectory()
public
static setLogDirectory(string $directory) : mixed
Parameters
- $directory : string
setLogEnabled()
public
static setLogEnabled(bool $value) : mixed
Parameters
- $value : bool
setTouchOnExit()
public
static setTouchOnExit(bool $value) : mixed
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) : mixed
Parameters
- $method : mixed
- $name : mixed
- $ret : mixed
_DOMHelper()
protected
static _DOMHelper() : mixed
_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) : mixed
Parameters
- $options : array<string|int, mixed>
- $uri : string
_httpOptions()
protected
static _httpOptions(mixed &$options) : mixed
Parameters
- $options : mixed
_httpRequest()
protected
static _httpRequest(array<string|int, mixed> $options, mixed $uri, mixed $data) : mixed
Parameters
- $options : array<string|int, mixed>
- $uri : mixed
- $data : mixed
_name()
protected
static _name(array<string|int, mixed> $options, mixed $uri, mixed $data) : mixed
Parameters
- $options : array<string|int, mixed>
- $uri : mixed
- $data : mixed
_randomCheck()
randomly force-download an already existing resource
protected
static _randomCheck() : bool
Return values
boolgetDBMSTable()
protected
getDBMSTable() : mixed
touch()
protected
touch(int $id) : mixed
Parameters
- $id : int