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