GC_HTTP_Response::__construct()

最后更新于:2021-12-01 11:10:50

GC_( mixed$data=null, int$status=200, array$headers=array())

Constructor.

参数

$data

(mixed) (Optional) Response data.

Default value: null

$status

(int) (Optional) HTTP status code.

Default value: 200

$headers

(array) (Optional) HTTP header map.

Default value: array()

源文件

文件: gc-includes/class-gc-http-response.php

	public function __construct( $data = null, $status = 200, $headers = array() ) {
		$this->set_data( $data );
		$this->set_status( $status );
		$this->set_headers( $headers );
	}