| Methods |
public
|
__construct()
Creates an instance of the store module.
Creates an instance of the store module.
The default constructor registers the store module with the
store manager by calling StoreManager::addStore() .
|
#
|
abstract
public
|
getStores(): array<string>
Returns the stores that are implemented by this
module.
Returns the stores that are implemented by this
module.
Returns
stores that are implemented by this
module
|
#
|
abstract
public
|
find(string $type, string $criteria, mixed $value): string|null
Finds an item with the specified type and search criteria.
The search criteria is defined by the store.
Finds an item with the specified type and search criteria.
The search criteria is defined by the store.
Parameters
| $type |
the item type
|
| $criteria |
the criteria name
|
| $value |
the criteria value
|
Returns
the item identifier or null if no item matches the
specified criteria
|
#
|
abstract
public
|
read(string $type, string $id): Storable|null
Parameters
| $type |
the item type
|
| $id |
the item identifier
|
Returns
the item or null if no item matches the
specified criteria
|
#
|
abstract
public
|
write(string $type, string $id, Storable $value): void
Parameters
| $type |
the item type
|
| $id |
the item identifier
|
| $value |
the item
|
|
#
|
abstract
public
|
delete(string $type, string $id): void
Parameters
| $type |
the item type
|
| $id |
the item identifier
|
|
#
|
abstract
public
|
exists(string $type, string $id): bool
Returns whether an item exists.
Returns whether an item exists.
Parameters
| $type |
the item type
|
| $id |
the item identifier
|
Returns
|
#
|
protected
|
equalsOrContainsValue(mixed $needle, mixed $haystack, ?string $id, array<mixed, mixed> &$index): bool
Returns whether $haystack contains or equals to $needle.
Returns whether $haystack contains or equals to $needle.
If $haystack is a scalar, then this function returns whether $needle equals
$haystack.
If $haystack is a list (i.e. an array of sequential integer keys), this
function returns whether a value of $haystack contains $needle.
If $haystack is an associative array, this function contains whether a key
of $haystack contains $needle.
Parameters
| $needle |
the value to find
|
| $haystack |
the item to search for the value
|
| $id |
the id to save cache information in
|
| $index |
cache
|
|
#
|