mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup RainLoop\Api
This commit is contained in:
parent
7c8039d91d
commit
6d3de4d691
1 changed files with 8 additions and 20 deletions
|
|
@ -2,33 +2,21 @@
|
||||||
|
|
||||||
namespace RainLoop;
|
namespace RainLoop;
|
||||||
|
|
||||||
class Api
|
abstract class Api
|
||||||
{
|
{
|
||||||
|
|
||||||
function __construct()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function RunResult() : bool
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @staticvar bool $bOne
|
|
||||||
*/
|
|
||||||
public static function Handle() : bool
|
public static function Handle() : bool
|
||||||
{
|
{
|
||||||
static $bOne = null;
|
static $bOne = false;
|
||||||
if (null === $bOne)
|
if (!$bOne)
|
||||||
{
|
{
|
||||||
static::SetupDefaultMailSoConfig();
|
static::SetupDefaultMailSoConfig();
|
||||||
$bOne = static::RunResult();
|
$bOne = true;
|
||||||
}
|
}
|
||||||
return $bOne;
|
return $bOne;
|
||||||
}
|
}
|
||||||
|
|
||||||
final public static function Actions() : Actions
|
public static function Actions() : Actions
|
||||||
{
|
{
|
||||||
static $oActions = null;
|
static $oActions = null;
|
||||||
if (null === $oActions)
|
if (null === $oActions)
|
||||||
|
|
@ -153,10 +141,10 @@ class Api
|
||||||
$oStorageProvider->DeleteStorage($sEmail);
|
$oStorageProvider->DeleteStorage($sEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (static::Actions()->AddressBookProvider() &&
|
$oAddressBookProvider = static::Actions()->AddressBookProvider();
|
||||||
static::Actions()->AddressBookProvider()->IsActive())
|
if ($oAddressBookProvider)
|
||||||
{
|
{
|
||||||
static::Actions()->AddressBookProvider()->DeleteAllContacts($sEmail);
|
$oAddressBookProvider->DeleteAllContacts($sEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue