3
타사 API를 호출하는 번들을 만들었습니다.Symfony Profiler에 대한 로그 데이터
이제받은 데이터를 Symfony Profiler에 표시하고 싶습니다.
CustomDataCollector (http://symfony.com/doc/current/profiler/data_collector.html)를 만들었습니다. 그건 모두 잘 작동합니다. 하지만 어떻게 api에 대한 응답을 받거나 "저장"할 수 있습니까?
$raw_response = curl_exec($ch);
$response = json_decode($raw_response);
if (property_exists($response, 'error') && $response->errors) {
return ['status'=>false, 'msg'=> (string)$response->errors[0]->description ] ;
} else {
return ['status'=>true, 'msg' =>'Send Successfully' ];
}