HEX
Server: LiteSpeed
System: Linux srv1.dhviews.com 5.14.0-570.23.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jun 24 11:27:16 EDT 2025 x86_64
User: bdedition (1723)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //home/bdedition/www/core/vendor/messagebird/php-rest-api/src/MessageBird/Objects/Recipients.php
<?php

namespace MessageBird\Objects;

use stdClass;

/**
 * Class Recipients
 *
 * @package MessageBird\Objects
 */
class Recipients extends Base
{
    /**
     * @var int
     */
    public $totalCount;

    /**
     * @var int
     */
    public $totalSentCount;

    /**
     * @var int
     */
    public $totalDeliveredCount;

    /**
     * @var int
     */
    public $totalDeliveryFailedCount;

    /**
     * @var Recipient[]
     */
    public $items;

    /**
     * @deprecated 2.2.0 No longer used by internal code, please switch to {@see self::loadFromStdclass()}
     * 
     * @param $object
     *
     * @return $this|void
     */
    public function loadFromArray($object): self
    {
        parent::loadFromArray($object);

        foreach ($this->items as &$item) {
            $recipient = new Recipient();
            $recipient->loadFromArray($item);

            $item = $recipient;
        }

        return $this;
    }

    public function loadFromStdclass(stdClass $object): self
    {
        parent::loadFromStdclass($object);

        foreach ($this->items as &$item) {
            $recipient = new Recipient();
            $recipient->loadFromStdclass($item);

            $item = $recipient;
        }

        return $this;
    }
}