diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-16 21:32:22 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-16 21:38:38 -0400 |
commit | 62fd225cfb17129c74ca3aaa6a75ddffe6453a3f (patch) | |
tree | f09c676d5b3477a71c0b85f9d4f1625bf9a9e192 /app/Core/ObjectStorage/ObjectStorageInterface.php | |
parent | 8bc141a286c23e2d3581bbfb49032cb80f4b35f3 (diff) |
Add abstract storage layer
Diffstat (limited to 'app/Core/ObjectStorage/ObjectStorageInterface.php')
-rw-r--r-- | app/Core/ObjectStorage/ObjectStorageInterface.php | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/app/Core/ObjectStorage/ObjectStorageInterface.php b/app/Core/ObjectStorage/ObjectStorageInterface.php new file mode 100644 index 00000000..5440cf2b --- /dev/null +++ b/app/Core/ObjectStorage/ObjectStorageInterface.php @@ -0,0 +1,68 @@ +<?php + +namespace Core\ObjectStorage; + +/** + * Object Storage Interface + * + * @package ObjectStorage + * @author Frederic Guillot + */ +interface ObjectStorageInterface +{ + /** + * Fetch object contents + * + * @access public + * @param string $key + * @return string + */ + public function get($key); + + /** + * Save object + * + * @access public + * @param string $key + * @param string $blob + * @return string + */ + public function put($key, &$blob); + + /** + * Output directly object content + * + * @access public + * @param string $key + */ + public function passthru($key); + + /** + * Move local file to object storage + * + * @access public + * @param string $filename + * @param string $key + * @return boolean + */ + public function moveFile($filename, $key); + + /** + * Move uploaded file to object storage + * + * @access public + * @param string $filename + * @param string $key + * @return boolean + */ + public function moveUploadedFile($filename, $key); + + /** + * Remove object + * + * @access public + * @param string $key + * @return boolean + */ + public function remove($key); +} |