Set options.
| Parameters: | array|Traversable|FilesystemOptions – |
|---|---|
| Return type: | Filesystem |
| See : |
Flush the whole storage
| Return type: | bool |
|---|
Remove items by given namespace
| Parameters: | string – |
|---|---|
| Throws ExceptionRuntimeException: | |
| Return type: | bool |
Remove items matching given prefix
| Parameters: | string – |
|---|---|
| Throws ExceptionRuntimeException: | |
| Return type: | bool |
Set tags to an item by given key. An empty array will remove all tags.
| Parameters: |
|
|---|---|
| Return type: | bool |
Get tags of an item by given key
| Parameters: | string – |
|---|---|
| Return type: | string[]|FALSE |
Remove items matching given tags.
If $disjunction only one of the given tags must match else all given tags must match.
| Parameters: |
|
|---|---|
| Return type: | bool |
Optimize the storage
| Return type: | bool |
|---|---|
| Return type: | ExceptionRuntimeException |
Get available space in bytes
| Return type: | int|float |
|---|
Get an item.
| Parameters: |
|
|---|---|
| Return type: | mixed Data on success, null on failure |
| Throws : | ExceptionExceptionInterface @triggers getItem.pre(PreEvent) |
@triggers getItem.post(PostEvent) @triggers getItem.exception(ExceptionEvent)
Get multiple items.
| Parameters: | array – |
|---|---|
| Return type: | array Associative array of keys and values |
| Throws : | ExceptionExceptionInterface @triggers getItems.pre(PreEvent) |
@triggers getItems.post(PostEvent) @triggers getItems.exception(ExceptionEvent)
Internal method to get an item.
| Parameters: |
|
|---|---|
| Return type: | mixed Data on success, null on failure |
| Throws : | ExceptionExceptionInterface |
Internal method to get multiple items.
| Parameters: | array – |
|---|---|
| Return type: | array Associative array of keys and values |
| Throws : | ExceptionExceptionInterface |
Test if an item exists.
| Parameters: | string – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers hasItem.pre(PreEvent) |
@triggers hasItem.post(PostEvent) @triggers hasItem.exception(ExceptionEvent)
Test multiple items.
| Parameters: | array – |
|---|---|
| Return type: | array Array of found keys |
| Throws : | ExceptionExceptionInterface @triggers hasItems.pre(PreEvent) |
@triggers hasItems.post(PostEvent) @triggers hasItems.exception(ExceptionEvent)
Internal method to test if an item exists.
| Parameters: | string – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface |
Get metadata
| Parameters: | string – |
|---|---|
| Return type: | array|bool Metadata on success, false on failure |
Get metadatas
| Parameters: |
|
|---|---|
| Return type: | array Associative array of keys and metadata |
Get info by key
| Parameters: | string – |
|---|---|
| Return type: | array|bool Metadata on success, false on failure |
Internal method to get multiple metadata
| Parameters: | array – |
|---|---|
| Return type: | array Associative array of keys and metadata |
| Throws : | ExceptionExceptionInterface |
Store an item.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers setItem.pre(PreEvent) |
@triggers setItem.post(PostEvent) @triggers setItem.exception(ExceptionEvent)
Store multiple items.
| Parameters: | array – |
|---|---|
| Return type: | array Array of not stored keys |
| Throws : | ExceptionExceptionInterface @triggers setItems.pre(PreEvent) |
@triggers setItems.post(PostEvent) @triggers setItems.exception(ExceptionEvent)
Add an item.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers addItem.pre(PreEvent) |
@triggers addItem.post(PostEvent) @triggers addItem.exception(ExceptionEvent)
Add multiple items.
| Parameters: | array – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers addItems.pre(PreEvent) |
@triggers addItems.post(PostEvent) @triggers addItems.exception(ExceptionEvent)
Replace an existing item.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers replaceItem.pre(PreEvent) |
@triggers replaceItem.post(PostEvent) @triggers replaceItem.exception(ExceptionEvent)
Replace multiple existing items.
| Parameters: | array – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers replaceItems.pre(PreEvent) |
@triggers replaceItems.post(PostEvent) @triggers replaceItems.exception(ExceptionEvent)
Internal method to store an item.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface |
Internal method to store multiple items.
| Parameters: | array – |
|---|---|
| Return type: | array Array of not stored keys |
| Throws : | ExceptionExceptionInterface |
Set an item only if token matches
It uses the token received from getItem() to check if the item has changed before overwriting it.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface |
| See : | |
| See : |
Internal method to set an item only if token matches
| Parameters: |
|
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface |
| See : | |
| See : |
Reset lifetime of an item
| Parameters: | string – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers touchItem.pre(PreEvent) |
@triggers touchItem.post(PostEvent) @triggers touchItem.exception(ExceptionEvent)
Reset lifetime of multiple items.
| Parameters: | array – |
|---|---|
| Return type: | array Array of not updated keys |
| Throws : | ExceptionExceptionInterface @triggers touchItems.pre(PreEvent) |
@triggers touchItems.post(PostEvent) @triggers touchItems.exception(ExceptionEvent)
Internal method to reset lifetime of an item
| Parameters: | string – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface |
Remove an item.
| Parameters: | string – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface @triggers removeItem.pre(PreEvent) |
@triggers removeItem.post(PostEvent) @triggers removeItem.exception(ExceptionEvent)
Remove multiple items.
| Parameters: | array – |
|---|---|
| Return type: | array Array of not removed keys |
| Throws : | ExceptionExceptionInterface @triggers removeItems.pre(PreEvent) |
@triggers removeItems.post(PostEvent) @triggers removeItems.exception(ExceptionEvent)
Internal method to remove an item.
| Parameters: | string – |
|---|---|
| Return type: | bool |
| Throws : | ExceptionExceptionInterface |
Internal method to get capabilities of this adapter
| Return type: | Capabilities |
|---|
Removes directories recursive by namespace
| Parameters: |
|
|---|---|
| Return type: | bool |
Get file spec of the given key and namespace
| Parameters: | string – |
|---|---|
| Return type: | string |
Read info file
| Parameters: |
|
|---|---|
| Return type: | array|bool The info array or false if file wasn’t found |
| Throws : | ExceptionRuntimeException |
Read a complete file
| Parameters: |
|
|---|---|
| Return type: | string |
| Throws : | ExceptionRuntimeException |
Prepares a directory structure for the given file(spec) using the configured directory level.
| Parameters: | string – |
|---|---|
| Return type: | void |
| Throws : | ExceptionRuntimeException |
Write content to a file
| Parameters: |
|
|---|---|
| Return type: | void |
| Throws : | ExceptionRuntimeException |
Unlink a file
| Parameters: | string – |
|---|---|
| Return type: | void @throw RuntimeException |