The Inx_Api_Plugin_PluginStore is used by plug-ins for storing small amounts of data on the Inxmail Professional system.
The Inx_Api_Plugin_PluginStore is used by plug-ins for storing small amounts of data on the Inxmail Professional system. Each plug-in may only use its isolated storage, identified by the plug-in secret. The data is allocated using unique keys. <strong>Note:</strong> It is <strong>strongly recommended</strong> to upload a maximum of 1 MB of data. Uploading too much data may significantly reduce the performance of the server.
The following snippet shows how to upload an image to the plug-in store of a plug-in with the secret id "plug-in secret":
$oPluginStore = $oSession->getPluginStore(); $handle = fopen("test.png","r"); $oPluginStore->put("plug-in secret","test-image",$handle);
The following snippet shows how to download the previously uploaded image for saving and displaying:
$oPluginStore = $oSession->getPluginStore(); $oInputStream = $oPluginStore->get("plug-in secret", "test-image"); $validate = fopen("validate.png",'w') or die("can't open file"); while(($chunk = $oInputStream->read()) != -1) { fwrite($validate,$chunk); } fclose($validate); echo '<img src="validate.png">';
Located in /Api/Plugin/PluginStore.php (line 48)
Returns an Inx_Api_InputStream to download the data for the given key.
Returns an Inx_Api_InputStream to download the data for the given key.
Returns all keys which are stored for the given plug-in secret id.
Returns all keys which are stored for the given plug-in secret id.
Uploads data from a plug-in which needs to be stored in Inxmail Professional.
Uploads data from a plug-in which needs to be stored in Inxmail Professional. The data should be no bigger than 1 MB. Uploading more data is <strong>strongly discouraged</strong> as it may significantly reduce the performance of the server.
Removes the given key and its value from the plug-in store.
Removes the given key and its value from the plug-in store. Removing an unknown key will have no effect.
Removes all keys from the plug-in store for the given plug-in secret id.
Removes all keys from the plug-in store for the given plug-in secret id.
Documentation generated on Thu, 17 Sep 2015 14:27:28 +0200 by phpDocumentor 1.3.2