folding Persistance\TrafficLimiter into Data\Filesystem

This commit is contained in:
El RIDO 2021-06-08 07:49:22 +02:00
parent 3429d293d3
commit b5a6ce323e
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
8 changed files with 100 additions and 30 deletions

View file

@ -54,7 +54,7 @@ class Model
*/
public function getPaste($pasteId = null)
{
$paste = new Paste($this->_conf, $this->_getStore());
$paste = new Paste($this->_conf, $this->getStore());
if ($pasteId !== null) {
$paste->setId($pasteId);
}
@ -67,9 +67,9 @@ class Model
public function purge()
{
PurgeLimiter::setConfiguration($this->_conf);
PurgeLimiter::setStore($this->_getStore());
PurgeLimiter::setStore($this->getStore());
if (PurgeLimiter::canPurge()) {
$this->_getStore()->purge($this->_conf->getKey('batchsize', 'purge'));
$this->getStore()->purge($this->_conf->getKey('batchsize', 'purge'));
}
}
@ -78,7 +78,7 @@ class Model
*
* @return Data\AbstractData
*/
private function _getStore()
public function getStore()
{
if ($this->_store === null) {
$this->_store = forward_static_call(