protected get_remote_data ( ) : object | ||
리턴 | object |
protected function get_remote_data()
{
// always use property if it's set
if (null !== $this->update_response) {
return $this->update_response;
}
// get cached remote data
$data = $this->get_cached_remote_data();
// if cache is empty or expired, call remote api
if ($data === false) {
$data = $this->call_remote_api();
}
$this->update_response = $data;
return $data;
}