1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00
limesurvey_ynh/sources/application/libraries/PluginManager/Storage/iPluginStorage.php

34 lines
No EOL
1.6 KiB
PHP

<?php
interface iPluginStorage {
/**
* Returns plugin data.
* @param object $plugin The plugin object getting its data.
* @param string | null $key The storage key, if null will return all data for the plugin.
* @param string $model Name of a model in case its model specific plugin data, like for a specific question or survey.
* @param int $id Id of the model for which the data is retreived
* @param mixed $default The default value to use when none present
* @param string $language The optional language to use
* @return mixed The data stored.
*/
public function get(iPlugin $plugin, $key = null, $model = null, $id = null, $default = null, $language = null);
/**
* Stores plugin data.
* @param object $plugin The plugin object getting its data.
* @param string $key The storage key to identify the data.
* @param mixed $data The data to be stored, serialized using serialize.
* @param string $model Name of a model in case its model specific plugin data, like for a specific question or survey.
* @param int $id Id of the model for which the data is retreived
* @param string $language The optional language to use
*/
public function set (iPlugin $plugin, $key, $data, $model = null, $id = null, $language = null);
/**
* Constructor must not take argument.
* The constructor must be part of the interface since our Plugin factory
* calls it and thus must know its arguments.
*/
public function __construct();
}