Documentation

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
author

Daniel Schulz

since
2014-07-25

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

$dbName

protected string $dbName = 'storage'

$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

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
bool

delete()

public delete(string $name) : bool
Parameters
$name : string
Return values
bool

exists()

public exists(string $name, int $modifyTime) : bool
Parameters
$name : string
$modifyTime : int
Return values
bool

getLogDirectory()

public static getLogDirectory() : string
Return values
string

getLogEnabled()

public static getLogEnabled() : bool
Return values
bool

getTouchOnExit()

public static getTouchOnExit() : bool
Return values
bool

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|DOMDocument

loadExternalFile()

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|string

loadExternalHeader()

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|mixed

loadExternalXPath()

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|DOMXPath

retrieve()

public retrieve(string $name, int $modifyTime) : null|mixed
Parameters
$name : string
$modifyTime : int
Return values
null|mixed

retrieveDocument()

public retrieveDocument(string $name, int $modifyTime) : null|DOMDocument
Parameters
$name : string
$modifyTime : int
Return values
null|DOMDocument

retrieveJSON()

public retrieveJSON(string $name, int $modifyTime) : mixed
Parameters
$name : string
$modifyTime : int
Tags
throws
Exception

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|null

sendTouch()

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
bool

storeDocument()

public storeDocument(string $name, DOMDocument $dataDoc, int $modifyTime) : bool
Parameters
$name : string
$dataDoc : DOMDocument
$modifyTime : int
Return values
bool

storeJSON()

public storeJSON(string $name, mixed $dataObject, int $modifyTime) : bool
Parameters
$name : string
$dataObject : mixed
$modifyTime : int
Return values
bool

storeXML()

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

_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
bool

getDBMSTable()

protected getDBMSTable() : mixed

touch()

protected touch(int $id) : mixed
Parameters
$id : int
On this page

Search results