mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57:03 +03:00
New logic for storage provider (breaking changes)
This commit is contained in:
parent
44566aad4b
commit
51666d7c7e
19 changed files with 453 additions and 297 deletions
|
|
@ -18,15 +18,15 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|string|null $oAccount
|
||||
* @param \RainLoop\Model\Account|string|null $mAccount
|
||||
* @param int $iStorageType
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function verifyAccount($oAccount, $iStorageType)
|
||||
private function verifyAccount($mAccount, $iStorageType)
|
||||
{
|
||||
if (\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY !== $iStorageType &&
|
||||
!($oAccount instanceof \RainLoop\Model\Account || \is_string($oAccount)))
|
||||
!($mAccount instanceof \RainLoop\Model\Account || \is_string($mAccount)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -83,10 +83,20 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return $this->oDriver->Clear($oAccount, $iStorageType, $sKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|string $oAccount
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function DeleteStorage($oAccount)
|
||||
{
|
||||
return $this->oDriver->DeleteStorage($oAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -94,4 +104,13 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
{
|
||||
return $this->oDriver instanceof \RainLoop\Providers\Storage\StorageInterface;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsLocal()
|
||||
{
|
||||
return $this->oDriver instanceof \RainLoop\Providers\Storage\StorageInterface &&
|
||||
$this->oDriver->IsLocal();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue