75 lines
1.1 KiB
PHP
75 lines
1.1 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace alveolata\storage;
|
||
|
|
||
|
// require_once(DIR_ALVEOLATA . '/definitions.php');
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @author Christian Fraß <frass@greenscale.de>
|
||
|
*/
|
||
|
interface interface_storage/*<type_key, type_value>*/
|
||
|
{
|
||
|
|
||
|
// type_key ~ string
|
||
|
// type_value ~ map<string,any>
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param type_value $value
|
||
|
* @return type_key key
|
||
|
* @author Christian Fraß <frass@greenscale.de>
|
||
|
*/
|
||
|
function create(
|
||
|
/*type_value */$value
|
||
|
)/* : type_key*/
|
||
|
;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param type_key $key
|
||
|
* @param type_value $value
|
||
|
* @author Christian Fraß <frass@greenscale.de>
|
||
|
*/
|
||
|
function update(
|
||
|
/*type_key */$key,
|
||
|
/*type_value */$value
|
||
|
) : void
|
||
|
;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param type_key $key
|
||
|
* @author Christian Fraß <frass@greenscale.de>
|
||
|
*/
|
||
|
function delete(
|
||
|
/*type_key */$key
|
||
|
) : void
|
||
|
;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param type_key $key
|
||
|
* @return type_value
|
||
|
* @author Christian Fraß <frass@greenscale.de>
|
||
|
*/
|
||
|
function read(
|
||
|
/*type_key*/ $key
|
||
|
)/* : type_value*/
|
||
|
;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param map<string,any> $parameters
|
||
|
* @return list<type_key>
|
||
|
* @author Christian Fraß <frass@greenscale.de>
|
||
|
*/
|
||
|
function search(
|
||
|
array $parameters
|
||
|
) : array
|
||
|
;
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|