1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77:
<?php
/**
* @author stev leibelt <artodeto@bazzline.net>
* @since 2015-04-12
*/
namespace Net\Bazzline\Component\Database\FileStorage\Storage;
/**
* Interface StorageInterface
*
* @package Net\Bazzline\Component\Database\FileStorage\Storage
*/
interface StorageInterface
{
/**
* @param array $data
* @param bool $resetRuntimeProperties
* @return string - unique identifier
*/
public function create(array $data, $resetRuntimeProperties = true);
/**
* @param bool $resetRuntimeProperties
* @return array
*/
public function readMany($resetRuntimeProperties = true);
/**
* @param bool $resetRuntimeProperties
* @return null|mixed - nothing or data
*/
public function readOne($resetRuntimeProperties = true);
/**
* @param array $data
* @param bool $resetRuntimeProperties
* @return boolean
*/
public function update(array $data, $resetRuntimeProperties = true);
/**
* @param bool $resetRuntimeProperties
* @return boolean
*/
public function delete($resetRuntimeProperties = true);
/**
* @param mixed $key
* @param mixed $value
* @return $this
*/
public function filterBy($key, $value);
/**
* @param mixed $id
* @return $this
*/
public function filterById($id);
/**
* @param int $count
* @param null|int $offset
* @return $this
*/
public function limitBy($count, $offset = null);
/**
* @param int $atLeast
* @param null|int $atMost
* @return bool
*/
public function has($atLeast = 1, $atMost = null);
public function resetRuntimeProperties();
}