From 9052e3c008b69bc50d0751431a393593e8f47ad9 Mon Sep 17 00:00:00 2001 From: ouyou Date: Tue, 14 Jan 2020 12:33:29 +0900 Subject: [PATCH] =?UTF-8?q?CSV=E3=83=86=E3=82=B9=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/Admin/Customer/CustomerController.php | 10 ++++++++-- src/Eccube/Util/EntityUtil.php | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Eccube/Controller/Admin/Customer/CustomerController.php b/src/Eccube/Controller/Admin/Customer/CustomerController.php index 7e3a9fba14a..37af7eacf42 100644 --- a/src/Eccube/Controller/Admin/Customer/CustomerController.php +++ b/src/Eccube/Controller/Admin/Customer/CustomerController.php @@ -298,18 +298,21 @@ public function export(Request $request) // データ行の出力. $this->csvExportService->setExportQueryBuilder($qb); $this->csvExportService->exportData(function ($entity, $csvService) use ($request) { + $Csvs = $csvService->getCsvs(); - /** @var $Customer \Eccube\Entity\Customer */ + /** @var \Eccube\Entity\Customer $Customer */ $Customer = $entity; $ExportCsvRow = new \Eccube\Entity\ExportCsvRow(); // CSV出力項目と合致するデータを取得. foreach ($Csvs as $Csv) { + // 会員データを検索. $ExportCsvRow->setData($csvService->getData($Csv, $Customer)); + /* $event = new EventArgs( [ 'csvService' => $csvService, @@ -320,6 +323,7 @@ public function export(Request $request) $request ); $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_CUSTOMER_CSV_EXPORT, $event); + */ $ExportCsvRow->pushData(); } @@ -327,6 +331,8 @@ public function export(Request $request) //$row[] = number_format(memory_get_usage(true)); // 出力. $csvService->fputcsv($ExportCsvRow->getRow()); + + echo '利用メモリ:' . memory_get_usage() . "\n"; }); }); @@ -337,7 +343,7 @@ public function export(Request $request) $response->send(); - log_info('会員CSVファイル名', [$filename]); + //log_info('会員CSVファイル名', [$filename]); return $response; } diff --git a/src/Eccube/Util/EntityUtil.php b/src/Eccube/Util/EntityUtil.php index 23e26215383..2f5f24b47e9 100644 --- a/src/Eccube/Util/EntityUtil.php +++ b/src/Eccube/Util/EntityUtil.php @@ -37,7 +37,7 @@ class EntityUtil */ public static function isEmpty($entity) { - @trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED); + //@trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED); if ($entity instanceof Proxy) { try { $entity->__load(); @@ -65,7 +65,7 @@ public static function isEmpty($entity) */ public static function isNotEmpty($entity) { - @trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED); + //@trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED); return !self::isEmpty($entity); }