HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.30
System: Linux iZj6c1151k3ad370bosnmsZ 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User: root (0)
PHP: 7.4.30
Disabled: NONE
Upload Files
File: /var/www/html/www.winghung.com/wp-content/plugins/conversational-forms/classes/api/response.php
<?php

/**
 * Response object all non-error REST API requests should return
 *
 * @package Caldera_Forms Modified by QuantumCloud
 * @author    Josh Pollock <Josh@CalderaWP.com>
 * @license   GPL-2.0+
 * @link
 * @copyright 2016 CalderaWP LLC
 */
class Qcformbuilder_Forms_API_Response extends \WP_REST_Response {

	/**
	 * @inheritdoc
	 *
	 * @since 1.4.4
	 */
	public function __construct( $data = null, $status = 200, $headers = array() ) {
		parent::__construct( $data, $status, $headers );
		if ( empty( $data ) ) {
			$this->set_status( 404 );
		}

	}

	public function set_total_header( $total ){
		$this->header( 'X-CF-API-TOTAL', (int) $total );
	}

	public function set_total_pages_header( $total_pages ){
		$this->header( 'X-CF-API-TOTAL-PAGES', (int) $total_pages );
	}


}