xxxxxxxxxx
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for getEnvelopeBuforResponse StructType
* @subpackage Structs
*/
class GetEnvelopeBuforResponse extends AbstractStructBase
{
/**
* The przesylka
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 0
* @var PrzesylkaType[]
*/
public $przesylka;
/**
* The error
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 0
* @var ErrorType[]
*/
public $error;
/**
* Constructor method for getEnvelopeBuforResponse
* @uses GetEnvelopeBuforResponse::setPrzesylka()
* @uses GetEnvelopeBuforResponse::setError()
* @param PrzesylkaType[] $przesylka
* @param ErrorType[] $error
*/
public function __construct(array $przesylka = array(), array $error = array())
{
$this
->setPrzesylka($przesylka)
->setError($error);
}
/**
* Get przesylka value
* @return PrzesylkaType[]|null
*/
public function getPrzesylka()
{
return $this->przesylka;
}
/**
* This method is responsible for validating the values passed to the setPrzesylka method
* This method is willingly generated in order to preserve the one-line inline validation within the setPrzesylka method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validatePrzesylkaForArrayConstraintsFromSetPrzesylka(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $getEnvelopeBuforResponsePrzesylkaItem) {
// validation for constraint: itemType
if (!$getEnvelopeBuforResponsePrzesylkaItem instanceof PrzesylkaType) {
$invalidValues[] = is_object($getEnvelopeBuforResponsePrzesylkaItem) ? get_class($getEnvelopeBuforResponsePrzesylkaItem) : sprintf('%s(%s)', gettype($getEnvelopeBuforResponsePrzesylkaItem), var_export($getEnvelopeBuforResponsePrzesylkaItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The przesylka property can only contain items of type PrzesylkaType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set przesylka value
* @throws \InvalidArgumentException
* @param PrzesylkaType[] $przesylka
* @return GetEnvelopeBuforResponse
*/
public function setPrzesylka(array $przesylka = array())
{
// validation for constraint: array
if ('' !== ($przesylkaArrayErrorMessage = self::validatePrzesylkaForArrayConstraintsFromSetPrzesylka($przesylka))) {
throw new \InvalidArgumentException($przesylkaArrayErrorMessage, __LINE__);
}
$this->przesylka = $przesylka;
return $this;
}
/**
* Add item to przesylka value
* @throws \InvalidArgumentException
* @param PrzesylkaType $item
* @return GetEnvelopeBuforResponse
*/
public function addToPrzesylka(PrzesylkaType $item)
{
// validation for constraint: itemType
if (!$item instanceof PrzesylkaType) {
throw new \InvalidArgumentException(sprintf('The przesylka property can only contain items of type PrzesylkaType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->przesylka[] = $item;
return $this;
}
/**
* Get error value
* @return ErrorType[]|null
*/
public function getError()
{
return $this->error;
}
/**
* This method is responsible for validating the values passed to the setError method
* This method is willingly generated in order to preserve the one-line inline validation within the setError method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validateErrorForArrayConstraintsFromSetError(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $getEnvelopeBuforResponseErrorItem) {
// validation for constraint: itemType
if (!$getEnvelopeBuforResponseErrorItem instanceof ErrorType) {
$invalidValues[] = is_object($getEnvelopeBuforResponseErrorItem) ? get_class($getEnvelopeBuforResponseErrorItem) : sprintf('%s(%s)', gettype($getEnvelopeBuforResponseErrorItem), var_export($getEnvelopeBuforResponseErrorItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The error property can only contain items of type ErrorType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set error value
* @throws \InvalidArgumentException
* @param ErrorType[] $error
* @return GetEnvelopeBuforResponse
*/
public function setError(array $error = array())
{
// validation for constraint: array
if ('' !== ($errorArrayErrorMessage = self::validateErrorForArrayConstraintsFromSetError($error))) {
throw new \InvalidArgumentException($errorArrayErrorMessage, __LINE__);
}
$this->error = $error;
return $this;
}
/**
* Add item to error value
* @throws \InvalidArgumentException
* @param ErrorType $item
* @return GetEnvelopeBuforResponse
*/
public function addToError(ErrorType $item)
{
// validation for constraint: itemType
if (!$item instanceof ErrorType) {
throw new \InvalidArgumentException(sprintf('The error property can only contain items of type ErrorType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->error[] = $item;
return $this;
}
}
Don't be shy, don't hesitate to contact us for any subject, we'll be glad to help.
This platform is provided to give developpers and non developpers a way to easily consume SOAP Web Services or share their own SOAP Web Services with extra features powered by the platform.
© 2025 Providr.IO