Nextcloud PHP API (master)

IContextPortation

Interface IContextPortation

Occasionally an IEntity needs to be reused not in the same, but a new request. As IEntities receive custom context information during a flow cycle, sometimes it might be necessary to export context identifiers to be able to recreate the state at a later point. For example: handling translations in a notification INotifier.

Tags
since
20.0.0

Table of Contents

Methods

exportContextIDs()  : array<string|int, mixed>
All relevant context identifiers that are needed to restore the state of an entity shall be returned with this method. The resulting array must be JSON-serializable.
importContextIDs()  : void
This method receives the array as returned by `exportContextIDs()` in order to restore the state of the IEntity if necessary.

Methods

exportContextIDs()

All relevant context identifiers that are needed to restore the state of an entity shall be returned with this method. The resulting array must be JSON-serializable.

public exportContextIDs() : array<string|int, mixed>
Tags
since
20.0.0
Return values
array<string|int, mixed>

importContextIDs()

This method receives the array as returned by `exportContextIDs()` in order to restore the state of the IEntity if necessary.

public importContextIDs(array<string|int, mixed> $contextIDs) : void
Parameters
$contextIDs : array<string|int, mixed>
Tags
since
20.0.0

        
On this page

Search results