init(); return; } $entityArray = is_object($entity) ? get_object_vars($entity) : $entity; foreach ($entityArray as $key => $value) { $this->{$key} = $value; } $this->migrate(); } public function init(): self { return $this; } private function migrate(): self { return $this; } }