AbstractFilesystemStorage
in package
implements
FlexStorageInterface
AbstractYes
Class AbstractFilesystemStorage
Table of Contents
Interfaces
- FlexStorageInterface
- Defines Flex Storage layer.
Properties
- $caseSensitive : bool
- $dataFormatter : FileFormatterInterface
- $keyField : string
- $keyLen : int
Methods
- buildStorageKey() : string
- buildStorageKeyParams() : string
- extractKeysFromRow() : array<string|int, mixed>
- extractKeysFromStorageKey() : array<string|int, mixed>
- getKeyField() : string
- hasKeys() : array<string|int, bool>
- Check if the key exists in the storage.
- isIndexed() : bool
- normalizeKey() : string
- detectDataFormatter() : string|null
- generateKey() : string
- Generates a random, unique key for the row.
- getFile() : CompiledJsonFile|CompiledYamlFile|CompiledMarkdownFile
- initDataFormatter() : void
- resolvePath() : string
- validateKey() : bool
- Checks if a key is valid.
Properties
$caseSensitive
protected
bool
$caseSensitive
= true
$dataFormatter
protected
FileFormatterInterface
$dataFormatter
$keyField
protected
string
$keyField
= 'storage_key'
$keyLen
protected
int
$keyLen
= 32
Methods
buildStorageKey()
public
buildStorageKey(array<string|int, mixed> $keys[, bool $includeParams = true ]) : string
Parameters
- $keys : array<string|int, mixed>
- $includeParams : bool = true
Return values
stringbuildStorageKeyParams()
public
buildStorageKeyParams(array<string|int, mixed> $keys) : string
Parameters
- $keys : array<string|int, mixed>
Return values
stringextractKeysFromRow()
public
extractKeysFromRow(array<string|int, mixed> $row) : array<string|int, mixed>
Parameters
- $row : array<string|int, mixed>
Return values
array<string|int, mixed>extractKeysFromStorageKey()
public
extractKeysFromStorageKey(string $key) : array<string|int, mixed>
Parameters
- $key : string
Return values
array<string|int, mixed>getKeyField()
public
getKeyField() : string
Tags
Return values
stringhasKeys()
Check if the key exists in the storage.
public
hasKeys(array<string|int, mixed> $keys) : array<string|int, bool>
Parameters
- $keys : array<string|int, mixed>
-
Storage key of an object.
Tags
Return values
array<string|int, bool> —Returns keys with true if the key exists in the storage, false otherwise.
isIndexed()
public
isIndexed() : bool
Return values
boolnormalizeKey()
public
normalizeKey(string $key) : string
Parameters
- $key : string
Return values
stringdetectDataFormatter()
protected
detectDataFormatter(string $filename) : string|null
Parameters
- $filename : string
Return values
string|nullgenerateKey()
Generates a random, unique key for the row.
protected
generateKey() : string
Return values
stringgetFile()
protected
getFile(string $filename) : CompiledJsonFile|CompiledYamlFile|CompiledMarkdownFile
Parameters
- $filename : string
Return values
CompiledJsonFile|CompiledYamlFile|CompiledMarkdownFileinitDataFormatter()
protected
initDataFormatter(string|array<string|int, mixed> $formatter) : void
Parameters
- $formatter : string|array<string|int, mixed>
resolvePath()
protected
resolvePath(string $path) : string
Parameters
- $path : string
Return values
stringvalidateKey()
Checks if a key is valid.
protected
validateKey(string $key) : bool
Parameters
- $key : string