public function getMappingsArray() { $res = array(); if (property_exists($this, 'AppointmentMappingItems')) { foreach ($this->AppointmentMappingItems as $item) { $res[$item->Key] = $item->Value; } } return $res; }