/** * Logs API requests * If @param task_library_found == FALSE the no. of records returned is 0 * * @param bool $task_library_found */ private function _log_api_request($task_library_found) { // Log the API request $this->api_logger = new Api_Log_Model(); $this->api_logger->api_task = strtolower($this->task_name); $this->api_logger->api_parameters = $this->api_parameters; $this->api_logger->api_ipaddress = $this->request_ip_address; $this->api_logger->api_records = $task_library_found ? $this->api_object->get_record_count() : 0; $this->api_logger->api_date = date('Y-m-d H:i:s', time()); $this->api_logger->save(); }