<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for createEnvelopeBufor StructType
 * @subpackage Structs
 */
class CreateEnvelopeBufor extends AbstractStructBase
{
    /**
     * The bufor
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 1
     * @var BuforType[]
     */
    public $bufor;
    /**
     * Constructor method for createEnvelopeBufor
     * @uses CreateEnvelopeBufor::setBufor()
     * @param BuforType[] $bufor
     */
    public function __construct(array $bufor = array())
    {
        $this
            -&gt;setBufor($bufor);
    }
    /**
     * Get bufor value
     * @return BuforType[]
     */
    public function getBufor()
    {
        return $this-&gt;bufor;
    }
    /**
     * This method is responsible for validating the values passed to the setBufor method
     * This method is willingly generated in order to preserve the one-line inline validation within the setBufor method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateBuforForArrayConstraintsFromSetBufor(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $createEnvelopeBuforBuforItem) {
            // validation for constraint: itemType
            if (!$createEnvelopeBuforBuforItem instanceof BuforType) {
                $invalidValues[] = is_object($createEnvelopeBuforBuforItem) ? get_class($createEnvelopeBuforBuforItem) : sprintf('%s(%s)', gettype($createEnvelopeBuforBuforItem), var_export($createEnvelopeBuforBuforItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The bufor property can only contain items of type BuforType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set bufor value
     * @throws \InvalidArgumentException
     * @param BuforType[] $bufor
     * @return CreateEnvelopeBufor
     */
    public function setBufor(array $bufor = array())
    {
        // validation for constraint: array
        if ('' !== ($buforArrayErrorMessage = self::validateBuforForArrayConstraintsFromSetBufor($bufor))) {
            throw new \InvalidArgumentException($buforArrayErrorMessage, __LINE__);
        }
        $this-&gt;bufor = $bufor;
        return $this;
    }
    /**
     * Add item to bufor value
     * @throws \InvalidArgumentException
     * @param BuforType $item
     * @return CreateEnvelopeBufor
     */
    public function addToBufor(BuforType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof BuforType) {
            throw new \InvalidArgumentException(sprintf('The bufor property can only contain items of type BuforType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this-&gt;bufor[] = $item;
        return $this;
    }
}
</pre></body></html>