GroupId = $param["GroupId"]; } if (array_key_exists("Candidates",$param) and $param["Candidates"] !== null) { $this->Candidates = []; foreach ($param["Candidates"] as $key => $value){ $obj = new Candidate(); $obj->deserialize($value); array_push($this->Candidates, $obj); } } } }