From 612dc03a804f2dabffef2b308b14c7b3cc019b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 21 Oct 2024 09:00:29 +0900 Subject: [PATCH] cfmgrv4 init...3 --- app/Services/Cloudflare/Account.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Services/Cloudflare/Account.php b/app/Services/Cloudflare/Account.php index 35e3487..394f63d 100644 --- a/app/Services/Cloudflare/Account.php +++ b/app/Services/Cloudflare/Account.php @@ -61,11 +61,13 @@ class Account extends Cloudflare log_message("notice", "\n----------Auth {$this->getAuthEntity()->getTitle()}의 Account 처리 시작-----------"); $entitys = []; try { - $results = $this->reload_procedure("accounts"); - if (count($results) > 0) { - foreach ($results as $result) { - $formDatas = $this->getArrayByResult($result); - $entitys[$formDatas[AccountModel::PK]] = $this->getModel()->modify(new AccountEntity(), $formDatas); + $results_array = $this->reload_procedure("accounts"); + if (count(value: $results_array) > 0) { + foreach ($results_array as $results) { + foreach ($results as $result) { + $formDatas = $this->getArrayByResult($result); + $entitys[$formDatas[AccountModel::PK]] = $this->getModel()->modify(new AccountEntity(), $formDatas); + } } //부모키를 기준으로 CF에 존재하지 않는 데이터 삭제용 $this->getModel()->where(AccountModel::PARENT, $this->getAuthEntity()->getPK());