Server : Apache
System : Linux webm011.cluster126.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User : alfamiffjq ( 77889)
PHP Version : 8.2.31
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Directory :  /home/alfamiffjq/www/alfamifwp/wp-content/plugins/elementor/core/utils/api/

📁 Create New:
⬆️ Upload File:
Current Dir [ Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: response-builder.php

Path: /home/alfamiffjq/www/alfamifwp/wp-content/plugins/elementor/core/utils/api/response-builder.php

Size: 855 B

Permissions: 0644

<?php

namespace Elementor\Core\Utils\Api;

class Response_Builder {
	private $data;
	private int $status;
	private array $meta = [];

	const NO_CONTENT = 204;

	private function __construct( $data, $status ) {
		$this->data = $data;
		$this->status = $status;
	}

	public static function make( $data = null, $status = 200 ) {
		return new self( $data, $status );
	}

	public function set_meta( array $meta ) {
		$this->meta = $meta;

		return $this;
	}

	public function set_status( int $status ) {
		$this->status = $status;

		return $this;
	}

	public function no_content() {
		return $this->set_status( static::NO_CONTENT );
	}

	public function build() {
		$res_data = static::NO_CONTENT === $this->status
			? null
			: [
				'data' => $this->data,
				'meta' => $this->meta,
			];

		return new \WP_REST_Response( $res_data, $this->status );
	}
}

← Back to Directory Edit File 🔒 Chmod

WP File Manager