$this->Methods, 'path' => $this->Path, 'class' => $this->Class ]; } /** * Constructs object from an array representation * * @param array $data * @return MethodConfiguration */ public static function fromArray(array $data): MethodConfiguration { $MethodConfigurationObject = new MethodConfiguration(); if(isset($data['methods'])) $MethodConfigurationObject->Methods = $data['methods']; if(isset($data['path'])) $MethodConfigurationObject->Path = $data['path']; if(isset($data['class'])) $MethodConfigurationObject->Class = $data['class']; return $MethodConfigurationObject; } }