/** * @param LeDbData $data * @param LeDbTypeEnum $leDbEnum * @param array $formattedData */ public function setDbData(LeDbData $data, LeDbTypeEnum $leDbEnum, array $formattedData) { $accountId = $data->getAccountId(); $dsn = $data->getDsn(); $dbData = parent::getJsonDecodedData(); if (!array_key_exists($accountId, $dbData)) { $dbData[$accountId] = []; $dbData[$accountId][$dsn] = []; $dbData[$accountId][$dsn][$leDbEnum->getValue()] = []; } elseif (!array_key_exists($dsn, $dbData[$accountId])) { $dbData[$accountId][$dsn] = []; $dbData[$accountId][$dsn][$leDbEnum->getValue()] = []; } elseif (!array_key_exists($leDbEnum->getValue(), $dbData[$accountId][$dsn])) { $dbData[$accountId][$dsn][$leDbEnum->getValue()] = []; } if (LeDbTypeEnum::master() == $leDbEnum) { $dbData[$accountId][$dsn][$leDbEnum->getValue()] = $formattedData; } else { $dbData[$accountId][$dsn][$leDbEnum->getValue()][$formattedData['server']] = $formattedData; } parent::setJsonDecodedData($dbData); }
public function init(LeConfigData $data) { parent::init($data); }