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;
class Api
abstract class Api
{
function __construct()
{
}
public static function RunResult() : bool
{
return true;
}
/**
* @staticvar bool $bOne
*/
public static function Handle() : bool
{
static $bOne = null;
if (null === $bOne)
static $bOne = false;
if (!$bOne)
{
static::SetupDefaultMailSoConfig();
$bOne = static::RunResult();
$bOne = true;
}
return $bOne;
}
final public static function Actions() : Actions
public static function Actions() : Actions
{
static $oActions = null;
if (null === $oActions)
@ -153,10 +141,10 @@ class Api
$oStorageProvider->DeleteStorage($sEmail);
}
if (static::Actions()->AddressBookProvider() &&
static::Actions()->AddressBookProvider()->IsActive())
$oAddressBookProvider = static::Actions()->AddressBookProvider();
if ($oAddressBookProvider)
{
static::Actions()->AddressBookProvider()->DeleteAllContacts($sEmail);
$oAddressBookProvider->DeleteAllContacts($sEmail);
}
return true;