HEX
Server: Apache
System: Linux efa57bbe-abb1-400d-2985-3b056fbc2701.secureserver.net 6.1.147-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 24 12:33:32 EDT 2025 x86_64
User: root (0)
PHP: 8.0.30.4
Disabled: NONE
Upload Files
File: /var/www/wp-content/mu-plugins/vendor/godaddy/mwc-core/src/Http/EventBridgeRequest.php
<?php

namespace GoDaddy\WordPress\MWC\Core\Http;

use Exception;
use GoDaddy\WordPress\MWC\Common\Helpers\ArrayHelper;
use GoDaddy\WordPress\MWC\Common\Helpers\DeprecationHelper;
use GoDaddy\WordPress\MWC\Common\Http\Request;

/**
 * The event bridge request representation.
 *
 * @deprecated
 */
class EventBridgeRequest extends Request
{
    /** @var string the ID of the site */
    public $siteId;

    /**
     * Sets the site ID.
     *
     * @deprecated
     *
     * @param string $siteId the ID of the site
     * @return $this
     * @throws Exception
     */
    public function setSiteId(string $siteId) : Request
    {
        DeprecationHelper::deprecatedFunction(__METHOD__, '3.3.1');

        $this->siteId = $siteId;

        $this->headers($this->headers);

        return $this;
    }

    /**
     * Sets Request headers.
     *
     * @deprecated
     *
     * @param array|null $additionalHeaders
     * @return $this
     * @throws Exception
     */
    public function headers($additionalHeaders = []) : Request
    {
        DeprecationHelper::deprecatedFunction(__METHOD__, '3.3.1');

        parent::setHeaders(ArrayHelper::combine($additionalHeaders, ['X-Site-ID' => $this->siteId]));

        return $this;
    }
}