xxxxxxxxxx
namespace GQ_\Arrays;
use \WsdlToPhp\PackageBase\AbstractStructArrayBase;
/**
* This class stands for ArrayOfGroupData Arrays
* Meta information extracted from the WSDL
* - nillable: true
* - type: tns:ArrayOfGroupData
* @package GQ_
* @subpackage Arrays
*/
class GQ_ArrayOfGroupData extends AbstractStructArrayBase
{
/**
* The GroupData
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 0
* - nillable: true
* @var \GQ_\Structs\GQ_GroupData[]
*/
public $GroupData;
/**
* Constructor method for ArrayOfGroupData
* @uses GQ_ArrayOfGroupData::setGroupData()
* @param \GQ_\Structs\GQ_GroupData[] $groupData
*/
public function __construct(array $groupData = array())
{
$this
->setGroupData($groupData);
}
/**
* Get GroupData value
* An additional test has been added (isset) before returning the property value as
* this property may have been unset before, due to the fact that this property is
* removable from the request (nillable=true+minOccurs=0)
* @return \GQ_\Structs\GQ_GroupData[]|null
*/
public function getGroupData()
{
return isset($this->GroupData) ? $this->GroupData : null;
}
/**
* This method is responsible for validating the values passed to the setGroupData method
* This method is willingly generated in order to preserve the one-line inline validation within the setGroupData method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validateGroupDataForArrayConstraintsFromSetGroupData(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $arrayOfGroupDataGroupDataItem) {
// validation for constraint: itemType
if (!$arrayOfGroupDataGroupDataItem instanceof \GQ_\Structs\GQ_GroupData) {
$invalidValues[] = is_object($arrayOfGroupDataGroupDataItem) ? get_class($arrayOfGroupDataGroupDataItem) : sprintf('%s(%s)', gettype($arrayOfGroupDataGroupDataItem), var_export($arrayOfGroupDataGroupDataItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The GroupData property can only contain items of type \GQ_\Structs\GQ_GroupData, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set GroupData value
* This property is removable from request (nillable=true+minOccurs=0), therefore
* if the value assigned to this property is null, it is removed from this object
* @throws \InvalidArgumentException
* @param \GQ_\Structs\GQ_GroupData[] $groupData
* @return \GQ_\Arrays\GQ_ArrayOfGroupData
*/
public function setGroupData(array $groupData = array())
{
// validation for constraint: array
if ('' !== ($groupDataArrayErrorMessage = self::validateGroupDataForArrayConstraintsFromSetGroupData($groupData))) {
throw new \InvalidArgumentException($groupDataArrayErrorMessage, __LINE__);
}
if (is_null($groupData) || (is_array($groupData) && empty($groupData))) {
unset($this->GroupData);
} else {
$this->GroupData = $groupData;
}
return $this;
}
/**
* Add item to GroupData value
* @throws \InvalidArgumentException
* @param \GQ_\Structs\GQ_GroupData $item
* @return \GQ_\Arrays\GQ_ArrayOfGroupData
*/
public function addToGroupData(\GQ_\Structs\GQ_GroupData $item)
{
// validation for constraint: itemType
if (!$item instanceof \GQ_\Structs\GQ_GroupData) {
throw new \InvalidArgumentException(sprintf('The GroupData property can only contain items of type \GQ_\Structs\GQ_GroupData, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->GroupData[] = $item;
return $this;
}
/**
* Returns the current element
* @see AbstractStructArrayBase::current()
* @return \GQ_\Structs\GQ_GroupData|null
*/
public function current()
{
return parent::current();
}
/**
* Returns the indexed element
* @see AbstractStructArrayBase::item()
* @param int $index
* @return \GQ_\Structs\GQ_GroupData|null
*/
public function item($index)
{
return parent::item($index);
}
/**
* Returns the first element
* @see AbstractStructArrayBase::first()
* @return \GQ_\Structs\GQ_GroupData|null
*/
public function first()
{
return parent::first();
}
/**
* Returns the last element
* @see AbstractStructArrayBase::last()
* @return \GQ_\Structs\GQ_GroupData|null
*/
public function last()
{
return parent::last();
}
/**
* Returns the element at the offset
* @see AbstractStructArrayBase::offsetGet()
* @param int $offset
* @return \GQ_\Structs\GQ_GroupData|null
*/
public function offsetGet($offset)
{
return parent::offsetGet($offset);
}
/**
* Returns the attribute name
* @see AbstractStructArrayBase::getAttributeName()
* @return string GroupData
*/
public function getAttributeName()
{
return 'GroupData';
}
}
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