Cleanup RainLoop\Api

This commit is contained in:
the-djmaze 2022-05-19 15:18:30 +02:00
parent 7c8039d91d
commit 6d3de4d691

View file

@ -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;