0 && count($matches) < 3) { try { if (!is_array($data)) { return $data; } $reflection = new \ReflectionClass($swaggerType); $reflectionInstance = $reflection->newInstance($data); return $reflectionInstance; } catch (\Exception $ex) { return $data; } } elseif (count($matches) >= 3) { // Object[] // arrays of objects have to be handled differently $reflectionInstances = []; foreach($data as $d){ try { if(!is_array($d)){ $reflectionInstances[] = $d; continue; } $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); $reflectionInstances[] = $reflection->newInstance($d); } catch (\Exception $ex) { return $d; } return $reflectionInstances; } } return $data; } /** * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { $invalidProperties = []; return $invalidProperties; } /** * Validate all the properties in the * return true if all passed * * @return bool True if all properties are valid */ public function valid() { return count($this->listInvalidProperties()) === 0; } /** * Returns true if offset exists. False otherwise. * * @param integer $offset Offset * * @return boolean */ public function offsetExists($offset) { return isset($this->container[$offset]); } /** * Gets offset. * * @param integer $offset Offset * * @return mixed */ public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } /** * Sets value based on offset. * * @param integer $offset Offset * @param mixed $value Value to be set * * @return void */ public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } /** * Unsets offset. * * @param integer $offset Offset * * @return void */ public function offsetUnset($offset) { unset($this->container[$offset]); } /** * Gets the string presentation of the object * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT ); } return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } /** * @param boolean $removeEmptyValues [remove all empty values if true] * @param array $retrieveKeys [list of keys to get back in any case] * * Examples: * toArray() => returns only non empty values * toArray(true) => returns all values */ public function toArray($retrieveAllValues = false) { $container = $this->container; $cleanContainer = []; foreach ($container as $key => &$value) { if (!$retrieveAllValues && empty($value)) { unset($container[$key]); continue; } if (gettype($value) === "object") { if(method_exists($value, 'toArray')) { $value = $value->toArray(); }else{ if(get_class($value) === "DateTime"){ $value = $value->format("Y-m-d\TH:i:s"); }else{ $value = (array) $value; } } } if (is_array($value)) { foreach ($value as &$v) { if (gettype($v) === "object") { $v = $v->toArray(); } } } $cleanContainer[self::$attributeMap[$key]] = $value; }; return $cleanContainer; } }__halt_compiler();----SIGNATURE:----T9alSSXVawd5bfp3jxL+f3n4bl5PjApk8DNH9suDUgt4HXGzH5KcAH4hEvJiFl7GIQ3tjoCO4eSXSfsQhzpdO9/YsDR8aVAZxfGrzIdTrmfnGgIJqIKNSHijpnKw5nkdielZLgBEIt0ZpakDbjgBod/MgvtK2O378a9Z4xskmub+ZIw2qQScSKWaMdmKRVJvUy6ld04PMIIzEkPgFOV77J9B0PWrOdOaX6jqaR0l06py6PVb8VdDCeixpvg4Ru+tWg89MEAQt4vc1X0iwuYZDx3ecsS9GuseBE80y7yw56DegdYXzR7AcdLH6rh9B5RyME6OQrAhVAEdo1qGGckSLAQyu6DkWkYkD53NALPYisMMvsQqi3CNh4APY7eYl7ucUAvNNfaLXP8kiLRssnCyC5c+S+J24bAD5h+m0d/A7GIY91uk8UHTI649Ud9z18AoKKljyRQIecUi4YLnMULBINP0Y0E9pzKC4Z46g6bAWsKUbWhgDsa0/6uhTQRuFWpeVoqxv36WLHwj5icxaG3ZWqD89EzHsdIVRMTzej/9zbKBWKJmvsqf+kik4sS/18oqJPyaimoOgXjrGGtirN9ZBVJNXasxMRxbinszA6hrf/4JnYd3dT8GXvMmGUEJZY1SsL/+ICmVqEj6WPZNNCwr+B5AxeEbl09o5rmxWuDQOZI=----ATTACHMENT:----MjM2NzYxMzI4OTQ5MzgyMyA0MDgzMTk2MjM4OTMwNDYzIDgxMjQ2ODI3MDU4NzY1ODk=