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:----R7jhJSMyYLmnp09RHwEKlHhp9TosUqAIXG//tGjiXYGFgOtiHa0th2sVk5YZZtpZJhb0j4vwruBxbnnzE+ATZzG5K1puKep9zM7RZb87+3oP8S9VCwcxhug8HjIuJEywv6qr+I+Vjy9ANRi52JvVxKkdtoCb7Cwb/XIf4iSAMVIs82bpLHCAybdZpATKreYRM7txpem2NXynzoKx14mgNG2oncgdbnxDUKtLusIApt61z0EV6AVpaTSOxyPFpOmlCmYuJHN5Vtuu4Ft+d+cuEehcvyVfLHc0Ia898/78VExYvVrl5bZKHZPMl8FewL2nmJFa7vs5zss0DZQ5gzDbiAWq2XsCcid0ROA/dBtkhNdn5sMjOQ/0bZ534lJ/KS5wS4Ri1d2fVxi9O0FxlhuH/NVBAzEdkkOk0rqSF332LjF1xsZDvOnS7LXcGT1Gh3YqLgpW6r/M4kL5gZYlHBX47oD+xQP53ixi6tyYQBMA3lmifk1JnObzZFCbOlMNKaJ2e0Uek9swYwM6hcpRDVG+l8KlochLK69fJLKX4LfDqELI56TIHgiAWjChBQ34mV5BvDvgEbcYCwiCh8gJUYKEpo9J+OxOY2wSnzayKMTe1DEsIO3RyL2bS8DMlufXGda5BFmTe3jJzB/BzMZqxz0YtU5yFdN9p8dPBfdNjfACfiw=----ATTACHMENT:----MzM5MzgzMjUxOTQwMDM2IDE5MDEyOTkzODczMzE5MDkgNzg1NDE2MzIwNTA2NDkxMA==