xxxxxxxxxx
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for getPlacowkiPocztoweResponse StructType
* @subpackage Structs
*/
class GetPlacowkiPocztoweResponse extends AbstractStructBase
{
/**
* The placowka
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 1
* @var PlacowkaPocztowaType[]
*/
public $placowka;
/**
* Constructor method for getPlacowkiPocztoweResponse
* @uses GetPlacowkiPocztoweResponse::setPlacowka()
* @param PlacowkaPocztowaType[] $placowka
*/
public function __construct(array $placowka = array())
{
$this
->setPlacowka($placowka);
}
/**
* Get placowka value
* @return PlacowkaPocztowaType[]
*/
public function getPlacowka()
{
return $this->placowka;
}
/**
* This method is responsible for validating the values passed to the setPlacowka method
* This method is willingly generated in order to preserve the one-line inline validation within the setPlacowka method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validatePlacowkaForArrayConstraintsFromSetPlacowka(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $getPlacowkiPocztoweResponsePlacowkaItem) {
// validation for constraint: itemType
if (!$getPlacowkiPocztoweResponsePlacowkaItem instanceof PlacowkaPocztowaType) {
$invalidValues[] = is_object($getPlacowkiPocztoweResponsePlacowkaItem) ? get_class($getPlacowkiPocztoweResponsePlacowkaItem) : sprintf('%s(%s)', gettype($getPlacowkiPocztoweResponsePlacowkaItem), var_export($getPlacowkiPocztoweResponsePlacowkaItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The placowka property can only contain items of type PlacowkaPocztowaType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set placowka value
* @throws \InvalidArgumentException
* @param PlacowkaPocztowaType[] $placowka
* @return GetPlacowkiPocztoweResponse
*/
public function setPlacowka(array $placowka = array())
{
// validation for constraint: array
if ('' !== ($placowkaArrayErrorMessage = self::validatePlacowkaForArrayConstraintsFromSetPlacowka($placowka))) {
throw new \InvalidArgumentException($placowkaArrayErrorMessage, __LINE__);
}
$this->placowka = $placowka;
return $this;
}
/**
* Add item to placowka value
* @throws \InvalidArgumentException
* @param PlacowkaPocztowaType $item
* @return GetPlacowkiPocztoweResponse
*/
public function addToPlacowka(PlacowkaPocztowaType $item)
{
// validation for constraint: itemType
if (!$item instanceof PlacowkaPocztowaType) {
throw new \InvalidArgumentException(sprintf('The placowka property can only contain items of type PlacowkaPocztowaType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->placowka[] = $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