HEX
Server: LiteSpeed
System: Linux node612.namehero.net 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: dfwparty (1186)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: /home/dfwparty/santabootshop.com/wp-content/mu-plugins/wp-toolkit/UI/includes/Dto/UrlsParams.php
<?php
// Copyright 1999-2026. WebPros International GmbH. All rights reserved.

namespace Webpros\WptkWpPlugin\WpToolkit\UI\Dto;

final class UrlsParams implements \JsonSerializable
{
    /**
     * @var string
     */
    private $restApiUrl;

    /**
     * @var PageParams[]
     */
    private $pages = [];

    /**
     * @param string       $restApiUrl
     * @param PageParams[] $pages
     */
    public function __construct($restApiUrl, $pages = [])
    {
        $this->restApiUrl = $restApiUrl;
        foreach ($pages as $pageParams) {
            $this->pages[] = $pageParams;
        }
    }

    /**
     * @return self
     */
    public function addPage(PageParams $pageParams)
    {
        $this->pages[] = $pageParams;

        return $this;
    }

    /**
     * @return array<string, mixed>
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return [
            'restApiUrl' => $this->restApiUrl,
            'pages' => $this->pages
        ];
    }
}