Yii Webservice Array Define

Hi,

In a webservice i need to use an array as a input and define the keys of array.I saw from a forum that creating a class for the array elements can do this thing.Like




class WebServiceData

{

	/**

	 * @var string	username of customer

	 * @soap

	 */

	public $username;


	/**

	 * @var integer

	 * @soap

	 */

	public $age;




}



and my server function I defined this as,




/**

 * Add member in to SugarCRM table

 * @param WebServiceData

 * @return object

 * @soap

 */



this works correctly.But my problem is do I need to create each one class, to define many arrays

Also need to know how to define maxOccurs, minOccurs

Found ansr for this: Actualy I tried this




class WebServiceData

{

	/**

	 * @var string {minOccurs=0, maxOccurs = 1}

	 * @soap

	 */

	public $username;


	/**

	 * @var string

	 * @soap

	 */

	public $age;


}

This ({minOccurs=0, maxOccurs = 1}) won’t work in Yii-1.1.12. It added in Yii-1.1.13. Or if you still need to use Yii-1.1.12 then you can follow this.