diff --git a/lib/Data/AbstractData.php b/lib/Data/AbstractData.php index 8a52d1d7..0508bc02 100644 --- a/lib/Data/AbstractData.php +++ b/lib/Data/AbstractData.php @@ -28,12 +28,6 @@ abstract class AbstractData */ protected static $_instance = null; - protected static $_namespaces = array( - 'purge_limiter', - 'salt', - 'traffic_limiter', - ); - /** * Enforce singleton, disable constructor * diff --git a/lib/Data/Database.php b/lib/Data/Database.php index 607013ba..5a0f369e 100644 --- a/lib/Data/Database.php +++ b/lib/Data/Database.php @@ -423,6 +423,46 @@ class Database extends AbstractData ); } + /** + * Save a value. + * + * @access public + * @param string $value + * @param string $namespace + * @param string $key + * @return bool + */ + public function setValue($value, $namespace, $key = '') + { + switch ($namespace) { + case 'purge_limiter': + ; + break; + case 'salt': + ; + break; + case 'traffic_limiter': + ; + break; + default: + return false; + break; + } + } + + /** + * Load a value. + * + * @access public + * @param string $namespace + * @param string $key + * @return string + */ + public function getValue($namespace, $key = '') + { + + } + /** * Returns up to batch size number of paste ids that have expired * diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index fee61c10..76c2600b 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -251,7 +251,20 @@ class Filesystem extends AbstractData */ public function setValue($value, $namespace, $key = '') { - + switch ($namespace) { + case 'purge_limiter': + ; + break; + case 'salt': + ; + break; + case 'traffic_limiter': + ; + break; + default: + return false; + break; + } } /** diff --git a/lib/Data/GoogleCloudStorage.php b/lib/Data/GoogleCloudStorage.php index 1a1d8bf5..81fcce64 100644 --- a/lib/Data/GoogleCloudStorage.php +++ b/lib/Data/GoogleCloudStorage.php @@ -217,6 +217,46 @@ class GoogleCloudStorage extends AbstractData return $o->exists(); } + /** + * Save a value. + * + * @access public + * @param string $value + * @param string $namespace + * @param string $key + * @return bool + */ + public function setValue($value, $namespace, $key = '') + { + switch ($namespace) { + case 'purge_limiter': + ; + break; + case 'salt': + ; + break; + case 'traffic_limiter': + ; + break; + default: + return false; + break; + } + } + + /** + * Load a value. + * + * @access public + * @param string $namespace + * @param string $key + * @return string + */ + public function getValue($namespace, $key = '') + { + + } + /** * @inheritDoc */