PHP Classes

File: tests/resources/generated/ValidAddRequest.php

Recommend this page to a friend!
  Classes of WsdlToPhp  >  PHP SOAP Package Generator  >  tests/resources/generated/ValidAddRequest.php  >  Download  
File: tests/resources/generated/ValidAddRequest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP SOAP Package Generator
Generate package to call SOAP services using WSDL
Author: By
Last change:
Date: 5 years ago
Size: 2,825 bytes
 

Contents

Class file image Download
<?php

namespace Api\StructType;

use \
WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for AddRequest StructType
 * @package Api
 * @subpackage Structs
 * @release 1.1.0
 */
class ApiAddRequest extends AbstractStructBase
{
   
/**
     * The AdGroups
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 1
     * @var \Api\StructType\ApiAdGroupAddItem[]
     */
   
public $AdGroups;
   
/**
     * Constructor method for AddRequest
     * @uses ApiAddRequest::setAdGroups()
     * @param \Api\StructType\ApiAdGroupAddItem[] $adGroups
     */
   
public function __construct(array $adGroups = array())
    {
       
$this
           
->setAdGroups($adGroups);
    }
   
/**
     * Get AdGroups value
     * @return \Api\StructType\ApiAdGroupAddItem[]
     */
   
public function getAdGroups()
    {
        return
$this->AdGroups;
    }
   
/**
     * Set AdGroups value
     * @throws \InvalidArgumentException
     * @param \Api\StructType\ApiAdGroupAddItem[] $adGroups
     * @return \Api\StructType\ApiAddRequest
     */
   
public function setAdGroups(array $adGroups = array())
    {
        foreach(
$adGroups as $item) {
            if (!
$item instanceof \Api\StructType\ApiAdGroupAddItem) {
                throw new \
InvalidArgumentException(sprintf('The AdGroups property can only contain items of \Api\StructType\ApiAdGroupAddItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
            }
        }
       
$this->AdGroups = $adGroups;
        return
$this;
    }
   
/**
     * Add item to AdGroups value
     * @throws \InvalidArgumentException
     * @param \Api\StructType\ApiAdGroupAddItem $item
     * @return \Api\StructType\ApiAddRequest
     */
   
public function addToAdGroups(\Api\StructType\ApiAdGroupAddItem $item)
    {
        if (!
$item instanceof \Api\StructType\ApiAdGroupAddItem) {
            throw new \
InvalidArgumentException(sprintf('The AdGroups property can only contain items of \Api\StructType\ApiAdGroupAddItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
       
$this->AdGroups[] = $item;
        return
$this;
    }
   
/**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \Api\StructType\ApiAddRequest
     */
   
public static function __set_state(array $array)
    {
        return
parent::__set_state($array);
    }
   
/**
     * Method returning the class name
     * @return string __CLASS__
     */
   
public function __toString()
    {
        return
__CLASS__;
    }
}

For more information send a message to info at phpclasses dot org.