xxxxxxxxxx
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for isMiejscowa StructType
* @subpackage Structs
*/
class IsMiejscowa extends AbstractStructBase
{
/**
* The trasaRequest
* Meta information extracted from the WSDL
* - maxOccurs: 500
* - minOccurs: 1
* @var TrasaRequestType[]
*/
public $trasaRequest;
/**
* Constructor method for isMiejscowa
* @uses IsMiejscowa::setTrasaRequest()
* @param TrasaRequestType[] $trasaRequest
*/
public function __construct(array $trasaRequest = array())
{
$this
->setTrasaRequest($trasaRequest);
}
/**
* Get trasaRequest value
* @return TrasaRequestType[]
*/
public function getTrasaRequest()
{
return $this->trasaRequest;
}
/**
* This method is responsible for validating the values passed to the setTrasaRequest method
* This method is willingly generated in order to preserve the one-line inline validation within the setTrasaRequest method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validateTrasaRequestForArrayConstraintsFromSetTrasaRequest(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $isMiejscowaTrasaRequestItem) {
// validation for constraint: itemType
if (!$isMiejscowaTrasaRequestItem instanceof TrasaRequestType) {
$invalidValues[] = is_object($isMiejscowaTrasaRequestItem) ? get_class($isMiejscowaTrasaRequestItem) : sprintf('%s(%s)', gettype($isMiejscowaTrasaRequestItem), var_export($isMiejscowaTrasaRequestItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The trasaRequest property can only contain items of type TrasaRequestType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set trasaRequest value
* @throws \InvalidArgumentException
* @param TrasaRequestType[] $trasaRequest
* @return IsMiejscowa
*/
public function setTrasaRequest(array $trasaRequest = array())
{
// validation for constraint: array
if ('' !== ($trasaRequestArrayErrorMessage = self::validateTrasaRequestForArrayConstraintsFromSetTrasaRequest($trasaRequest))) {
throw new \InvalidArgumentException($trasaRequestArrayErrorMessage, __LINE__);
}
// validation for constraint: maxOccurs(500)
if (is_array($trasaRequest) && count($trasaRequest) > 500) {
throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 500', count($trasaRequest)), __LINE__);
}
$this->trasaRequest = $trasaRequest;
return $this;
}
/**
* Add item to trasaRequest value
* @throws \InvalidArgumentException
* @param TrasaRequestType $item
* @return IsMiejscowa
*/
public function addToTrasaRequest(TrasaRequestType $item)
{
// validation for constraint: itemType
if (!$item instanceof TrasaRequestType) {
throw new \InvalidArgumentException(sprintf('The trasaRequest property can only contain items of type TrasaRequestType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
// validation for constraint: maxOccurs(500)
if (is_array($this->trasaRequest) && count($this->trasaRequest) >= 500) {
throw new \InvalidArgumentException(sprintf('You can\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 500', count($this->trasaRequest)), __LINE__);
}
$this->trasaRequest[] = $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